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

LexerInterpreter() public method

public LexerInterpreter ( string grammarFileName, IVocabulary vocabulary, IEnumerable ruleNames, IEnumerable modeNames, ATN atn, ICharStream input ) : System
grammarFileName string
vocabulary IVocabulary
ruleNames IEnumerable
modeNames IEnumerable
atn Antlr4.Runtime.Atn.ATN
input ICharStream
return System
        public LexerInterpreter(string grammarFileName, IVocabulary vocabulary, IEnumerable<string> ruleNames, IEnumerable<string> modeNames, ATN atn, ICharStream input)
            : base(input)
        {
            if (atn.grammarType != ATNType.Lexer)
            {
                throw new ArgumentException("The ATN must be a lexer ATN.");
            }
            this.grammarFileName = grammarFileName;
            this.atn = atn;
            this.ruleNames = ruleNames.ToArray();
            this.modeNames = modeNames.ToArray();
            this.vocabulary = vocabulary;
            this.decisionToDFA = new DFA[atn.NumberOfDecisions];
            for (int i = 0; i < decisionToDFA.Length; i++)
            {
                decisionToDFA[i] = new DFA(atn.GetDecisionState(i), i);
            }
            this.Interpreter = new LexerATNSimulator(this, atn, decisionToDFA, sharedContextCache);
        }
LexerInterpreter