public void reportAmbiguity(Parser recognizer,DFA dfa,int startIndex,int stopIndex,boolean exact,BitSet ambigAlts,ATNConfigSet configs){if (exactOnly && !exact) {return;}String format = "reportAmbiguity d=%s: ambigAlts=%s, input='%s'";String decision = getDecisionDescription(recognizer, dfa);BitSet conflictingAlts = getConflictingAlts(ambigAlts, configs);String text = recognizer.getTokenStream().getText(Interval.of(startIndex, stopIndex));String message = String.format(format, decision, conflictingAlts, text);recognizer.notifyErrorListeners(message);}
public override void ReportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, bool exact, BitSet ambigAlts, ATNConfigSet configs){if (exactOnly && !exact){return;}string format = "reportAmbiguity d={0}: ambigAlts={1}, input='{2}'";string decision = GetDecisionDescription(recognizer, dfa);BitSet conflictingAlts = GetConflictingAlts(ambigAlts, configs);string text = ((ITokenStream)recognizer.InputStream).GetText(Interval.Of(startIndex, stopIndex));string message = string.Format(format, decision, conflictingAlts, text);recognizer.NotifyErrorListeners(message);}