diff options
author | David Beazley <dave@dabeaz.com> | 2012-04-26 15:16:57 -0500 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2012-04-26 15:16:57 -0500 |
commit | ff91f50c7c5a0aac792ab2e256255feee5df7533 (patch) | |
tree | ec5211b4d92a40852700b35fdb2ee98eed87d5d6 /CHANGES | |
parent | c0f9ed554f3425b08b717933f94eb34485e8c993 (diff) | |
download | ply-ff91f50c7c5a0aac792ab2e256255feee5df7533.tar.gz |
Reverted p_error() API
Diffstat (limited to 'CHANGES')
-rw-r--r-- | CHANGES | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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. |