[antlr-interest] Re: antlr bug or grammar problem?
kozchris
csnyder at alumni.ncsu.edu
Thu Sep 23 12:38:13 PDT 2004
haha, Small world.
I wrote the code to generate the test vectors for you back then. We've
been working together for a while and didn't know it. :>)
I tried the semantic predicate and it worked just like I expected.
Terence would this be considered a bug or works as designed?
Thanks so much.
Chris
--- In antlr-interest at yahoogroups.com, Monty Zukowski <monty at c...> wrote:
> Hey, I used to work on that grammar! Anyhow, this may be a bug in
> ANTLR. Syntactic predicates are used to disambiguate. Here, ANTLR
> sees no ambiguities between the alternatives, so it doesn't use the
> syntactic predicate. If it were generating a syn pred you would see
> guessing mode incremented and the decremented at the end of the
> predicate.
>
> Try a semantic predicate instead
> {LA(1)==BECAME_TRUE||LA(1)==BECAME_FALSE||LA(1)==CHANGED}?
>
> Monty
>
> ANTLR & Java Consultant -- http://www.codetransform.com
> ANSI C/GCC transformation toolkit --
> http://www.codetransform.com/gcc.html
> Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list