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;
}
}