[antlr-interest] Syntactic predicates elude me

Artemus Ward coddbotherer at googlemail.com
Sun Jun 29 03:31:24 PDT 2008


2008/6/28 Raphael Reitzig <r_reitzi at cs.uni-kl.de>:
> Hi!
>
> I had a similar problem. ANTLRWorks' interpreter cannot evaluate
> predicates. Try debugging it. The Debugger actually works with the created
> and compiled classes and thus is able to work with predicates.

Hell.  I have wasted two weeks because I felt it was arrogant to think
the problem wasn't just my own lack of understanding. I am not happy.
What about backtracking?  Does ANTLRWorks support that?

Art

> On Sat, 28 Jun 2008 21:43:30 +0100, "Artemus Ward"
> <coddbotherer at googlemail.com> wrote:
>> 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