LEX/YACC EDI Translator?

mikesw@dhp.com (M Sweger)
22 May 1997 22:14:53 -0400

          From comp.compilers

Related articles
LEX/YACC EDI Translator? mikesw@dhp.com (1997-05-22)
Re: LEX/YACC EDI Translator? cfc@world.std.com (1997-05-25)
| List of all articles for this month |

From: mikesw@dhp.com (M Sweger)
Newsgroups: comp.compilers
Date: 22 May 1997 22:14:53 -0400
Organization: DataHaven Project, Inc (http://www.dhp.com)
Keywords: parse, question


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
of times.
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
design/implementation model?
Thanks for any input that will shed some light in this area.

[Sounds like a pretty straightforward parsing task. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.