[antlr-interest] Simple Tree Rewrite help

Tim Williams williamstw at gmail.com
Wed Jul 29 08:25:27 PDT 2009


I'm trying to get a tree rewrite version of something like this:

query:  LPAREN! expr (OR_TOK^ expr)+ RPAREN!;

This seems to do what I want, but I need a tree rewrite version so
that I can send something other than OR_TOK as the root, namely an
normalized "OR" token.  I've tried:

-> ^(OR expr expr)+;

with no luck.

Any help appreciated,

Thanks,
--tim


More information about the antlr-interest mailing list