@Override protected DFAState getExistingTargetState(DFAState previousD, int t) { // this method is called after each time the input position advances // during SLL prediction _sllStopIndex = _input.index(); DFAState existingTargetState = super.getExistingTargetState(previousD, t); if ( existingTargetState!=null ) { decisions[currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state if ( existingTargetState==ERROR ) { decisions[currentDecision].errors.add( new ErrorInfo(currentDecision, previousD.configs, _input, _startIndex, _sllStopIndex, false) ); } } currentState = existingTargetState; return existingTargetState; }
DFAState D = getExistingTargetState(previousD, t); if (D == null) { D = computeTargetState(dfa, previousD, t);
@Override protected DFAState getExistingTargetState(DFAState previousD, int t) { // this method is called after each time the input position advances // during SLL prediction _sllStopIndex = _input.index(); DFAState existingTargetState = super.getExistingTargetState(previousD, t); if ( existingTargetState!=null ) { decisions[currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state if ( existingTargetState==ERROR ) { decisions[currentDecision].errors.add( new ErrorInfo(currentDecision, previousD.configs, _input, _startIndex, _sllStopIndex, false) ); } } currentState = existingTargetState; return existingTargetState; }
@Override protected DFAState getExistingTargetState(DFAState previousD, int t) { // this method is called after each time the input position advances // during SLL prediction _sllStopIndex = _input.index(); DFAState existingTargetState = super.getExistingTargetState(previousD, t); if ( existingTargetState!=null ) { decisions[currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state if ( existingTargetState==ERROR ) { decisions[currentDecision].errors.add( new ErrorInfo(currentDecision, previousD.configs, _input, _startIndex, _sllStopIndex, false) ); } } currentState = existingTargetState; return existingTargetState; }
@Override protected DFAState getExistingTargetState(DFAState previousD, int t) { // this method is called after each time the input position advances // during SLL prediction _sllStopIndex = _input.index(); DFAState existingTargetState = super.getExistingTargetState(previousD, t); if ( existingTargetState!=null ) { decisions[currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state if ( existingTargetState==ERROR ) { decisions[currentDecision].errors.add( new ErrorInfo(currentDecision, previousD.configs, _input, _startIndex, _sllStopIndex, false) ); } } currentState = existingTargetState; return existingTargetState; }
@Override protected DFAState getExistingTargetState(DFAState previousD, int t) { // this method is called after each time the input position advances if (currentState.useContext) { _llStopIndex = _input.index(); } else { _sllStopIndex = _input.index(); } DFAState existingTargetState = super.getExistingTargetState(previousD, t); if ( existingTargetState!=null ) { // this method is directly called by execDFA; must construct a SimulatorState // to represent the current state for this case currentState = new SimulatorState(currentState.outerContext, existingTargetState, currentState.useContext, currentState.remainingOuterContext); if (currentState.useContext) { decisions[currentDecision].LL_DFATransitions++; } else { decisions[currentDecision].SLL_DFATransitions++; // count only if we transition over a DFA state } if ( existingTargetState==ERROR ) { SimulatorState state = new SimulatorState(currentState.outerContext, previousD, currentState.useContext, currentState.remainingOuterContext); decisions[currentDecision].errors.add( new ErrorInfo(currentDecision, state, _input, _startIndex, _input.index()) ); } } return existingTargetState; }
DFAState D = getExistingTargetState(previousD, t); if (D == null) { D = computeTargetState(dfa, previousD, t);
DFAState D = getExistingTargetState(previousD, t); if (D == null) { D = computeTargetState(dfa, previousD, t);
DFAState D = getExistingTargetState(previousD, t); if (D == null) { D = computeTargetState(dfa, previousD, t);
DFAState target = getExistingTargetState(s0, t); if (target == null) { Tuple2<DFAState, ParserRuleContext> result = computeTargetState(dfa, s0, remainingGlobalContext, t, useContext, contextCache);
DFAState target = getExistingTargetState(s, t); if ( target == null ) { if ( dfa_debug && t>=0 ) System.out.println("no edge for "+parser.getVocabulary().getDisplayName(t));