LexerATNSimulator.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:Scratch-ApuC 作者:
protected int failOrAccept(SimState prevAccept, CharStream 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==IntStream.EOF && input.index()==startIndex ) {
            return Token.EOF;
        }

        throw new LexerNoViableAltException(recog, input, startIndex, reach);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号