[antlr-interest] Operator tree construction in rewrite syntax

Guntis Ozols guntiso at latnet.lv
Mon Apr 14 13:00:45 PDT 2008


> Quick question (i hope). What is the equivalent to the following using
> the rewrite (->) syntax:
>
> sum: something (Plus^ something);
>
> Thanks,
> Marko

1. try: something (Plus something) -> ^(Plus something+);

2. how about '*', did you mean: something (Plus^ something)*; ?

3. do not use ^ on both sides

Guntis



More information about the antlr-interest mailing list