Skip to content
Browse files

Reverted p_error() API

  • Loading branch information...
1 parent c0f9ed5 commit ff91f50c7c5a0aac792ab2e256255feee5df7533 @dabeaz committed Apr 26, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 CHANGES
View
9 CHANGES
@@ -10,14 +10,15 @@ Version 3.5
The use of global variables was problematic for code involving multiple parsers
and frankly was a poor design overall. These functions have been moved to methods
- of the parser instance created by the yacc() function. To make it easier to
- obtain an instance of the parser in error handling, it is now passed as an optional
- parameter to p_error() like this:
+ of the parser instance created by the yacc() function. You should write code like
+ this:
- def p_error(p, parser):
+ def p_error(p):
...
parser.errok()
+ parser = yacc.yacc()
+
*** POTENTIAL INCOMPATIBILITY *** The original global functions now issue a
DeprecationWarning.

0 comments on commit ff91f50

Please sign in to comment.
Something went wrong with that request. Please try again.