Antlr4.Runtime.ParserInterpreter.ParserInterpreter C# (CSharp) Method

ParserInterpreter() public method

public ParserInterpreter ( string grammarFileName, IVocabulary vocabulary, IEnumerable ruleNames, ATN atn, ITokenStream input ) : System
grammarFileName string
vocabulary IVocabulary
ruleNames IEnumerable
atn Antlr4.Runtime.Atn.ATN
input ITokenStream
return System
        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);
        }