public override string ToString()
{
string channelStr = "";
if (Channel > 0)
{
channelStr = ",channel=" + Channel;
}
string txt = Text;
if (txt != null)
{
txt = txt.Replace("\n", "\\n");
txt = txt.Replace("\r", "\\r");
txt = txt.Replace("\t", "\\t");
}
else
{
txt = "<no text>";
}
return "[@" + TokenIndex + "," + StartIndex + ":" + StopIndex +
"='" + txt + "',<" + Type + ">" + channelStr + "," + Line + ":" + CharPositionInLine + "]";
}
}