[antlr-interest] Two pass parser example

Micheal J open.zone at virgin.net
Fri Feb 3 18:31:32 PST 2006


> Hi Everybody,
> I'm trying to parse C syntax with my ANTLR grammar.I have to 
> parse functions and fuction calls ,for which i'm building a 
> two pass parser . Could anyone help by posting a two pass 
> parser example ? Thanks in advance Priya

http://www.cc.gatech.edu/classes/AY2001/cs4240_fall/
http://www.cc.gatech.edu/classes/AY2001/cs4240_fall/prj3/more.html
http://www.cc.gatech.edu/classes/AY2001/cs4240_fall/prj3sol/

It's a multi-pass sample. It does lexing, parsing, typechecking, optimizing
and codegen. It parses once, builds a tree and then uses tree parsers for
the other "passes". Make what you can of it.

Good luck

Micheal



More information about the antlr-interest mailing list