yacc.c: make sure we properly propagated the user's number for error

* data/skeletons/yacc.c (YYERRCODE): Be truthful.
* tests/input.at (Redefining the error token): Check that.
This commit is contained in:
Akim Demaille
2020-03-08 07:56:39 +01:00
parent cfcd823e16
commit e3812bb8c3
3 changed files with 18 additions and 8 deletions

9
TODO
View File

@@ -315,13 +315,8 @@ It would be a very nice source of inspiration for the other languages.
Valentin Tolmer is working on this.
** YYERRCODE
Defined to 256, but not used, not documented. Probably the token
number for the error token, which POSIX wants to be 256, but which
Bison might renumber if the user used number 256. Keep fix and doc?
Throw away?
Also, why don't we output the token name of the error token in the
output? It is explicitly skipped:
Why don't we output the token name of the error token in the output? It is
explicitly skipped:
/* Skip error token and tokens without identifier. */
if (sym != errtoken && id)