[antlr-interest] Nestes Parenthetical in Rewrite Rule
titech at metaorb.com
titech at metaorb.com
Tue Aug 26 23:51:52 PDT 2008
Is there any way to write this that won't give an error:
shape : '(' 'rect' (ID | STRING) float float ')' -> ^('rect' (ID | STRING) float float);
I tried splitting it up on multiple lines, but always I get "expecting RPAREN, but found '|'" (or similar).
The only way I've gotten it to work is to make the parenthetical statement a separate rule.
Regards,
--Mike
More information about the antlr-interest
mailing list