[antlr-interest] Rewrite Rules, inline to right side.

Shaun Bogan smbogan at gmail.com
Sun Mar 9 13:17:57 PDT 2008


Thanks for the help.
Unfortunately, Antlr returns an error when I use the rule you
provided.  It appears to not
like the second = sign.  Says unexpected token '='.  I pasted exactly
what you had and changed rule to the name of my rule (which is
assignops).

Shaun


On Sun, Mar 9, 2008 at 1:56 PM, Johannes Luber <jaluber at gmx.de> wrote:
> Shaun Bogan schrieb:
> > Could someone tell me how to rewrite the following on the right-hand side:
> > boolops (firstops^ boolops)*
> >
>
> rule
>    :  b1=boolops -> $b1 (firstops b2=boolops -> ^(firstops $rule $b2) )*
>    ;
>
> should solve this.
>
> Johannes
>


More information about the antlr-interest mailing list