diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-08-05 08:39:24 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-08-09 07:17:19 +0200 |
commit | 3c5f73fe51a6d61e6a2f6219a9320bf4fd32ae66 (patch) | |
tree | d6f625d49abe74ba2ba2036f756dbf8e3bc8d21b /tests/README.md | |
parent | dabde7c560f249f30e47a1fce7cf29891023f3fc (diff) | |
download | bison-3c5f73fe51a6d61e6a2f6219a9320bf4fd32ae66.tar.gz |
yacc: comply with recent POSIX updates: declare yyerror and yylex
In POSIX Yacc mode, declare yyerror and yylex unless already #defined,
or if YYERROR_IS_DECLARED/YYLEX_IS_DECLARED are defined (for
consistency with Bison's YYSTYPE_IS_DECLARED/YYLTYPE_IS_DECLARED).
See <https://austingroupbugs.net/view.php?id=1388#c5220>.
* data/skeletons/c.m4 (b4_function_declare): Resurect.
(b4_lex_formals): Since we will possibly expose this prototype
in the header, take the prefix into account.
* data/skeletons/yacc.c (b4_declare_yyerror_and_yylex): New.
(b4_shared_declarations): Use it.
* tests/local.at (AT_YACC_IF): New.
When in Yacc mode, set the `yacc` Autotest keyword.
(AT_YYERROR_DECLARE(c)): Don't declare in Yacc mode,
to avoid clashes (since this signature is static).
(AT_YYERROR_DEFINE(c)): Don't define as static in Yacc mode.
* tests/regression.at (Early token definitions with --yacc): Specify
that we are in Yacc mode.
Diffstat (limited to 'tests/README.md')
-rw-r--r-- | tests/README.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/README.md b/tests/README.md index aa409a54..a23f6b8b 100644 --- a/tests/README.md +++ b/tests/README.md @@ -27,6 +27,7 @@ synonyms. - report: for automaton dumps - %union - variant +- yacc: POSIX yacc (%yacc) # Calculator The grammar features several special directives: |