c: add support for YYNOMEM

Suggested by Joe Nelson <joe@begriffs.com>.
https://lists.gnu.org/r/help-bison/2020-12/msg00020.html

* data/skeletons/glr.c, data/skeletons/yacc.c (YYNOMEM): New.
Use it.
(yyexhaustedlab): Rename as...
(yynomemlab): this.
* tests/calc.at: Check it.
* doc/bison.texi: Document it.
Fix incorrect statements about non-existing constants for YYERROR etc.
This commit is contained in:
Akim Demaille
2021-01-16 09:17:07 +01:00
parent a9f9f317b5
commit 17fb1d0377
6 changed files with 67 additions and 35 deletions

5
NEWS
View File

@@ -64,6 +64,11 @@ GNU Bison NEWS
The Java skeleton (lalr1.java) now supports LAC, via the `parse.lac`
%define variable.
*** Abort parsing for memory exhaustion (C)
The user actions may now use YYNOMEM to abort the current parse with
memory exhaustion.
* Noteworthy changes in release 3.7.4 (2020-11-14) [stable]