ur'.+? \n

def t_trailingwhitespace(self, token):
        ur'.+? \n'
        print "Error: trailing whitespace at line %s in text '%s'" % (token.lexer.lineno + 1, token.value[:-1])
        token.lexer.lexerror = True
        token.lexer.skip(1)