protected int MatchATN(ICharStream input)
{
ATNState startState = atn.modeToStartState[mode];
if (debug)
{
Console.WriteLine("matchATN mode " + mode + " start: " + startState);
}
int old_mode = mode;
ATNConfigSet s0_closure = ComputeStartState(input, startState);
bool suppressEdge = s0_closure.hasSemanticContext;
s0_closure.hasSemanticContext = false;
DFAState next = AddDFAState(s0_closure);
if (!suppressEdge)
{
decisionToDFA[mode].s0 = next;
}
int predict = ExecATN(input, next);
if (debug)
{
Console.WriteLine("DFA after matchATN: " + decisionToDFA[old_mode].ToString());
}
return predict;
}