[antlr-interest] Newbie questions: How to traverse the AST ...
agnisys at yahoo.com
Thu Dec 28 11:31:02 PST 2006
I need to pick up useful pieces of information from a 3rd party file. The file format is simple
field based with possible quoted text. I've written the lexer and parser for the file (.g). I
would have used Perl but decided to try Antlr in the hope that when the 3rd party changes the
format I would have to do little to accommodate the changes.
I have a couple of questions related to this :
1. What is the standard idiom to traverse the AST ? Any examples would help. How do I get to
the relevant information in the Java code?
2. Is there an AWK mode that simply splits the input into fields?
3. How to deal with quoted comments that can contain elements from the language itself.
For example :
The '=' should be skipped inside the double quote.
4. Is the antlr-interest group postings search-able on any site?
Thanks for any pointers for any of these questions. This would enable me to move forward.
P.S. Anxiously waiting for the Antlr book. I found this to be very helpful:
More information about the antlr-interest