#NEWLINE# def __str__( self ) : #NEWLINE# #INDENT# exp = ( ', expected %s' % self . expecting ) #NEWLINE# if ( self . expecting == INVALID_TOKEN_TYPE ) : #NEWLINE# #INDENT# exp = '' #NEWLINE# #UNINDENT# if ( self . token is None ) : #NEWLINE# #INDENT# return ( 'UnwantedTokenException(found=%s%s)' % ( None , exp ) ) #NEWLINE# #UNINDENT# return ( 'UnwantedTokenException(found=%s%s)' % ( exp . token . text , exp ) )