protected internal virtual void CaptureSimState(LexerATNSimulator.SimState settings, ICharStream input, DFAState dfaState) { settings.index = input.Index; settings.line = _line; settings.charPos = charPositionInLine; settings.dfaState = dfaState; }
protected internal virtual int FailOrAccept(LexerATNSimulator.SimState prevAccept, ICharStream input, ATNConfigSet reach, int t) { if (prevAccept.dfaState != null) { LexerActionExecutor lexerActionExecutor = prevAccept.dfaState.LexerActionExecutor; Accept(input, lexerActionExecutor, startIndex, prevAccept.index, prevAccept.line, prevAccept.charPos); return(prevAccept.dfaState.Prediction); } else { // if no accept and EOF is first char, return EOF if (t == IntStreamConstants.Eof && input.Index == startIndex) { return(TokenConstants.Eof); } throw new LexerNoViableAltException(recog, input, startIndex, reach); } }