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

Johannes Luber jaluber at gmx.de
Sun Mar 9 11:56:59 PDT 2008


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