mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Merge remote-tracking branch 'origin/maint'
* origin/maint: maint: formatting changes. tests: support api.prefix. tests: pacify font-lock-mode. tests: remove test covered elsewhere. tests: factor the declaration/definition of yyerror and yylex. regen. tests: portability issues. tests: call the parser from another compilation unit. glr.c, yacc.c: declare yydebug in the header. skeletons: use header guards. tests: improve AT_FULL_COMPILE. tests: reorder. tests: strengthen the test on generated headers inclusion yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it. yacc.c: factor. Conflicts: NEWS data/glr.c data/yacc.c src/parse-gram.c src/parse-gram.h tests/conflicts.at tests/regression.at
This commit is contained in:
29
data/glr.c
29
data/glr.c
@@ -171,9 +171,11 @@ m4_define([b4_rhs_location],
|
||||
# Declaration that might either go into the header (if --defines)
|
||||
# or open coded in the parser body.
|
||||
m4_define([b4_shared_declarations],
|
||||
[b4_percent_code_get([[requires]])[
|
||||
[b4_declare_yydebug[
|
||||
]b4_percent_code_get([[requires]])[
|
||||
]b4_token_enums(b4_tokens)[
|
||||
]b4_declare_yylstype[
|
||||
]b4_c_ansi_function_decl(b4_prefix[parse], [int], b4_parse_param)[
|
||||
]b4_percent_code_get([[provides]])[]dnl
|
||||
])
|
||||
|
||||
@@ -213,11 +215,6 @@ m4_if(b4_prefix, [yy], [],
|
||||
]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
|
||||
[b4_shared_declarations])[
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG ]b4_parse_trace_if([1], [0])[
|
||||
#endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
# undef YYERROR_VERBOSE
|
||||
@@ -417,9 +414,6 @@ dnl We probably ought to introduce a type for confl.
|
||||
]b4_conflicting_rules[
|
||||
};
|
||||
|
||||
/* Prevent warning if -Wmissing-prototypes. */
|
||||
]b4_c_ansi_function_decl([yyparse], [int], b4_parse_param)[
|
||||
|
||||
/* Error token number */
|
||||
#define YYTERROR 1
|
||||
|
||||
@@ -2626,15 +2620,12 @@ m4_if(b4_skeleton, ["glr.c"],
|
||||
[b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||
[2002-2012])
|
||||
[2002-2012])[
|
||||
|
||||
b4_shared_declarations
|
||||
|
||||
b4_pure_if([],
|
||||
[[extern YYSTYPE ]b4_prefix[lval;]])
|
||||
|
||||
b4_locations_if([b4_pure_if([],
|
||||
[extern YYLTYPE ]b4_prefix[lloc;])
|
||||
])
|
||||
])])[]dnl
|
||||
]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)
|
||||
|
||||
Reference in New Issue
Block a user