public virtual string GetTokenErrorDisplay( IToken t )
{
string s = t.Text;
if ( s == null )
{
if ( t.Type == TokenTypes.EndOfFile )
{
s = "<EOF>";
}
else
{
s = "<" + t.Type + ">";
}
}
s = Regex.Replace( s, "\n", "\\\\n" );
s = Regex.Replace( s, "\r", "\\\\r" );
s = Regex.Replace( s, "\t", "\\\\t" );
return "'" + s + "'";
}