protected override void ReportAmbiguity(DFA dfa, DFAState D, int startIndex, int stopIndex, bool exact,
BitSet ambigAlts, ATNConfigSet configSet)
{
int prediction;
if (ambigAlts != null)
{
prediction = ambigAlts.NextSetBit(0);
}
else {
prediction = configSet.GetAlts().NextSetBit(0);
}
if (configSet.fullCtx && prediction != conflictingAltResolvedBySLL)
{
// Even though this is an ambiguity we are reporting, we can
// still detect some context sensitivities. Both SLL and LL
// are showing a conflict, hence an ambiguity, but if they resolve
// to different minimum alternatives we have also identified a
// context sensitivity.
decisions[currentDecision].contextSensitivities.Add( new ContextSensitivityInfo(currentDecision, null /*configs*/, input, startIndex, stopIndex) );
}
decisions[currentDecision].ambiguities.Add(
new AmbiguityInfo(currentDecision, null /*configs, ambigAlts*/,
input, startIndex, stopIndex/*, configs.IsFullContext*/)
);
base.ReportAmbiguity(dfa, D, startIndex, stopIndex, exact, ambigAlts, configSet);
}