[antlr-interest] Token rewrite
xkrebstarx
xkrebstarx at gmail.com
Tue Aug 21 08:57:12 PDT 2007
Also,
I have two productions, such as this
a : ( (x -> ^(IMG_NODE x))
| (y -> ^(IMG_NODE y))
| (z -> ^(IMG_NODE z))
)
;
b : a? c
;
Where I want the rewrite for b to have c as the subtree root if a is not
there and a to be the subtree root if it is there. But, I would like to have
these as one production such as this...
a : ( (x -> ^(IMG_NODE x))
| (y -> ^(IMG_NODE y))
| (z -> ^(IMG_NODE z))
) c -> ^($a? c)
;
Can this be done?
thanx again,
xkrebstarx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070821/04da95bb/attachment.html
More information about the antlr-interest
mailing list