protected int matchATN(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; }
public int match(CharStream input, int mode) { match_calls++; this.mode = mode; int mark = input.mark(); try { this.startIndex = input.index(); this.prevAccept.reset(); DFA dfa = decisionToDFA[mode]; if ( dfa.s0==null ) { return matchATN(input); } else { return execATN(input, dfa.s0); } } finally { input.release(mark); } }
protected int matchATN(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; }
protected int matchATN(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; }
protected int matchATN(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; }
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(); if (suppressEdge) { s0_closure.clearExplicitSemanticContext(); } DFAState next = addDFAState(s0_closure); if (!suppressEdge) { if (!atn.modeToDFA[mode].s0.compareAndSet(null, next)) { next = atn.modeToDFA[mode].s0.get(); } } int predict = execATN(input, next); if ( debug ) { System.out.format(Locale.getDefault(), "DFA after matchATN: %s\n", atn.modeToDFA[old_mode].toLexerString()); } return predict; }
public int match(@NotNull CharStream input, int mode) { match_calls++; this.mode = mode; int mark = input.mark(); try { this.startIndex = input.index(); this.prevAccept.reset(); DFAState s0 = atn.modeToDFA[mode].s0.get(); if ( s0==null ) { return matchATN(input); } else { return execATN(input, s0); } } finally { input.release(mark); } }
public int match(CharStream input, int mode) { match_calls++; this.mode = mode; int mark = input.mark(); try { this.startIndex = input.index(); this.prevAccept.reset(); DFA dfa = decisionToDFA[mode]; if ( dfa.s0==null ) { return matchATN(input); } else { return execATN(input, dfa.s0); } } finally { input.release(mark); } }
public int match(CharStream input, int mode) { match_calls++; this.mode = mode; int mark = input.mark(); try { this.startIndex = input.index(); this.prevAccept.reset(); DFA dfa = decisionToDFA[mode]; if ( dfa.s0==null ) { return matchATN(input); } else { return execATN(input, dfa.s0); } } finally { input.release(mark); } }
public int match(CharStream input, int mode) { match_calls++; this.mode = mode; int mark = input.mark(); try { this.startIndex = input.index(); this.prevAccept.reset(); DFA dfa = decisionToDFA[mode]; if ( dfa.s0==null ) { return matchATN(input); } else { return execATN(input, dfa.s0); } } finally { input.release(mark); } }