@Override protected SimulatorState computeReachSet(DFA dfa, SimulatorState previous, int t, PredictionContextCache contextCache) { if (previous.useContext) { totalTransitions[decision]++; computedTransitions[decision]++; fullContextTransitions[decision]++; } return super.computeReachSet(dfa, previous, t, contextCache); }
@Override protected DFAState addDFAEdge(DFA dfa, DFAState fromState, int t, IntegerList contextTransitions, ATNConfigSet toConfigs, PredictionContextCache contextCache) { if (!getSuppressedSet(startIndex).isNil()) { DFAState to = addDFAState(dfa, toConfigs, contextCache); return to; } return super.addDFAEdge(dfa, fromState, t, contextTransitions, toConfigs, contextCache); }
@Override protected Tuple2<DFAState, ParserRuleContext> computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) { computedTransitions[decision]++; long startTime = System.nanoTime(); try { return super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache); } finally { long totalTime = System.nanoTime() - startTime; decisionCost[dfa.decision] += totalTime; if (useContext) { decisionLlCost[dfa.decision] += totalTime; } } }
public PositionAdjustingLexerATNSimulator(Lexer recog, ATN atn, DFA[] decisionToDFA, PredictionContextCache sharedContextCache) { super(recog, atn, decisionToDFA, sharedContextCache); }
@Override protected Tuple2<DFAState, ParserRuleContext> computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) { computedTransitions[decision]++; return super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache); }
@Override protected void closure(ATNConfigSet sourceConfigs, ATNConfigSet configs, boolean collectPredicates, boolean hasMoreContext, PredictionContextCache contextCache, boolean treatEofAsEpsilon) { super.closure(sourceConfigs, configs, collectPredicates, hasMoreContext, contextCache, treatEofAsEpsilon); }