antlr/antlr4 — Issue #31: Predicated configs suppress reportAmbiguity
Author: sharwell
Created: 2012-03-01 07:16:04+00:00
State: open
Labels: comp:runtime, type:bug:1

Currently, no call to `reportAmbiguity` occurs when one or more `ATNConfig` 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 having `ParserATNSimulator.evalSemanticContext` return an `IntervalSet` 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.