HL7 parser with segment code generator in C