# ---------------
# Arguments passed to yyerror: user args plus yylloc.
m4_define([b4_yyerror_args],
-[b4_yacc_pure_if([b4_location_if([&yylloc, ])])dnl
+[b4_yacc_pure_if([b4_locations_if([&yylloc, ])])dnl
m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
# b4_lex_param arrives quoted twice, but we want to keep only one level.
m4_define([b4_lex_param],
m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl
-b4_location_if([, [[YYLTYPE *], [&yylloc]]])m4_ifdef([b4_lex_param], [, ])])dnl
+b4_locations_if([, [[YYLTYPE *], [&yylloc]]])m4_ifdef([b4_lex_param], [, ])])dnl
m4_ifdef([b4_lex_param], b4_lex_param)))
m4_changecom()
m4_divert(0)dnl
@output @output_parser_name@
-b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
+b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
USER NAME SPACE" below. */
]b4_identification
-m4_if(b4_prefix[], [yy], [],
+m4_if(b4_prefix, [yy], [],
[/* Substitute the variable and function names. */
#define yyparse b4_prefix[]parse
#define yylex b4_prefix[]lex
#define yychar b4_prefix[]char
#define yydebug b4_prefix[]debug
#define yynerrs b4_prefix[]nerrs
-b4_location_if([#define yylloc b4_prefix[]lloc])])[
+b4_locations_if([#define yylloc b4_prefix[]lloc])])[
]b4_token_enums_defines(b4_tokens)[
/* Enabling traces. */
#ifndef YYDEBUG
-# define YYDEBUG ]b4_debug[
+# define YYDEBUG ]b4_debug_flag[
#endif
/* Enabling verbose error messages. */
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
-# define YYERROR_VERBOSE ]b4_error_verbose[
+# define YYERROR_VERBOSE ]b4_error_verbose_flag[
#endif
/* Enabling the token table. */
# define YYSTYPE_IS_TRIVIAL 1
#endif
-]b4_location_if([#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+]b4_locations_if([#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
int first_line;
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (]b4_location_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ || (]b4_locations_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
&& ]])[defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
{
yytype_int16 yyss;
YYSTYPE yyvs;
- ]b4_location_if([ YYLTYPE yyls;
+ ]b4_locations_if([ YYLTYPE yyls;
])dnl
[};
/* The size of an array large to enough to hold all stacks, each with
N elements. */
-]b4_location_if(
+]b4_locations_if(
[# define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)],
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
-# define YYLEX yylex (]b4_pure_if([&yylval[]b4_location_if([, &yylloc]), ])[YYLEX_PARAM)
+# define YYLEX yylex (]b4_pure_if([&yylval[]b4_locations_if([, &yylloc]), ])[YYLEX_PARAM)
#else
# define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[
#endif
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
- Type, Value]b4_location_if([, Location])[]b4_user_args[); \
+ Type, Value]b4_locations_if([, Location])[]b4_user_args[); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
]b4_c_function_def([yy_reduce_print], [static void],
[[YYSTYPE *yyvsp], [yyvsp]],
- b4_location_if([[[YYLTYPE *yylsp], [yylsp]],])
+ b4_locations_if([[[YYLTYPE *yylsp], [yylsp]],])
[[int yyrule], [yyrule]]m4_ifset([b4_parse_param], [,])
b4_parse_param)[
{
fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&]b4_rhs_value(yynrhs, yyi + 1)[
- ]b4_location_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
+ ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
b4_user_args[);
fprintf (stderr, "\n");
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (yyvsp, ]b4_location_if([yylsp, ])[Rule]b4_user_args[); \
+ yy_reduce_print (yyvsp, ]b4_locations_if([yylsp, ])[Rule]b4_user_args[); \
} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
YYSTYPE yylval;
/* Number of syntax errors so far. */
-int yynerrs;b4_location_if([
+int yynerrs;b4_locations_if([
/* Location data for the look-ahead symbol. */
YYLTYPE yylloc;])
])
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
-]b4_location_if(
+]b4_locations_if(
[[ /* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
/* The locations where the error started and ended. */
YYLTYPE yyerror_range[2];]])[
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)]b4_location_if([, yylsp -= (N)])[)
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)]b4_locations_if([, yylsp -= (N)])[)
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
-]b4_location_if([ YYLTYPE yyloc;])[
+]b4_locations_if([ YYLTYPE yyloc;])[
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
yyssp = yyss;
yyvsp = yyvs;
-]b4_location_if([[ yylsp = yyls;
+]b4_locations_if([[ yylsp = yyls;
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
memory. */
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
-]b4_location_if([ YYLTYPE *yyls1 = yyls;])[
+]b4_locations_if([ YYLTYPE *yyls1 = yyls;])[
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[
+]b4_locations_if([ &yyls1, yysize * sizeof (*yylsp),])[
&yystacksize);
-]b4_location_if([ yyls = yyls1;])[
+]b4_locations_if([ yyls = yyls1;])[
yyss = yyss1;
yyvs = yyvs1;
}
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
-]b4_location_if([ YYSTACK_RELOCATE (yyls);])[
+]b4_locations_if([ YYSTACK_RELOCATE (yyls);])[
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-]b4_location_if([ yylsp = yyls + yysize - 1;])[
+]b4_locations_if([ yylsp = yyls + yysize - 1;])[
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
yystate = yyn;
*++yyvsp = yylval;
-]b4_location_if([ *++yylsp = yylloc;])[
+]b4_locations_if([ *++yylsp = yylloc;])[
goto yynewstate;
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
-]b4_location_if(
+]b4_locations_if(
[[ /* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);]])[
YY_REDUCE_PRINT (yyn);
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
-]b4_location_if([ *++yylsp = yyloc;])[
+]b4_locations_if([ *++yylsp = yyloc;])[
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
#endif
}
-]b4_location_if([[ yyerror_range[0] = yylloc;]])[
+]b4_locations_if([[ yyerror_range[0] = yylloc;]])[
if (yyerrstatus == 3)
{
else
{
yydestruct ("Error: discarding",
- yytoken, &yylval]b4_location_if([, &yylloc])[]b4_user_args[);
+ yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
yychar = YYEMPTY;
}
}
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
-]b4_location_if([[ yyerror_range[0] = yylsp[1-yylen];
+]b4_locations_if([[ yyerror_range[0] = yylsp[1-yylen];
]])[ /* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
if (yyssp == yyss)
YYABORT;
-]b4_location_if([[ yyerror_range[0] = *yylsp;]])[
+]b4_locations_if([[ yyerror_range[0] = *yylsp;]])[
yydestruct ("Error: popping",
- yystos[yystate], yyvsp]b4_location_if([, yylsp])[]b4_user_args[);
+ yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
YYACCEPT;
*++yyvsp = yylval;
-]b4_location_if([[
+]b4_locations_if([[
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the look-ahead. YYLOC is available though. */
yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval]b4_location_if([, &yylloc])[]b4_user_args[);
+ yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[]b4_user_args[);
+ yystos[*yyssp], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
YYPOPSTACK (1);
}
#ifndef yyoverflow
b4_epilogue
-m4_if(b4_defines_flag, 0, [],
+b4_defines_if(
[@output @output_header_name@
-b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
+b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
b4_token_enums_defines(b4_tokens)
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
b4_pure_if([],
[extern YYSTYPE b4_prefix[]lval;])
-b4_location_if(
+b4_locations_if(
[#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
# define YYLTYPE_IS_TRIVIAL 1
#endif
-m4_if(b4_pure, [0],
-[extern YYLTYPE b4_prefix[]lloc;])
-])
-])
+b4_pure_if([],
+ [extern YYLTYPE b4_prefix[]lloc;])
+])dnl b4_locations_if
+])dnl b4_defines_if