summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/prebuilt/levcomp.tab.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/prebuilt/levcomp.tab.cc')
-rw-r--r--crawl-ref/source/prebuilt/levcomp.tab.cc1630
1 files changed, 695 insertions, 935 deletions
diff --git a/crawl-ref/source/prebuilt/levcomp.tab.cc b/crawl-ref/source/prebuilt/levcomp.tab.cc
index 27a769fedc..51821c1205 100644
--- a/crawl-ref/source/prebuilt/levcomp.tab.cc
+++ b/crawl-ref/source/prebuilt/levcomp.tab.cc
@@ -1,9 +1,7 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.0. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 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
@@ -17,24 +15,16 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
@@ -46,9 +36,6 @@
/* Identify Bison output. */
#define YYBISON 1
-/* Bison version. */
-#define YYBISON_VERSION "2.3"
-
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -73,31 +60,33 @@
KFEAT = 262,
KITEM = 263,
KMONS = 264,
- NAME = 265,
- DEPTH = 266,
- ORIENT = 267,
- PLACE = 268,
- CHANCE = 269,
- MONS = 270,
- ITEM = 271,
- MARKER = 272,
- PRELUDE = 273,
- MAIN = 274,
- VALIDATE = 275,
- VETO = 276,
- NSUBST = 277,
- WELCOME = 278,
- COMMA = 279,
- INTEGER = 280,
- CHARACTER = 281,
- STRING = 282,
- MAP_LINE = 283,
- MONSTER_NAME = 284,
- ITEM_INFO = 285,
- LUA_LINE = 286
+ KMASK = 265,
+ NAME = 266,
+ DEPTH = 267,
+ ORIENT = 268,
+ PLACE = 269,
+ CHANCE = 270,
+ MONS = 271,
+ ITEM = 272,
+ MARKER = 273,
+ PRELUDE = 274,
+ MAIN = 275,
+ VALIDATE = 276,
+ VETO = 277,
+ NSUBST = 278,
+ WELCOME = 279,
+ LFLAGS = 280,
+ BFLAGS = 281,
+ COMMA = 282,
+ INTEGER = 283,
+ CHARACTER = 284,
+ STRING = 285,
+ MAP_LINE = 286,
+ MONSTER_NAME = 287,
+ ITEM_INFO = 288,
+ LUA_LINE = 289
};
#endif
-/* Tokens. */
#define DEFAULT_DEPTH 258
#define SHUFFLE 259
#define SUBST 260
@@ -105,28 +94,31 @@
#define KFEAT 262
#define KITEM 263
#define KMONS 264
-#define NAME 265
-#define DEPTH 266
-#define ORIENT 267
-#define PLACE 268
-#define CHANCE 269
-#define MONS 270
-#define ITEM 271
-#define MARKER 272
-#define PRELUDE 273
-#define MAIN 274
-#define VALIDATE 275
-#define VETO 276
-#define NSUBST 277
-#define WELCOME 278
-#define COMMA 279
-#define INTEGER 280
-#define CHARACTER 281
-#define STRING 282
-#define MAP_LINE 283
-#define MONSTER_NAME 284
-#define ITEM_INFO 285
-#define LUA_LINE 286
+#define KMASK 265
+#define NAME 266
+#define DEPTH 267
+#define ORIENT 268
+#define PLACE 269
+#define CHANCE 270
+#define MONS 271
+#define ITEM 272
+#define MARKER 273
+#define PRELUDE 274
+#define MAIN 275
+#define VALIDATE 276
+#define VETO 277
+#define NSUBST 278
+#define WELCOME 279
+#define LFLAGS 280
+#define BFLAGS 281
+#define COMMA 282
+#define INTEGER 283
+#define CHARACTER 284
+#define STRING 285
+#define MAP_LINE 286
+#define MONSTER_NAME 287
+#define ITEM_INFO 288
+#define LUA_LINE 289
@@ -190,22 +182,15 @@ level_range set_range(const char *s, int start, int end)
# define YYERROR_VERBOSE 0
#endif
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 46 "levcomp.ypp"
-{
+typedef union YYSTYPE {
int i;
const char *text;
raw_range range;
-}
-/* Line 193 of yacc.c. */
-#line 208 "levcomp.tab.c"
- YYSTYPE;
+} YYSTYPE;
+/* Line 185 of yacc.c. */
+#line 194 "levcomp.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -216,94 +201,17 @@ typedef union YYSTYPE
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 221 "levcomp.tab.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
+/* Line 213 of yacc.c. */
+#line 206 "levcomp.tab.c"
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
+# ifndef YYFREE
+# define YYFREE free
# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#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
+# ifndef YYMALLOC
+# define YYMALLOC malloc
# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int i)
-#else
-static int
-YYID (i)
- int i;
-#endif
-{
- return i;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -311,76 +219,34 @@ YYID (i)
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (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
-# endif
-# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (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__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
+# define YYSIZE_T size_t
# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
+ short int yyss;
YYSTYPE yyvs;
};
@@ -390,24 +256,24 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short int) + 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__
+# 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; \
+ register YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
@@ -425,33 +291,39 @@ union yyalloc
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (YYID (0))
+ while (0)
#endif
-/* YYFINAL -- State number of the termination state. */
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 58
+#define YYLAST 64
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 32
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 61
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 105
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 119
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 35
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 64
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 112
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 128
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 286
+#define YYMAXUTOK 289
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 yytranslate[] =
+static const unsigned char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -481,204 +353,212 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
};
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const yytype_uint8 yyprhs[] =
+static const unsigned short int yyprhs[] =
{
0, 0, 3, 5, 6, 9, 11, 13, 15, 17,
19, 22, 25, 26, 29, 31, 33, 36, 38, 40,
42, 44, 46, 48, 50, 52, 54, 56, 58, 60,
- 62, 64, 66, 68, 70, 72, 74, 76, 79, 80,
- 83, 85, 88, 89, 92, 94, 97, 98, 101, 103,
- 106, 107, 110, 112, 115, 116, 119, 121, 123, 126,
- 128, 131, 133, 136, 139, 141, 145, 147, 150, 151,
- 154, 156, 157, 161, 163, 164, 167, 169, 172, 174,
- 178, 180, 183, 185, 189, 191, 193, 196, 200, 202,
- 204, 206, 209, 213, 215, 217, 220, 222, 225, 228,
- 230, 233, 236, 238, 241, 243
+ 62, 64, 66, 68, 70, 72, 74, 76, 78, 80,
+ 82, 85, 86, 89, 91, 94, 95, 98, 100, 103,
+ 104, 107, 109, 112, 113, 116, 118, 121, 122, 125,
+ 127, 129, 132, 134, 137, 139, 142, 144, 147, 150,
+ 152, 156, 158, 161, 162, 165, 167, 170, 173, 174,
+ 178, 180, 181, 184, 186, 189, 191, 195, 197, 200,
+ 202, 206, 208, 210, 213, 217, 219, 221, 223, 226,
+ 230, 232, 234, 237, 239, 242, 245, 247, 250, 253,
+ 255, 258, 260
};
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
{
- 33, 0, -1, 34, -1, -1, 34, 35, -1, 37,
- -1, 39, -1, 26, -1, 38, -1, 44, -1, 3,
- 27, -1, 42, 40, -1, -1, 40, 41, -1, 43,
- -1, 90, -1, 10, 27, -1, 85, -1, 86, -1,
- 87, -1, 88, -1, 89, -1, 82, -1, 79, -1,
- 68, -1, 76, -1, 73, -1, 62, -1, 65, -1,
- 59, -1, 61, -1, 60, -1, 47, -1, 56, -1,
- 50, -1, 53, -1, 36, -1, 19, 45, -1, -1,
- 45, 46, -1, 31, -1, 19, 48, -1, -1, 48,
- 49, -1, 31, -1, 20, 51, -1, -1, 51, 52,
- -1, 31, -1, 21, 54, -1, -1, 54, 55, -1,
- 31, -1, 18, 57, -1, -1, 57, 58, -1, 31,
- -1, 7, -1, 7, 27, -1, 9, -1, 9, 27,
- -1, 8, -1, 8, 27, -1, 4, 63, -1, 64,
- -1, 63, 24, 64, -1, 30, -1, 6, 66, -1,
- -1, 66, 67, -1, 27, -1, -1, 17, 69, 70,
- -1, 71, -1, -1, 71, 72, -1, 27, -1, 22,
- 74, -1, 75, -1, 74, 24, 75, -1, 30, -1,
- 5, 77, -1, 78, -1, 78, 24, 77, -1, 30,
- -1, 16, -1, 16, 80, -1, 80, 24, 81, -1,
- 81, -1, 30, -1, 15, -1, 15, 83, -1, 84,
- 24, 83, -1, 84, -1, 29, -1, 13, 27, -1,
- 11, -1, 11, 27, -1, 14, 25, -1, 12, -1,
- 12, 27, -1, 23, 27, -1, 91, -1, 91, 92,
- -1, 92, -1, 28, -1
+ 36, 0, -1, 37, -1, -1, 37, 38, -1, 40,
+ -1, 42, -1, 29, -1, 41, -1, 47, -1, 3,
+ 30, -1, 45, 43, -1, -1, 43, 44, -1, 46,
+ -1, 96, -1, 11, 30, -1, 91, -1, 92, -1,
+ 93, -1, 94, -1, 95, -1, 88, -1, 85, -1,
+ 74, -1, 82, -1, 79, -1, 66, -1, 69, -1,
+ 72, -1, 73, -1, 62, -1, 64, -1, 63, -1,
+ 65, -1, 50, -1, 59, -1, 53, -1, 56, -1,
+ 39, -1, 20, 48, -1, -1, 48, 49, -1, 34,
+ -1, 20, 51, -1, -1, 51, 52, -1, 34, -1,
+ 21, 54, -1, -1, 54, 55, -1, 34, -1, 22,
+ 57, -1, -1, 57, 58, -1, 34, -1, 19, 60,
+ -1, -1, 60, 61, -1, 34, -1, 7, -1, 7,
+ 30, -1, 9, -1, 9, 30, -1, 8, -1, 8,
+ 30, -1, 10, -1, 10, 30, -1, 4, 67, -1,
+ 68, -1, 67, 27, 68, -1, 33, -1, 6, 70,
+ -1, -1, 70, 71, -1, 30, -1, 25, 30, -1,
+ 26, 30, -1, -1, 18, 75, 76, -1, 77, -1,
+ -1, 77, 78, -1, 30, -1, 23, 80, -1, 81,
+ -1, 80, 27, 81, -1, 33, -1, 5, 83, -1,
+ 84, -1, 84, 27, 83, -1, 33, -1, 17, -1,
+ 17, 86, -1, 86, 27, 87, -1, 87, -1, 33,
+ -1, 16, -1, 16, 89, -1, 90, 27, 89, -1,
+ 90, -1, 32, -1, 14, 30, -1, 12, -1, 12,
+ 30, -1, 15, 28, -1, 13, -1, 13, 30, -1,
+ 24, 30, -1, 97, -1, 97, 98, -1, 98, -1,
+ 31, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
+static const unsigned short int yyrline[] =
{
0, 66, 66, 69, 70, 73, 74, 77, 83, 84,
87, 97, 119, 120, 123, 124, 127, 151, 152, 153,
154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 170, 173, 175, 176,
- 179, 184, 186, 187, 190, 195, 197, 198, 201, 206,
- 208, 209, 212, 217, 219, 220, 223, 228, 229, 237,
- 238, 246, 247, 255, 258, 259, 262, 270, 273, 274,
- 277, 287, 286, 297, 299, 300, 303, 315, 318, 319,
- 322, 331, 334, 335, 338, 347, 348, 351, 352, 355,
- 363, 364, 367, 368, 371, 380, 389, 390, 399, 407,
- 408, 417, 426, 429, 430, 433
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 176, 178, 179, 182, 187, 189, 190, 193, 198, 200,
+ 201, 204, 209, 211, 212, 215, 220, 222, 223, 226,
+ 231, 232, 240, 241, 249, 250, 258, 259, 267, 270,
+ 271, 274, 282, 285, 286, 289, 298, 307, 317, 316,
+ 327, 329, 330, 333, 345, 348, 349, 352, 361, 364,
+ 365, 368, 377, 378, 381, 382, 385, 393, 394, 397,
+ 398, 401, 410, 419, 420, 429, 437, 438, 447, 456,
+ 459, 460, 463
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "DEFAULT_DEPTH", "SHUFFLE", "SUBST",
- "TAGS", "KFEAT", "KITEM", "KMONS", "NAME", "DEPTH", "ORIENT", "PLACE",
- "CHANCE", "MONS", "ITEM", "MARKER", "PRELUDE", "MAIN", "VALIDATE",
- "VETO", "NSUBST", "WELCOME", "COMMA", "INTEGER", "CHARACTER", "STRING",
- "MAP_LINE", "MONSTER_NAME", "ITEM_INFO", "LUA_LINE", "$accept", "file",
- "definitions", "definition", "error_seq", "def", "defdepth", "level",
- "map_specs", "map_spec", "name", "metaline", "global_lua",
- "global_lua_lines", "global_lua_line", "main_lua", "main_lua_lines",
- "main_lua_line", "validate_lua", "validate_lua_lines",
- "validate_lua_line", "veto_lua", "veto_lua_lines", "veto_lua_line",
- "prelude_lua", "prelude_lua_lines", "prelude_lua_line", "kfeat", "kmons",
- "kitem", "shuffle", "shuffle_specifiers", "shuffle_spec", "tags",
- "tagstrings", "tagstring", "marker", "@1", "marker_spec",
- "mspec_segments", "mspec_segment", "nsubst", "nsubst_specifiers",
- "nsubst_spec", "subst", "subst_specifiers", "subst_spec", "items",
- "item_specifiers", "item_specifier", "mons", "mnames", "mname", "place",
- "depth", "chance", "orientation", "welcome", "map_def", "map_lines",
- "map_line", 0
+ "TAGS", "KFEAT", "KITEM", "KMONS", "KMASK", "NAME", "DEPTH", "ORIENT",
+ "PLACE", "CHANCE", "MONS", "ITEM", "MARKER", "PRELUDE", "MAIN",
+ "VALIDATE", "VETO", "NSUBST", "WELCOME", "LFLAGS", "BFLAGS", "COMMA",
+ "INTEGER", "CHARACTER", "STRING", "MAP_LINE", "MONSTER_NAME",
+ "ITEM_INFO", "LUA_LINE", "$accept", "file", "definitions", "definition",
+ "error_seq", "def", "defdepth", "level", "map_specs", "map_spec", "name",
+ "metaline", "global_lua", "global_lua_lines", "global_lua_line",
+ "main_lua", "main_lua_lines", "main_lua_line", "validate_lua",
+ "validate_lua_lines", "validate_lua_line", "veto_lua", "veto_lua_lines",
+ "veto_lua_line", "prelude_lua", "prelude_lua_lines", "prelude_lua_line",
+ "kfeat", "kmons", "kitem", "kmask", "shuffle", "shuffle_specifiers",
+ "shuffle_spec", "tags", "tagstrings", "tagstring", "lflags", "bflags",
+ "marker", "@1", "marker_spec", "mspec_segments", "mspec_segment",
+ "nsubst", "nsubst_specifiers", "nsubst_spec", "subst",
+ "subst_specifiers", "subst_spec", "items", "item_specifiers",
+ "item_specifier", "mons", "mnames", "mname", "place", "depth", "chance",
+ "orientation", "welcome", "map_def", "map_lines", "map_line", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
+static const unsigned short int yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286
+ 285, 286, 287, 288, 289
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
+static const unsigned char yyr1[] =
{
- 0, 32, 33, 34, 34, 35, 35, 36, 37, 37,
- 38, 39, 40, 40, 41, 41, 42, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 44, 45, 45,
- 46, 47, 48, 48, 49, 50, 51, 51, 52, 53,
- 54, 54, 55, 56, 57, 57, 58, 59, 59, 60,
- 60, 61, 61, 62, 63, 63, 64, 65, 66, 66,
- 67, 69, 68, 70, 71, 71, 72, 73, 74, 74,
- 75, 76, 77, 77, 78, 79, 79, 80, 80, 81,
- 82, 82, 83, 83, 84, 85, 86, 86, 87, 88,
- 88, 89, 90, 91, 91, 92
+ 0, 35, 36, 37, 37, 38, 38, 39, 40, 40,
+ 41, 42, 43, 43, 44, 44, 45, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 47, 48, 48, 49, 50, 51, 51, 52, 53, 54,
+ 54, 55, 56, 57, 57, 58, 59, 60, 60, 61,
+ 62, 62, 63, 63, 64, 64, 65, 65, 66, 67,
+ 67, 68, 69, 70, 70, 71, 72, 73, 75, 74,
+ 76, 77, 77, 78, 79, 80, 80, 81, 82, 83,
+ 83, 84, 85, 85, 86, 86, 87, 88, 88, 89,
+ 89, 90, 91, 92, 92, 93, 94, 94, 95, 96,
+ 97, 97, 98
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
+static const unsigned char yyr2[] =
{
0, 2, 1, 0, 2, 1, 1, 1, 1, 1,
2, 2, 0, 2, 1, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 0, 2,
- 1, 2, 0, 2, 1, 2, 0, 2, 1, 2,
- 0, 2, 1, 2, 0, 2, 1, 1, 2, 1,
- 2, 1, 2, 2, 1, 3, 1, 2, 0, 2,
- 1, 0, 3, 1, 0, 2, 1, 2, 1, 3,
- 1, 2, 1, 3, 1, 1, 2, 3, 1, 1,
- 1, 2, 3, 1, 1, 2, 1, 2, 2, 1,
- 2, 2, 1, 2, 1, 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 0, 2, 1, 2, 0, 2, 1, 2, 0,
+ 2, 1, 2, 0, 2, 1, 2, 0, 2, 1,
+ 1, 2, 1, 2, 1, 2, 1, 2, 2, 1,
+ 3, 1, 2, 0, 2, 1, 2, 2, 0, 3,
+ 1, 0, 2, 1, 2, 1, 3, 1, 2, 1,
+ 3, 1, 1, 2, 3, 1, 1, 1, 2, 3,
+ 1, 1, 2, 1, 2, 2, 1, 2, 2, 1,
+ 2, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const yytype_uint8 yydefact[] =
+static const unsigned char yydefact[] =
{
- 3, 0, 2, 1, 0, 0, 38, 4, 5, 8,
- 6, 12, 9, 10, 16, 37, 11, 40, 39, 0,
- 0, 68, 57, 61, 59, 96, 99, 0, 0, 90,
- 85, 71, 54, 42, 46, 50, 0, 0, 7, 105,
- 36, 13, 14, 32, 34, 35, 33, 29, 31, 30,
- 27, 28, 24, 26, 25, 23, 22, 17, 18, 19,
- 20, 21, 15, 102, 104, 66, 63, 64, 84, 81,
- 82, 67, 58, 62, 60, 97, 100, 95, 98, 94,
- 91, 93, 89, 86, 88, 74, 53, 41, 45, 49,
- 80, 77, 78, 101, 103, 0, 0, 70, 69, 0,
- 0, 72, 73, 56, 55, 44, 43, 48, 47, 52,
- 51, 0, 65, 83, 92, 87, 76, 75, 79
+ 3, 0, 2, 1, 0, 0, 41, 4, 5, 8,
+ 6, 12, 9, 10, 16, 40, 11, 43, 42, 0,
+ 0, 73, 60, 64, 62, 66, 103, 106, 0, 0,
+ 97, 92, 78, 57, 45, 49, 53, 0, 0, 0,
+ 0, 7, 112, 39, 13, 14, 35, 37, 38, 36,
+ 31, 33, 32, 34, 27, 28, 29, 30, 24, 26,
+ 25, 23, 22, 17, 18, 19, 20, 21, 15, 109,
+ 111, 71, 68, 69, 91, 88, 89, 72, 61, 65,
+ 63, 67, 104, 107, 102, 105, 101, 98, 100, 96,
+ 93, 95, 81, 56, 44, 48, 52, 87, 84, 85,
+ 108, 76, 77, 110, 0, 0, 75, 74, 0, 0,
+ 79, 80, 59, 58, 47, 46, 51, 50, 55, 54,
+ 0, 70, 90, 99, 94, 83, 82, 86
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
{
- -1, 1, 2, 7, 40, 8, 9, 10, 16, 41,
- 11, 42, 12, 15, 18, 43, 87, 106, 44, 88,
- 108, 45, 89, 110, 46, 86, 104, 47, 48, 49,
- 50, 66, 67, 51, 71, 98, 52, 85, 101, 102,
- 117, 53, 91, 92, 54, 69, 70, 55, 83, 84,
- 56, 80, 81, 57, 58, 59, 60, 61, 62, 63,
- 64
+ -1, 1, 2, 7, 43, 8, 9, 10, 16, 44,
+ 11, 45, 12, 15, 18, 46, 94, 115, 47, 95,
+ 117, 48, 96, 119, 49, 93, 113, 50, 51, 52,
+ 53, 54, 72, 73, 55, 77, 107, 56, 57, 58,
+ 92, 110, 111, 126, 59, 98, 99, 60, 75, 76,
+ 61, 90, 91, 62, 87, 88, 63, 64, 65, 66,
+ 67, 68, 69, 70
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -64
-static const yytype_int8 yypact[] =
+#define YYPACT_NINF -68
+static const yysigned_char yypact[] =
{
- -64, 6, 17, -64, -6, -2, -64, -64, -64, -64,
- -64, -64, -64, -64, -64, -8, -4, -64, -64, -1,
- 0, -64, 1, 4, 5, 7, 8, 10, 13, -3,
- 3, -64, -64, -64, -64, -64, 9, 14, -64, -64,
- -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
- -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
- -64, -64, -64, 12, -64, -64, 18, -64, -64, -64,
- 19, 20, -64, -64, -64, -64, -64, -64, -64, -64,
- -64, 21, -64, 22, -64, -64, 23, 24, 25, 26,
- -64, 27, -64, -64, -64, -1, 0, -64, -64, -3,
- 3, -64, 31, -64, -64, -64, -64, -64, -64, -64,
- -64, 9, -64, -64, -64, -64, -64, -64, -64
+ -68, 7, 20, -68, -6, -2, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -8, -4, -68, -68, -3,
+ -1, -68, 3, 4, 5, 6, 8, 9, 11, 1,
+ 10, 12, -68, -68, -68, -68, -68, 13, 14, 17,
+ 18, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, 19,
+ -68, -68, 16, -68, -68, -68, 22, 21, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, 25, -68,
+ 26, -68, -68, 23, 24, 27, 28, -68, 29, -68,
+ -68, -68, -68, -68, -3, -1, -68, -68, 10, 12,
+ -68, 30, -68, -68, -68, -68, -68, -68, -68, -68,
+ 13, -68, -68, -68, -68, -68, -68, -68
};
/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
+static const yysigned_char yypgoto[] =
{
- -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
- -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
- -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
- -64, -64, -51, -64, -64, -64, -64, -64, -64, -64,
- -64, -64, -64, -63, -64, -47, -64, -64, -64, -50,
- -64, -46, -64, -64, -64, -64, -64, -64, -64, -64,
- -11
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -67, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -66, -68, -50, -68,
+ -68, -68, -46, -68, -49, -68, -68, -68, -68, -68,
+ -68, -68, -68, -5
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -686,44 +566,63 @@ static const yytype_int8 yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
+static const unsigned char yytable[] =
{
- 19, 20, 21, 22, 23, 24, 3, 25, 26, 27,
+ 19, 20, 21, 22, 23, 24, 25, 3, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 4, 13, 38, 17, 39, 14, 79, 5, 72, 65,
- 68, 73, 74, 82, 75, 76, 6, 77, 78, 90,
- 39, 93, 95, 96, 112, 99, 100, 97, 118, 113,
- 115, 111, 94, 114, 103, 105, 107, 109, 116
+ 38, 39, 40, 4, 13, 41, 17, 42, 14, 85,
+ 71, 5, 74, 78, 79, 80, 81, 121, 82, 83,
+ 6, 84, 86, 104, 100, 89, 97, 101, 102, 105,
+ 42, 106, 108, 109, 127, 122, 120, 112, 114, 123,
+ 125, 116, 118, 124, 103
};
-static const yytype_uint8 yycheck[] =
+static const unsigned char yycheck[] =
{
- 4, 5, 6, 7, 8, 9, 0, 11, 12, 13,
+ 4, 5, 6, 7, 8, 9, 10, 0, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 3, 27, 26, 31, 28, 27, 29, 10, 27, 30,
- 30, 27, 27, 30, 27, 27, 19, 27, 25, 30,
- 28, 27, 24, 24, 95, 24, 24, 27, 111, 96,
- 100, 24, 63, 99, 31, 31, 31, 31, 27
+ 24, 25, 26, 3, 30, 29, 34, 31, 30, 28,
+ 33, 11, 33, 30, 30, 30, 30, 104, 30, 30,
+ 20, 30, 32, 27, 30, 33, 33, 30, 30, 27,
+ 31, 30, 27, 27, 120, 105, 27, 34, 34, 108,
+ 30, 34, 34, 109, 69
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
+static const unsigned char yystos[] =
{
- 0, 33, 34, 0, 3, 10, 19, 35, 37, 38,
- 39, 42, 44, 27, 27, 45, 40, 31, 46, 4,
- 5, 6, 7, 8, 9, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 26, 28,
- 36, 41, 43, 47, 50, 53, 56, 59, 60, 61,
- 62, 65, 68, 73, 76, 79, 82, 85, 86, 87,
- 88, 89, 90, 91, 92, 30, 63, 64, 30, 77,
- 78, 66, 27, 27, 27, 27, 27, 27, 25, 29,
- 83, 84, 30, 80, 81, 69, 57, 48, 51, 54,
- 30, 74, 75, 27, 92, 24, 24, 27, 67, 24,
- 24, 70, 71, 31, 58, 31, 49, 31, 52, 31,
- 55, 24, 64, 77, 83, 81, 27, 72, 75
+ 0, 36, 37, 0, 3, 11, 20, 38, 40, 41,
+ 42, 45, 47, 30, 30, 48, 43, 34, 49, 4,
+ 5, 6, 7, 8, 9, 10, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 29, 31, 39, 44, 46, 50, 53, 56, 59,
+ 62, 63, 64, 65, 66, 69, 72, 73, 74, 79,
+ 82, 85, 88, 91, 92, 93, 94, 95, 96, 97,
+ 98, 33, 67, 68, 33, 83, 84, 70, 30, 30,
+ 30, 30, 30, 30, 30, 28, 32, 89, 90, 33,
+ 86, 87, 75, 60, 51, 54, 57, 33, 80, 81,
+ 30, 30, 30, 98, 27, 27, 30, 71, 27, 27,
+ 76, 77, 34, 61, 34, 52, 34, 55, 34, 58,
+ 27, 68, 83, 89, 87, 30, 78, 81
};
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -749,15 +648,15 @@ do \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
+ YYPOPSTACK; \
goto yybackup; \
} \
else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
+ { \
+ yyerror ("syntax error: cannot back up");\
YYERROR; \
} \
-while (YYID (0))
+while (0)
#define YYTERROR 1
@@ -772,7 +671,7 @@ while (YYID (0))
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (YYID (N)) \
+ if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -786,7 +685,7 @@ while (YYID (0))
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (YYID (0))
+ while (0)
#endif
@@ -798,8 +697,8 @@ while (YYID (0))
# if 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)
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
@@ -826,96 +725,36 @@ while (YYID (0))
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+} while (0)
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+ short int *bottom;
+ short int *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
+ for (/* Nothing. */; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -924,45 +763,37 @@ yy_stack_print (bottom, top)
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (int yyrule)
#else
static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
+yy_reduce_print (yyrule)
int yyrule;
#endif
{
- int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- fprintf (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- fprintf (stderr, "\n");
- }
+ unsigned int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ 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]]);
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+ yy_reduce_print (Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -984,7 +815,7 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
@@ -996,47 +827,45 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
+# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
+# else
yystrlen (yystr)
- const char *yystr;
-#endif
+ const char *yystr;
+# endif
{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
continue;
- return yylen;
+
+ return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
+# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
+# else
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
+ char *yydest;
+ const char *yysrc;
+# endif
{
- char *yyd = yydest;
- const char *yys = yysrc;
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -1046,171 +875,53 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-# 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 == '"')
- {
- YYSIZE_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: ;
- }
+#endif /* !YYERROR_VERBOSE */
- if (! yyres)
- return yystrlen (yystr);
+
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
-/* 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)
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
{
- int yyn = yypact[yystate];
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
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");
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# 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;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- 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;
+ switch (yytype)
+ {
+ default:
+ break;
}
+ YYFPRINTF (yyoutput, ")");
}
-#endif /* YYERROR_VERBOSE */
-
+#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
@@ -1221,7 +932,8 @@ yydestruct (yymsg, yytype, yyvaluep)
YYSTYPE *yyvaluep;
#endif
{
- YYUSE (yyvaluep);
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
if (!yymsg)
yymsg = "Deleting";
@@ -1231,7 +943,7 @@ yydestruct (yymsg, yytype, yyvaluep)
{
default:
- break;
+ break;
}
}
@@ -1239,13 +951,13 @@ yydestruct (yymsg, yytype, yyvaluep)
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
+# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
-#else
+# else
int yyparse ();
-#endif
+# endif
#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
@@ -1270,18 +982,14 @@ int yynerrs;
`----------*/
#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
@@ -1292,19 +1000,13 @@ yyparse ()
#endif
{
- int yystate;
- int yyn;
+ register int yystate;
+ register int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
/* Three stacks and their tools:
`yyss': related to states,
@@ -1315,18 +1017,18 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ register short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ register YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+#define YYPOPSTACK (yyvsp--, yyssp--)
YYSIZE_T yystacksize = YYINITDEPTH;
@@ -1335,9 +1037,9 @@ yyparse ()
YYSTYPE yyval;
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1354,6 +1056,9 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
+
+ yyvsp[0] = yylval;
+
goto yysetstate;
/*------------------------------------------------------------.
@@ -1361,7 +1066,8 @@ yyparse ()
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
+ have just been pushed. so pushing a state here evens the stacks.
+ */
yyssp++;
yysetstate:
@@ -1374,18 +1080,18 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
+ /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
+ short int *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
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 (YY_("memory exhausted"),
+ yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1396,21 +1102,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
+ goto yyoverflowlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyoverflowlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyexhaustedlab;
+ goto yyoverflowlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1441,10 +1147,12 @@ yyparse ()
`-----------*/
yybackup:
- /* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+/* Do appropriate processing given the current state. */
+/* Read a look-ahead token if we need one and don't already have one. */
+/* yyresume: */
/* First try to decide what to do without reference to look-ahead token. */
+
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
@@ -1486,21 +1194,22 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
/* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
+ /* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
- yystate = yyn;
*++yyvsp = yylval;
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
goto yynewstate;
@@ -1581,10 +1290,10 @@ yyreduce:
#line 88 "levcomp.ypp"
{
dgn_reset_default_depth();
- std::string err = dgn_set_default_depth((yyvsp[(2) - (2)].text));
+ std::string err = dgn_set_default_depth((yyvsp[0].text));
if (!err.empty())
yyerror(make_stringf("Bad default-depth: %s (%s)",
- (yyvsp[(2) - (2)].text), err.c_str()).c_str());
+ (yyvsp[0].text), err.c_str()).c_str());
}
break;
@@ -1635,393 +1344,429 @@ yyreduce:
#line 128 "levcomp.ypp"
{
lc_map.init();
- lc_map.name = (yyvsp[(2) - (2)].text);
+ lc_map.name = (yyvsp[0].text);
map_load_info_t::const_iterator i =
- lc_loaded_maps.find((yyvsp[(2) - (2)].text));
+ lc_loaded_maps.find((yyvsp[0].text));
if (i != lc_loaded_maps.end())
{
yyerror(
make_stringf(
"Map named '%s' already loaded at %s:%d",
- (yyvsp[(2) - (2)].text),
+ (yyvsp[0].text),
i->second.filename.c_str(),
i->second.lineno).c_str() );
}
lc_map.place_loaded_from =
map_file_place(lc_desfile, yylineno);
- lc_loaded_maps[(yyvsp[(2) - (2)].text)] = lc_map.place_loaded_from;
+ lc_loaded_maps[(yyvsp[0].text)] = lc_map.place_loaded_from;
}
break;
- case 36:
-#line 170 "levcomp.ypp"
+ case 39:
+#line 173 "levcomp.ypp"
{}
break;
- case 37:
-#line 173 "levcomp.ypp"
+ case 40:
+#line 176 "levcomp.ypp"
{ }
break;
- case 38:
-#line 175 "levcomp.ypp"
+ case 41:
+#line 178 "levcomp.ypp"
{ }
break;
- case 39:
-#line 176 "levcomp.ypp"
+ case 42:
+#line 179 "levcomp.ypp"
{ }
break;
- case 40:
-#line 180 "levcomp.ypp"
+ case 43:
+#line 183 "levcomp.ypp"
{
- lc_global_prelude.add(yylineno, (yyvsp[(1) - (1)].text));
+ lc_global_prelude.add(yylineno, (yyvsp[0].text));
}
break;
- case 41:
-#line 184 "levcomp.ypp"
+ case 44:
+#line 187 "levcomp.ypp"
{ }
break;
- case 42:
-#line 186 "levcomp.ypp"
+ case 45:
+#line 189 "levcomp.ypp"
{ }
break;
- case 43:
-#line 187 "levcomp.ypp"
+ case 46:
+#line 190 "levcomp.ypp"
{ }
break;
- case 44:
-#line 191 "levcomp.ypp"
+ case 47:
+#line 194 "levcomp.ypp"
{
- lc_map.main.add(yylineno, (yyvsp[(1) - (1)].text));
+ lc_map.main.add(yylineno, (yyvsp[0].text));
}
break;
- case 45:
-#line 195 "levcomp.ypp"
+ case 48:
+#line 198 "levcomp.ypp"
{ }
break;
- case 46:
-#line 197 "levcomp.ypp"
+ case 49:
+#line 200 "levcomp.ypp"
{ }
break;
- case 47:
-#line 198 "levcomp.ypp"
+ case 50:
+#line 201 "levcomp.ypp"
{ }
break;
- case 48:
-#line 202 "levcomp.ypp"
+ case 51:
+#line 205 "levcomp.ypp"
{
- lc_map.validate.add(yylineno, (yyvsp[(1) - (1)].text));
+ lc_map.validate.add(yylineno, (yyvsp[0].text));
}
break;
- case 49:
-#line 206 "levcomp.ypp"
+ case 52:
+#line 209 "levcomp.ypp"
{ }
break;
- case 50:
-#line 208 "levcomp.ypp"
+ case 53:
+#line 211 "levcomp.ypp"
{ }
break;
- case 51:
-#line 209 "levcomp.ypp"
+ case 54:
+#line 212 "levcomp.ypp"
{ }
break;
- case 52:
-#line 213 "levcomp.ypp"
+ case 55:
+#line 216 "levcomp.ypp"
{
- lc_map.veto.add(yylineno, (yyvsp[(1) - (1)].text));
+ lc_map.veto.add(yylineno, (yyvsp[0].text));
}
break;
- case 53:
-#line 217 "levcomp.ypp"
+ case 56:
+#line 220 "levcomp.ypp"
{ }
break;
- case 54:
-#line 219 "levcomp.ypp"
+ case 57:
+#line 222 "levcomp.ypp"
{ }
break;
- case 55:
-#line 220 "levcomp.ypp"
+ case 58:
+#line 223 "levcomp.ypp"
{ }
break;
- case 56:
-#line 224 "levcomp.ypp"
+ case 59:
+#line 227 "levcomp.ypp"
{
- lc_map.prelude.add(yylineno, (yyvsp[(1) - (1)].text));
+ lc_map.prelude.add(yylineno, (yyvsp[0].text));
}
break;
- case 57:
-#line 228 "levcomp.ypp"
+ case 60:
+#line 231 "levcomp.ypp"
{ }
break;
- case 58:
-#line 230 "levcomp.ypp"
+ case 61:
+#line 233 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("kfeat(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 59:
-#line 237 "levcomp.ypp"
+ case 62:
+#line 240 "levcomp.ypp"
{ }
break;
- case 60:
-#line 239 "levcomp.ypp"
+ case 63:
+#line 242 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("kmons(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 61:
-#line 246 "levcomp.ypp"
+ case 64:
+#line 249 "levcomp.ypp"
{ }
break;
- case 62:
-#line 248 "levcomp.ypp"
+ case 65:
+#line 251 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("kitem(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 63:
-#line 255 "levcomp.ypp"
+ case 66:
+#line 258 "levcomp.ypp"
+ { }
+ break;
+
+ case 67:
+#line 260 "levcomp.ypp"
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("kmask(\"%s\")",
+ quote_lua_string((yyvsp[0].text)).c_str()));
+ }
+ break;
+
+ case 68:
+#line 267 "levcomp.ypp"
{}
break;
- case 66:
-#line 263 "levcomp.ypp"
+ case 71:
+#line 275 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("shuffle(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 67:
-#line 270 "levcomp.ypp"
+ case 72:
+#line 282 "levcomp.ypp"
{}
break;
- case 70:
-#line 278 "levcomp.ypp"
+ case 75:
+#line 290 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("tags(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 71:
-#line 287 "levcomp.ypp"
+ case 76:
+#line 299 "levcomp.ypp"
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("lflags(\"%s\")",
+ quote_lua_string((yyvsp[0].text)).c_str()));
+ }
+ break;
+
+ case 77:
+#line 308 "levcomp.ypp"
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("bflags(\"%s\")",
+ quote_lua_string((yyvsp[0].text)).c_str()));
+ }
+ break;
+
+ case 78:
+#line 317 "levcomp.ypp"
{
lc_map.main.add(yylineno, "marker(");
start_marker_segment = true;
}
break;
- case 72:
-#line 292 "levcomp.ypp"
+ case 79:
+#line 322 "levcomp.ypp"
{
lc_map.main.add(yylineno, ")");
}
break;
- case 76:
-#line 304 "levcomp.ypp"
+ case 83:
+#line 334 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf(
"%s\"%s\"",
start_marker_segment? "" : " .. ",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
start_marker_segment = false;
}
break;
- case 77:
-#line 315 "levcomp.ypp"
+ case 84:
+#line 345 "levcomp.ypp"
{ }
break;
- case 80:
-#line 323 "levcomp.ypp"
+ case 87:
+#line 353 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("nsubst(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 81:
-#line 331 "levcomp.ypp"
+ case 88:
+#line 361 "levcomp.ypp"
{ }
break;
- case 84:
-#line 339 "levcomp.ypp"
+ case 91:
+#line 369 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("subst(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 85:
-#line 347 "levcomp.ypp"
+ case 92:
+#line 377 "levcomp.ypp"
{}
break;
- case 86:
-#line 348 "levcomp.ypp"
+ case 93:
+#line 378 "levcomp.ypp"
{}
break;
- case 89:
-#line 356 "levcomp.ypp"
+ case 96:
+#line 386 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("item(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 90:
-#line 363 "levcomp.ypp"
+ case 97:
+#line 393 "levcomp.ypp"
{}
break;
- case 91:
-#line 364 "levcomp.ypp"
+ case 98:
+#line 394 "levcomp.ypp"
{}
break;
- case 94:
-#line 372 "levcomp.ypp"
+ case 101:
+#line 402 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("mons(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 95:
-#line 381 "levcomp.ypp"
+ case 102:
+#line 411 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("place(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 96:
-#line 389 "levcomp.ypp"
+ case 103:
+#line 419 "levcomp.ypp"
{}
break;
- case 97:
-#line 391 "levcomp.ypp"
+ case 104:
+#line 421 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("depth(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 98:
-#line 400 "levcomp.ypp"
+ case 105:
+#line 430 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
- make_stringf("chance(\"%d\")", (yyvsp[(2) - (2)].i)));
+ make_stringf("chance(\"%d\")", (yyvsp[0].i)));
}
break;
- case 99:
-#line 407 "levcomp.ypp"
+ case 106:
+#line 437 "levcomp.ypp"
{}
break;
- case 100:
-#line 409 "levcomp.ypp"
+ case 107:
+#line 439 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("orient(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 101:
-#line 418 "levcomp.ypp"
+ case 108:
+#line 448 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("welcome(\"%s\")",
- quote_lua_string((yyvsp[(2) - (2)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
- case 105:
-#line 434 "levcomp.ypp"
+ case 112:
+#line 464 "levcomp.ypp"
{
lc_map.main.add(
yylineno,
make_stringf("map(\"%s\")",
- quote_lua_string((yyvsp[(1) - (1)].text)).c_str()));
+ quote_lua_string((yyvsp[0].text)).c_str()));
}
break;
-/* Line 1267 of yacc.c. */
-#line 2019 "levcomp.tab.c"
- default: break;
}
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
- YYPOPSTACK (yylen);
- yylen = 0;
+/* Line 1037 of yacc.c. */
+#line 1765 "levcomp.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
@@ -2050,41 +1795,66 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
- {
- 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
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ const char* yyprefix;
+ char *yymsg;
+ int yyx;
+
+ /* 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;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 0;
+
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+ yycount += 1;
+ if (yycount == 5)
+ {
+ yysize = 0;
+ break;
+ }
}
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
- }
-#endif
+ yysize += (sizeof ("syntax error, unexpected ")
+ + yystrlen (yytname[yytype]));
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yyp = yystpcpy (yyp, yyprefix);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yyprefix = " or ";
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
}
@@ -2095,15 +1865,23 @@ yyerrlab:
error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
+ {
+ /* If at end of input, pop the error token,
+ then the rest of the stack, then return failure. */
if (yychar == YYEOF)
- YYABORT;
- }
+ for (;;)
+ {
+
+ YYPOPSTACK;
+ if (yyssp == yyss)
+ YYABORT;
+ yydestruct ("Error: popping",
+ yystos[*yyssp], yyvsp);
+ }
+ }
else
{
- yydestruct ("Error: discarding",
- yytoken, &yylval);
+ yydestruct ("Error: discarding", yytoken, &yylval);
yychar = YYEMPTY;
}
}
@@ -2118,17 +1896,15 @@ yyerrlab:
`---------------------------------------------------*/
yyerrorlab:
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ yyerrorlab therefore never appears in user code. */
+ if (0)
goto yyerrorlab;
+#endif
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
+yyvsp -= yylen;
+ yyssp -= yylen;
yystate = *yyssp;
goto yyerrlab1;
@@ -2158,9 +1934,8 @@ yyerrlab1:
YYABORT;
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
@@ -2171,7 +1946,7 @@ yyerrlab1:
*++yyvsp = yylval;
- /* Shift the error token. */
+ /* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
@@ -2189,46 +1964,31 @@ yyacceptlab:
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
+ yydestruct ("Error: discarding lookahead",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
yyresult = 1;
goto yyreturn;
#ifndef yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-#line 442 "levcomp.ypp"
+#line 472 "levcomp.ypp"