[antlr-interest] Syntactic anti-predicates

Steve Bennett stevagewp at gmail.com
Sat Feb 9 19:48:50 PST 2008


On 2/10/08, Gavin Lambert <antlr at mirality.co.nz> wrote:
> Why not just use:
>
> ruleA
>    :  (X Y Z) => ruleXYZ
>    |  ruleNotXYZ
>    ;

Ok, well say the context looks something like this:


ruleB:
   ruleA*
   X Y W
;

What I want to do is tell ruleA to break out if there's X Y W coming
rather than X Y Z. Maybe it's as simple as:

ruleA: (X Y Z) => X Y Z;

as you suggest. I'm probably just confused :)

Steve


More information about the antlr-interest mailing list