[antlr-interest] Simple semantic predicates in lexers in ANTLRWorks?

chris king kingces95 at gmail.com
Mon Feb 7 21:19:19 PST 2011


Hello, I'm feeling rather stupid but why doesn't ANTLRWorks recognize 'a'
using this grammar? When I gen the grammar using target CSharp3 it does
match 'a'. Does ANTLRWorks support semantic predicates?

a
    : A
    ;

A
    : {true}? 'a'
    ;

Thanks,
Chris


More information about the antlr-interest mailing list