Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.5.1. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 3 | /* Bison implementation for Yacc-like parsers in C |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 4 | |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 5 | Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 6 | |
| 7 | This program is free software: you can redistribute it and/or modify |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 8 | it under the terms of the GNU General Public License as published by |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 9 | the Free Software Foundation, either version 3 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 16 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 17 | You should have received a copy of the GNU General Public License |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 19 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 20 | /* As a special exception, you may create a larger work that contains |
| 21 | part or all of the Bison parser skeleton and distribute that work |
| 22 | under terms of your choice, so long as that work isn't itself a |
| 23 | parser generator using the skeleton or a modified version thereof |
| 24 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 25 | the parser skeleton itself, you may (at your option) remove this |
| 26 | special exception, which will cause the skeleton and the resulting |
| 27 | Bison output files to be licensed under the GNU General Public |
| 28 | License without this special exception. |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 29 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 30 | This special exception was added by the Free Software Foundation in |
| 31 | version 2.2 of Bison. */ |
| 32 | |
| 33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 34 | simplifying the original so-called "semantic" parser. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 35 | |
| 36 | /* All symbols defined below should begin with yy or YY, to avoid |
| 37 | infringing on user name space. This should be done even for local |
| 38 | variables, as they might otherwise be expanded by user macros. |
| 39 | There are some unavoidable exceptions within include files to |
| 40 | define necessary library symbols; they are noted "INFRINGES ON |
| 41 | USER NAME SPACE" below. */ |
| 42 | |
| 43 | /* Identify Bison output. */ |
| 44 | #define YYBISON 1 |
| 45 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 46 | /* Bison version. */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 47 | #define YYBISON_VERSION "2.5.1" |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 48 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 49 | /* Skeleton name. */ |
| 50 | #define YYSKELETON_NAME "yacc.c" |
| 51 | |
| 52 | /* Pure parsers. */ |
| 53 | #define YYPURE 0 |
| 54 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 55 | /* Push parsers. */ |
| 56 | #define YYPUSH 0 |
| 57 | |
| 58 | /* Pull parsers. */ |
| 59 | #define YYPULL 1 |
| 60 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 61 | /* Using locations. */ |
| 62 | #define YYLSP_NEEDED 0 |
| 63 | |
| 64 | |
| 65 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 66 | /* Copy the first part of user declarations. */ |
| 67 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 68 | |
| 69 | |
| 70 | #include <assert.h> |
| 71 | #include <stdlib.h> |
| 72 | #include <string.h> |
| 73 | #include "genksyms.h" |
| 74 | |
| 75 | static int is_typedef; |
| 76 | static int is_extern; |
| 77 | static char *current_name; |
| 78 | static struct string_list *decl_spec; |
| 79 | |
| 80 | static void yyerror(const char *); |
| 81 | |
| 82 | static inline void |
| 83 | remove_node(struct string_list **p) |
| 84 | { |
| 85 | struct string_list *node = *p; |
| 86 | *p = node->next; |
| 87 | free_node(node); |
| 88 | } |
| 89 | |
| 90 | static inline void |
| 91 | remove_list(struct string_list **pb, struct string_list **pe) |
| 92 | { |
| 93 | struct string_list *b = *pb, *e = *pe; |
| 94 | *pb = e; |
| 95 | free_list(b, e); |
| 96 | } |
| 97 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 98 | /* Record definition of a struct/union/enum */ |
| 99 | static void record_compound(struct string_list **keyw, |
| 100 | struct string_list **ident, |
| 101 | struct string_list **body, |
| 102 | enum symbol_type type) |
| 103 | { |
| 104 | struct string_list *b = *body, *i = *ident, *r; |
| 105 | |
| 106 | if (i->in_source_file) { |
| 107 | remove_node(keyw); |
| 108 | (*ident)->tag = type; |
| 109 | remove_list(body, ident); |
| 110 | return; |
| 111 | } |
| 112 | r = copy_node(i); r->tag = type; |
| 113 | r->next = (*keyw)->next; *body = r; (*keyw)->next = NULL; |
| 114 | add_symbol(i->string, type, b, is_extern); |
| 115 | } |
| 116 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 117 | |
| 118 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 119 | |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 120 | # ifndef YY_NULL |
| 121 | # if defined __cplusplus && 201103L <= __cplusplus |
| 122 | # define YY_NULL nullptr |
| 123 | # else |
| 124 | # define YY_NULL 0 |
| 125 | # endif |
| 126 | # endif |
| 127 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 128 | /* Enabling traces. */ |
| 129 | #ifndef YYDEBUG |
| 130 | # define YYDEBUG 1 |
| 131 | #endif |
| 132 | |
| 133 | /* Enabling verbose error messages. */ |
| 134 | #ifdef YYERROR_VERBOSE |
| 135 | # undef YYERROR_VERBOSE |
| 136 | # define YYERROR_VERBOSE 1 |
| 137 | #else |
| 138 | # define YYERROR_VERBOSE 0 |
| 139 | #endif |
| 140 | |
| 141 | /* Enabling the token table. */ |
| 142 | #ifndef YYTOKEN_TABLE |
| 143 | # define YYTOKEN_TABLE 0 |
| 144 | #endif |
| 145 | |
| 146 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 147 | /* Tokens. */ |
| 148 | #ifndef YYTOKENTYPE |
| 149 | # define YYTOKENTYPE |
| 150 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 151 | know about them. */ |
| 152 | enum yytokentype { |
| 153 | ASM_KEYW = 258, |
| 154 | ATTRIBUTE_KEYW = 259, |
| 155 | AUTO_KEYW = 260, |
| 156 | BOOL_KEYW = 261, |
| 157 | CHAR_KEYW = 262, |
| 158 | CONST_KEYW = 263, |
| 159 | DOUBLE_KEYW = 264, |
| 160 | ENUM_KEYW = 265, |
| 161 | EXTERN_KEYW = 266, |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 162 | EXTENSION_KEYW = 267, |
| 163 | FLOAT_KEYW = 268, |
| 164 | INLINE_KEYW = 269, |
| 165 | INT_KEYW = 270, |
| 166 | LONG_KEYW = 271, |
| 167 | REGISTER_KEYW = 272, |
| 168 | RESTRICT_KEYW = 273, |
| 169 | SHORT_KEYW = 274, |
| 170 | SIGNED_KEYW = 275, |
| 171 | STATIC_KEYW = 276, |
| 172 | STRUCT_KEYW = 277, |
| 173 | TYPEDEF_KEYW = 278, |
| 174 | UNION_KEYW = 279, |
| 175 | UNSIGNED_KEYW = 280, |
| 176 | VOID_KEYW = 281, |
| 177 | VOLATILE_KEYW = 282, |
| 178 | TYPEOF_KEYW = 283, |
| 179 | EXPORT_SYMBOL_KEYW = 284, |
| 180 | ASM_PHRASE = 285, |
| 181 | ATTRIBUTE_PHRASE = 286, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 182 | TYPEOF_PHRASE = 287, |
| 183 | BRACE_PHRASE = 288, |
| 184 | BRACKET_PHRASE = 289, |
| 185 | EXPRESSION_PHRASE = 290, |
| 186 | CHAR = 291, |
| 187 | DOTS = 292, |
| 188 | IDENT = 293, |
| 189 | INT = 294, |
| 190 | REAL = 295, |
| 191 | STRING = 296, |
| 192 | TYPE = 297, |
| 193 | OTHER = 298, |
| 194 | FILENAME = 299 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 195 | }; |
| 196 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 197 | |
| 198 | |
| 199 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 200 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 201 | typedef int YYSTYPE; |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 202 | # define YYSTYPE_IS_TRIVIAL 1 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 203 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 204 | # define YYSTYPE_IS_DECLARED 1 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 205 | #endif |
| 206 | |
| 207 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 208 | /* Copy the second part of user declarations. */ |
| 209 | |
| 210 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 211 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 212 | #ifdef short |
| 213 | # undef short |
| 214 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 215 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 216 | #ifdef YYTYPE_UINT8 |
| 217 | typedef YYTYPE_UINT8 yytype_uint8; |
| 218 | #else |
| 219 | typedef unsigned char yytype_uint8; |
| 220 | #endif |
| 221 | |
| 222 | #ifdef YYTYPE_INT8 |
| 223 | typedef YYTYPE_INT8 yytype_int8; |
| 224 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 225 | || defined __cplusplus || defined _MSC_VER) |
| 226 | typedef signed char yytype_int8; |
| 227 | #else |
| 228 | typedef short int yytype_int8; |
| 229 | #endif |
| 230 | |
| 231 | #ifdef YYTYPE_UINT16 |
| 232 | typedef YYTYPE_UINT16 yytype_uint16; |
| 233 | #else |
| 234 | typedef unsigned short int yytype_uint16; |
| 235 | #endif |
| 236 | |
| 237 | #ifdef YYTYPE_INT16 |
| 238 | typedef YYTYPE_INT16 yytype_int16; |
| 239 | #else |
| 240 | typedef short int yytype_int16; |
| 241 | #endif |
| 242 | |
| 243 | #ifndef YYSIZE_T |
| 244 | # ifdef __SIZE_TYPE__ |
| 245 | # define YYSIZE_T __SIZE_TYPE__ |
| 246 | # elif defined size_t |
| 247 | # define YYSIZE_T size_t |
| 248 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 249 | || defined __cplusplus || defined _MSC_VER) |
| 250 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 251 | # define YYSIZE_T size_t |
| 252 | # else |
| 253 | # define YYSIZE_T unsigned int |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 254 | # endif |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 255 | #endif |
| 256 | |
| 257 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 258 | |
| 259 | #ifndef YY_ |
Arnaud Lacombe | 58ef81c | 2011-05-23 01:52:59 -0400 | [diff] [blame] | 260 | # if defined YYENABLE_NLS && YYENABLE_NLS |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 261 | # if ENABLE_NLS |
| 262 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 263 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
| 264 | # endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 265 | # endif |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 266 | # ifndef YY_ |
| 267 | # define YY_(msgid) msgid |
| 268 | # endif |
| 269 | #endif |
| 270 | |
| 271 | /* Suppress unused-variable warnings by "using" E. */ |
| 272 | #if ! defined lint || defined __GNUC__ |
| 273 | # define YYUSE(e) ((void) (e)) |
| 274 | #else |
| 275 | # define YYUSE(e) /* empty */ |
| 276 | #endif |
| 277 | |
| 278 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 279 | #ifndef lint |
| 280 | # define YYID(n) (n) |
| 281 | #else |
| 282 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 283 | || defined __cplusplus || defined _MSC_VER) |
| 284 | static int |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 285 | YYID (int yyi) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 286 | #else |
| 287 | static int |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 288 | YYID (yyi) |
| 289 | int yyi; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 290 | #endif |
| 291 | { |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 292 | return yyi; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 293 | } |
| 294 | #endif |
| 295 | |
| 296 | #if ! defined yyoverflow || YYERROR_VERBOSE |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 297 | |
| 298 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 299 | |
| 300 | # ifdef YYSTACK_USE_ALLOCA |
| 301 | # if YYSTACK_USE_ALLOCA |
| 302 | # ifdef __GNUC__ |
| 303 | # define YYSTACK_ALLOC __builtin_alloca |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 304 | # elif defined __BUILTIN_VA_ARG_INCR |
| 305 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 306 | # elif defined _AIX |
| 307 | # define YYSTACK_ALLOC __alloca |
| 308 | # elif defined _MSC_VER |
| 309 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 310 | # define alloca _alloca |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 311 | # else |
| 312 | # define YYSTACK_ALLOC alloca |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 313 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 314 | || defined __cplusplus || defined _MSC_VER) |
| 315 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 316 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 317 | # ifndef EXIT_SUCCESS |
| 318 | # define EXIT_SUCCESS 0 |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 319 | # endif |
| 320 | # endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 321 | # endif |
| 322 | # endif |
| 323 | # endif |
| 324 | |
| 325 | # ifdef YYSTACK_ALLOC |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 326 | /* Pacify GCC's `empty if-body' warning. */ |
| 327 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 328 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 329 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 330 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 331 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 332 | to allow for a few compiler-allocated temporary stack slots. */ |
| 333 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 334 | # endif |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 335 | # else |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 336 | # define YYSTACK_ALLOC YYMALLOC |
| 337 | # define YYSTACK_FREE YYFREE |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 338 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 339 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 340 | # endif |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 341 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 342 | && ! ((defined YYMALLOC || defined malloc) \ |
| 343 | && (defined YYFREE || defined free))) |
| 344 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 345 | # ifndef EXIT_SUCCESS |
| 346 | # define EXIT_SUCCESS 0 |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 347 | # endif |
| 348 | # endif |
| 349 | # ifndef YYMALLOC |
| 350 | # define YYMALLOC malloc |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 351 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 352 | || defined __cplusplus || defined _MSC_VER) |
| 353 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 354 | # endif |
| 355 | # endif |
| 356 | # ifndef YYFREE |
| 357 | # define YYFREE free |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 358 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 359 | || defined __cplusplus || defined _MSC_VER) |
| 360 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 361 | # endif |
| 362 | # endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 363 | # endif |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 364 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 365 | |
| 366 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 367 | #if (! defined yyoverflow \ |
| 368 | && (! defined __cplusplus \ |
| 369 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 370 | |
| 371 | /* A type that is properly aligned for any stack member. */ |
| 372 | union yyalloc |
| 373 | { |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 374 | yytype_int16 yyss_alloc; |
| 375 | YYSTYPE yyvs_alloc; |
| 376 | }; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 377 | |
| 378 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 379 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| 380 | |
| 381 | /* The size of an array large to enough to hold all stacks, each with |
| 382 | N elements. */ |
| 383 | # define YYSTACK_BYTES(N) \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 384 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 385 | + YYSTACK_GAP_MAXIMUM) |
| 386 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 387 | # define YYCOPY_NEEDED 1 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 388 | |
| 389 | /* Relocate STACK from its old location to the new one. The |
| 390 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 391 | elements in the stack, and YYPTR gives the new location of the |
| 392 | stack. Advance YYPTR to a properly aligned location for the next |
| 393 | stack. */ |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 394 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 395 | do \ |
| 396 | { \ |
| 397 | YYSIZE_T yynewbytes; \ |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 398 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 399 | Stack = &yyptr->Stack_alloc; \ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 400 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 401 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 402 | } \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 403 | while (YYID (0)) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 404 | |
| 405 | #endif |
| 406 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 407 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 408 | /* Copy COUNT objects from SRC to DST. The source and destination do |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 409 | not overlap. */ |
| 410 | # ifndef YYCOPY |
| 411 | # if defined __GNUC__ && 1 < __GNUC__ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 412 | # define YYCOPY(Dst, Src, Count) \ |
| 413 | __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 414 | # else |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 415 | # define YYCOPY(Dst, Src, Count) \ |
| 416 | do \ |
| 417 | { \ |
| 418 | YYSIZE_T yyi; \ |
| 419 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 420 | (Dst)[yyi] = (Src)[yyi]; \ |
| 421 | } \ |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 422 | while (YYID (0)) |
| 423 | # endif |
| 424 | # endif |
| 425 | #endif /* !YYCOPY_NEEDED */ |
| 426 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 427 | /* YYFINAL -- State number of the termination state. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 428 | #define YYFINAL 4 |
| 429 | /* YYLAST -- Last index in YYTABLE. */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 430 | #define YYLAST 514 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 431 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 432 | /* YYNTOKENS -- Number of terminals. */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 433 | #define YYNTOKENS 54 |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 434 | /* YYNNTS -- Number of nonterminals. */ |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 435 | #define YYNNTS 49 |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 436 | /* YYNRULES -- Number of rules. */ |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 437 | #define YYNRULES 132 |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 438 | /* YYNRULES -- Number of states. */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 439 | #define YYNSTATES 187 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 440 | |
| 441 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 442 | #define YYUNDEFTOK 2 |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 443 | #define YYMAXUTOK 299 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 444 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 445 | #define YYTRANSLATE(YYX) \ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 446 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| 447 | |
| 448 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 449 | static const yytype_uint8 yytranslate[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 450 | { |
| 451 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 452 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 453 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 454 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 455 | 48, 49, 50, 2, 47, 2, 2, 2, 2, 2, |
| 456 | 2, 2, 2, 2, 2, 2, 2, 2, 53, 45, |
| 457 | 2, 51, 2, 2, 2, 2, 2, 2, 2, 2, |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 458 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 459 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 460 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 461 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 462 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 463 | 2, 2, 2, 52, 2, 46, 2, 2, 2, 2, |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 464 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 465 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 466 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 467 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 468 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 469 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 470 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 471 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 472 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 473 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 474 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 475 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 476 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 477 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 478 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 479 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 480 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 481 | }; |
| 482 | |
| 483 | #if YYDEBUG |
| 484 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 485 | YYRHS. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 486 | static const yytype_uint16 yyprhs[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 487 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 488 | 0, 0, 3, 5, 8, 9, 12, 13, 18, 19, |
| 489 | 23, 25, 27, 29, 31, 34, 37, 41, 42, 44, |
| 490 | 46, 50, 55, 56, 58, 60, 63, 65, 67, 69, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 491 | 71, 73, 75, 77, 79, 81, 86, 88, 91, 94, |
| 492 | 97, 101, 105, 109, 112, 115, 118, 120, 122, 124, |
| 493 | 126, 128, 130, 132, 134, 136, 138, 140, 143, 144, |
| 494 | 146, 148, 151, 153, 155, 157, 159, 162, 164, 166, |
| 495 | 171, 176, 179, 183, 187, 190, 192, 194, 196, 201, |
| 496 | 206, 209, 213, 217, 220, 222, 226, 227, 229, 231, |
| 497 | 235, 238, 241, 243, 244, 246, 248, 253, 258, 261, |
| 498 | 265, 269, 273, 274, 276, 279, 283, 287, 288, 290, |
| 499 | 292, 295, 299, 302, 303, 305, 307, 311, 314, 317, |
| 500 | 319, 322, 323, 326, 330, 335, 337, 341, 343, 347, |
| 501 | 350, 351, 353 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 502 | }; |
| 503 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 504 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 505 | static const yytype_int8 yyrhs[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 506 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 507 | 55, 0, -1, 56, -1, 55, 56, -1, -1, 57, |
| 508 | 58, -1, -1, 12, 23, 59, 61, -1, -1, 23, |
| 509 | 60, 61, -1, 61, -1, 85, -1, 100, -1, 102, |
| 510 | -1, 1, 45, -1, 1, 46, -1, 65, 62, 45, |
| 511 | -1, -1, 63, -1, 64, -1, 63, 47, 64, -1, |
| 512 | 75, 101, 96, 86, -1, -1, 66, -1, 67, -1, |
| 513 | 66, 67, -1, 68, -1, 69, -1, 5, -1, 17, |
| 514 | -1, 21, -1, 11, -1, 14, -1, 70, -1, 74, |
| 515 | -1, 28, 48, 82, 49, -1, 32, -1, 22, 38, |
| 516 | -1, 24, 38, -1, 10, 38, -1, 22, 38, 88, |
| 517 | -1, 24, 38, 88, -1, 10, 38, 97, -1, 10, |
| 518 | 97, -1, 22, 88, -1, 24, 88, -1, 7, -1, |
| 519 | 19, -1, 15, -1, 16, -1, 20, -1, 25, -1, |
| 520 | 13, -1, 9, -1, 26, -1, 6, -1, 42, -1, |
| 521 | 50, 72, -1, -1, 73, -1, 74, -1, 73, 74, |
| 522 | -1, 8, -1, 27, -1, 31, -1, 18, -1, 71, |
| 523 | 75, -1, 76, -1, 38, -1, 76, 48, 79, 49, |
| 524 | -1, 76, 48, 1, 49, -1, 76, 34, -1, 48, |
| 525 | 75, 49, -1, 48, 1, 49, -1, 71, 77, -1, |
| 526 | 78, -1, 38, -1, 42, -1, 78, 48, 79, 49, |
| 527 | -1, 78, 48, 1, 49, -1, 78, 34, -1, 48, |
| 528 | 77, 49, -1, 48, 1, 49, -1, 80, 37, -1, |
| 529 | 80, -1, 81, 47, 37, -1, -1, 81, -1, 82, |
| 530 | -1, 81, 47, 82, -1, 66, 83, -1, 71, 83, |
| 531 | -1, 84, -1, -1, 38, -1, 42, -1, 84, 48, |
| 532 | 79, 49, -1, 84, 48, 1, 49, -1, 84, 34, |
| 533 | -1, 48, 83, 49, -1, 48, 1, 49, -1, 65, |
| 534 | 75, 33, -1, -1, 87, -1, 51, 35, -1, 52, |
| 535 | 89, 46, -1, 52, 1, 46, -1, -1, 90, -1, |
| 536 | 91, -1, 90, 91, -1, 65, 92, 45, -1, 1, |
| 537 | 45, -1, -1, 93, -1, 94, -1, 93, 47, 94, |
| 538 | -1, 77, 96, -1, 38, 95, -1, 95, -1, 53, |
| 539 | 35, -1, -1, 96, 31, -1, 52, 98, 46, -1, |
| 540 | 52, 98, 47, 46, -1, 99, -1, 98, 47, 99, |
| 541 | -1, 38, -1, 38, 51, 35, -1, 30, 45, -1, |
| 542 | -1, 30, -1, 29, 48, 38, 49, 45, -1 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 543 | }; |
| 544 | |
| 545 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 546 | static const yytype_uint16 yyrline[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 547 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 548 | 0, 124, 124, 125, 129, 129, 135, 135, 137, 137, |
| 549 | 139, 140, 141, 142, 143, 144, 148, 162, 163, 167, |
| 550 | 175, 188, 194, 195, 199, 200, 204, 210, 214, 215, |
| 551 | 216, 217, 218, 222, 223, 224, 225, 229, 231, 233, |
| 552 | 237, 239, 241, 246, 249, 250, 254, 255, 256, 257, |
| 553 | 258, 259, 260, 261, 262, 263, 264, 268, 273, 274, |
| 554 | 278, 279, 283, 283, 283, 284, 292, 293, 297, 306, |
| 555 | 308, 310, 312, 314, 321, 322, 326, 327, 328, 330, |
| 556 | 332, 334, 336, 341, 342, 343, 347, 348, 352, 353, |
| 557 | 358, 363, 365, 369, 370, 378, 382, 384, 386, 388, |
| 558 | 390, 395, 404, 405, 410, 415, 416, 420, 421, 425, |
| 559 | 426, 430, 432, 437, 438, 442, 443, 447, 448, 449, |
| 560 | 453, 457, 458, 462, 463, 467, 468, 471, 476, 484, |
| 561 | 488, 489, 493 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 562 | }; |
| 563 | #endif |
| 564 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 565 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
| 566 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 567 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 568 | static const char *const yytname[] = |
| 569 | { |
| 570 | "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW", |
| 571 | "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW", |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 572 | "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW", |
| 573 | "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", |
| 574 | "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", |
| 575 | "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", |
| 576 | "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 577 | "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 578 | "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 579 | "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "')'", "'*'", |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 580 | "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1", |
| 581 | "declaration1", "$@2", "$@3", "simple_declaration", |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 582 | "init_declarator_list_opt", "init_declarator_list", "init_declarator", |
| 583 | "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier", |
| 584 | "storage_class_specifier", "type_specifier", "simple_type_specifier", |
| 585 | "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq", |
| 586 | "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator", |
| 587 | "direct_nested_declarator", "parameter_declaration_clause", |
| 588 | "parameter_declaration_list_opt", "parameter_declaration_list", |
| 589 | "parameter_declaration", "m_abstract_declarator", |
| 590 | "direct_m_abstract_declarator", "function_definition", "initializer_opt", |
| 591 | "initializer", "class_body", "member_specification_opt", |
| 592 | "member_specification", "member_declaration", |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 593 | "member_declarator_list_opt", "member_declarator_list", |
| 594 | "member_declarator", "member_bitfield_declarator", "attribute_opt", |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 595 | "enum_body", "enumerator_list", "enumerator", "asm_definition", |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 596 | "asm_phrase_opt", "export_definition", YY_NULL |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 597 | }; |
| 598 | #endif |
| 599 | |
| 600 | # ifdef YYPRINT |
| 601 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 602 | token YYLEX-NUM. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 603 | static const yytype_uint16 yytoknum[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 604 | { |
| 605 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 606 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 607 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 608 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 609 | 295, 296, 297, 298, 299, 59, 125, 44, 40, 41, |
| 610 | 42, 61, 123, 58 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 611 | }; |
| 612 | # endif |
| 613 | |
| 614 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 615 | static const yytype_uint8 yyr1[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 616 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 617 | 0, 54, 55, 55, 57, 56, 59, 58, 60, 58, |
| 618 | 58, 58, 58, 58, 58, 58, 61, 62, 62, 63, |
| 619 | 63, 64, 65, 65, 66, 66, 67, 67, 68, 68, |
| 620 | 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, |
| 621 | 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, |
| 622 | 70, 70, 70, 70, 70, 70, 70, 71, 72, 72, |
| 623 | 73, 73, 74, 74, 74, 74, 75, 75, 76, 76, |
| 624 | 76, 76, 76, 76, 77, 77, 78, 78, 78, 78, |
| 625 | 78, 78, 78, 79, 79, 79, 80, 80, 81, 81, |
| 626 | 82, 83, 83, 84, 84, 84, 84, 84, 84, 84, |
| 627 | 84, 85, 86, 86, 87, 88, 88, 89, 89, 90, |
| 628 | 90, 91, 91, 92, 92, 93, 93, 94, 94, 94, |
| 629 | 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, |
| 630 | 101, 101, 102 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 631 | }; |
| 632 | |
| 633 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 634 | static const yytype_uint8 yyr2[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 635 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 636 | 0, 2, 1, 2, 0, 2, 0, 4, 0, 3, |
| 637 | 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, |
| 638 | 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 639 | 1, 1, 1, 1, 1, 4, 1, 2, 2, 2, |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 640 | 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, |
| 641 | 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, |
| 642 | 1, 2, 1, 1, 1, 1, 2, 1, 1, 4, |
| 643 | 4, 2, 3, 3, 2, 1, 1, 1, 4, 4, |
| 644 | 2, 3, 3, 2, 1, 3, 0, 1, 1, 3, |
| 645 | 2, 2, 1, 0, 1, 1, 4, 4, 2, 3, |
| 646 | 3, 3, 0, 1, 2, 3, 3, 0, 1, 1, |
| 647 | 2, 3, 2, 0, 1, 1, 3, 2, 2, 1, |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 648 | 2, 0, 2, 3, 4, 1, 3, 1, 3, 2, |
| 649 | 0, 1, 5 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 650 | }; |
| 651 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 652 | /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
| 653 | Performed when YYTABLE doesn't specify something else to do. Zero |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 654 | means the default is an error. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 655 | static const yytype_uint8 yydefact[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 656 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 657 | 4, 4, 2, 0, 1, 3, 0, 28, 55, 46, |
| 658 | 62, 53, 0, 31, 0, 52, 32, 48, 49, 29, |
| 659 | 65, 47, 50, 30, 0, 8, 0, 51, 54, 63, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 660 | 0, 0, 0, 64, 36, 56, 5, 10, 17, 23, |
| 661 | 24, 26, 27, 33, 34, 11, 12, 13, 14, 15, |
| 662 | 39, 0, 43, 6, 37, 0, 44, 22, 38, 45, |
| 663 | 0, 0, 129, 68, 0, 58, 0, 18, 19, 0, |
| 664 | 130, 67, 25, 42, 127, 0, 125, 22, 40, 0, |
| 665 | 113, 0, 0, 109, 9, 17, 41, 93, 0, 0, |
| 666 | 0, 0, 57, 59, 60, 16, 0, 66, 131, 101, |
| 667 | 121, 71, 0, 0, 123, 0, 7, 112, 106, 76, |
| 668 | 77, 0, 0, 0, 121, 75, 0, 114, 115, 119, |
| 669 | 105, 0, 110, 130, 94, 56, 0, 93, 90, 92, |
| 670 | 35, 0, 73, 72, 61, 20, 102, 0, 0, 84, |
| 671 | 87, 88, 128, 124, 126, 118, 0, 76, 0, 120, |
| 672 | 74, 117, 80, 0, 111, 0, 0, 95, 0, 91, |
| 673 | 98, 0, 132, 122, 0, 21, 103, 70, 69, 83, |
| 674 | 0, 82, 81, 0, 0, 116, 100, 99, 0, 0, |
| 675 | 104, 85, 89, 79, 78, 97, 96 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 676 | }; |
| 677 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 678 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 679 | static const yytype_int16 yydefgoto[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 680 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 681 | -1, 1, 2, 3, 36, 77, 57, 37, 66, 67, |
| 682 | 68, 80, 39, 40, 41, 42, 43, 69, 92, 93, |
| 683 | 44, 123, 71, 114, 115, 138, 139, 140, 141, 128, |
| 684 | 129, 45, 165, 166, 56, 81, 82, 83, 116, 117, |
| 685 | 118, 119, 136, 52, 75, 76, 46, 100, 47 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 686 | }; |
| 687 | |
| 688 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 689 | STATE-NUM. */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 690 | #define YYPACT_NINF -140 |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 691 | static const yytype_int16 yypact[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 692 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 693 | -140, 29, -140, 207, -140, -140, 40, -140, -140, -140, |
| 694 | -140, -140, -27, -140, 44, -140, -140, -140, -140, -140, |
| 695 | -140, -140, -140, -140, -22, -140, -18, -140, -140, -140, |
| 696 | -9, 22, 28, -140, -140, -140, -140, -140, 42, 472, |
| 697 | -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, |
| 698 | 46, 43, -140, -140, 47, 107, -140, 472, 47, -140, |
| 699 | 472, 62, -140, -140, 16, -3, 57, 56, -140, 42, |
| 700 | 35, -11, -140, -140, 53, 48, -140, 472, -140, 51, |
| 701 | 21, 59, 157, -140, -140, 42, -140, 388, 58, 60, |
| 702 | 70, 81, -140, -3, -140, -140, 42, -140, -140, -140, |
| 703 | -140, -140, 253, 71, -140, -20, -140, -140, -140, 83, |
| 704 | -140, 5, 102, 34, -140, 12, 95, 94, -140, -140, |
| 705 | -140, 97, -140, 113, -140, -140, 2, 41, -140, 27, |
| 706 | -140, 99, -140, -140, -140, -140, -24, 98, 101, 109, |
| 707 | 104, -140, -140, -140, -140, -140, 105, -140, 110, -140, |
| 708 | -140, 117, -140, 298, -140, 21, 112, -140, 120, -140, |
| 709 | -140, 343, -140, -140, 121, -140, -140, -140, -140, -140, |
| 710 | 434, -140, -140, 131, 137, -140, -140, -140, 138, 141, |
| 711 | -140, -140, -140, -140, -140, -140, -140 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 712 | }; |
| 713 | |
| 714 | /* YYPGOTO[NTERM-NUM]. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 715 | static const yytype_int16 yypgoto[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 716 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 717 | -140, -140, 190, -140, -140, -140, -140, -45, -140, -140, |
| 718 | 96, 1, -60, -31, -140, -140, -140, -78, -140, -140, |
| 719 | -55, -7, -140, -92, -140, -139, -140, -140, -59, -39, |
| 720 | -140, -140, -140, -140, -13, -140, -140, 111, -140, -140, |
| 721 | 39, 87, 84, 147, -140, 106, -140, -140, -140 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 722 | }; |
| 723 | |
| 724 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 725 | positive, shift that token. If negative, reduce the rule which |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 726 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 727 | #define YYTABLE_NINF -109 |
| 728 | static const yytype_int16 yytable[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 729 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 730 | 87, 88, 113, 156, 38, 10, 146, 163, 72, 127, |
| 731 | 94, 50, 84, 59, 174, 20, 54, 90, 74, 148, |
| 732 | 58, 150, 179, 101, 29, 51, 143, 164, 33, 4, |
| 733 | 55, 70, 106, 113, 55, 113, -93, 102, 134, 60, |
| 734 | 124, 78, 87, 147, 157, 86, 152, 110, 127, 127, |
| 735 | 126, -93, 65, 111, 63, 65, 72, 91, 85, 109, |
| 736 | 153, 160, 97, 110, 64, 98, 65, 53, 99, 111, |
| 737 | 61, 65, 147, 62, 112, 161, 110, 113, 85, 124, |
| 738 | 63, 74, 111, 157, 65, 48, 49, 158, 159, 126, |
| 739 | 64, 65, 65, 87, 104, 105, 107, 108, 51, 55, |
| 740 | 89, 87, 95, 96, 103, 120, 142, 130, 79, 131, |
| 741 | 87, 182, 7, 8, 9, 10, 11, 12, 13, 132, |
| 742 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 743 | 133, 26, 27, 28, 29, 30, 112, 149, 33, 34, |
| 744 | 154, 155, 107, 98, 162, -22, 169, 167, 163, 35, |
| 745 | 168, 170, -22, -107, 171, -22, 180, -22, 121, 172, |
| 746 | -22, 176, 7, 8, 9, 10, 11, 12, 13, 177, |
| 747 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 748 | 183, 26, 27, 28, 29, 30, 184, 185, 33, 34, |
| 749 | 186, 5, 135, 122, 175, -22, 145, 73, 151, 35, |
| 750 | 0, 0, -22, -108, 0, -22, 0, -22, 6, 0, |
| 751 | -22, 144, 7, 8, 9, 10, 11, 12, 13, 14, |
| 752 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 753 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 754 | 0, 0, 0, 0, 0, -22, 0, 0, 0, 35, |
| 755 | 0, 0, -22, 0, 137, -22, 0, -22, 7, 8, |
| 756 | 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, |
| 757 | 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, |
| 758 | 29, 30, 0, 0, 33, 34, 0, 0, 0, 0, |
| 759 | -86, 0, 0, 0, 0, 35, 0, 0, 0, 173, |
| 760 | 0, 0, -86, 7, 8, 9, 10, 11, 12, 13, |
| 761 | 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
| 762 | 24, 0, 26, 27, 28, 29, 30, 0, 0, 33, |
| 763 | 34, 0, 0, 0, 0, -86, 0, 0, 0, 0, |
| 764 | 35, 0, 0, 0, 178, 0, 0, -86, 7, 8, |
| 765 | 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, |
| 766 | 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, |
| 767 | 29, 30, 0, 0, 33, 34, 0, 0, 0, 0, |
| 768 | -86, 0, 0, 0, 0, 35, 0, 0, 0, 0, |
| 769 | 0, 0, -86, 7, 8, 9, 10, 11, 12, 13, |
| 770 | 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
| 771 | 24, 0, 26, 27, 28, 29, 30, 0, 0, 33, |
| 772 | 34, 0, 0, 0, 0, 0, 124, 0, 0, 0, |
| 773 | 125, 0, 0, 0, 0, 0, 126, 0, 65, 7, |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 774 | 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, |
| 775 | 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 776 | 28, 29, 30, 0, 0, 33, 34, 0, 0, 0, |
| 777 | 0, 181, 0, 0, 0, 0, 35, 7, 8, 9, |
| 778 | 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, |
| 779 | 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, |
| 780 | 30, 0, 0, 33, 34, 0, 0, 0, 0, 0, |
| 781 | 0, 0, 0, 0, 35 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 782 | }; |
| 783 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 784 | #define yypact_value_is_default(yystate) \ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 785 | ((yystate) == (-140)) |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 786 | |
| 787 | #define yytable_value_is_error(yytable_value) \ |
| 788 | YYID (0) |
| 789 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 790 | static const yytype_int16 yycheck[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 791 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 792 | 60, 60, 80, 1, 3, 8, 1, 31, 39, 87, |
| 793 | 65, 38, 57, 26, 153, 18, 38, 1, 38, 111, |
| 794 | 38, 113, 161, 34, 27, 52, 46, 51, 31, 0, |
| 795 | 52, 38, 77, 111, 52, 113, 34, 48, 93, 48, |
| 796 | 38, 54, 102, 38, 42, 58, 34, 42, 126, 127, |
| 797 | 48, 49, 50, 48, 38, 50, 87, 64, 57, 38, |
| 798 | 48, 34, 69, 42, 48, 30, 50, 23, 33, 48, |
| 799 | 48, 50, 38, 45, 53, 48, 42, 155, 77, 38, |
| 800 | 38, 38, 48, 42, 50, 45, 46, 126, 127, 48, |
| 801 | 48, 50, 50, 153, 46, 47, 45, 46, 52, 52, |
| 802 | 38, 161, 45, 47, 51, 46, 35, 49, 1, 49, |
| 803 | 170, 170, 5, 6, 7, 8, 9, 10, 11, 49, |
| 804 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 805 | 49, 24, 25, 26, 27, 28, 53, 35, 31, 32, |
| 806 | 45, 47, 45, 30, 45, 38, 37, 49, 31, 42, |
| 807 | 49, 47, 45, 46, 49, 48, 35, 50, 1, 49, |
| 808 | 53, 49, 5, 6, 7, 8, 9, 10, 11, 49, |
| 809 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 810 | 49, 24, 25, 26, 27, 28, 49, 49, 31, 32, |
| 811 | 49, 1, 96, 82, 155, 38, 109, 50, 114, 42, |
| 812 | -1, -1, 45, 46, -1, 48, -1, 50, 1, -1, |
| 813 | 53, 105, 5, 6, 7, 8, 9, 10, 11, 12, |
| 814 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 815 | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, |
| 816 | -1, -1, -1, -1, -1, 38, -1, -1, -1, 42, |
| 817 | -1, -1, 45, -1, 1, 48, -1, 50, 5, 6, |
| 818 | 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, |
| 819 | 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, |
| 820 | 27, 28, -1, -1, 31, 32, -1, -1, -1, -1, |
| 821 | 37, -1, -1, -1, -1, 42, -1, -1, -1, 1, |
| 822 | -1, -1, 49, 5, 6, 7, 8, 9, 10, 11, |
| 823 | -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 824 | 22, -1, 24, 25, 26, 27, 28, -1, -1, 31, |
| 825 | 32, -1, -1, -1, -1, 37, -1, -1, -1, -1, |
| 826 | 42, -1, -1, -1, 1, -1, -1, 49, 5, 6, |
| 827 | 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, |
| 828 | 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, |
| 829 | 27, 28, -1, -1, 31, 32, -1, -1, -1, -1, |
| 830 | 37, -1, -1, -1, -1, 42, -1, -1, -1, -1, |
| 831 | -1, -1, 49, 5, 6, 7, 8, 9, 10, 11, |
| 832 | -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 833 | 22, -1, 24, 25, 26, 27, 28, -1, -1, 31, |
| 834 | 32, -1, -1, -1, -1, -1, 38, -1, -1, -1, |
| 835 | 42, -1, -1, -1, -1, -1, 48, -1, 50, 5, |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 836 | 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, |
| 837 | 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 838 | 26, 27, 28, -1, -1, 31, 32, -1, -1, -1, |
| 839 | -1, 37, -1, -1, -1, -1, 42, 5, 6, 7, |
| 840 | 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, |
| 841 | 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, |
| 842 | 28, -1, -1, 31, 32, -1, -1, -1, -1, -1, |
| 843 | -1, -1, -1, -1, 42 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 844 | }; |
| 845 | |
| 846 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 847 | symbol of state STATE-NUM. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 848 | static const yytype_uint8 yystos[] = |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 849 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 850 | 0, 55, 56, 57, 0, 56, 1, 5, 6, 7, |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 851 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
| 852 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 853 | 28, 29, 30, 31, 32, 42, 58, 61, 65, 66, |
| 854 | 67, 68, 69, 70, 74, 85, 100, 102, 45, 46, |
| 855 | 38, 52, 97, 23, 38, 52, 88, 60, 38, 88, |
| 856 | 48, 48, 45, 38, 48, 50, 62, 63, 64, 71, |
| 857 | 75, 76, 67, 97, 38, 98, 99, 59, 88, 1, |
| 858 | 65, 89, 90, 91, 61, 65, 88, 66, 82, 38, |
| 859 | 1, 75, 72, 73, 74, 45, 47, 75, 30, 33, |
| 860 | 101, 34, 48, 51, 46, 47, 61, 45, 46, 38, |
| 861 | 42, 48, 53, 71, 77, 78, 92, 93, 94, 95, |
| 862 | 46, 1, 91, 75, 38, 42, 48, 71, 83, 84, |
| 863 | 49, 49, 49, 49, 74, 64, 96, 1, 79, 80, |
| 864 | 81, 82, 35, 46, 99, 95, 1, 38, 77, 35, |
| 865 | 77, 96, 34, 48, 45, 47, 1, 42, 83, 83, |
| 866 | 34, 48, 45, 31, 51, 86, 87, 49, 49, 37, |
| 867 | 47, 49, 49, 1, 79, 94, 49, 49, 1, 79, |
| 868 | 35, 37, 82, 49, 49, 49, 49 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 869 | }; |
| 870 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 871 | #define yyerrok (yyerrstatus = 0) |
| 872 | #define yyclearin (yychar = YYEMPTY) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 873 | #define YYEMPTY (-2) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 874 | #define YYEOF 0 |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 875 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 876 | #define YYACCEPT goto yyacceptlab |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 877 | #define YYABORT goto yyabortlab |
| 878 | #define YYERROR goto yyerrorlab |
| 879 | |
| 880 | |
| 881 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 882 | to ease the transition to the new meaning of YYERROR, for GCC. |
Arnaud Lacombe | 58ef81c | 2011-05-23 01:52:59 -0400 | [diff] [blame] | 883 | Once GCC version 2 has supplanted version 1, this can go. However, |
| 884 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
| 885 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
| 886 | discussed. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 887 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 888 | #define YYFAIL goto yyerrlab |
Arnaud Lacombe | 58ef81c | 2011-05-23 01:52:59 -0400 | [diff] [blame] | 889 | #if defined YYFAIL |
| 890 | /* This is here to suppress warnings from the GCC cpp's |
| 891 | -Wunused-macros. Normally we don't worry about that warning, but |
| 892 | some users do, and we want to make it easy for users to remove |
| 893 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
| 894 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 895 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 896 | #define YYRECOVERING() (!!yyerrstatus) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 897 | |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 898 | #define YYBACKUP(Token, Value) \ |
| 899 | do \ |
| 900 | if (yychar == YYEMPTY) \ |
| 901 | { \ |
| 902 | yychar = (Token); \ |
| 903 | yylval = (Value); \ |
| 904 | YYPOPSTACK (yylen); \ |
| 905 | yystate = *yyssp; \ |
| 906 | goto yybackup; \ |
| 907 | } \ |
| 908 | else \ |
| 909 | { \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 910 | yyerror (YY_("syntax error: cannot back up")); \ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 911 | YYERROR; \ |
| 912 | } \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 913 | while (YYID (0)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 914 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 915 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 916 | #define YYTERROR 1 |
| 917 | #define YYERRCODE 256 |
| 918 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 919 | |
| 920 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 921 | If N is 0, then set CURRENT to the empty location which ends |
| 922 | the previous symbol: RHS[0] (always defined). */ |
| 923 | |
| 924 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| 925 | #ifndef YYLLOC_DEFAULT |
| 926 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 927 | do \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 928 | if (YYID (N)) \ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 929 | { \ |
| 930 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 931 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 932 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 933 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 934 | } \ |
| 935 | else \ |
| 936 | { \ |
| 937 | (Current).first_line = (Current).last_line = \ |
| 938 | YYRHSLOC (Rhs, 0).last_line; \ |
| 939 | (Current).first_column = (Current).last_column = \ |
| 940 | YYRHSLOC (Rhs, 0).last_column; \ |
| 941 | } \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 942 | while (YYID (0)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 943 | #endif |
| 944 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 945 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 946 | /* This macro is provided for backward compatibility. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 947 | |
| 948 | #ifndef YY_LOCATION_PRINT |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 949 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 950 | #endif |
| 951 | |
| 952 | |
| 953 | /* YYLEX -- calling `yylex' with the right arguments. */ |
| 954 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 955 | #ifdef YYLEX_PARAM |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 956 | # define YYLEX yylex (YYLEX_PARAM) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 957 | #else |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 958 | # define YYLEX yylex () |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 959 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 960 | |
| 961 | /* Enable debugging if requested. */ |
| 962 | #if YYDEBUG |
| 963 | |
| 964 | # ifndef YYFPRINTF |
| 965 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 966 | # define YYFPRINTF fprintf |
| 967 | # endif |
| 968 | |
| 969 | # define YYDPRINTF(Args) \ |
| 970 | do { \ |
| 971 | if (yydebug) \ |
| 972 | YYFPRINTF Args; \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 973 | } while (YYID (0)) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 974 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 975 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 976 | do { \ |
| 977 | if (yydebug) \ |
| 978 | { \ |
| 979 | YYFPRINTF (stderr, "%s ", Title); \ |
| 980 | yy_symbol_print (stderr, \ |
| 981 | Type, Value); \ |
| 982 | YYFPRINTF (stderr, "\n"); \ |
| 983 | } \ |
| 984 | } while (YYID (0)) |
| 985 | |
| 986 | |
| 987 | /*--------------------------------. |
| 988 | | Print this symbol on YYOUTPUT. | |
| 989 | `--------------------------------*/ |
| 990 | |
| 991 | /*ARGSUSED*/ |
| 992 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 993 | || defined __cplusplus || defined _MSC_VER) |
| 994 | static void |
| 995 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 996 | #else |
| 997 | static void |
| 998 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 999 | FILE *yyoutput; |
| 1000 | int yytype; |
| 1001 | YYSTYPE const * const yyvaluep; |
| 1002 | #endif |
| 1003 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 1004 | FILE *yyo = yyoutput; |
| 1005 | YYUSE (yyo); |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1006 | if (!yyvaluep) |
| 1007 | return; |
| 1008 | # ifdef YYPRINT |
| 1009 | if (yytype < YYNTOKENS) |
| 1010 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1011 | # else |
| 1012 | YYUSE (yyoutput); |
| 1013 | # endif |
| 1014 | switch (yytype) |
| 1015 | { |
| 1016 | default: |
| 1017 | break; |
| 1018 | } |
| 1019 | } |
| 1020 | |
| 1021 | |
| 1022 | /*--------------------------------. |
| 1023 | | Print this symbol on YYOUTPUT. | |
| 1024 | `--------------------------------*/ |
| 1025 | |
| 1026 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1027 | || defined __cplusplus || defined _MSC_VER) |
| 1028 | static void |
| 1029 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1030 | #else |
| 1031 | static void |
| 1032 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 1033 | FILE *yyoutput; |
| 1034 | int yytype; |
| 1035 | YYSTYPE const * const yyvaluep; |
| 1036 | #endif |
| 1037 | { |
| 1038 | if (yytype < YYNTOKENS) |
| 1039 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1040 | else |
| 1041 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1042 | |
| 1043 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 1044 | YYFPRINTF (yyoutput, ")"); |
| 1045 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1046 | |
| 1047 | /*------------------------------------------------------------------. |
| 1048 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1049 | | TOP (included). | |
| 1050 | `------------------------------------------------------------------*/ |
| 1051 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1052 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1053 | || defined __cplusplus || defined _MSC_VER) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1054 | static void |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1055 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1056 | #else |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1057 | static void |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1058 | yy_stack_print (yybottom, yytop) |
| 1059 | yytype_int16 *yybottom; |
| 1060 | yytype_int16 *yytop; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1061 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1062 | { |
| 1063 | YYFPRINTF (stderr, "Stack now"); |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1064 | for (; yybottom <= yytop; yybottom++) |
| 1065 | { |
| 1066 | int yybot = *yybottom; |
| 1067 | YYFPRINTF (stderr, " %d", yybot); |
| 1068 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1069 | YYFPRINTF (stderr, "\n"); |
| 1070 | } |
| 1071 | |
| 1072 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1073 | do { \ |
| 1074 | if (yydebug) \ |
| 1075 | yy_stack_print ((Bottom), (Top)); \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1076 | } while (YYID (0)) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1077 | |
| 1078 | |
| 1079 | /*------------------------------------------------. |
| 1080 | | Report that the YYRULE is going to be reduced. | |
| 1081 | `------------------------------------------------*/ |
| 1082 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1083 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1084 | || defined __cplusplus || defined _MSC_VER) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1085 | static void |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1086 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1087 | #else |
| 1088 | static void |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1089 | yy_reduce_print (yyvsp, yyrule) |
| 1090 | YYSTYPE *yyvsp; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1091 | int yyrule; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1092 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1093 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1094 | int yynrhs = yyr2[yyrule]; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1095 | int yyi; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1096 | unsigned long int yylno = yyrline[yyrule]; |
| 1097 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 1098 | yyrule - 1, yylno); |
| 1099 | /* The symbols being reduced. */ |
| 1100 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1101 | { |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1102 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1103 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1104 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1105 | ); |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1106 | YYFPRINTF (stderr, "\n"); |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1107 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1108 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1109 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1110 | # define YY_REDUCE_PRINT(Rule) \ |
| 1111 | do { \ |
| 1112 | if (yydebug) \ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1113 | yy_reduce_print (yyvsp, Rule); \ |
| 1114 | } while (YYID (0)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1115 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1116 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1117 | multiple parsers can coexist. */ |
| 1118 | int yydebug; |
| 1119 | #else /* !YYDEBUG */ |
| 1120 | # define YYDPRINTF(Args) |
| 1121 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1122 | # define YY_STACK_PRINT(Bottom, Top) |
| 1123 | # define YY_REDUCE_PRINT(Rule) |
| 1124 | #endif /* !YYDEBUG */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1125 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1126 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1127 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1128 | #ifndef YYINITDEPTH |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1129 | # define YYINITDEPTH 200 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1130 | #endif |
| 1131 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1132 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1133 | if the built-in stack extension method is used). |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1134 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1135 | Do not make this value too large; the results are undefined if |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1136 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1137 | evaluated with infinite-precision integer arithmetic. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1138 | |
| 1139 | #ifndef YYMAXDEPTH |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1140 | # define YYMAXDEPTH 10000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1141 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1142 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1143 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1144 | #if YYERROR_VERBOSE |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1145 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1146 | # ifndef yystrlen |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1147 | # if defined __GLIBC__ && defined _STRING_H |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1148 | # define yystrlen strlen |
| 1149 | # else |
| 1150 | /* Return the length of YYSTR. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1151 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1152 | || defined __cplusplus || defined _MSC_VER) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1153 | static YYSIZE_T |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1154 | yystrlen (const char *yystr) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1155 | #else |
| 1156 | static YYSIZE_T |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1157 | yystrlen (yystr) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1158 | const char *yystr; |
| 1159 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1160 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1161 | YYSIZE_T yylen; |
| 1162 | for (yylen = 0; yystr[yylen]; yylen++) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1163 | continue; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1164 | return yylen; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1165 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1166 | # endif |
| 1167 | # endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1168 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1169 | # ifndef yystpcpy |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1170 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1171 | # define yystpcpy stpcpy |
| 1172 | # else |
| 1173 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1174 | YYDEST. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1175 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1176 | || defined __cplusplus || defined _MSC_VER) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1177 | static char * |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1178 | yystpcpy (char *yydest, const char *yysrc) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1179 | #else |
| 1180 | static char * |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1181 | yystpcpy (yydest, yysrc) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1182 | char *yydest; |
| 1183 | const char *yysrc; |
| 1184 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1185 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1186 | char *yyd = yydest; |
| 1187 | const char *yys = yysrc; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1188 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1189 | while ((*yyd++ = *yys++) != '\0') |
| 1190 | continue; |
| 1191 | |
| 1192 | return yyd - 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1193 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1194 | # endif |
| 1195 | # endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1196 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1197 | # ifndef yytnamerr |
| 1198 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1199 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1200 | heuristic is that double-quoting is unnecessary unless the string |
| 1201 | contains an apostrophe, a comma, or backslash (other than |
| 1202 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1203 | null, do not copy; instead, return the length of what the result |
| 1204 | would have been. */ |
| 1205 | static YYSIZE_T |
| 1206 | yytnamerr (char *yyres, const char *yystr) |
| 1207 | { |
| 1208 | if (*yystr == '"') |
| 1209 | { |
| 1210 | YYSIZE_T yyn = 0; |
| 1211 | char const *yyp = yystr; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1212 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1213 | for (;;) |
| 1214 | switch (*++yyp) |
| 1215 | { |
| 1216 | case '\'': |
| 1217 | case ',': |
| 1218 | goto do_not_strip_quotes; |
| 1219 | |
| 1220 | case '\\': |
| 1221 | if (*++yyp != '\\') |
| 1222 | goto do_not_strip_quotes; |
| 1223 | /* Fall through. */ |
| 1224 | default: |
| 1225 | if (yyres) |
| 1226 | yyres[yyn] = *yyp; |
| 1227 | yyn++; |
| 1228 | break; |
| 1229 | |
| 1230 | case '"': |
| 1231 | if (yyres) |
| 1232 | yyres[yyn] = '\0'; |
| 1233 | return yyn; |
| 1234 | } |
| 1235 | do_not_strip_quotes: ; |
| 1236 | } |
| 1237 | |
| 1238 | if (! yyres) |
| 1239 | return yystrlen (yystr); |
| 1240 | |
| 1241 | return yystpcpy (yyres, yystr) - yyres; |
| 1242 | } |
| 1243 | # endif |
| 1244 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1245 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
| 1246 | about the unexpected token YYTOKEN for the state stack whose top is |
| 1247 | YYSSP. |
| 1248 | |
| 1249 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
| 1250 | not large enough to hold the message. In that case, also set |
| 1251 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
| 1252 | required number of bytes is too large to store. */ |
| 1253 | static int |
| 1254 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
| 1255 | yytype_int16 *yyssp, int yytoken) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1256 | { |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 1257 | YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1258 | YYSIZE_T yysize = yysize0; |
| 1259 | YYSIZE_T yysize1; |
| 1260 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1261 | /* Internationalized format string. */ |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 1262 | const char *yyformat = YY_NULL; |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1263 | /* Arguments of yyformat. */ |
| 1264 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1265 | /* Number of reported tokens (one for the "unexpected", one per |
| 1266 | "expected"). */ |
| 1267 | int yycount = 0; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1268 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1269 | /* There are many possibilities here to consider: |
| 1270 | - Assume YYFAIL is not used. It's too flawed to consider. See |
| 1271 | <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> |
| 1272 | for details. YYERROR is fine as it does not invoke this |
| 1273 | function. |
| 1274 | - If this state is a consistent state with a default action, then |
| 1275 | the only way this function was invoked is if the default action |
| 1276 | is an error action. In that case, don't check for expected |
| 1277 | tokens because there are none. |
| 1278 | - The only way there can be no lookahead present (in yychar) is if |
| 1279 | this state is a consistent state with a default action. Thus, |
| 1280 | detecting the absence of a lookahead is sufficient to determine |
| 1281 | that there is no unexpected or expected token to report. In that |
| 1282 | case, just report a simple "syntax error". |
| 1283 | - Don't assume there isn't a lookahead just because this state is a |
| 1284 | consistent state with a default action. There might have been a |
| 1285 | previous inconsistent state, consistent state with a non-default |
| 1286 | action, or user semantic action that manipulated yychar. |
| 1287 | - Of course, the expected token list depends on states to have |
| 1288 | correct lookahead information, and it depends on the parser not |
| 1289 | to perform extra reductions after fetching a lookahead from the |
| 1290 | scanner and before detecting a syntax error. Thus, state merging |
| 1291 | (from LALR or IELR) and default reductions corrupt the expected |
| 1292 | token list. However, the list is correct for canonical LR with |
| 1293 | one exception: it will still contain any token that will not be |
| 1294 | accepted due to an error action in a later state. |
| 1295 | */ |
| 1296 | if (yytoken != YYEMPTY) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1297 | { |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1298 | int yyn = yypact[*yyssp]; |
| 1299 | yyarg[yycount++] = yytname[yytoken]; |
| 1300 | if (!yypact_value_is_default (yyn)) |
| 1301 | { |
| 1302 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1303 | YYCHECK. In other words, skip the first -YYN actions for |
| 1304 | this state because they are default actions. */ |
| 1305 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1306 | /* Stay within bounds of both yycheck and yytname. */ |
| 1307 | int yychecklim = YYLAST - yyn + 1; |
| 1308 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1309 | int yyx; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1310 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1311 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1312 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
| 1313 | && !yytable_value_is_error (yytable[yyx + yyn])) |
| 1314 | { |
| 1315 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1316 | { |
| 1317 | yycount = 1; |
| 1318 | yysize = yysize0; |
| 1319 | break; |
| 1320 | } |
| 1321 | yyarg[yycount++] = yytname[yyx]; |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 1322 | yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1323 | if (! (yysize <= yysize1 |
| 1324 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1325 | return 2; |
| 1326 | yysize = yysize1; |
| 1327 | } |
| 1328 | } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1329 | } |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1330 | |
| 1331 | switch (yycount) |
| 1332 | { |
| 1333 | # define YYCASE_(N, S) \ |
| 1334 | case N: \ |
| 1335 | yyformat = S; \ |
| 1336 | break |
| 1337 | YYCASE_(0, YY_("syntax error")); |
| 1338 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
| 1339 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
| 1340 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
| 1341 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
| 1342 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
| 1343 | # undef YYCASE_ |
| 1344 | } |
| 1345 | |
| 1346 | yysize1 = yysize + yystrlen (yyformat); |
| 1347 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1348 | return 2; |
| 1349 | yysize = yysize1; |
| 1350 | |
| 1351 | if (*yymsg_alloc < yysize) |
| 1352 | { |
| 1353 | *yymsg_alloc = 2 * yysize; |
| 1354 | if (! (yysize <= *yymsg_alloc |
| 1355 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 1356 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
| 1357 | return 1; |
| 1358 | } |
| 1359 | |
| 1360 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1361 | Don't have undefined behavior even if the translation |
| 1362 | produced a string with the wrong number of "%s"s. */ |
| 1363 | { |
| 1364 | char *yyp = *yymsg; |
| 1365 | int yyi = 0; |
| 1366 | while ((*yyp = *yyformat) != '\0') |
| 1367 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
| 1368 | { |
| 1369 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1370 | yyformat += 2; |
| 1371 | } |
| 1372 | else |
| 1373 | { |
| 1374 | yyp++; |
| 1375 | yyformat++; |
| 1376 | } |
| 1377 | } |
| 1378 | return 0; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1379 | } |
| 1380 | #endif /* YYERROR_VERBOSE */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1381 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1382 | /*-----------------------------------------------. |
| 1383 | | Release the memory associated to this symbol. | |
| 1384 | `-----------------------------------------------*/ |
| 1385 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1386 | /*ARGSUSED*/ |
| 1387 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1388 | || defined __cplusplus || defined _MSC_VER) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1389 | static void |
| 1390 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
| 1391 | #else |
| 1392 | static void |
| 1393 | yydestruct (yymsg, yytype, yyvaluep) |
| 1394 | const char *yymsg; |
| 1395 | int yytype; |
| 1396 | YYSTYPE *yyvaluep; |
| 1397 | #endif |
| 1398 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1399 | YYUSE (yyvaluep); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1400 | |
| 1401 | if (!yymsg) |
| 1402 | yymsg = "Deleting"; |
| 1403 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1404 | |
| 1405 | switch (yytype) |
| 1406 | { |
| 1407 | |
| 1408 | default: |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1409 | break; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1410 | } |
| 1411 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1412 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1413 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1414 | /* Prevent warnings from -Wmissing-prototypes. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1415 | #ifdef YYPARSE_PARAM |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1416 | #if defined __STDC__ || defined __cplusplus |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1417 | int yyparse (void *YYPARSE_PARAM); |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1418 | #else |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1419 | int yyparse (); |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1420 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1421 | #else /* ! YYPARSE_PARAM */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1422 | #if defined __STDC__ || defined __cplusplus |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1423 | int yyparse (void); |
| 1424 | #else |
| 1425 | int yyparse (); |
| 1426 | #endif |
| 1427 | #endif /* ! YYPARSE_PARAM */ |
| 1428 | |
| 1429 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1430 | /* The lookahead symbol. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1431 | int yychar; |
| 1432 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1433 | /* The semantic value of the lookahead symbol. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1434 | YYSTYPE yylval; |
| 1435 | |
| 1436 | /* Number of syntax errors so far. */ |
| 1437 | int yynerrs; |
| 1438 | |
| 1439 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1440 | /*----------. |
| 1441 | | yyparse. | |
| 1442 | `----------*/ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1443 | |
| 1444 | #ifdef YYPARSE_PARAM |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1445 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1446 | || defined __cplusplus || defined _MSC_VER) |
| 1447 | int |
| 1448 | yyparse (void *YYPARSE_PARAM) |
| 1449 | #else |
| 1450 | int |
| 1451 | yyparse (YYPARSE_PARAM) |
| 1452 | void *YYPARSE_PARAM; |
| 1453 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1454 | #else /* ! YYPARSE_PARAM */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1455 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1456 | || defined __cplusplus || defined _MSC_VER) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1457 | int |
| 1458 | yyparse (void) |
| 1459 | #else |
| 1460 | int |
| 1461 | yyparse () |
| 1462 | |
| 1463 | #endif |
| 1464 | #endif |
| 1465 | { |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1466 | int yystate; |
| 1467 | /* Number of tokens to shift before error messages enabled. */ |
| 1468 | int yyerrstatus; |
| 1469 | |
| 1470 | /* The stacks and their tools: |
| 1471 | `yyss': related to states. |
| 1472 | `yyvs': related to semantic values. |
| 1473 | |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 1474 | Refer to the stacks through separate pointers, to allow yyoverflow |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1475 | to reallocate them elsewhere. */ |
| 1476 | |
| 1477 | /* The state stack. */ |
| 1478 | yytype_int16 yyssa[YYINITDEPTH]; |
| 1479 | yytype_int16 *yyss; |
| 1480 | yytype_int16 *yyssp; |
| 1481 | |
| 1482 | /* The semantic value stack. */ |
| 1483 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 1484 | YYSTYPE *yyvs; |
| 1485 | YYSTYPE *yyvsp; |
| 1486 | |
| 1487 | YYSIZE_T yystacksize; |
| 1488 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1489 | int yyn; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1490 | int yyresult; |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1491 | /* Lookahead token as an internal (translated) token number. */ |
| 1492 | int yytoken; |
| 1493 | /* The variables used to return semantic value and location from the |
| 1494 | action routines. */ |
| 1495 | YYSTYPE yyval; |
| 1496 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1497 | #if YYERROR_VERBOSE |
| 1498 | /* Buffer for error messages, and its allocated size. */ |
| 1499 | char yymsgbuf[128]; |
| 1500 | char *yymsg = yymsgbuf; |
| 1501 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 1502 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1503 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1504 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1505 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1506 | /* The number of symbols on the RHS of the reduced rule. |
| 1507 | Keep to zero when no symbol should be popped. */ |
| 1508 | int yylen = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1509 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1510 | yytoken = 0; |
| 1511 | yyss = yyssa; |
| 1512 | yyvs = yyvsa; |
| 1513 | yystacksize = YYINITDEPTH; |
| 1514 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1515 | YYDPRINTF ((stderr, "Starting parse\n")); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1516 | |
| 1517 | yystate = 0; |
| 1518 | yyerrstatus = 0; |
| 1519 | yynerrs = 0; |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1520 | yychar = YYEMPTY; /* Cause a token to be read. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1521 | |
| 1522 | /* Initialize stack pointers. |
| 1523 | Waste one element of value and location stack |
| 1524 | so that they stay on the same level as the state stack. |
| 1525 | The wasted elements are never initialized. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1526 | yyssp = yyss; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1527 | yyvsp = yyvs; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1528 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1529 | goto yysetstate; |
| 1530 | |
| 1531 | /*------------------------------------------------------------. |
| 1532 | | yynewstate -- Push a new state, which is found in yystate. | |
| 1533 | `------------------------------------------------------------*/ |
| 1534 | yynewstate: |
| 1535 | /* In all cases, when you get here, the value and location stacks |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1536 | have just been pushed. So pushing a state here evens the stacks. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1537 | yyssp++; |
| 1538 | |
| 1539 | yysetstate: |
| 1540 | *yyssp = yystate; |
| 1541 | |
| 1542 | if (yyss + yystacksize - 1 <= yyssp) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1543 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1544 | /* Get the current used size of the three stacks, in elements. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1545 | YYSIZE_T yysize = yyssp - yyss + 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1546 | |
| 1547 | #ifdef yyoverflow |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1548 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1549 | /* Give user a chance to reallocate the stack. Use copies of |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1550 | these so that the &'s don't force the real ones into |
| 1551 | memory. */ |
| 1552 | YYSTYPE *yyvs1 = yyvs; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1553 | yytype_int16 *yyss1 = yyss; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1554 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1555 | /* Each stack pointer address is followed by the size of the |
| 1556 | data in use in that stack, in bytes. This used to be a |
| 1557 | conditional around just the two extra args, but that might |
| 1558 | be undefined if yyoverflow is a macro. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1559 | yyoverflow (YY_("memory exhausted"), |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1560 | &yyss1, yysize * sizeof (*yyssp), |
| 1561 | &yyvs1, yysize * sizeof (*yyvsp), |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1562 | &yystacksize); |
| 1563 | |
| 1564 | yyss = yyss1; |
| 1565 | yyvs = yyvs1; |
| 1566 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1567 | #else /* no yyoverflow */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1568 | # ifndef YYSTACK_RELOCATE |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1569 | goto yyexhaustedlab; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1570 | # else |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1571 | /* Extend the stack our own way. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1572 | if (YYMAXDEPTH <= yystacksize) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1573 | goto yyexhaustedlab; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1574 | yystacksize *= 2; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1575 | if (YYMAXDEPTH < yystacksize) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1576 | yystacksize = YYMAXDEPTH; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1577 | |
| 1578 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1579 | yytype_int16 *yyss1 = yyss; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1580 | union yyalloc *yyptr = |
| 1581 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 1582 | if (! yyptr) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1583 | goto yyexhaustedlab; |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1584 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1585 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1586 | # undef YYSTACK_RELOCATE |
| 1587 | if (yyss1 != yyssa) |
| 1588 | YYSTACK_FREE (yyss1); |
| 1589 | } |
| 1590 | # endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1591 | #endif /* no yyoverflow */ |
| 1592 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1593 | yyssp = yyss + yysize - 1; |
| 1594 | yyvsp = yyvs + yysize - 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1595 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1596 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 1597 | (unsigned long int) yystacksize)); |
| 1598 | |
| 1599 | if (yyss + yystacksize - 1 <= yyssp) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1600 | YYABORT; |
| 1601 | } |
| 1602 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1603 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1604 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1605 | if (yystate == YYFINAL) |
| 1606 | YYACCEPT; |
| 1607 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1608 | goto yybackup; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1609 | |
| 1610 | /*-----------. |
| 1611 | | yybackup. | |
| 1612 | `-----------*/ |
| 1613 | yybackup: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1614 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1615 | /* Do appropriate processing given the current state. Read a |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1616 | lookahead token if we need one and don't already have one. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1617 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1618 | /* First try to decide what to do without reference to lookahead token. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1619 | yyn = yypact[yystate]; |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1620 | if (yypact_value_is_default (yyn)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1621 | goto yydefault; |
| 1622 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1623 | /* Not known => get a lookahead token if don't already have one. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1624 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1625 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1626 | if (yychar == YYEMPTY) |
| 1627 | { |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1628 | YYDPRINTF ((stderr, "Reading a token: ")); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1629 | yychar = YYLEX; |
| 1630 | } |
| 1631 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1632 | if (yychar <= YYEOF) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1633 | { |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1634 | yychar = yytoken = YYEOF; |
| 1635 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1636 | } |
| 1637 | else |
| 1638 | { |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1639 | yytoken = YYTRANSLATE (yychar); |
| 1640 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1641 | } |
| 1642 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1643 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 1644 | detect an error, take that action. */ |
| 1645 | yyn += yytoken; |
| 1646 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1647 | goto yydefault; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1648 | yyn = yytable[yyn]; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1649 | if (yyn <= 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1650 | { |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1651 | if (yytable_value_is_error (yyn)) |
| 1652 | goto yyerrlab; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1653 | yyn = -yyn; |
| 1654 | goto yyreduce; |
| 1655 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1656 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1657 | /* Count tokens shifted since error; after three, turn off error |
| 1658 | status. */ |
| 1659 | if (yyerrstatus) |
| 1660 | yyerrstatus--; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1661 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1662 | /* Shift the lookahead token. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1663 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 1664 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1665 | /* Discard the shifted token. */ |
| 1666 | yychar = YYEMPTY; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1667 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1668 | yystate = yyn; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1669 | *++yyvsp = yylval; |
| 1670 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1671 | goto yynewstate; |
| 1672 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1673 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1674 | /*-----------------------------------------------------------. |
| 1675 | | yydefault -- do the default action for the current state. | |
| 1676 | `-----------------------------------------------------------*/ |
| 1677 | yydefault: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1678 | yyn = yydefact[yystate]; |
| 1679 | if (yyn == 0) |
| 1680 | goto yyerrlab; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1681 | goto yyreduce; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1682 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1683 | |
| 1684 | /*-----------------------------. |
| 1685 | | yyreduce -- Do a reduction. | |
| 1686 | `-----------------------------*/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1687 | yyreduce: |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1688 | /* yyn is the number of a rule to reduce with. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1689 | yylen = yyr2[yyn]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1690 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1691 | /* If YYLEN is nonzero, implement the default value of the action: |
| 1692 | `$$ = $1'. |
| 1693 | |
| 1694 | Otherwise, the following line sets YYVAL to garbage. |
| 1695 | This behavior is undocumented and Bison |
| 1696 | users should not rely upon it. Assigning to YYVAL |
| 1697 | unconditionally makes the parser a bit smaller, and it avoids a |
| 1698 | GCC warning that YYVAL may be used uninitialized. */ |
| 1699 | yyval = yyvsp[1-yylen]; |
| 1700 | |
| 1701 | |
| 1702 | YY_REDUCE_PRINT (yyn); |
| 1703 | switch (yyn) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1704 | { |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1705 | case 4: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1706 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1707 | { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1708 | break; |
| 1709 | |
| 1710 | case 5: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1711 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1712 | { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1713 | break; |
| 1714 | |
| 1715 | case 6: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1716 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1717 | { is_typedef = 1; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1718 | break; |
| 1719 | |
| 1720 | case 7: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1721 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1722 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1723 | break; |
| 1724 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1725 | case 8: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1726 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1727 | { is_typedef = 1; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1728 | break; |
| 1729 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1730 | case 9: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1731 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1732 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1733 | break; |
| 1734 | |
| 1735 | case 14: |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1736 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1737 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1738 | break; |
| 1739 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1740 | case 15: |
| 1741 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1742 | { (yyval) = (yyvsp[(2) - (2)]); } |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1743 | break; |
| 1744 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1745 | case 16: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1746 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1747 | { if (current_name) { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1748 | struct string_list *decl = (*(yyvsp[(3) - (3)]))->next; |
| 1749 | (*(yyvsp[(3) - (3)]))->next = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1750 | add_symbol(current_name, |
| 1751 | is_typedef ? SYM_TYPEDEF : SYM_NORMAL, |
| 1752 | decl, is_extern); |
| 1753 | current_name = NULL; |
| 1754 | } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1755 | (yyval) = (yyvsp[(3) - (3)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1756 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1757 | break; |
| 1758 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1759 | case 17: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1760 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1761 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1762 | break; |
| 1763 | |
| 1764 | case 19: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1765 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1766 | { struct string_list *decl = *(yyvsp[(1) - (1)]); |
| 1767 | *(yyvsp[(1) - (1)]) = NULL; |
| 1768 | add_symbol(current_name, |
| 1769 | is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); |
| 1770 | current_name = NULL; |
| 1771 | (yyval) = (yyvsp[(1) - (1)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1772 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1773 | break; |
| 1774 | |
| 1775 | case 20: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1776 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1777 | { struct string_list *decl = *(yyvsp[(3) - (3)]); |
| 1778 | *(yyvsp[(3) - (3)]) = NULL; |
| 1779 | free_list(*(yyvsp[(2) - (3)]), NULL); |
| 1780 | *(yyvsp[(2) - (3)]) = decl_spec; |
| 1781 | add_symbol(current_name, |
| 1782 | is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); |
| 1783 | current_name = NULL; |
| 1784 | (yyval) = (yyvsp[(3) - (3)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1785 | } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1786 | break; |
| 1787 | |
| 1788 | case 21: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1789 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1790 | { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1791 | break; |
| 1792 | |
| 1793 | case 22: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1794 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1795 | { decl_spec = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1796 | break; |
| 1797 | |
| 1798 | case 24: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1799 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1800 | { decl_spec = *(yyvsp[(1) - (1)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1801 | break; |
| 1802 | |
| 1803 | case 25: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1804 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1805 | { decl_spec = *(yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1806 | break; |
| 1807 | |
| 1808 | case 26: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1809 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1810 | { /* Version 2 checksumming ignores storage class, as that |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1811 | is really irrelevant to the linkage. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1812 | remove_node((yyvsp[(1) - (1)])); |
| 1813 | (yyval) = (yyvsp[(1) - (1)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1814 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1815 | break; |
| 1816 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1817 | case 31: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1818 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1819 | { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1820 | break; |
| 1821 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1822 | case 32: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1823 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1824 | { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1825 | break; |
| 1826 | |
| 1827 | case 37: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1828 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1829 | { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1830 | break; |
| 1831 | |
| 1832 | case 38: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1833 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1834 | { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1835 | break; |
| 1836 | |
| 1837 | case 39: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1838 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1839 | { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1840 | break; |
| 1841 | |
| 1842 | case 40: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1843 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1844 | { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_STRUCT); (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1845 | break; |
| 1846 | |
| 1847 | case 41: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1848 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1849 | { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_UNION); (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1850 | break; |
| 1851 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1852 | case 42: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1853 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1854 | { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_ENUM); (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1855 | break; |
| 1856 | |
| 1857 | case 43: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1858 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1859 | { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1860 | break; |
| 1861 | |
| 1862 | case 44: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1863 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1864 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1865 | break; |
| 1866 | |
| 1867 | case 45: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1868 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1869 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1870 | break; |
| 1871 | |
| 1872 | case 56: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1873 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1874 | { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1875 | break; |
| 1876 | |
| 1877 | case 57: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1878 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1879 | { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1880 | break; |
| 1881 | |
| 1882 | case 58: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1883 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1884 | { (yyval) = NULL; } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1885 | break; |
| 1886 | |
| 1887 | case 61: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1888 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1889 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1890 | break; |
| 1891 | |
| 1892 | case 65: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1893 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1894 | { /* restrict has no effect in prototypes so ignore it */ |
| 1895 | remove_node((yyvsp[(1) - (1)])); |
| 1896 | (yyval) = (yyvsp[(1) - (1)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1897 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1898 | break; |
| 1899 | |
| 1900 | case 66: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1901 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1902 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1903 | break; |
| 1904 | |
| 1905 | case 68: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1906 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1907 | { if (current_name != NULL) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1908 | error_with_pos("unexpected second declaration name"); |
| 1909 | YYERROR; |
| 1910 | } else { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1911 | current_name = (*(yyvsp[(1) - (1)]))->string; |
| 1912 | (yyval) = (yyvsp[(1) - (1)]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1913 | } |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1914 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1915 | break; |
| 1916 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1917 | case 69: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1918 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1919 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1920 | break; |
| 1921 | |
| 1922 | case 70: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1923 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1924 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1925 | break; |
| 1926 | |
| 1927 | case 71: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1928 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1929 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1930 | break; |
| 1931 | |
| 1932 | case 72: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1933 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1934 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1935 | break; |
| 1936 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1937 | case 73: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1938 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1939 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1940 | break; |
| 1941 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1942 | case 74: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1943 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1944 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1945 | break; |
| 1946 | |
| 1947 | case 78: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1948 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1949 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1950 | break; |
| 1951 | |
| 1952 | case 79: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1953 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1954 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1955 | break; |
| 1956 | |
| 1957 | case 80: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1958 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1959 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1960 | break; |
| 1961 | |
| 1962 | case 81: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1963 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1964 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1965 | break; |
| 1966 | |
| 1967 | case 82: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1968 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1969 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1970 | break; |
| 1971 | |
| 1972 | case 83: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1973 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1974 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1975 | break; |
| 1976 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1977 | case 85: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1978 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1979 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1980 | break; |
| 1981 | |
| 1982 | case 86: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1983 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1984 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1985 | break; |
| 1986 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1987 | case 89: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1988 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1989 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1990 | break; |
| 1991 | |
| 1992 | case 90: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1993 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1994 | { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 1995 | break; |
| 1996 | |
| 1997 | case 91: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 1998 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 1999 | { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2000 | break; |
| 2001 | |
| 2002 | case 93: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2003 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2004 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2005 | break; |
| 2006 | |
| 2007 | case 94: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2008 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2009 | { /* For version 2 checksums, we don't want to remember |
| 2010 | private parameter names. */ |
| 2011 | remove_node((yyvsp[(1) - (1)])); |
| 2012 | (yyval) = (yyvsp[(1) - (1)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2013 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2014 | break; |
| 2015 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2016 | case 95: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2017 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2018 | { remove_node((yyvsp[(1) - (1)])); |
| 2019 | (yyval) = (yyvsp[(1) - (1)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2020 | } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2021 | break; |
| 2022 | |
| 2023 | case 96: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2024 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2025 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2026 | break; |
| 2027 | |
| 2028 | case 97: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2029 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2030 | { (yyval) = (yyvsp[(4) - (4)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2031 | break; |
| 2032 | |
| 2033 | case 98: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2034 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2035 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2036 | break; |
| 2037 | |
| 2038 | case 99: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2039 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2040 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2041 | break; |
| 2042 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2043 | case 100: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2044 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2045 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2046 | break; |
| 2047 | |
| 2048 | case 101: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2049 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2050 | { struct string_list *decl = *(yyvsp[(2) - (3)]); |
| 2051 | *(yyvsp[(2) - (3)]) = NULL; |
| 2052 | add_symbol(current_name, SYM_NORMAL, decl, is_extern); |
| 2053 | (yyval) = (yyvsp[(3) - (3)]); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2054 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2055 | break; |
| 2056 | |
| 2057 | case 102: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2058 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2059 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2060 | break; |
| 2061 | |
| 2062 | case 104: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2063 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2064 | { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2065 | break; |
| 2066 | |
| 2067 | case 105: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2068 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2069 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2070 | break; |
| 2071 | |
| 2072 | case 106: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2073 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2074 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2075 | break; |
| 2076 | |
| 2077 | case 107: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2078 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2079 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2080 | break; |
| 2081 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2082 | case 110: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2083 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2084 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2085 | break; |
| 2086 | |
| 2087 | case 111: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2088 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2089 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2090 | break; |
| 2091 | |
| 2092 | case 112: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2093 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2094 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2095 | break; |
| 2096 | |
| 2097 | case 113: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2098 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2099 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2100 | break; |
| 2101 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2102 | case 116: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2103 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2104 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2105 | break; |
| 2106 | |
| 2107 | case 117: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2108 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2109 | { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2110 | break; |
| 2111 | |
| 2112 | case 118: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2113 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2114 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2115 | break; |
| 2116 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2117 | case 120: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2118 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2119 | { (yyval) = (yyvsp[(2) - (2)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2120 | break; |
| 2121 | |
| 2122 | case 121: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2123 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2124 | { (yyval) = NULL; } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2125 | break; |
| 2126 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2127 | case 123: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2128 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2129 | { (yyval) = (yyvsp[(3) - (3)]); } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2130 | break; |
| 2131 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2132 | case 124: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2133 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2134 | { (yyval) = (yyvsp[(4) - (4)]); } |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2135 | break; |
| 2136 | |
| 2137 | case 127: |
| 2138 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2139 | { |
| 2140 | const char *name = strdup((*(yyvsp[(1) - (1)]))->string); |
| 2141 | add_symbol(name, SYM_ENUM_CONST, NULL, 0); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2142 | } |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2143 | break; |
| 2144 | |
| 2145 | case 128: |
| 2146 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2147 | { |
| 2148 | const char *name = strdup((*(yyvsp[(1) - (3)]))->string); |
| 2149 | struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)])); |
| 2150 | add_symbol(name, SYM_ENUM_CONST, expr, 0); |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2151 | } |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2152 | break; |
| 2153 | |
| 2154 | case 129: |
| 2155 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2156 | { (yyval) = (yyvsp[(2) - (2)]); } |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2157 | break; |
| 2158 | |
| 2159 | case 130: |
| 2160 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2161 | { (yyval) = NULL; } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2162 | break; |
| 2163 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2164 | case 132: |
| 2165 | |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2166 | { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2167 | break; |
| 2168 | |
| 2169 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2170 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2171 | default: break; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2172 | } |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2173 | /* User semantic actions sometimes alter yychar, and that requires |
| 2174 | that yytoken be updated with the new translation. We take the |
| 2175 | approach of translating immediately before every use of yytoken. |
| 2176 | One alternative is translating here after every semantic action, |
| 2177 | but that translation would be missed if the semantic action invokes |
| 2178 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
| 2179 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
| 2180 | incorrect destructor might then be invoked immediately. In the |
| 2181 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
| 2182 | to an incorrect destructor call or verbose syntax error message |
| 2183 | before the lookahead is translated. */ |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2184 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2185 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2186 | YYPOPSTACK (yylen); |
| 2187 | yylen = 0; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2188 | YY_STACK_PRINT (yyss, yyssp); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2189 | |
| 2190 | *++yyvsp = yyval; |
| 2191 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2192 | /* Now `shift' the result of the reduction. Determine what state |
| 2193 | that goes to, based on the state we popped back to and the rule |
| 2194 | number reduced by. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2195 | |
| 2196 | yyn = yyr1[yyn]; |
| 2197 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2198 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 2199 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2200 | yystate = yytable[yystate]; |
| 2201 | else |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2202 | yystate = yydefgoto[yyn - YYNTOKENS]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2203 | |
| 2204 | goto yynewstate; |
| 2205 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2206 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2207 | /*------------------------------------. |
| 2208 | | yyerrlab -- here on detecting error | |
| 2209 | `------------------------------------*/ |
| 2210 | yyerrlab: |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2211 | /* Make sure we have latest lookahead translation. See comments at |
| 2212 | user semantic actions for why this is necessary. */ |
| 2213 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
| 2214 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2215 | /* If not already recovering from an error, report this error. */ |
| 2216 | if (!yyerrstatus) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2217 | { |
| 2218 | ++yynerrs; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2219 | #if ! YYERROR_VERBOSE |
| 2220 | yyerror (YY_("syntax error")); |
| 2221 | #else |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2222 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
| 2223 | yyssp, yytoken) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2224 | { |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2225 | char const *yymsgp = YY_("syntax error"); |
| 2226 | int yysyntax_error_status; |
| 2227 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 2228 | if (yysyntax_error_status == 0) |
| 2229 | yymsgp = yymsg; |
| 2230 | else if (yysyntax_error_status == 1) |
| 2231 | { |
| 2232 | if (yymsg != yymsgbuf) |
| 2233 | YYSTACK_FREE (yymsg); |
| 2234 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
| 2235 | if (!yymsg) |
| 2236 | { |
| 2237 | yymsg = yymsgbuf; |
| 2238 | yymsg_alloc = sizeof yymsgbuf; |
| 2239 | yysyntax_error_status = 2; |
| 2240 | } |
| 2241 | else |
| 2242 | { |
| 2243 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 2244 | yymsgp = yymsg; |
| 2245 | } |
| 2246 | } |
| 2247 | yyerror (yymsgp); |
| 2248 | if (yysyntax_error_status == 2) |
| 2249 | goto yyexhaustedlab; |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2250 | } |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2251 | # undef YYSYNTAX_ERROR |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2252 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2253 | } |
| 2254 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2255 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2256 | |
| 2257 | if (yyerrstatus == 3) |
| 2258 | { |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2259 | /* If just tried and failed to reuse lookahead token after an |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2260 | error, discard it. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2261 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2262 | if (yychar <= YYEOF) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2263 | { |
| 2264 | /* Return failure if at end of input. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2265 | if (yychar == YYEOF) |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2266 | YYABORT; |
| 2267 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2268 | else |
| 2269 | { |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2270 | yydestruct ("Error: discarding", |
| 2271 | yytoken, &yylval); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2272 | yychar = YYEMPTY; |
| 2273 | } |
| 2274 | } |
| 2275 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2276 | /* Else will try to reuse lookahead token after shifting the error |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2277 | token. */ |
| 2278 | goto yyerrlab1; |
| 2279 | |
| 2280 | |
| 2281 | /*---------------------------------------------------. |
| 2282 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 2283 | `---------------------------------------------------*/ |
| 2284 | yyerrorlab: |
| 2285 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2286 | /* Pacify compilers like GCC when the user code never invokes |
| 2287 | YYERROR and the label yyerrorlab therefore never appears in user |
| 2288 | code. */ |
| 2289 | if (/*CONSTCOND*/ 0) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2290 | goto yyerrorlab; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2291 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2292 | /* Do not reclaim the symbols of the rule which action triggered |
| 2293 | this YYERROR. */ |
| 2294 | YYPOPSTACK (yylen); |
| 2295 | yylen = 0; |
| 2296 | YY_STACK_PRINT (yyss, yyssp); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2297 | yystate = *yyssp; |
| 2298 | goto yyerrlab1; |
| 2299 | |
| 2300 | |
| 2301 | /*-------------------------------------------------------------. |
| 2302 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 2303 | `-------------------------------------------------------------*/ |
| 2304 | yyerrlab1: |
| 2305 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 2306 | |
| 2307 | for (;;) |
| 2308 | { |
| 2309 | yyn = yypact[yystate]; |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2310 | if (!yypact_value_is_default (yyn)) |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2311 | { |
| 2312 | yyn += YYTERROR; |
| 2313 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 2314 | { |
| 2315 | yyn = yytable[yyn]; |
| 2316 | if (0 < yyn) |
| 2317 | break; |
| 2318 | } |
| 2319 | } |
| 2320 | |
| 2321 | /* Pop the current state because it cannot handle the error token. */ |
| 2322 | if (yyssp == yyss) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2323 | YYABORT; |
| 2324 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2325 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2326 | yydestruct ("Error: popping", |
| 2327 | yystos[yystate], yyvsp); |
| 2328 | YYPOPSTACK (1); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2329 | yystate = *yyssp; |
| 2330 | YY_STACK_PRINT (yyss, yyssp); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2331 | } |
| 2332 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2333 | *++yyvsp = yylval; |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2334 | |
| 2335 | |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2336 | /* Shift the error token. */ |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2337 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2338 | |
| 2339 | yystate = yyn; |
| 2340 | goto yynewstate; |
| 2341 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2342 | |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2343 | /*-------------------------------------. |
| 2344 | | yyacceptlab -- YYACCEPT comes here. | |
| 2345 | `-------------------------------------*/ |
| 2346 | yyacceptlab: |
| 2347 | yyresult = 0; |
| 2348 | goto yyreturn; |
| 2349 | |
| 2350 | /*-----------------------------------. |
| 2351 | | yyabortlab -- YYABORT comes here. | |
| 2352 | `-----------------------------------*/ |
| 2353 | yyabortlab: |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2354 | yyresult = 1; |
| 2355 | goto yyreturn; |
| 2356 | |
Jan Beulich | dc53324 | 2014-04-03 14:46:37 -0700 | [diff] [blame] | 2357 | #if !defined yyoverflow || YYERROR_VERBOSE |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2358 | /*-------------------------------------------------. |
| 2359 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 2360 | `-------------------------------------------------*/ |
| 2361 | yyexhaustedlab: |
| 2362 | yyerror (YY_("memory exhausted")); |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2363 | yyresult = 2; |
| 2364 | /* Fall through. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2365 | #endif |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2366 | |
| 2367 | yyreturn: |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2368 | if (yychar != YYEMPTY) |
Michal Marek | 0359de7 | 2011-10-11 12:07:05 +0200 | [diff] [blame] | 2369 | { |
| 2370 | /* Make sure we have latest lookahead translation. See comments at |
| 2371 | user semantic actions for why this is necessary. */ |
| 2372 | yytoken = YYTRANSLATE (yychar); |
| 2373 | yydestruct ("Cleanup: discarding lookahead", |
| 2374 | yytoken, &yylval); |
| 2375 | } |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2376 | /* Do not reclaim the symbols of the rule which action triggered |
| 2377 | this YYABORT or YYACCEPT. */ |
| 2378 | YYPOPSTACK (yylen); |
| 2379 | YY_STACK_PRINT (yyss, yyssp); |
| 2380 | while (yyssp != yyss) |
| 2381 | { |
| 2382 | yydestruct ("Cleanup: popping", |
| 2383 | yystos[*yyssp], yyvsp); |
| 2384 | YYPOPSTACK (1); |
| 2385 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2386 | #ifndef yyoverflow |
| 2387 | if (yyss != yyssa) |
| 2388 | YYSTACK_FREE (yyss); |
| 2389 | #endif |
Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2390 | #if YYERROR_VERBOSE |
| 2391 | if (yymsg != yymsgbuf) |
| 2392 | YYSTACK_FREE (yymsg); |
| 2393 | #endif |
| 2394 | /* Make sure YYID is used. */ |
| 2395 | return YYID (yyresult); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2396 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2397 | |
| 2398 | |
Michal Marek | 303fc01 | 2011-02-15 16:04:35 +0100 | [diff] [blame] | 2399 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2400 | |
| 2401 | |
| 2402 | static void |
| 2403 | yyerror(const char *e) |
| 2404 | { |
| 2405 | error_with_pos("%s", e); |
| 2406 | } |
Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2407 | |