Antlr4.Runtime.Atn.ATNDeserializer.MarkPrecedenceDecisions C# (CSharp) Метод

MarkPrecedenceDecisions() защищенный Метод

Analyze the StarLoopEntryState states in the specified ATN to set the StarLoopEntryState.precedenceRuleDecision field to the correct value.
protected MarkPrecedenceDecisions ( ATN atn ) : void
atn ATN The ATN.
Результат void
        protected internal virtual void MarkPrecedenceDecisions(ATN atn)
        {
            foreach (ATNState state in atn.states)
            {
                if (!(state is StarLoopEntryState))
                {
                    continue;
                }
                if (atn.ruleToStartState[state.ruleIndex].isPrecedenceRule)
                {
                    ATNState maybeLoopEndState = state.Transition(state.NumberOfTransitions - 1).target;
                    if (maybeLoopEndState is LoopEndState)
                    {
                        if (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.Transition(0).target is RuleStopState)
                        {
                            ((StarLoopEntryState)state).isPrecedenceDecision = true;
                        }
                    }
                }
            }
        }