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