# define YYSIZE_T unsigned int
#endif
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
#endif
#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
};
#endif
-#ifndef YYI18N
-# if YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YYI18N(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YYI18N
-# define YYI18N(msgid) msgid
-# endif
-#endif
-
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
} \
else \
{ \
- yyerror (]b4_yyerror_args[YYI18N ("syntax error: cannot back up")); \
+ yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
[[short int *bottom], [bottom]],
[[short int *top], [top]])[
{
- YYFPRINTF (stderr, YYI18N ("Stack now"));
+ YYFPRINTF (stderr, "Stack now");
for (/* Nothing. */; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
[[int yyrule], [yyrule]])[
{
int yyi;
- unsigned int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, YYI18N ("Reducing stack by rule %d (line %u), "),
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule) \
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
\f
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow (YYI18N ("parser stack overflow"),
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
]b4_location_if([ YYSTACK_RELOCATE (yyls);])[
yyvsp = yyvs + yysize - 1;
]b4_location_if([ yylsp = yyls + yysize - 1;])[
- YYDPRINTF ((stderr, YYI18N ("Stack size increased to %lu\n"),
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
- YYDPRINTF ((stderr, YYI18N ("Entering state %d\n"), yystate));
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, YYI18N ("Reading a token: ")));
+ YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
if (yychar <= YYEOF)
{
yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, YYI18N ("Now at end of input.\n")));
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT (YYI18N ("Next token is"), yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
YYACCEPT;
/* Shift the look-ahead token. */
- YY_SYMBOL_PRINT (YYI18N ("Shifting"), yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yystrlen (yytname[yytype]);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
#if 0
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */
- YYI18N ("syntax error, unexpected %s");
- YYI18N ("syntax error, unexpected %s, expecting %s");
- YYI18N ("syntax error, unexpected %s, expecting %s or %s");
- YYI18N ("syntax error, unexpected %s, expecting %s or %s or %s");
- YYI18N ("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
#endif
char *yyfmt;
char const *yyf;
break;
}
yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yystrlen (yytname[yyx]);
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
}
- yyf = YYI18N (yyformat);
+ yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
- yyp = yystpcpy (yyp, yyarg[yyi++]);
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
YYSTACK_FREE (yymsg);
}
else
- yyerror (]b4_yyerror_args[YYI18N ("syntax error; also memory exhausted"));
+ {
+ yyerror (]b4_yyerror_args[YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror (]b4_yyerror_args[YYI18N ("syntax error"));
+ yyerror (]b4_yyerror_args[YY_("syntax error"));
}
]b4_location_if([[ yyerror_range[0] = yylloc;]])[
if (yychar <= YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
+ /* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
- yydestruct (YYI18N ("Error: discarding"), yytoken, &yylval]b4_location_if([, &yylloc])[);
+ yydestruct ("Error: discarding", yytoken, &yylval]b4_location_if([, &yylloc])[);
yychar = YYEMPTY;
}
}
YYABORT;
]b4_location_if([[ yyerror_range[0] = *yylsp;]])[
- yydestruct (YYI18N ("Error: popping"), yystos[yystate], yyvsp]b4_location_if([, yylsp])[);
+ yydestruct ("Error: popping", yystos[yystate], yyvsp]b4_location_if([, yylsp])[);
YYPOPSTACK;
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
*++yylsp = yyloc;]])[
/* Shift the error token. */
- YY_SYMBOL_PRINT (YYI18N ("Shifting"), yystos[yyn], yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror (]b4_yyerror_args[YYI18N ("parser stack overflow"));
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (]b4_yyerror_args[YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct (YYI18N ("Error: discarding lookahead"),
+ yydestruct ("Error: discarding lookahead",
yytoken, &yylval]b4_location_if([, &yylloc])[);
- if (yyssp != yyss)
- for (;;)
- {
-]b4_location_if([[ yyerror_range[0] = *yylsp;]])[
- YYPOPSTACK;
- if (yyssp == yyss)
- break;
- yydestruct (YYI18N ("Error: popping"),
- yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
- }
+ while (yyssp != yyss)
+ {
+ yydestruct ("Error: popping",
+ yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
+ YYPOPSTACK;
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);