public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, IEnumerable<string> ruleNames, ATN atn, ITokenStream input)
: base(input)
{
this._grammarFileName = grammarFileName;
this._atn = atn;
this._ruleNames = ruleNames.ToArray();
this.vocabulary = vocabulary;
// identify the ATN states where pushNewRecursionContext must be called
this.pushRecursionContextStates = new BitSet(atn.states.Count);
foreach (ATNState state in atn.states)
{
if (!(state is StarLoopEntryState))
{
continue;
}
if (((StarLoopEntryState)state).isPrecedenceDecision)
{
this.pushRecursionContextStates.Set(state.stateNumber);
}
}
// get atn simulator that knows how to do predictions
Interpreter = new ParserATNSimulator(this, atn, null, null);
}