Antlr4.Tool.DOTGenerator.GetStateLabel C# (CSharp) Метод

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

protected GetStateLabel ( ATNState s ) : string
s Antlr4.Runtime.Atn.ATNState
Результат string
        protected virtual string GetStateLabel(ATNState s)
        {
            if (s == null)
                return "null";
            string stateLabel = "";

            if (s is BlockStartState)
            {
                stateLabel += "→\\n";
            }
            else if (s is BlockEndState)
            {
                stateLabel += "←\\n";
            }

            stateLabel += s.stateNumber.ToString();

            if (s is PlusBlockStartState || s is PlusLoopbackState)
            {
                stateLabel += "+";
            }
            else if (s is StarBlockStartState || s is StarLoopEntryState || s is StarLoopbackState)
            {
                stateLabel += "*";
            }

            if (s is DecisionState && ((DecisionState)s).decision >= 0)
            {
                stateLabel = stateLabel + "\\nd=" + ((DecisionState)s).decision;
            }

            return stateLabel;
        }
    }

Same methods

DOTGenerator::GetStateLabel ( DFAState s ) : string