Fix a destructor bug reported by Wolfgang Spraul in

<http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
* data/yacc.c (yyabortlab): Don't call destructor, and
don't set yychar to EMPTY.
(yyoverflowlab): Don't call destructor.
(yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
* tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
since we no longer output the message "discarding lookahead token
end of input ()".
This commit is contained in:
Paul Eggert
2005-05-22 05:20:01 +00:00
parent 5e6f62f2f1
commit cea1469d47
3 changed files with 19 additions and 9 deletions

View File

@@ -480,7 +480,7 @@ _AT_CHECK_CALC_ERROR([$1], [1],
[16],
[2.0: syntax error, unexpected '+'])
# Exercise error messages with EOF: work on an empty file.
_AT_CHECK_CALC_ERROR([$1], [1], [/dev/null], [5],
_AT_CHECK_CALC_ERROR([$1], [1], [/dev/null], [4],
[1.0: syntax error, unexpected end of input])
# Exercise the error token: without it, we die at the first error,