[antlr-interest] Tree parsers and real world example

Matt Holmes tegan at gnometank.net
Sun Apr 15 23:47:45 PDT 2007


While I am waiting for 3.0 to have better CSharp output support, so I 
can continue my project, I am continuing to learn ANTLR 2.77 and develop 
a parser for my language. I am trying to wrap my head around tree 
parsers, and it's just not clicking for me yet. I've looked in the ANTLR 
wiki and read the docs, but I am curious if anyone knows of a real good 
"real world" example of one in use? Preferably how (or if?) they are 
involved in the code generation* process for a scripting language. I 
have a working parser that gives me back basic expressions and the like, 
and now I am trying to figure out how I would interface that with my 
(soon to be written) code generator. I sense that tree parsers are meant 
to ease this, but looking at the examples in the CSharp examples with 
2.77 and reading the docs, I am just not grasping it. I am hoping to see 
it "in action" to give me a better idea of how it all fits together.

* In this case, by code generation, I mean turning the parsed AST in to 
byte code to be later executed by my VM.

Thanks,

Matt


More information about the antlr-interest mailing list