[antlr-interest] Re: How to easily parse a language into a tree ?

micheal_jor <open.zone at virgin.net> open.zone at virgin.net
Thu Jan 23 08:36:30 PST 2003


> I am trying to parse an IDL (using the grammar in the antlr package)
> to extract struct information into a data structure I can work with.
> 
> First I tried buildAST=true;
> but the resulting linked list does not really help me.

A few minutes studying the section of the ANTLR documentation on 
building ASTs in Parsers is all you need. The grammar needs 
decorations to specify the structure of the resulting tree.

http://www.antlr.org/doc/trees.html#_bb1

Cheers,

Micheal



PS   Please consider contributing your updated grammar to the vault.




 

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



More information about the antlr-interest mailing list