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