[antlr-interest] help on rewritting the tree

antlr_bill antlr_bill at yeah.net
Sun Oct 4 08:55:42 PDT 2009


can someone please help on this ?
i have an rule like this :

a:
 :   ID( ABC )? (DOT ID (ABC)? )*
;
how to rewrite it into a tree grammer ?
i am dont understand on how to make it repeatable ,
i wrote it like this :
->^(V
        (ID( ABC)?)
        ^(V ((DOT ID) (ABC)?)* )
    )
;
 V is am imaginary token



THANKS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091004/ed043766/attachment.html 


More information about the antlr-interest mailing list