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