# Yacc compatible skeleton for Bison
-# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1984, 1989-1990, 2000-2010 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
# We do want M4 expansion after # for CPP macros.
m4_changecom()
m4_divert_push(0)dnl
-@output(b4_parser_file_name@)
-b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
- [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
+@output(b4_parser_file_name@)@
+b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],
+ [1984, 1989-1990, 2000-2006, 2009-2010])[
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
- YYSTYPE yyval;
-]b4_locations_if([[ YYLTYPE yyloc;
-]])[
+ YYSTYPE yyval;]b4_locations_if([[
+ YYLTYPE yyloc;]])[
+
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
- int yylen = 0;
-]b4_push_if([[
+ int yylen = 0;]b4_push_if([[
+
if (!yyps->yynew)
{
yyn = yypact[yystate];
goto yyread_pushed_token;
- }
-]])[
+ }]])[
+
yytoken = 0;
yyss = yyssa;
- yyvs = yyvsa;
-]b4_locations_if([[ yyls = yylsa;
-]])[
+ yyvs = yyvsa;]b4_locations_if([[
+ yyls = yylsa;]])[
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yyvsp = yyvs;]b4_locations_if([[
yylsp = yyls;
-#if YYLTYPE_IS_TRIVIAL
+#if defined YYLTYPE_IS_TRIVIAL && 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[;
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
- {
-]b4_push_if([[ if (!yyps->yynew)
- {
-]b4_use_push_for_pull_if([],
-[[ YYDPRINTF ((stderr, "Return for a new token:\n"));
-]])[ yyresult = YYPUSH_MORE;
+ {]b4_push_if([[
+ if (!yyps->yynew)
+ {]b4_use_push_for_pull_if([], [[
+ YYDPRINTF ((stderr, "Return for a new token:\n"));]])[
+ yyresult = YYPUSH_MORE;
goto yypushreturn;
}
- yyps->yynew = 0;
-]b4_pure_if([], [[
+ yyps->yynew = 0;]b4_pure_if([], [[
/* Restoring the pushed token is only necessary for the first
yypush_parse invocation since subsequent invocations don't overwrite
it before jumping to yyread_pushed_token. */
yychar = yypushed_char;
- yylval = yypushed_val;
- ]b4_locations_if([[yylloc = yypushed_loc;
-]])])[
-yyread_pushed_token:
-]])[ YYDPRINTF ((stderr, "Reading a token: "));
-]b4_push_if([b4_pure_if([[ yychar = yypushed_char;
+ yylval = yypushed_val;]b4_locations_if([[
+ yylloc = yypushed_loc;]])])[
+yyread_pushed_token:]])[
+ YYDPRINTF ((stderr, "Reading a token: "));]b4_push_if([b4_pure_if([[
+ yychar = yypushed_char;
if (yypushed_val)
- yylval = *yypushed_val;
-]b4_locations_if([[ if (yypushed_loc)
- yylloc = *yypushed_loc;
-]])])],
-[[ yychar = YYLEX;
-]])[ }
+ yylval = *yypushed_val;]b4_locations_if([[
+ if (yypushed_loc)
+ yylloc = *yypushed_loc;]])])], [[
+ yychar = YYLEX;]])[
+ }
if (yychar <= YYEOF)
{
]b4_epilogue
b4_defines_if(
-[@output(b4_spec_defines_file@)
-b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
- [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
+[@output(b4_spec_defines_file@)@
+b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],
+ [1984, 1989-1990, 2000-2006, 2009-2010])
b4_percent_code_get([[requires]])[]dnl