[antlr-interest] ahum.. tree question
Lloyd Dupont
ld at galador.net
Tue Jul 10 06:40:40 PDT 2007
I'm not sure it work, but I rewite the problematic part as follow:
( op=(LT | GT | LTE | GTE) s=shift -> ^($op $compare $s) )*
is it ok?
----- Original Message -----
From: Lloyd Dupont
To: antlr-interest at antlr.org
Sent: Tuesday, July 10, 2007 11:36 PM
Subject: [antlr-interest] ahum.. tree question
here is my rule:
===========
compare : (shift -> shift)
(
( (LT | GT | LTE | GTE) s=shift -> ^((LT | GT | LTE | GTE) $compare $s) )*
| is='is' i=identifier -> ^(IS[$is] $compare $i)
| as='as' i=identifier -> ^(AS[$as] $compare $i)
)
;
===========
it doesn't work...
it looks like think ANTLR doesn't like my
^((LT | GT | LTE | GTE)
in the tree rewriting rule.
any tip on how I could rewrite this tree?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070710/570b932b/attachment.html
More information about the antlr-interest
mailing list