[antlr-interest] Help writing a particular semantic predicate

Naveen Chawla naveen.chwl at googlemail.com
Tue Oct 6 15:02:09 PDT 2009


grammar x;

x:  a b;

     a: 'i' a? | c? 'j';     // Question, how would I write the semantic
predicates: if this "a" is followed by 'v1' choose the first alternative, if
not choose the second alternative

          c: 'i';

     b: 'v1' | 'v2';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091006/bddb08de/attachment.html 


More information about the antlr-interest mailing list