dogfooding: use YYERRCODE in our scanner

* src/scan-gram.l: Use it.
* tests/input.at: Adjust.
This commit is contained in:
Akim Demaille
2020-04-27 07:14:05 +02:00
parent 89c4e1becf
commit 7346163840
3 changed files with 43 additions and 13 deletions

13
NEWS
View File

@@ -2,6 +2,19 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?]
** New features
*** Returning the error token
When the scanner returns an invalid token or the undefined token
(YYUNDEF), the parser generates an error message and enters error
recovery. Because of that error message, most scanners that find lexical
errors generate an error message, and then ignore the invalid input
without entering the error-recovery.
The scanners may now return YYERRCODE, the error token, to enter the
error-recovery mode without triggering an additional error message. See
the bistromathic for an example.
* Noteworthy changes in release 3.5.90 (2020-04-18) [beta]