mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
Merge remote-tracking branch 'origin/maint'
* origin/maint: tests: more uniformity. tests: handle locations in a more generic way. tests: handle locations in the generic yyerror functions. tests: fix AT_CHECK_CALC. tests: improve infrastructure tests: factor. skeletons: minor style changes tests: AT_LANG. c skeletons: factor the declaration of yylloc and yylval. news: condemn YYPARSE_PARAM and YYLEX_PARAM. maint: regen. Conflicts: tests/calc.at tests/local.at tests/regression.at
This commit is contained in:
@@ -574,8 +574,8 @@ b4_locations_if([, yylocationp])[]b4_user_args[);
|
||||
|
||||
# b4_declare_yylstype
|
||||
# ------------------
|
||||
# Declaration that might either go into the header (if --defines)
|
||||
# or open coded in the parser body. Declare YYSTYPE and YYLTYPE.
|
||||
# Declarations that might either go into the header (if --defines) or
|
||||
# in the parser body. Declare YYSTYPE/YYLTYPE, and yylval/yylloc.
|
||||
m4_define([b4_declare_yylstype],
|
||||
[[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
]m4_ifdef([b4_stype],
|
||||
@@ -603,6 +603,9 @@ typedef struct YYLTYPE
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif]])
|
||||
|
||||
b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;
|
||||
]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])[]dnl
|
||||
])
|
||||
|
||||
# b4_declare_yydebug
|
||||
|
||||
24
data/glr.c
24
data/glr.c
@@ -195,17 +195,17 @@ b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||
|
||||
]b4_identification
|
||||
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[/* Substitute the variable and function names. */
|
||||
#define yyparse b4_prefix[]parse
|
||||
#define yylex b4_prefix[]lex
|
||||
#define yyerror b4_prefix[]error
|
||||
#define yylval b4_prefix[]lval
|
||||
#define yychar b4_prefix[]char
|
||||
#define yydebug b4_prefix[]debug
|
||||
#define yynerrs b4_prefix[]nerrs
|
||||
#define yylloc b4_prefix[]lloc])[
|
||||
b4_percent_code_get([[top]])[
|
||||
]m4_if(b4_prefix, [yy], [],
|
||||
[[/* Substitute the variable and function names. */
|
||||
#define yyparse ]b4_prefix[parse
|
||||
#define yylex ]b4_prefix[lex
|
||||
#define yyerror ]b4_prefix[error
|
||||
#define yylval ]b4_prefix[lval
|
||||
#define yychar ]b4_prefix[char
|
||||
#define yydebug ]b4_prefix[debug
|
||||
#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[
|
||||
#define yylloc ]b4_prefix[lloc]])])[
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
]b4_user_pre_prologue[
|
||||
@@ -2624,8 +2624,6 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_shared_declarations[
|
||||
]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;
|
||||
]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]])])
|
||||
m4_divert_pop(0)
|
||||
|
||||
@@ -317,8 +317,8 @@ m4_if(b4_prefix, [yy], [],
|
||||
#define yylval ]b4_prefix[lval
|
||||
#define yychar ]b4_prefix[char
|
||||
#define yydebug ]b4_prefix[debug
|
||||
#define yynerrs ]b4_prefix[nerrs
|
||||
]b4_locations_if([[#define yylloc ]b4_prefix[lloc]])])[
|
||||
#define yynerrs ]b4_prefix[nerrs]b4_locations_if([[
|
||||
#define yylloc ]b4_prefix[lloc]])])[
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
]b4_user_pre_prologue[
|
||||
@@ -1999,8 +1999,6 @@ b4_copyright([Bison interface for Yacc-like parsers in C])[
|
||||
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_shared_declarations[
|
||||
]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;
|
||||
]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]])dnl b4_defines_if
|
||||
m4_divert_pop(0)
|
||||
|
||||
Reference in New Issue
Block a user