#NEWLINE# def p_error( p ) : #NEWLINE# #INDENT# 'Handles errors' #NEWLINE# if ( p is None ) : #NEWLINE# #INDENT# raise SyntaxError ( 'Unexpected end of predicate!' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# err = ( 'Syntax error at token' , p . type , p . value , p . lexpos , parser . lineno ) #NEWLINE# parser = p . lexer . parser #NEWLINE# parser . errors . append ( err ) #NEWLINE# parser . errok ( )