[antlr-interest] Heterogeneous AST - simple calculator parser
Sinan
sinan.karasu at boeing.com
Thu Feb 7 16:46:17 PST 2002
koud0002 wrote:
>
[...]
>
> simpleExpression
> : MINUS t:term!
change to
:m:MINUS^ term {#m.setType(UNARY_MINUS);}
you don't need all that UnaryMinusNode stuff. The rest is done in the
treewalker
#(UNARY_MINUS expression ....
same for UNARY_PLUS...
Sinan
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list