# Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007 Free Software Foundation, Inc.
+# 2007, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
USER NAME SPACE" below. */
]b4_identification
-
b4_percent_code_get([[top]])[]dnl
m4_if(b4_prefix, [yy], [],
[[/* Substitute the variable and function names. */
# define YYSTYPE_IS_TRIVIAL 1]])])[
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-#endif
+#endif]b4_locations_if([[
-]b4_locations_if([#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
int first_line;
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
-#endif])
+#endif]])b4_push_if([[
-b4_push_if([[#ifndef YYPUSH_DECLS
+#ifndef YYPUSH_DECLS
# define YYPUSH_DECLS
struct yypstate;
typedef struct yypstate yypstate;
b4_c_function_decl([[yypstate_new]], [[yypstate *]], [[[void]], []])
b4_c_function_decl([[yypstate_delete]], [[void]],
[[[yypstate *yyps]], [[yyps]]])[
-#endif
-]])
+#endif]])
+
b4_percent_code_get([[provides]])[]dnl
[/* Copy the second part of user declarations. */
union yyalloc
{
yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
- ]b4_locations_if([ YYLTYPE yyls_alloc;
-])dnl
-[};
+ YYSTYPE yyvs_alloc;]b4_locations_if([
+ YYLTYPE yyls_alloc;])[
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.]b4_locations_if([[
+ `yyls': related to locations.]])[
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
#define yyerror_range yyps->yyerror_range
]])[#define yystacksize yyps->yystacksize
]])[
-
/*-------------------------.
| yyparse or yypush_parse. |
`-------------------------*/
-
]b4_push_if([
b4_c_function_def([[yypush_parse]], [[int]],
[[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
[b4_declare_parser_state_variables])[
int yyn;
int yyresult;
- /* Look-ahead token as an internal (translated) token number. */
+ /* Lookahead token as an internal (translated) token number. */
int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
- yyvsp = yyvs;
-]b4_locations_if([[ yylsp = yyls;
+ yyvsp = yyvs;]b4_locations_if([[
+ yylsp = yyls;
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
-#endif
-]])
-m4_ifdef([b4_initial_action], [
+#endif]])
+m4_ifdef([b4_initial_action],[
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
/* User initialization code. */
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
]])dnl
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
-]])dnl
-[
+]])[
goto yysetstate;
/*------------------------------------------------------------.
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-]b4_locations_if([ YYLTYPE *yyls1 = yyls;])[
+ yytype_int16 *yyss1 = yyss;]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
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
-]b4_locations_if([ &yyls1, yysize * sizeof (*yylsp),])[
+ &yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([
+ &yyls1, yysize * sizeof (*yylsp),])[
&yystacksize);
-]b4_locations_if([ yyls = yyls1;])[
+]b4_locations_if([
+ yyls = yyls1;])[
yyss = yyss1;
yyvs = yyvs1;
}
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-]b4_locations_if([ YYSTACK_RELOCATE (yyls_alloc, yyls);])[
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
+ YYSTACK_RELOCATE (yyls_alloc, yyls);])[
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-]b4_locations_if([ yylsp = yyls + yysize - 1;])[
+ yyvsp = yyvs + yysize - 1;]b4_locations_if([
+ yylsp = yyls + yysize - 1;])[
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
- *++yyvsp = yyval;
-]b4_locations_if([ *++yylsp = yyloc;])[
+ *++yyvsp = yyval;]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
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]])
)dnl b4_locations_if
-
-b4_push_if([[#ifndef YYPUSH_DECLS
+b4_push_if([[
+#ifndef YYPUSH_DECLS
# define YYPUSH_DECLS
struct ]b4_prefix[pstate;
typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;