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

Peter Kooiman peter at crispu.com
Mon Mar 21 07:09:43 PDT 2011


Hi Martin, 

It's telling you that when when it recursively enters ruleExpression after ruleUnOp, on encountering "[" at the end of the recursive ruleExpression it cannot decide if ruleSelector is part of the recursive invocation of ruleExpression or of the invoking ruleExpression. Because of the recursion involved the visualization is somewhat hard to parse.. 

Hope his makes sense. 

Peter 



From: "Martin Becker" <becker at lpr.e-technik.tu-muenchen.de> 
To: antlr-interest at antlr.org 
Sent: Monday, March 21, 2011 2:13:50 PM 
Subject: [antlr-interest] How to Read ANTLR Ambiguous Path Visualization? 

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 


List: http://www.antlr.org/mailman/listinfo/antlr-interest 
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address 


More information about the antlr-interest mailing list