def METHOD_NAME(self, t:Token):
    if t is None:
        return "<no token>"
    s = t.text
    if s is None:
        if t.type==Token.EOF:
            s = "<EOF>"
        else:
            s = "<" + str(t.type) + ">"
    s = s.replace("\n","\\n")
    s = s.replace("\r","\\r")
    s = s.replace("\t","\\t")
    return "'" + s + "'"