Can I use ANTLR for both two-way parsing/generating?
Posted
by Mike Q
on Stack Overflow
See other posts from Stack Overflow
or by Mike Q
Published on 2010-03-31T11:06:41Z
Indexed on
2010/03/31
11:13 UTC
Read the original article
Hit count: 364
Hi all,
I need to both parse incoming messages and generate outgoing messages in EDIFACT format (basically a structured delimited format).
I would like to have a Java model that will be generated by parsing a message. Then I would like to use the same model to create an instance and generate a message.
The first half is fine, I've used ANTLR before to go from raw -> Java objects. But I've never done the reverse, or if I have it's been custom.
Does ANTLR support generating using a grammar or is it really just a parse-only tool?
© Stack Overflow or respective owner