-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Predicated configs suppress reportAmbiguity #31
Comments
Yeah, we should essentially gate out all untrue predicated alts and choose min of remaining. For this issue, we can maybe make an option. |
Fully identifying ambiguities is more work than decision making. In plain decision making mode, |
Fixed in 2cc39c2 |
Ensure self.getErrorDisplayForChar always returns str
There is no need to call ->hashCode() explicitly
replaced CodePointCharStream with StringCharStream closes antlr#31
Currently, no call to
reportAmbiguity
occurs when one or moreATNConfig
instances have a semantic context. This is particularly problematic in tracking down issues in LR rules due to the automatically inserted predicates. One way to resolve this is havingParserATNSimulator.evalSemanticContext
return anIntervalSet
of all passing alternatives (unpredicated or having a predicate returning true). If the set contains more than one alternative,reportAmbiguity
can be called before resolving the set to a single chosen alternative.This presents a potential problem due to the fact that resolution currently prefers the minimum passing predicated alternative as opposed to the standard minimum acceptable alternative. However, this resolution policy will have to be changed to minimum acceptable alternative to resolve #29.
The text was updated successfully, but these errors were encountered: