[antlr-interest] How to Read ANTLR Ambiguous Path Visualization?

Martin Becker becker at lpr.e-technik.tu-muenchen.de
Mon Mar 21 06:13:50 PDT 2011


Hi there, 

I'm new to grammars and ANTLR(Works) and having a problem now. I
understand there is some disambiguity in my grammar, but due to lack of
documentation of the 'Ambiguous Path Visualization' in ANTLRWorks, I
don't understand what it is trying to tell me. Please have a look at
this screenshot: http://picfront.de/d/87zv

The error is "Decision can match input such as "'['" using multiple
alternatives: 1, 2"

Please note that the line between the state "ruleSelector" in the upper
right corner and the rule "ruleSelector" on the left side is green and
red, so this seems to be a path for both alternatives.

First of all...does it mean, that the disambiguity starts at the upper
right corner, before "ruleSelector"? And then...the red path is just
confusing. I don't understand from where to where it goes...

Could anyone explain that to me, please?

Thanks, Martin



More information about the antlr-interest mailing list