[antlr-interest] template rewrites
Viktor Lioutyi
Viktor_Lioutyi at i2.com
Mon Jun 8 14:09:46 PDT 2009
I encountered the same problem and the best solution I found so far
for literals:
numeric_literal
: INTEGER_LITERAL -> {%{$INTEGER_LITERAL.text}}
| DECIMAL_LITERAL -> {%{$DECIMAL_LITERAL.text}}
| FLOATING_POINT_LITERAL -> {%{$FLOATING_POINT_LITERAL.text}}
;
for rules:
function
: castFunction -> {$castFunction.st}
| trimFunction -> {$trimFunction.st}
...
;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090608/91bbc2d6/attachment.html
More information about the antlr-interest
mailing list