all: display a clear warning about private macros

* data/bison.m4 (b4_disclaimer): New.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
This commit is contained in:
Akim Demaille
2018-10-21 19:10:41 +02:00
parent ba29791773
commit 73917e9e6f
8 changed files with 49 additions and 24 deletions

View File

@@ -299,9 +299,8 @@ m4_define([b4_shared_declarations],
## Output files. ##
## -------------- ##
b4_output_begin([b4_parser_file_name])
b4_copyright([Bison implementation for Yacc-like parsers in C])[
b4_output_begin([b4_parser_file_name])[
]b4_copyright([Bison implementation for Yacc-like parsers in C])[
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
@@ -312,8 +311,9 @@ b4_copyright([Bison implementation for Yacc-like parsers in C])[
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
]b4_identification
b4_percent_code_get([[top]])[]dnl
]b4_disclaimer[
]b4_identification[
]b4_percent_code_get([[top]])[]dnl
m4_if(b4_api_prefix, [yy], [],
[[/* Substitute the type names. */
#define YYSTYPE ]b4_api_PREFIX[STYPE]b4_locations_if([[
@@ -1906,10 +1906,10 @@ yypushreturn:]])[
]b4_epilogue[]dnl
b4_output_end
b4_defines_if(
[b4_output_begin([b4_spec_defines_file])[
b4_defines_if([[
]b4_output_begin([b4_spec_defines_file])[
]b4_copyright([Bison interface for Yacc-like parsers in C])[
]b4_disclaimer[
]b4_shared_declarations[
]b4_output_end
])# b4_defines_if
]b4_output_end[
]])# b4_defines_if