glr.c: obey the parse.assert %define variable

* data/skeletons/glr.c (YYASSERT): Rename as...
(YY_ASSERT): this, for consistency with yacc.c, and also to emphasize
the fact that this is not for the end user (YY_ prefix).
* tests/glr-regression.at: Define parse.assert.
This commit is contained in:
Akim Demaille
2019-12-07 09:47:54 +01:00
parent d4a6c3c58a
commit 357336d254
5 changed files with 58 additions and 34 deletions

View File

@@ -6494,9 +6494,12 @@ Obsoleted by @code{api.namespace}
@deffn Directive {%define parse.assert}
@itemize
@item Languages(s): C++
@item Languages(s): C, C++
@item Purpose: Issue runtime assertions to catch invalid uses.
In C, some important invariants in the implementation of the parser are
checked when this option is enabled.
In C++, when variants are used (@pxref{C++ Variants}), symbols must be
constructed and destroyed properly. This option checks these constraints.