mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
yysyntax_error: avoid duplicate lookahead collection.
Except when memory reallocation is required, this change
eliminates the need to invoke yysyntax_error twice and thus to
repeat the collection of lookaheads. It also prepares for
future extensions that will make those repetitions more
expensive and that will require additional memory management in
yysyntax_error. Finally, it fixes an obscure bug already
exercised in the test suite.
* data/yacc.c (yysyntax_error): Add arguments for message
buffer variables stored in the parser. Instead of size, return
status similar to yyparse status but indicating success of
message creation. Other than the actual reallocation of the
message buffer, import and clean up memory management code
from...
(yyparse, yypush_parse): ... here.
* tests/regression.at (%error-verbose overflow): No longer an
expected failure.
(cherry picked from commit 45319f1365)
Conflicts:
src/parse-gram.c
src/parse-gram.h
This commit is contained in:
20
ChangeLog
20
ChangeLog
@@ -1,3 +1,23 @@
|
||||
2009-09-23 Joel E. Denny <jdenny@clemson.edu>
|
||||
|
||||
yysyntax_error: avoid duplicate lookahead collection.
|
||||
Except when memory reallocation is required, this change
|
||||
eliminates the need to invoke yysyntax_error twice and thus to
|
||||
repeat the collection of lookaheads. It also prepares for
|
||||
future extensions that will make those repetitions more
|
||||
expensive and that will require additional memory management in
|
||||
yysyntax_error. Finally, it fixes an obscure bug already
|
||||
exercised in the test suite.
|
||||
* data/yacc.c (yysyntax_error): Add arguments for message
|
||||
buffer variables stored in the parser. Instead of size, return
|
||||
status similar to yyparse status but indicating success of
|
||||
message creation. Other than the actual reallocation of the
|
||||
message buffer, import and clean up memory management code
|
||||
from...
|
||||
(yyparse, yypush_parse): ... here.
|
||||
* tests/regression.at (%error-verbose overflow): No longer an
|
||||
expected failure.
|
||||
|
||||
2009-09-23 Joel E. Denny <jdenny@clemson.edu>
|
||||
|
||||
yysyntax_error: test memory management more.
|
||||
|
||||
Reference in New Issue
Block a user