[antlr-interest] Re: recognizer vs translator

lgcraymer lgc at mail1.jpl.nasa.gov
Wed Jul 2 10:38:11 PDT 2003


What you want to do is to annotate your grammar so that it constructs 
a syntax tree, then transform it with tree walker passes and then 
generate output from the final tree.  Take a look at the examples 
provided with the ANTLR distribution and the contributed grammars (and 
RTFM on tree walkers).


--- In antlr-interest at yahoogroups.com, "Adrian Sandor" <aditsu at y...> 
> If I have a grammar which is good for recognizing a language, then 
> how can I write a translator for that language without modifying the 
> grammar? I mean I want to keep the translator rules separately (even 
> if they are in the same file).
> Adrian


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list