m4_if(b4_prefix, [yy], [],
[/* Substitute the variable and function names. */
#define yyparse b4_prefix[]parse
-#define yypushparse b4_prefix[]pushparse
+]b4_push_if([#define yypushparse b4_prefix[]pushparse
#define yypvarsinit b4_prefix[]pvarsinit
-#define yypvars b4_prefix[]pvars
+#define yypvars b4_prefix[]pvars])[
#define yylex b4_prefix[]lex
#define yyerror b4_prefix[]error
#define yylval b4_prefix[]lval
YYLTYPE yylloc;])
])
+m4_define([b4_yyssa],b4_push_if([pv->yyssa],[yyssa]))
+m4_define([b4_yyerror_range],b4_push_if([pv->yyerror_range],[yyerror_range]))
+
# b4_declare_yyparse_variables
# ----------------------------
# Declare all the variables that are needed local to YYPARSE
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyssa_ptr;
yytype_int16 *yyss;
yytype_int16 *yyssp;
YYLTYPE *yyls;
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
- YYLTYPE *yyerror_range_ptr;]]])[
+ YYLTYPE yyerror_range[2];]]])[
YYSIZE_T yystacksize;
int yylen;
/* The variables used to return semantic value and location from the
pv->yyerrstatus = 0;
pv->yytoken = 0;
- pv->yyssa_ptr = pv->yyssa;
pv->yyss = pv->yyssa;
pv->yyvs = pv->yyvsa;
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyssa_ptr = yyssa;
yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp;
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
YYLTYPE yyerror_range[2];
- YYLTYPE *yyerror_range_ptr = yyerror_range;
]])[
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)]b4_locations_if([, yylsp -= (N)])[)
yyerrstatus = pv->yyerrstatus;
yytoken = pv->yytoken;
- yyssa_ptr = pv->yyssa_ptr;
yyss = pv->yyss;
yyssp = pv->yyssp;
]b4_locations_if([[ /* The location stack. */
yyls = pv->yyls;
- yylsp = pv->yylsp;
-
- yyerror_range_ptr = pv->yyerror_range_ptr;]])[
+ yylsp = pv->yylsp;]])[
yystacksize = pv->yystacksize;
yylen = pv->yylen;
YYSTACK_RELOCATE (yyvs);
]b4_locations_if([ YYSTACK_RELOCATE (yyls);])[
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa_ptr)
+ if (yyss1 != ]b4_yyssa[)
YYSTACK_FREE (yyss1);
}
# endif
pv->yyerrstatus = yyerrstatus;
pv->yytoken = yytoken;
- pv->yyssa_ptr = yyssa_ptr;
pv->yyss = yyss;
pv->yyssp = yyssp;
]b4_locations_if([[ /* The location stack. */
pv->yyls = yyls;
- pv->yylsp = yylsp;
- pv->yyerror_range_ptr = yyerror_range_ptr;]])[
+ pv->yylsp = yylsp;]])[
pv->yystacksize = yystacksize;
pv->yylen = yylen;
#endif
}
-]b4_locations_if([[ yyerror_range[0] = yylloc;]])[
+]b4_locations_if([[ ]b4_yyerror_range[[0] = yylloc;]])[
if (yyerrstatus == 3)
{
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
-]b4_locations_if([[ yyerror_range[0] = yylsp[1-yylen];
+]b4_locations_if([[ ]b4_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_locations_if([[ yyerror_range[0] = *yylsp;]])[
+]b4_locations_if([[ ]b4_yyerror_range[[0] = *yylsp;]])[
yydestruct ("Error: popping",
yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
YYPOPSTACK (1);
*++yyvsp = yylval;
]b4_locations_if([[
- yyerror_range[1] = yylloc;
+ ]b4_yyerror_range[[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the lookahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range- 1), 2);
+ YYLLOC_DEFAULT (yyloc, (]b4_yyerror_range[- 1), 2);
*++yylsp = yyloc;]])[
/* Shift the error token. */
YYPOPSTACK (1);
}
#ifndef yyoverflow
- if (yyss != yyssa_ptr)
+ if (yyss != ]b4_yyssa[)
YYSTACK_FREE (yyss);
#endif
]b4_push_if([yypushreturn:])[