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