|LEX/YACC EDI Translator? firstname.lastname@example.org (1997-05-22)|
|Re: LEX/YACC EDI Translator? email@example.com (1997-05-25)|
|From:||firstname.lastname@example.org (M Sweger)|
|Date:||22 May 1997 22:14:53 -0400|
|Organization:||DataHaven Project, Inc (http://www.dhp.com)|
I'm wondering if the Lex/Yacc tools can be used to write an
Electronic Data Interchange (EDI) translator? Eventually the
translation maps could be changed per each trading partners
specification on the fly and hence, the parsing and translation with
associated errors would change correspondingly.
Of course there wouldn't be any need for object code etc. My
guess is that the translator would be more of an interpreter rather
than a compiler. The translator would have to recognize:
1) EDI segments in a specified order and that they can be
optional or mandatory.
2) That some EDI segments are grouped together and can repeat X number
3) That the repeating loops can be nested.
4) That certain fields within a segment can be mandatory, optional
or be conditional on another field.
5) That each field matches a specified data type and a variable
field length definition.
6) That each block of EDI segments can represent a different
transaction set type with their own set of translation mappings
that are selected based on the trading partner profile in the
header and the transaction set type for that block of segment
Does the idea of a translator/interpreter resemble any compiler
Thanks for any input that will shed some light in this area.
[Sounds like a pretty straightforward parsing task. -John]
Return to the
Search the comp.compilers archives again.