[antlr-interest] automatic tree grammar generation
Terence Parr
parrt at cs.usfca.edu
Mon May 19 17:30:21 PDT 2008
On May 19, 2008, at 4:49 PM, Kamal Verma wrote:
> Wonderful, when can we have it.
>
> Few months ago I had similar need and I almost thought of same
> thing. It will be wonderful if have it as a command line option on
> antlr. Like "-treeg <filename>". How about string templating the
> 'AST' of 'antlr' grammar. ( inside the tool )
>
> It will also help with understanding of generated AST and debug and
> develop the grammar.
>
> I will love to hear Terence thoughts on this.
Not always easy for -> rewrites even when they use $a vars.
a : (b->b) ('+' x=b -> ^('+' $a $x) )* ;
not sure how i'd figure that out off top of my head.
A basic "get me started" kind of thing would be pretty easy I guess. :)
Ter
More information about the antlr-interest
mailing list