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