[antlr-interest] Syntactic predicates elude me

Artemus Ward coddbotherer at googlemail.com
Sat Jun 28 13:43:30 PDT 2008


I am a newbie and for a couple of weeks I've been banging my head on
something simple that I'm just not getting.

I just cannot figure out how to write a syntactic predicate.  I'm
testing in ANTLRWorks and I always get an error reported like:
FailedPredicateException(rulename,{synpredN}?).

What puzzles me is that the predicate that is reported is always the
one I expected would succeed based on the input I provide.  If I
provide an input that should match (say) the third predicate it will
report the third predicate as the error.

I'm using ANTLR 3.0.1 and ANTLRWorks 1.1.7.

Art


More information about the antlr-interest mailing list