summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/prebuilt
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-10-12 11:39:32 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-10-12 11:47:28 +0200
commita7ca20b9059354421ecf837a47eb9618f3c52a5d (patch)
treec74d1aebdfb78220aff37318188c2851be2aff2d /crawl-ref/source/prebuilt
parent7528ae825b9a70d3e60c0ad12ce943896c454cc7 (diff)
downloadcrawl-ref-a7ca20b9059354421ecf837a47eb9618f3c52a5d.tar.gz
crawl-ref-a7ca20b9059354421ecf837a47eb9618f3c52a5d.zip
Regenerate the prebuilt yaccage.
In a separate commit to separate the generated noise from actual changes. Usual gripe about having generated files under version control applies, but it'd be tricky to have executables in contribs so we still keep the prebuilt copies.
Diffstat (limited to 'crawl-ref/source/prebuilt')
-rw-r--r--crawl-ref/source/prebuilt/levcomp.lex.cc32
-rw-r--r--crawl-ref/source/prebuilt/levcomp.tab.cc657
-rw-r--r--crawl-ref/source/prebuilt/levcomp.tab.h13
3 files changed, 378 insertions, 324 deletions
diff --git a/crawl-ref/source/prebuilt/levcomp.lex.cc b/crawl-ref/source/prebuilt/levcomp.lex.cc
index d282c8415e..dc98c97c51 100644
--- a/crawl-ref/source/prebuilt/levcomp.lex.cc
+++ b/crawl-ref/source/prebuilt/levcomp.lex.cc
@@ -54,7 +54,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -141,7 +142,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -1788,10 +1797,10 @@ char *yytext;
//
// Based loosely on NetHack's lev_comp.l
+#include "AppHdr.h"
#include <algorithm>
#include <cstring>
#include <queue>
-#include "AppHdr.h"
#include "mapdef.h"
#include "levcomp.tab.h"
#include "stuff.h"
@@ -1916,7 +1925,7 @@ static void cattext(bool trim_right = false, int strip_trailing = 0)
-#line 1920 "levcomp.lex.cc"
+#line 1929 "levcomp.lex.cc"
#define INITIAL 0
#define MAPDEF 1
@@ -2004,7 +2013,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -2012,7 +2026,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -2023,7 +2037,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2111,7 +2125,7 @@ YY_DECL
#line 145 "levcomp.lpp"
-#line 2115 "levcomp.lex.cc"
+#line 2129 "levcomp.lex.cc"
if ( !(yy_init) )
{
@@ -2698,7 +2712,7 @@ YY_RULE_SETUP
#line 303 "levcomp.lpp"
ECHO;
YY_BREAK
-#line 2702 "levcomp.lex.cc"
+#line 2716 "levcomp.lex.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(MAPDEF):
case YY_STATE_EOF(LUA):
@@ -3471,8 +3485,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
diff --git a/crawl-ref/source/prebuilt/levcomp.tab.cc b/crawl-ref/source/prebuilt/levcomp.tab.cc
index 15401a1bfb..85d6d5ab37 100644
--- a/crawl-ref/source/prebuilt/levcomp.tab.cc
+++ b/crawl-ref/source/prebuilt/levcomp.tab.cc
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2011 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
@@ -45,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -66,14 +65,14 @@
/* Copy the first part of user declarations. */
-/* Line 189 of yacc.c */
+/* Line 268 of yacc.c */
#line 1 "levcomp.ypp"
-#include <map>
-#include <algorithm>
#include "AppHdr.h"
+#include <map>
+#include <algorithm>
#include "l_defs.h"
#include "libutil.h"
#include "mapdef.h"
@@ -88,7 +87,7 @@ int yylex();
extern int yylineno;
-void yyerror(const char *e)
+NORETURN void yyerror(const char *e)
{
if (strstr(e, lc_desfile.c_str()) == e)
fprintf(stderr, "%s\n", e);
@@ -100,8 +99,8 @@ void yyerror(const char *e)
-/* Line 189 of yacc.c */
-#line 105 "levcomp.tab.c"
+/* Line 268 of yacc.c */
+#line 104 "levcomp.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -237,7 +236,7 @@ void yyerror(const char *e)
typedef union YYSTYPE
{
-/* Line 214 of yacc.c */
+/* Line 293 of yacc.c */
#line 34 "levcomp.ypp"
int i;
@@ -247,8 +246,8 @@ typedef union YYSTYPE
-/* Line 214 of yacc.c */
-#line 252 "levcomp.tab.c"
+/* Line 293 of yacc.c */
+#line 251 "levcomp.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -259,8 +258,8 @@ typedef union YYSTYPE
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 264 "levcomp.tab.c"
+/* Line 343 of yacc.c */
+#line 263 "levcomp.tab.c"
#ifdef short
# undef short
@@ -363,11 +362,11 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -390,24 +389,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -436,23 +435,7 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
+# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -472,6 +455,26 @@ union yyalloc
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
@@ -722,8 +725,8 @@ static const yytype_uint8 yyr2[] =
1, 2, 1, 3, 1
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
@@ -810,8 +813,7 @@ static const yytype_int16 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
+ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
@@ -829,6 +831,12 @@ static const yytype_uint8 yytable[] =
199, 197, 196, 198, 206, 0, 163
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-129))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
static const yytype_int16 yycheck[] =
{
4, 5, 6, 7, 8, 9, 10, 11, 0, 13,
@@ -905,7 +913,6 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -947,19 +954,10 @@ while (YYID (0))
#endif
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
+/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
-# 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, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
@@ -1151,7 +1149,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -1254,115 +1251,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- 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;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1395,6 +1419,7 @@ yydestruct (yymsg, yytype, yyvaluep)
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
@@ -1421,10 +1446,9 @@ YYSTYPE yylval;
int yynerrs;
-
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1448,8 +1472,6 @@ yyparse ()
#endif
#endif
{
-
-
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
@@ -1604,7 +1626,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
@@ -1635,8 +1657,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -1691,42 +1713,42 @@ yyreduce:
{
case 2:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 60 "levcomp.ypp"
{ }
break;
case 3:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 63 "levcomp.ypp"
{}
break;
case 4:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 64 "levcomp.ypp"
{}
break;
case 5:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 67 "levcomp.ypp"
{}
break;
case 6:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 68 "levcomp.ypp"
{}
break;
case 7:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 72 "levcomp.ypp"
{
yyerror("Unexpected character sequence.");
@@ -1735,21 +1757,21 @@ yyreduce:
case 8:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 77 "levcomp.ypp"
{}
break;
case 9:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 78 "levcomp.ypp"
{}
break;
case 10:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 82 "levcomp.ypp"
{
dgn_reset_default_depth();
@@ -1762,7 +1784,7 @@ yyreduce:
case 11:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 92 "levcomp.ypp"
{
lc_map.set_file(lc_desfile);
@@ -1786,35 +1808,35 @@ yyreduce:
case 12:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 112 "levcomp.ypp"
{ }
break;
case 13:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 113 "levcomp.ypp"
{ }
break;
case 14:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 116 "levcomp.ypp"
{ }
break;
case 15:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 117 "levcomp.ypp"
{ }
break;
case 16:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 121 "levcomp.ypp"
{
lc_map.init();
@@ -1841,35 +1863,35 @@ yyreduce:
case 53:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 180 "levcomp.ypp"
{}
break;
case 54:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 183 "levcomp.ypp"
{ }
break;
case 55:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 185 "levcomp.ypp"
{ }
break;
case 56:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 186 "levcomp.ypp"
{ }
break;
case 57:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 190 "levcomp.ypp"
{
lc_global_prelude.add(yylineno, (yyvsp[(1) - (1)].text));
@@ -1878,28 +1900,28 @@ yyreduce:
case 58:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 194 "levcomp.ypp"
{ }
break;
case 59:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 196 "levcomp.ypp"
{ }
break;
case 60:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 197 "levcomp.ypp"
{ }
break;
case 61:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 201 "levcomp.ypp"
{
lc_map.main.add(yylineno, (yyvsp[(1) - (1)].text));
@@ -1908,28 +1930,28 @@ yyreduce:
case 62:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 205 "levcomp.ypp"
{ }
break;
case 63:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 207 "levcomp.ypp"
{ }
break;
case 64:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 208 "levcomp.ypp"
{ }
break;
case 65:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 212 "levcomp.ypp"
{
lc_map.validate.add(yylineno, (yyvsp[(1) - (1)].text));
@@ -1938,28 +1960,28 @@ yyreduce:
case 66:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 216 "levcomp.ypp"
{ }
break;
case 67:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 218 "levcomp.ypp"
{ }
break;
case 68:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 219 "levcomp.ypp"
{ }
break;
case 69:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 223 "levcomp.ypp"
{
lc_map.veto.add(yylineno, (yyvsp[(1) - (1)].text));
@@ -1968,28 +1990,28 @@ yyreduce:
case 70:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 227 "levcomp.ypp"
{ }
break;
case 71:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 229 "levcomp.ypp"
{ }
break;
case 72:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 230 "levcomp.ypp"
{ }
break;
case 73:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 234 "levcomp.ypp"
{
lc_map.prelude.add(yylineno, (yyvsp[(1) - (1)].text));
@@ -1998,28 +2020,28 @@ yyreduce:
case 74:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 238 "levcomp.ypp"
{ }
break;
case 75:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 240 "levcomp.ypp"
{ }
break;
case 76:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 241 "levcomp.ypp"
{ }
break;
case 77:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 245 "levcomp.ypp"
{
lc_map.epilogue.add(yylineno, (yyvsp[(1) - (1)].text));
@@ -2028,14 +2050,14 @@ yyreduce:
case 78:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 249 "levcomp.ypp"
{ }
break;
case 79:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 251 "levcomp.ypp"
{
lc_map.main.add(
@@ -2047,14 +2069,14 @@ yyreduce:
case 80:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 258 "levcomp.ypp"
{ }
break;
case 81:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 260 "levcomp.ypp"
{
lc_map.main.add(
@@ -2066,14 +2088,14 @@ yyreduce:
case 82:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 267 "levcomp.ypp"
{ }
break;
case 83:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 269 "levcomp.ypp"
{
lc_map.main.add(
@@ -2085,14 +2107,14 @@ yyreduce:
case 84:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 276 "levcomp.ypp"
{ }
break;
case 85:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 278 "levcomp.ypp"
{
lc_map.main.add(
@@ -2104,14 +2126,14 @@ yyreduce:
case 86:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 285 "levcomp.ypp"
{ }
break;
case 87:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 287 "levcomp.ypp"
{
lc_map.main.add(
@@ -2123,14 +2145,14 @@ yyreduce:
case 88:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 294 "levcomp.ypp"
{}
break;
case 91:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 302 "levcomp.ypp"
{
lc_map.main.add(
@@ -2142,14 +2164,14 @@ yyreduce:
case 92:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 309 "levcomp.ypp"
{}
break;
case 95:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 317 "levcomp.ypp"
{
lc_map.main.add(
@@ -2161,7 +2183,7 @@ yyreduce:
case 96:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 326 "levcomp.ypp"
{
lc_map.main.add(
@@ -2173,7 +2195,7 @@ yyreduce:
case 97:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 335 "levcomp.ypp"
{
lc_map.main.add(
@@ -2185,7 +2207,7 @@ yyreduce:
case 98:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 344 "levcomp.ypp"
{
std::string key, arg;
@@ -2221,21 +2243,21 @@ yyreduce:
case 99:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 376 "levcomp.ypp"
{ }
break;
case 100:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 379 "levcomp.ypp"
{ }
break;
case 101:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 381 "levcomp.ypp"
{
lc_map.main.add(
@@ -2247,14 +2269,14 @@ yyreduce:
case 102:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 388 "levcomp.ypp"
{ }
break;
case 103:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 390 "levcomp.ypp"
{
lc_map.main.add(
@@ -2266,14 +2288,14 @@ yyreduce:
case 104:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 397 "levcomp.ypp"
{ }
break;
case 105:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 399 "levcomp.ypp"
{
lc_map.main.add(
@@ -2285,14 +2307,14 @@ yyreduce:
case 106:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 407 "levcomp.ypp"
{ }
break;
case 107:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 409 "levcomp.ypp"
{
lc_map.main.add(
@@ -2304,7 +2326,7 @@ yyreduce:
case 111:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 424 "levcomp.ypp"
{
lc_map.main.add(
@@ -2316,7 +2338,7 @@ yyreduce:
case 115:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 440 "levcomp.ypp"
{
lc_map.main.add(
@@ -2328,7 +2350,7 @@ yyreduce:
case 119:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 456 "levcomp.ypp"
{
lc_map.main.add(
@@ -2340,7 +2362,7 @@ yyreduce:
case 123:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 472 "levcomp.ypp"
{
lc_map.main.add(
@@ -2352,21 +2374,21 @@ yyreduce:
case 124:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 481 "levcomp.ypp"
{ }
break;
case 125:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 482 "levcomp.ypp"
{ }
break;
case 126:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 486 "levcomp.ypp"
{
lc_map.main.add(
@@ -2378,28 +2400,28 @@ yyreduce:
case 127:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 494 "levcomp.ypp"
{ }
break;
case 128:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 497 "levcomp.ypp"
{ }
break;
case 129:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 498 "levcomp.ypp"
{ }
break;
case 130:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 502 "levcomp.ypp"
{
lc_map.main.add(
@@ -2411,14 +2433,14 @@ yyreduce:
case 131:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 510 "levcomp.ypp"
{ }
break;
case 134:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 518 "levcomp.ypp"
{
lc_map.main.add(
@@ -2430,21 +2452,21 @@ yyreduce:
case 135:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 526 "levcomp.ypp"
{}
break;
case 136:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 527 "levcomp.ypp"
{}
break;
case 139:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 535 "levcomp.ypp"
{
lc_map.main.add(
@@ -2456,21 +2478,21 @@ yyreduce:
case 140:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 542 "levcomp.ypp"
{}
break;
case 141:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 543 "levcomp.ypp"
{}
break;
case 144:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 551 "levcomp.ypp"
{
lc_map.main.add(
@@ -2482,7 +2504,7 @@ yyreduce:
case 145:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 560 "levcomp.ypp"
{
lc_map.main.add(
@@ -2494,7 +2516,7 @@ yyreduce:
case 146:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 569 "levcomp.ypp"
{
lc_map.main.add(
@@ -2506,14 +2528,14 @@ yyreduce:
case 147:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 577 "levcomp.ypp"
{}
break;
case 148:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 579 "levcomp.ypp"
{
lc_map.main.add(
@@ -2525,21 +2547,21 @@ yyreduce:
case 149:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 587 "levcomp.ypp"
{ }
break;
case 150:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 588 "levcomp.ypp"
{ }
break;
case 153:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 595 "levcomp.ypp"
{
(yyval.i) = (yyvsp[(1) - (2)].f) * 100;
@@ -2548,7 +2570,7 @@ yyreduce:
case 154:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 599 "levcomp.ypp"
{
(yyval.i) = (yyvsp[(1) - (1)].f);
@@ -2557,7 +2579,7 @@ yyreduce:
case 155:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 604 "levcomp.ypp"
{
(yyval.chance).priority = (yyvsp[(1) - (3)].f);
@@ -2567,7 +2589,7 @@ yyreduce:
case 156:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 609 "levcomp.ypp"
{
(yyval.chance).priority = DEFAULT_CHANCE_PRIORITY;
@@ -2577,7 +2599,7 @@ yyreduce:
case 157:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 616 "levcomp.ypp"
{
lc_map.main.add(
@@ -2590,7 +2612,7 @@ yyreduce:
case 158:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 624 "levcomp.ypp"
{
lc_map.main.add(
@@ -2602,7 +2624,7 @@ yyreduce:
case 162:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 638 "levcomp.ypp"
{
lc_map.main.add(
@@ -2614,7 +2636,7 @@ yyreduce:
case 163:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 645 "levcomp.ypp"
{
lc_map.main.add(
@@ -2625,14 +2647,14 @@ yyreduce:
case 164:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 652 "levcomp.ypp"
{}
break;
case 165:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 654 "levcomp.ypp"
{
lc_map.main.add(
@@ -2644,7 +2666,7 @@ yyreduce:
case 166:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 663 "levcomp.ypp"
{
lc_map.main.add(
@@ -2656,7 +2678,7 @@ yyreduce:
case 170:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 679 "levcomp.ypp"
{
lc_map.mapchunk.add(
@@ -2668,7 +2690,7 @@ yyreduce:
case 174:
-/* Line 1464 of yacc.c */
+/* Line 1806 of yacc.c */
#line 695 "levcomp.ypp"
{
lc_map.main.add(
@@ -2680,10 +2702,21 @@ yyreduce:
-/* Line 1464 of yacc.c */
-#line 2685 "levcomp.tab.c"
+/* Line 1806 of yacc.c */
+#line 2707 "levcomp.tab.c"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -2711,6 +2744,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -2718,37 +2755,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
@@ -2807,7 +2843,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2866,8 +2902,13 @@ yyexhaustedlab:
yyreturn:
if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
@@ -2892,7 +2933,7 @@ yyreturn:
-/* Line 1684 of yacc.c */
+/* Line 2067 of yacc.c */
#line 703 "levcomp.ypp"
diff --git a/crawl-ref/source/prebuilt/levcomp.tab.h b/crawl-ref/source/prebuilt/levcomp.tab.h
index cd8a19c4b3..1f1378f407 100644
--- a/crawl-ref/source/prebuilt/levcomp.tab.h
+++ b/crawl-ref/source/prebuilt/levcomp.tab.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2011 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
@@ -147,7 +146,7 @@
typedef union YYSTYPE
{
-/* Line 1685 of yacc.c */
+/* Line 2068 of yacc.c */
#line 34 "levcomp.ypp"
int i;
@@ -157,8 +156,8 @@ typedef union YYSTYPE
-/* Line 1685 of yacc.c */
-#line 162 "levcomp.tab.h"
+/* Line 2068 of yacc.c */
+#line 161 "levcomp.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */