protected int matchATN(@NotNull CharStream input) {
ATNState startState = atn.modeToStartState.get(mode);
if ( debug ) {
System.out.format(Locale.getDefault(), "matchATN mode %d start: %s\n", mode, startState);
}
int old_mode = mode;
ATNConfigSet s0_closure = computeStartState(input, startState);
boolean suppressEdge = s0_closure.hasSemanticContext;
s0_closure.hasSemanticContext = false;
DFAState next = addDFAState(s0_closure);
if (!suppressEdge) {
decisionToDFA[mode].s0 = next;
}
int predict = execATN(input, next);
if ( debug ) {
System.out.format(Locale.getDefault(), "DFA after matchATN: %s\n", decisionToDFA[old_mode].toLexerString());
}
return predict;
}
LexerATNSimulator.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:Scratch-ApuC
作者:
评论列表
文章目录