[antlr-interest] Determinig the real ambiguities

thrutchy eric_mahurin at yahoo.com
Thu Jul 15 11:30:10 PDT 2004


Is there a way to turn off the ambiguities warnings that aren't real
and only affection the parser prediction (and thus performance)?  Here
is an example:

a_must_have_c : (A)? (B)+ C D | (B)+ D ;

It thinks these alternatives are ambiguous because they both can start
with an indeterminate amount of B's, but the ambiguity is resolved
right after that.

I assume ANTLR will try matching the first alternative and then go to
the second if the input matches the second alternative.  Is that correct?

I know that there are several ways I can turn off the warnings
(syntactic predicate, options), but it would be nice if ANTLR could
figure out that the alternatives really don't overlap even though it
may predict the wrong alternative.  Eventually, it would be good to
fix as many of these mispredictions as possible, but initially
functionality is what matters.

Eric





 
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