[antlr-interest] A postmortem of my use of antler

Andy Tripp antlr at jazillian.com
Tue Mar 11 14:33:05 PDT 2008


Terence Parr wrote:
>
> On Mar 11, 2008, at 11:35 AM, Andy Tripp wrote:
>
>> Terence Parr wrote:
>>> how could ANTLR *possibly* know the structure of the AST to build 
>>> except for, perhaps, expressions? parse tree, yes. AST, no.
>> How about have the AST just match the parse tree by default?
>
> Because then you add one ^ or -> rewrite and what should it do?  Give 
> you a hybrid?  
Give an error.
> That just wouldn't be useful.  
No, a hybrid wouldn't be very useful.
> If you want a parse tree use it.
Ummm...sorry for the newbie question. How do I get ANTLR to produce a 
parse tree?
I looked through all instances of "parse tree" in the book and couldn't 
find the answer. I
see that ANTLRWorks shows it, and obviously the code itself is a parse 
tree. But is there
some option that says "give me the parse tree as a data structure?"
>
>
> Ter
>



More information about the antlr-interest mailing list