[antlr-interest] Tree Construction - DOT operator

Brent Yates brent.yates at gmail.com
Fri Feb 8 08:05:26 PST 2008


Adrian,

Try:

// Imaginary tokes for AST rewrite
tokens
    {
    GETMEMBER;
    }

primary
    :    (atom -> atom)  ( (t+=trailer)+ -> ^(GETMEMBER $primary $t+) )?
    ;

trailer
    :    '.'! ID
    ;



Regards,

Brent Yates
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080208/a5e90d11/attachment.html 


More information about the antlr-interest mailing list