summaryrefslogtreecommitdiff
path: root/CHANGES
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2012-04-26 14:42:55 -0500
committerDavid Beazley <dave@dabeaz.com>2012-04-26 14:42:55 -0500
commitb766b21116b0b4fa14a9b836e1abd805a4bf6064 (patch)
treee24ebf0009dbabccd176320e11685c7a049536da /CHANGES
parent708ff46356912aa05d8e30a5b84d837d7a65d3b2 (diff)
downloadply-b766b21116b0b4fa14a9b836e1abd805a4bf6064.tar.gz
Changes to panic mode error recovery
Diffstat (limited to 'CHANGES')
-rw-r--r--CHANGES21
1 files changed, 21 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 99dc683..28da920 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,26 @@
Version 3.5
---------------------
+04/26/12: beazley
+ Changes to functions available in panic mode error recover. In previous versions
+ of PLY, the following global functions were available for use in the p_error() rule:
+
+ yacc.errok() # Reset error state
+ yacc.token() # Get the next token
+ yacc.restart() # Reset the parsing stack
+
+ 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:
+
+ def p_error(p, parser):
+ ...
+ parser.errok()
+
+ *** POTENTIAL INCOMPATIBILITY *** The original global functions now issue a
+ DeprecationWarning.
+
04/19/12: beazley
Fixed some problems with line and position tracking and the use of error
symbols. If you have a grammar rule involving an error rule like this: