Antlr4.Runtime.Atn.ProfilingATNSimulator.GetExistingTargetState C# (CSharp) Method

GetExistingTargetState() protected method

protected GetExistingTargetState ( DFAState previousD, int t ) : DFAState
previousD Antlr4.Runtime.Dfa.DFAState
t int
return Antlr4.Runtime.Dfa.DFAState
        protected override 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 = base.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, null /*previousD.configs*/, input, startIndex, sllStopIndex)
                );
            }
            }

            currentState = existingTargetState;
            return existingTargetState;
        }