[antlr-interest] flat AST tree

Gavin Lambert antlr at mirality.co.nz
Tue Aug 26 03:43:45 PDT 2008


At 10:45 26/08/2008, Andy Tripp wrote:
 >If you look back in the mailing list, you'll see a fairly heated 

 >debate a couple of months ago about whether it's reasonable to
 >have ANTLR return the parse tree for the AST when there are no
 >rewrite rules - your case.

I don't recall it being all *that* heated :)

I was actually on the other side at that time (arguing for it 
producing a parse-tree-like AST by default), but further thought 
has since caused me to change my mind.

I still think that there needs to be an easy way to obtain a parse 
tree from a given parser run (outside of ANTLRworks), just as 
simple diagnostic validation (after all, at the time the main 
thing I wanted it for was just to sanity-check the parse 
operation).  But I think that it needs to be kept separate from 
the AST, since the concepts don't really mesh too well in the end.



More information about the antlr-interest mailing list