mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
api.prefix.
* data/c.m4 (b4_api_prefix, b4_api_PREFIX): New. (b4_prefix, b4_union_name, b4_token_enums, b4_declare_yylstype): Use them. * data/glr.c, data/yacc.c, data/glr.cc, data/lalr1.cc: Use them to change the prefix of exported preprocessor symbols. * src/getargs.c (usage): Ditto. * tests/headers.at (Several parsers): New. * tests/local.at (AT_API_PREFIX): New. AT_YYSTYPE, AT_YYLTYPE): Adjust. * doc/bison.texi (Multiple Parsers): Move documentation of %name-prefix to... (Table of Symbols): here. (Multiple Parsers): Document api.prefix. (%define Summary): Point to it. Use @code for variable names. (Bison Options): -p/--name-prefix are obsoleted. * NEWS: Announce api.prefix.
This commit is contained in:
@@ -188,6 +188,14 @@ b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||
]b4_identification
|
||||
|
||||
b4_percent_code_get([[top]])[
|
||||
]m4_if(b4_api_prefix, [yy], [],
|
||||
[[/* Substitute the type names. */
|
||||
#define YYSTYPE ]b4_api_PREFIX[STYPE
|
||||
#define YYSTYPE_IS_TRIVIAL ]b4_api_PREFIX[STYPE_IS_TRIVIAL
|
||||
#define YYSTYPE_IS_DECLARED ]b4_api_PREFIX[STYPE_IS_DECLARED]b4_locations_if([[
|
||||
#define YYLTYPE ]b4_api_PREFIX[LTYPE
|
||||
#define YYLTYPE_IS_TRIVIAL ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
|
||||
#define YYLTYPE_IS_DECLARED ]b4_api_PREFIX[LTYPE_IS_DECLARED]])])[
|
||||
]m4_if(b4_prefix, [yy], [],
|
||||
[[/* Substitute the variable and function names. */
|
||||
#define yyparse ]b4_prefix[parse
|
||||
|
||||
Reference in New Issue
Block a user