Exemplo n.º 1
0
        public override string ToString()
        {
            string result = string.IsNullOrEmpty(Tag) ? string.Empty : Tag + ":";

            if (Terminal is SymbolTerminal)
            {
                result += _text + " [Symbol]";
            }
            else if (IsKeyword)
            {
                result += _text + " " + "[Keyword]";
            }
            else
            {
                result += ValueString + " " + Terminal.ToString();
            }
            return(result);
        }
Exemplo n.º 2
0
 public static int ByName(Terminal x, Terminal y)
 {
     return(string.Compare(x.ToString(), y.ToString()));
 }