Jiri Olsa | 89812fc | 2012-03-15 20:09:15 +0100 | [diff] [blame^] | 1 | /* A Bison parser, made by GNU Bison 2.4.3. */ |
| 2 | |
| 3 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
| 4 | |
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| 6 | 2009, 2010 Free Software Foundation, Inc. |
| 7 | |
| 8 | This program is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation, either version 3 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | |
| 21 | /* As a special exception, you may create a larger work that contains |
| 22 | part or all of the Bison parser skeleton and distribute that work |
| 23 | under terms of your choice, so long as that work isn't itself a |
| 24 | parser generator using the skeleton or a modified version thereof |
| 25 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 26 | the parser skeleton itself, you may (at your option) remove this |
| 27 | special exception, which will cause the skeleton and the resulting |
| 28 | Bison output files to be licensed under the GNU General Public |
| 29 | License without this special exception. |
| 30 | |
| 31 | This special exception was added by the Free Software Foundation in |
| 32 | version 2.2 of Bison. */ |
| 33 | |
| 34 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 35 | simplifying the original so-called "semantic" parser. */ |
| 36 | |
| 37 | /* All symbols defined below should begin with yy or YY, to avoid |
| 38 | infringing on user name space. This should be done even for local |
| 39 | variables, as they might otherwise be expanded by user macros. |
| 40 | There are some unavoidable exceptions within include files to |
| 41 | define necessary library symbols; they are noted "INFRINGES ON |
| 42 | USER NAME SPACE" below. */ |
| 43 | |
| 44 | /* Identify Bison output. */ |
| 45 | #define YYBISON 1 |
| 46 | |
| 47 | /* Bison version. */ |
| 48 | #define YYBISON_VERSION "2.4.3" |
| 49 | |
| 50 | /* Skeleton name. */ |
| 51 | #define YYSKELETON_NAME "yacc.c" |
| 52 | |
| 53 | /* Pure parsers. */ |
| 54 | #define YYPURE 0 |
| 55 | |
| 56 | /* Push parsers. */ |
| 57 | #define YYPUSH 0 |
| 58 | |
| 59 | /* Pull parsers. */ |
| 60 | #define YYPULL 1 |
| 61 | |
| 62 | /* Using locations. */ |
| 63 | #define YYLSP_NEEDED 0 |
| 64 | |
| 65 | /* Substitute the variable and function names. */ |
| 66 | #define yyparse parse_events_parse |
| 67 | #define yylex parse_events_lex |
| 68 | #define yyerror parse_events_error |
| 69 | #define yylval parse_events_lval |
| 70 | #define yychar parse_events_char |
| 71 | #define yydebug parse_events_debug |
| 72 | #define yynerrs parse_events_nerrs |
| 73 | |
| 74 | |
| 75 | /* Copy the first part of user declarations. */ |
| 76 | |
| 77 | /* Line 189 of yacc.c */ |
| 78 | #line 6 "util/parse-events.y" |
| 79 | |
| 80 | |
| 81 | #define YYDEBUG 1 |
| 82 | |
| 83 | #include <linux/compiler.h> |
| 84 | #include <linux/list.h> |
| 85 | #include "types.h" |
| 86 | #include "util.h" |
| 87 | #include "parse-events.h" |
| 88 | |
| 89 | extern int parse_events_lex (void); |
| 90 | |
| 91 | #define ABORT_ON(val) \ |
| 92 | do { \ |
| 93 | if (val) \ |
| 94 | YYABORT; \ |
| 95 | } while (0) |
| 96 | |
| 97 | |
| 98 | |
| 99 | /* Line 189 of yacc.c */ |
| 100 | #line 101 "util/parse-events-bison.c" |
| 101 | |
| 102 | /* Enabling traces. */ |
| 103 | #ifndef YYDEBUG |
| 104 | # define YYDEBUG 0 |
| 105 | #endif |
| 106 | |
| 107 | /* Enabling verbose error messages. */ |
| 108 | #ifdef YYERROR_VERBOSE |
| 109 | # undef YYERROR_VERBOSE |
| 110 | # define YYERROR_VERBOSE 1 |
| 111 | #else |
| 112 | # define YYERROR_VERBOSE 0 |
| 113 | #endif |
| 114 | |
| 115 | /* Enabling the token table. */ |
| 116 | #ifndef YYTOKEN_TABLE |
| 117 | # define YYTOKEN_TABLE 0 |
| 118 | #endif |
| 119 | |
| 120 | |
| 121 | /* Tokens. */ |
| 122 | #ifndef YYTOKENTYPE |
| 123 | # define YYTOKENTYPE |
| 124 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 125 | know about them. */ |
| 126 | enum yytokentype { |
| 127 | PE_VALUE = 258, |
| 128 | PE_VALUE_SYM = 259, |
| 129 | PE_RAW = 260, |
| 130 | PE_NAME = 261, |
| 131 | PE_MODIFIER_EVENT = 262, |
| 132 | PE_MODIFIER_BP = 263, |
| 133 | PE_NAME_CACHE_TYPE = 264, |
| 134 | PE_NAME_CACHE_OP_RESULT = 265, |
| 135 | PE_PREFIX_MEM = 266, |
| 136 | PE_PREFIX_RAW = 267, |
| 137 | PE_ERROR = 268 |
| 138 | }; |
| 139 | #endif |
| 140 | |
| 141 | |
| 142 | |
| 143 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 144 | typedef union YYSTYPE |
| 145 | { |
| 146 | |
| 147 | /* Line 214 of yacc.c */ |
| 148 | #line 42 "util/parse-events.y" |
| 149 | |
| 150 | char *str; |
| 151 | unsigned long num; |
| 152 | |
| 153 | |
| 154 | |
| 155 | /* Line 214 of yacc.c */ |
| 156 | #line 157 "util/parse-events-bison.c" |
| 157 | } YYSTYPE; |
| 158 | # define YYSTYPE_IS_TRIVIAL 1 |
| 159 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 160 | # define YYSTYPE_IS_DECLARED 1 |
| 161 | #endif |
| 162 | |
| 163 | |
| 164 | /* Copy the second part of user declarations. */ |
| 165 | |
| 166 | |
| 167 | /* Line 264 of yacc.c */ |
| 168 | #line 169 "util/parse-events-bison.c" |
| 169 | |
| 170 | #ifdef short |
| 171 | # undef short |
| 172 | #endif |
| 173 | |
| 174 | #ifdef YYTYPE_UINT8 |
| 175 | typedef YYTYPE_UINT8 yytype_uint8; |
| 176 | #else |
| 177 | typedef unsigned char yytype_uint8; |
| 178 | #endif |
| 179 | |
| 180 | #ifdef YYTYPE_INT8 |
| 181 | typedef YYTYPE_INT8 yytype_int8; |
| 182 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 183 | || defined __cplusplus || defined _MSC_VER) |
| 184 | typedef signed char yytype_int8; |
| 185 | #else |
| 186 | typedef short int yytype_int8; |
| 187 | #endif |
| 188 | |
| 189 | #ifdef YYTYPE_UINT16 |
| 190 | typedef YYTYPE_UINT16 yytype_uint16; |
| 191 | #else |
| 192 | typedef unsigned short int yytype_uint16; |
| 193 | #endif |
| 194 | |
| 195 | #ifdef YYTYPE_INT16 |
| 196 | typedef YYTYPE_INT16 yytype_int16; |
| 197 | #else |
| 198 | typedef short int yytype_int16; |
| 199 | #endif |
| 200 | |
| 201 | #ifndef YYSIZE_T |
| 202 | # ifdef __SIZE_TYPE__ |
| 203 | # define YYSIZE_T __SIZE_TYPE__ |
| 204 | # elif defined size_t |
| 205 | # define YYSIZE_T size_t |
| 206 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 207 | || defined __cplusplus || defined _MSC_VER) |
| 208 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 209 | # define YYSIZE_T size_t |
| 210 | # else |
| 211 | # define YYSIZE_T unsigned int |
| 212 | # endif |
| 213 | #endif |
| 214 | |
| 215 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 216 | |
| 217 | #ifndef YY_ |
| 218 | # if defined YYENABLE_NLS && YYENABLE_NLS |
| 219 | # if ENABLE_NLS |
| 220 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 221 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
| 222 | # endif |
| 223 | # endif |
| 224 | # ifndef YY_ |
| 225 | # define YY_(msgid) msgid |
| 226 | # endif |
| 227 | #endif |
| 228 | |
| 229 | /* Suppress unused-variable warnings by "using" E. */ |
| 230 | #if ! defined lint || defined __GNUC__ |
| 231 | # define YYUSE(e) ((void) (e)) |
| 232 | #else |
| 233 | # define YYUSE(e) /* empty */ |
| 234 | #endif |
| 235 | |
| 236 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 237 | #ifndef lint |
| 238 | # define YYID(n) (n) |
| 239 | #else |
| 240 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 241 | || defined __cplusplus || defined _MSC_VER) |
| 242 | static int |
| 243 | YYID (int yyi) |
| 244 | #else |
| 245 | static int |
| 246 | YYID (yyi) |
| 247 | int yyi; |
| 248 | #endif |
| 249 | { |
| 250 | return yyi; |
| 251 | } |
| 252 | #endif |
| 253 | |
| 254 | #if ! defined yyoverflow || YYERROR_VERBOSE |
| 255 | |
| 256 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 257 | |
| 258 | # ifdef YYSTACK_USE_ALLOCA |
| 259 | # if YYSTACK_USE_ALLOCA |
| 260 | # ifdef __GNUC__ |
| 261 | # define YYSTACK_ALLOC __builtin_alloca |
| 262 | # elif defined __BUILTIN_VA_ARG_INCR |
| 263 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 264 | # elif defined _AIX |
| 265 | # define YYSTACK_ALLOC __alloca |
| 266 | # elif defined _MSC_VER |
| 267 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 268 | # define alloca _alloca |
| 269 | # else |
| 270 | # define YYSTACK_ALLOC alloca |
| 271 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 272 | || defined __cplusplus || defined _MSC_VER) |
| 273 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 274 | # ifndef _STDLIB_H |
| 275 | # define _STDLIB_H 1 |
| 276 | # endif |
| 277 | # endif |
| 278 | # endif |
| 279 | # endif |
| 280 | # endif |
| 281 | |
| 282 | # ifdef YYSTACK_ALLOC |
| 283 | /* Pacify GCC's `empty if-body' warning. */ |
| 284 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 285 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 286 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 287 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 288 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 289 | to allow for a few compiler-allocated temporary stack slots. */ |
| 290 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
| 291 | # endif |
| 292 | # else |
| 293 | # define YYSTACK_ALLOC YYMALLOC |
| 294 | # define YYSTACK_FREE YYFREE |
| 295 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 296 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 297 | # endif |
| 298 | # if (defined __cplusplus && ! defined _STDLIB_H \ |
| 299 | && ! ((defined YYMALLOC || defined malloc) \ |
| 300 | && (defined YYFREE || defined free))) |
| 301 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 302 | # ifndef _STDLIB_H |
| 303 | # define _STDLIB_H 1 |
| 304 | # endif |
| 305 | # endif |
| 306 | # ifndef YYMALLOC |
| 307 | # define YYMALLOC malloc |
| 308 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 309 | || defined __cplusplus || defined _MSC_VER) |
| 310 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 311 | # endif |
| 312 | # endif |
| 313 | # ifndef YYFREE |
| 314 | # define YYFREE free |
| 315 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 316 | || defined __cplusplus || defined _MSC_VER) |
| 317 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 318 | # endif |
| 319 | # endif |
| 320 | # endif |
| 321 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 322 | |
| 323 | |
| 324 | #if (! defined yyoverflow \ |
| 325 | && (! defined __cplusplus \ |
| 326 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
| 327 | |
| 328 | /* A type that is properly aligned for any stack member. */ |
| 329 | union yyalloc |
| 330 | { |
| 331 | yytype_int16 yyss_alloc; |
| 332 | YYSTYPE yyvs_alloc; |
| 333 | }; |
| 334 | |
| 335 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 336 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| 337 | |
| 338 | /* The size of an array large to enough to hold all stacks, each with |
| 339 | N elements. */ |
| 340 | # define YYSTACK_BYTES(N) \ |
| 341 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 342 | + YYSTACK_GAP_MAXIMUM) |
| 343 | |
| 344 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 345 | not overlap. */ |
| 346 | # ifndef YYCOPY |
| 347 | # if defined __GNUC__ && 1 < __GNUC__ |
| 348 | # define YYCOPY(To, From, Count) \ |
| 349 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 350 | # else |
| 351 | # define YYCOPY(To, From, Count) \ |
| 352 | do \ |
| 353 | { \ |
| 354 | YYSIZE_T yyi; \ |
| 355 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 356 | (To)[yyi] = (From)[yyi]; \ |
| 357 | } \ |
| 358 | while (YYID (0)) |
| 359 | # endif |
| 360 | # endif |
| 361 | |
| 362 | /* Relocate STACK from its old location to the new one. The |
| 363 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 364 | elements in the stack, and YYPTR gives the new location of the |
| 365 | stack. Advance YYPTR to a properly aligned location for the next |
| 366 | stack. */ |
| 367 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 368 | do \ |
| 369 | { \ |
| 370 | YYSIZE_T yynewbytes; \ |
| 371 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 372 | Stack = &yyptr->Stack_alloc; \ |
| 373 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 374 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 375 | } \ |
| 376 | while (YYID (0)) |
| 377 | |
| 378 | #endif |
| 379 | |
| 380 | /* YYFINAL -- State number of the termination state. */ |
| 381 | #define YYFINAL 20 |
| 382 | /* YYLAST -- Last index in YYTABLE. */ |
| 383 | #define YYLAST 27 |
| 384 | |
| 385 | /* YYNTOKENS -- Number of terminals. */ |
| 386 | #define YYNTOKENS 17 |
| 387 | /* YYNNTS -- Number of nonterminals. */ |
| 388 | #define YYNNTS 11 |
| 389 | /* YYNRULES -- Number of rules. */ |
| 390 | #define YYNRULES 22 |
| 391 | /* YYNRULES -- Number of states. */ |
| 392 | #define YYNSTATES 39 |
| 393 | |
| 394 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 395 | #define YYUNDEFTOK 2 |
| 396 | #define YYMAXUTOK 268 |
| 397 | |
| 398 | #define YYTRANSLATE(YYX) \ |
| 399 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| 400 | |
| 401 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
| 402 | static const yytype_uint8 yytranslate[] = |
| 403 | { |
| 404 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 405 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 406 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 407 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 408 | 2, 2, 2, 2, 14, 15, 2, 2, 2, 2, |
| 409 | 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, |
| 410 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 411 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 412 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 413 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 414 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 415 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 416 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 417 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 418 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 419 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 420 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 421 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 422 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 423 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 424 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 425 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 426 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 427 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 428 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 429 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 430 | 5, 6, 7, 8, 9, 10, 11, 12, 13 |
| 431 | }; |
| 432 | |
| 433 | #if YYDEBUG |
| 434 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 435 | YYRHS. */ |
| 436 | static const yytype_uint8 yyprhs[] = |
| 437 | { |
| 438 | 0, 0, 3, 7, 9, 12, 14, 17, 20, 22, |
| 439 | 25, 28, 31, 33, 39, 43, 45, 51, 55, 59, |
| 440 | 63, 65, 67 |
| 441 | }; |
| 442 | |
| 443 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 444 | static const yytype_int8 yyrhs[] = |
| 445 | { |
| 446 | 18, 0, -1, 18, 14, 19, -1, 19, -1, 20, |
| 447 | 7, -1, 20, -1, 21, 27, -1, 22, 27, -1, |
| 448 | 23, -1, 24, 27, -1, 25, 27, -1, 26, 27, |
| 449 | -1, 4, -1, 9, 15, 10, 15, 10, -1, 9, |
| 450 | 15, 10, -1, 9, -1, 11, 3, 16, 8, 27, |
| 451 | -1, 11, 3, 27, -1, 6, 16, 6, -1, 3, |
| 452 | 16, 3, -1, 5, -1, 16, -1, -1 |
| 453 | }; |
| 454 | |
| 455 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 456 | static const yytype_uint8 yyrline[] = |
| 457 | { |
| 458 | 0, 49, 49, 49, 52, 57, 59, 60, 61, 62, |
| 459 | 63, 64, 67, 76, 81, 86, 92, 97, 103, 109, |
| 460 | 115, 120, 120 |
| 461 | }; |
| 462 | #endif |
| 463 | |
| 464 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
| 465 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 466 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 467 | static const char *const yytname[] = |
| 468 | { |
| 469 | "$end", "error", "$undefined", "PE_VALUE", "PE_VALUE_SYM", "PE_RAW", |
| 470 | "PE_NAME", "PE_MODIFIER_EVENT", "PE_MODIFIER_BP", "PE_NAME_CACHE_TYPE", |
| 471 | "PE_NAME_CACHE_OP_RESULT", "PE_PREFIX_MEM", "PE_PREFIX_RAW", "PE_ERROR", |
| 472 | "','", "'-'", "':'", "$accept", "events", "event", "event_def", |
| 473 | "event_legacy_symbol", "event_legacy_cache", "event_legacy_mem", |
| 474 | "event_legacy_tracepoint", "event_legacy_numeric", "event_legacy_raw", |
| 475 | "sep_dc", 0 |
| 476 | }; |
| 477 | #endif |
| 478 | |
| 479 | # ifdef YYPRINT |
| 480 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 481 | token YYLEX-NUM. */ |
| 482 | static const yytype_uint16 yytoknum[] = |
| 483 | { |
| 484 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 485 | 265, 266, 267, 268, 44, 45, 58 |
| 486 | }; |
| 487 | # endif |
| 488 | |
| 489 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 490 | static const yytype_uint8 yyr1[] = |
| 491 | { |
| 492 | 0, 17, 18, 18, 19, 19, 20, 20, 20, 20, |
| 493 | 20, 20, 21, 22, 22, 22, 23, 23, 24, 25, |
| 494 | 26, 27, 27 |
| 495 | }; |
| 496 | |
| 497 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 498 | static const yytype_uint8 yyr2[] = |
| 499 | { |
| 500 | 0, 2, 3, 1, 2, 1, 2, 2, 1, 2, |
| 501 | 2, 2, 1, 5, 3, 1, 5, 3, 3, 3, |
| 502 | 1, 1, 0 |
| 503 | }; |
| 504 | |
| 505 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 506 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 507 | means the default is an error. */ |
| 508 | static const yytype_uint8 yydefact[] = |
| 509 | { |
| 510 | 0, 0, 12, 20, 0, 15, 0, 0, 3, 5, |
| 511 | 22, 22, 8, 22, 22, 22, 0, 0, 0, 22, |
| 512 | 1, 0, 4, 21, 6, 7, 9, 10, 11, 19, |
| 513 | 18, 14, 21, 17, 2, 0, 22, 13, 16 |
| 514 | }; |
| 515 | |
| 516 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 517 | static const yytype_int8 yydefgoto[] = |
| 518 | { |
| 519 | -1, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 520 | 24 |
| 521 | }; |
| 522 | |
| 523 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 524 | STATE-NUM. */ |
| 525 | #define YYPACT_NINF -12 |
| 526 | static const yytype_int8 yypact[] = |
| 527 | { |
| 528 | 7, -10, -12, -12, -9, -6, 2, 1, -12, 10, |
| 529 | -2, -2, -12, -2, -2, -2, 16, 14, 11, 6, |
| 530 | -12, 7, -12, -12, -12, -12, -12, -12, -12, -12, |
| 531 | -12, 8, 18, -12, -12, 17, -2, -12, -12 |
| 532 | }; |
| 533 | |
| 534 | /* YYPGOTO[NTERM-NUM]. */ |
| 535 | static const yytype_int8 yypgoto[] = |
| 536 | { |
| 537 | -12, -12, 3, -12, -12, -12, -12, -12, -12, -12, |
| 538 | -11 |
| 539 | }; |
| 540 | |
| 541 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 542 | positive, shift that token. If negative, reduce the rule which |
| 543 | number is the opposite. If zero, do what YYDEFACT says. |
| 544 | If YYTABLE_NINF, syntax error. */ |
| 545 | #define YYTABLE_NINF -1 |
| 546 | static const yytype_uint8 yytable[] = |
| 547 | { |
| 548 | 25, 20, 26, 27, 28, 19, 16, 17, 33, 18, |
| 549 | 1, 2, 3, 4, 23, 21, 5, 22, 6, 29, |
| 550 | 30, 31, 32, 35, 34, 38, 36, 37 |
| 551 | }; |
| 552 | |
| 553 | static const yytype_uint8 yycheck[] = |
| 554 | { |
| 555 | 11, 0, 13, 14, 15, 3, 16, 16, 19, 15, |
| 556 | 3, 4, 5, 6, 16, 14, 9, 7, 11, 3, |
| 557 | 6, 10, 16, 15, 21, 36, 8, 10 |
| 558 | }; |
| 559 | |
| 560 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 561 | symbol of state STATE-NUM. */ |
| 562 | static const yytype_uint8 yystos[] = |
| 563 | { |
| 564 | 0, 3, 4, 5, 6, 9, 11, 18, 19, 20, |
| 565 | 21, 22, 23, 24, 25, 26, 16, 16, 15, 3, |
| 566 | 0, 14, 7, 16, 27, 27, 27, 27, 27, 3, |
| 567 | 6, 10, 16, 27, 19, 15, 8, 10, 27 |
| 568 | }; |
| 569 | |
| 570 | #define yyerrok (yyerrstatus = 0) |
| 571 | #define yyclearin (yychar = YYEMPTY) |
| 572 | #define YYEMPTY (-2) |
| 573 | #define YYEOF 0 |
| 574 | |
| 575 | #define YYACCEPT goto yyacceptlab |
| 576 | #define YYABORT goto yyabortlab |
| 577 | #define YYERROR goto yyerrorlab |
| 578 | |
| 579 | |
| 580 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 581 | to ease the transition to the new meaning of YYERROR, for GCC. |
| 582 | Once GCC version 2 has supplanted version 1, this can go. However, |
| 583 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
| 584 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
| 585 | discussed. */ |
| 586 | |
| 587 | #define YYFAIL goto yyerrlab |
| 588 | #if defined YYFAIL |
| 589 | /* This is here to suppress warnings from the GCC cpp's |
| 590 | -Wunused-macros. Normally we don't worry about that warning, but |
| 591 | some users do, and we want to make it easy for users to remove |
| 592 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
| 593 | #endif |
| 594 | |
| 595 | #define YYRECOVERING() (!!yyerrstatus) |
| 596 | |
| 597 | #define YYBACKUP(Token, Value) \ |
| 598 | do \ |
| 599 | if (yychar == YYEMPTY && yylen == 1) \ |
| 600 | { \ |
| 601 | yychar = (Token); \ |
| 602 | yylval = (Value); \ |
| 603 | yytoken = YYTRANSLATE (yychar); \ |
| 604 | YYPOPSTACK (1); \ |
| 605 | goto yybackup; \ |
| 606 | } \ |
| 607 | else \ |
| 608 | { \ |
| 609 | yyerror (list, idx, YY_("syntax error: cannot back up")); \ |
| 610 | YYERROR; \ |
| 611 | } \ |
| 612 | while (YYID (0)) |
| 613 | |
| 614 | |
| 615 | #define YYTERROR 1 |
| 616 | #define YYERRCODE 256 |
| 617 | |
| 618 | |
| 619 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 620 | If N is 0, then set CURRENT to the empty location which ends |
| 621 | the previous symbol: RHS[0] (always defined). */ |
| 622 | |
| 623 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| 624 | #ifndef YYLLOC_DEFAULT |
| 625 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 626 | do \ |
| 627 | if (YYID (N)) \ |
| 628 | { \ |
| 629 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 630 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 631 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 632 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 633 | } \ |
| 634 | else \ |
| 635 | { \ |
| 636 | (Current).first_line = (Current).last_line = \ |
| 637 | YYRHSLOC (Rhs, 0).last_line; \ |
| 638 | (Current).first_column = (Current).last_column = \ |
| 639 | YYRHSLOC (Rhs, 0).last_column; \ |
| 640 | } \ |
| 641 | while (YYID (0)) |
| 642 | #endif |
| 643 | |
| 644 | |
| 645 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 646 | This macro was not mandated originally: define only if we know |
| 647 | we won't break user code: when these are the locations we know. */ |
| 648 | |
| 649 | #ifndef YY_LOCATION_PRINT |
| 650 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 651 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 652 | fprintf (File, "%d.%d-%d.%d", \ |
| 653 | (Loc).first_line, (Loc).first_column, \ |
| 654 | (Loc).last_line, (Loc).last_column) |
| 655 | # else |
| 656 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 657 | # endif |
| 658 | #endif |
| 659 | |
| 660 | |
| 661 | /* YYLEX -- calling `yylex' with the right arguments. */ |
| 662 | |
| 663 | #ifdef YYLEX_PARAM |
| 664 | # define YYLEX yylex (YYLEX_PARAM) |
| 665 | #else |
| 666 | # define YYLEX yylex () |
| 667 | #endif |
| 668 | |
| 669 | /* Enable debugging if requested. */ |
| 670 | #if YYDEBUG |
| 671 | |
| 672 | # ifndef YYFPRINTF |
| 673 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 674 | # define YYFPRINTF fprintf |
| 675 | # endif |
| 676 | |
| 677 | # define YYDPRINTF(Args) \ |
| 678 | do { \ |
| 679 | if (yydebug) \ |
| 680 | YYFPRINTF Args; \ |
| 681 | } while (YYID (0)) |
| 682 | |
| 683 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 684 | do { \ |
| 685 | if (yydebug) \ |
| 686 | { \ |
| 687 | YYFPRINTF (stderr, "%s ", Title); \ |
| 688 | yy_symbol_print (stderr, \ |
| 689 | Type, Value, list, idx); \ |
| 690 | YYFPRINTF (stderr, "\n"); \ |
| 691 | } \ |
| 692 | } while (YYID (0)) |
| 693 | |
| 694 | |
| 695 | /*--------------------------------. |
| 696 | | Print this symbol on YYOUTPUT. | |
| 697 | `--------------------------------*/ |
| 698 | |
| 699 | /*ARGSUSED*/ |
| 700 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 701 | || defined __cplusplus || defined _MSC_VER) |
| 702 | static void |
| 703 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct list_head *list, int *idx) |
| 704 | #else |
| 705 | static void |
| 706 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, list, idx) |
| 707 | FILE *yyoutput; |
| 708 | int yytype; |
| 709 | YYSTYPE const * const yyvaluep; |
| 710 | struct list_head *list; |
| 711 | int *idx; |
| 712 | #endif |
| 713 | { |
| 714 | if (!yyvaluep) |
| 715 | return; |
| 716 | YYUSE (list); |
| 717 | YYUSE (idx); |
| 718 | # ifdef YYPRINT |
| 719 | if (yytype < YYNTOKENS) |
| 720 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 721 | # else |
| 722 | YYUSE (yyoutput); |
| 723 | # endif |
| 724 | switch (yytype) |
| 725 | { |
| 726 | default: |
| 727 | break; |
| 728 | } |
| 729 | } |
| 730 | |
| 731 | |
| 732 | /*--------------------------------. |
| 733 | | Print this symbol on YYOUTPUT. | |
| 734 | `--------------------------------*/ |
| 735 | |
| 736 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 737 | || defined __cplusplus || defined _MSC_VER) |
| 738 | static void |
| 739 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct list_head *list, int *idx) |
| 740 | #else |
| 741 | static void |
| 742 | yy_symbol_print (yyoutput, yytype, yyvaluep, list, idx) |
| 743 | FILE *yyoutput; |
| 744 | int yytype; |
| 745 | YYSTYPE const * const yyvaluep; |
| 746 | struct list_head *list; |
| 747 | int *idx; |
| 748 | #endif |
| 749 | { |
| 750 | if (yytype < YYNTOKENS) |
| 751 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 752 | else |
| 753 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 754 | |
| 755 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, list, idx); |
| 756 | YYFPRINTF (yyoutput, ")"); |
| 757 | } |
| 758 | |
| 759 | /*------------------------------------------------------------------. |
| 760 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 761 | | TOP (included). | |
| 762 | `------------------------------------------------------------------*/ |
| 763 | |
| 764 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 765 | || defined __cplusplus || defined _MSC_VER) |
| 766 | static void |
| 767 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
| 768 | #else |
| 769 | static void |
| 770 | yy_stack_print (yybottom, yytop) |
| 771 | yytype_int16 *yybottom; |
| 772 | yytype_int16 *yytop; |
| 773 | #endif |
| 774 | { |
| 775 | YYFPRINTF (stderr, "Stack now"); |
| 776 | for (; yybottom <= yytop; yybottom++) |
| 777 | { |
| 778 | int yybot = *yybottom; |
| 779 | YYFPRINTF (stderr, " %d", yybot); |
| 780 | } |
| 781 | YYFPRINTF (stderr, "\n"); |
| 782 | } |
| 783 | |
| 784 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 785 | do { \ |
| 786 | if (yydebug) \ |
| 787 | yy_stack_print ((Bottom), (Top)); \ |
| 788 | } while (YYID (0)) |
| 789 | |
| 790 | |
| 791 | /*------------------------------------------------. |
| 792 | | Report that the YYRULE is going to be reduced. | |
| 793 | `------------------------------------------------*/ |
| 794 | |
| 795 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 796 | || defined __cplusplus || defined _MSC_VER) |
| 797 | static void |
| 798 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct list_head *list, int *idx) |
| 799 | #else |
| 800 | static void |
| 801 | yy_reduce_print (yyvsp, yyrule, list, idx) |
| 802 | YYSTYPE *yyvsp; |
| 803 | int yyrule; |
| 804 | struct list_head *list; |
| 805 | int *idx; |
| 806 | #endif |
| 807 | { |
| 808 | int yynrhs = yyr2[yyrule]; |
| 809 | int yyi; |
| 810 | unsigned long int yylno = yyrline[yyrule]; |
| 811 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 812 | yyrule - 1, yylno); |
| 813 | /* The symbols being reduced. */ |
| 814 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 815 | { |
| 816 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
| 817 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 818 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 819 | , list, idx); |
| 820 | YYFPRINTF (stderr, "\n"); |
| 821 | } |
| 822 | } |
| 823 | |
| 824 | # define YY_REDUCE_PRINT(Rule) \ |
| 825 | do { \ |
| 826 | if (yydebug) \ |
| 827 | yy_reduce_print (yyvsp, Rule, list, idx); \ |
| 828 | } while (YYID (0)) |
| 829 | |
| 830 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 831 | multiple parsers can coexist. */ |
| 832 | int yydebug; |
| 833 | #else /* !YYDEBUG */ |
| 834 | # define YYDPRINTF(Args) |
| 835 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 836 | # define YY_STACK_PRINT(Bottom, Top) |
| 837 | # define YY_REDUCE_PRINT(Rule) |
| 838 | #endif /* !YYDEBUG */ |
| 839 | |
| 840 | |
| 841 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 842 | #ifndef YYINITDEPTH |
| 843 | # define YYINITDEPTH 200 |
| 844 | #endif |
| 845 | |
| 846 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 847 | if the built-in stack extension method is used). |
| 848 | |
| 849 | Do not make this value too large; the results are undefined if |
| 850 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 851 | evaluated with infinite-precision integer arithmetic. */ |
| 852 | |
| 853 | #ifndef YYMAXDEPTH |
| 854 | # define YYMAXDEPTH 10000 |
| 855 | #endif |
| 856 | |
| 857 | |
| 858 | |
| 859 | #if YYERROR_VERBOSE |
| 860 | |
| 861 | # ifndef yystrlen |
| 862 | # if defined __GLIBC__ && defined _STRING_H |
| 863 | # define yystrlen strlen |
| 864 | # else |
| 865 | /* Return the length of YYSTR. */ |
| 866 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 867 | || defined __cplusplus || defined _MSC_VER) |
| 868 | static YYSIZE_T |
| 869 | yystrlen (const char *yystr) |
| 870 | #else |
| 871 | static YYSIZE_T |
| 872 | yystrlen (yystr) |
| 873 | const char *yystr; |
| 874 | #endif |
| 875 | { |
| 876 | YYSIZE_T yylen; |
| 877 | for (yylen = 0; yystr[yylen]; yylen++) |
| 878 | continue; |
| 879 | return yylen; |
| 880 | } |
| 881 | # endif |
| 882 | # endif |
| 883 | |
| 884 | # ifndef yystpcpy |
| 885 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
| 886 | # define yystpcpy stpcpy |
| 887 | # else |
| 888 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 889 | YYDEST. */ |
| 890 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 891 | || defined __cplusplus || defined _MSC_VER) |
| 892 | static char * |
| 893 | yystpcpy (char *yydest, const char *yysrc) |
| 894 | #else |
| 895 | static char * |
| 896 | yystpcpy (yydest, yysrc) |
| 897 | char *yydest; |
| 898 | const char *yysrc; |
| 899 | #endif |
| 900 | { |
| 901 | char *yyd = yydest; |
| 902 | const char *yys = yysrc; |
| 903 | |
| 904 | while ((*yyd++ = *yys++) != '\0') |
| 905 | continue; |
| 906 | |
| 907 | return yyd - 1; |
| 908 | } |
| 909 | # endif |
| 910 | # endif |
| 911 | |
| 912 | # ifndef yytnamerr |
| 913 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 914 | quotes and backslashes, so that it's suitable for yyerror. The |
| 915 | heuristic is that double-quoting is unnecessary unless the string |
| 916 | contains an apostrophe, a comma, or backslash (other than |
| 917 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 918 | null, do not copy; instead, return the length of what the result |
| 919 | would have been. */ |
| 920 | static YYSIZE_T |
| 921 | yytnamerr (char *yyres, const char *yystr) |
| 922 | { |
| 923 | if (*yystr == '"') |
| 924 | { |
| 925 | YYSIZE_T yyn = 0; |
| 926 | char const *yyp = yystr; |
| 927 | |
| 928 | for (;;) |
| 929 | switch (*++yyp) |
| 930 | { |
| 931 | case '\'': |
| 932 | case ',': |
| 933 | goto do_not_strip_quotes; |
| 934 | |
| 935 | case '\\': |
| 936 | if (*++yyp != '\\') |
| 937 | goto do_not_strip_quotes; |
| 938 | /* Fall through. */ |
| 939 | default: |
| 940 | if (yyres) |
| 941 | yyres[yyn] = *yyp; |
| 942 | yyn++; |
| 943 | break; |
| 944 | |
| 945 | case '"': |
| 946 | if (yyres) |
| 947 | yyres[yyn] = '\0'; |
| 948 | return yyn; |
| 949 | } |
| 950 | do_not_strip_quotes: ; |
| 951 | } |
| 952 | |
| 953 | if (! yyres) |
| 954 | return yystrlen (yystr); |
| 955 | |
| 956 | return yystpcpy (yyres, yystr) - yyres; |
| 957 | } |
| 958 | # endif |
| 959 | |
| 960 | /* Copy into YYRESULT an error message about the unexpected token |
| 961 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 962 | including the terminating null byte. If YYRESULT is null, do not |
| 963 | copy anything; just return the number of bytes that would be |
| 964 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 965 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 966 | size calculation. */ |
| 967 | static YYSIZE_T |
| 968 | yysyntax_error (char *yyresult, int yystate, int yychar) |
| 969 | { |
| 970 | int yyn = yypact[yystate]; |
| 971 | |
| 972 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
| 973 | return 0; |
| 974 | else |
| 975 | { |
| 976 | int yytype = YYTRANSLATE (yychar); |
| 977 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| 978 | YYSIZE_T yysize = yysize0; |
| 979 | YYSIZE_T yysize1; |
| 980 | int yysize_overflow = 0; |
| 981 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 982 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 983 | int yyx; |
| 984 | |
| 985 | # if 0 |
| 986 | /* This is so xgettext sees the translatable formats that are |
| 987 | constructed on the fly. */ |
| 988 | YY_("syntax error, unexpected %s"); |
| 989 | YY_("syntax error, unexpected %s, expecting %s"); |
| 990 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
| 991 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| 992 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| 993 | # endif |
| 994 | char *yyfmt; |
| 995 | char const *yyf; |
| 996 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 997 | static char const yyexpecting[] = ", expecting %s"; |
| 998 | static char const yyor[] = " or %s"; |
| 999 | char yyformat[sizeof yyunexpected |
| 1000 | + sizeof yyexpecting - 1 |
| 1001 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 1002 | * (sizeof yyor - 1))]; |
| 1003 | char const *yyprefix = yyexpecting; |
| 1004 | |
| 1005 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1006 | YYCHECK. */ |
| 1007 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1008 | |
| 1009 | /* Stay within bounds of both yycheck and yytname. */ |
| 1010 | int yychecklim = YYLAST - yyn + 1; |
| 1011 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1012 | int yycount = 1; |
| 1013 | |
| 1014 | yyarg[0] = yytname[yytype]; |
| 1015 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 1016 | |
| 1017 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1018 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 1019 | { |
| 1020 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1021 | { |
| 1022 | yycount = 1; |
| 1023 | yysize = yysize0; |
| 1024 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 1025 | break; |
| 1026 | } |
| 1027 | yyarg[yycount++] = yytname[yyx]; |
| 1028 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 1029 | yysize_overflow |= (yysize1 < yysize); |
| 1030 | yysize = yysize1; |
| 1031 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 1032 | yyprefix = yyor; |
| 1033 | } |
| 1034 | |
| 1035 | yyf = YY_(yyformat); |
| 1036 | yysize1 = yysize + yystrlen (yyf); |
| 1037 | yysize_overflow |= (yysize1 < yysize); |
| 1038 | yysize = yysize1; |
| 1039 | |
| 1040 | if (yysize_overflow) |
| 1041 | return YYSIZE_MAXIMUM; |
| 1042 | |
| 1043 | if (yyresult) |
| 1044 | { |
| 1045 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1046 | Don't have undefined behavior even if the translation |
| 1047 | produced a string with the wrong number of "%s"s. */ |
| 1048 | char *yyp = yyresult; |
| 1049 | int yyi = 0; |
| 1050 | while ((*yyp = *yyf) != '\0') |
| 1051 | { |
| 1052 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 1053 | { |
| 1054 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1055 | yyf += 2; |
| 1056 | } |
| 1057 | else |
| 1058 | { |
| 1059 | yyp++; |
| 1060 | yyf++; |
| 1061 | } |
| 1062 | } |
| 1063 | } |
| 1064 | return yysize; |
| 1065 | } |
| 1066 | } |
| 1067 | #endif /* YYERROR_VERBOSE */ |
| 1068 | |
| 1069 | |
| 1070 | /*-----------------------------------------------. |
| 1071 | | Release the memory associated to this symbol. | |
| 1072 | `-----------------------------------------------*/ |
| 1073 | |
| 1074 | /*ARGSUSED*/ |
| 1075 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1076 | || defined __cplusplus || defined _MSC_VER) |
| 1077 | static void |
| 1078 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct list_head *list, int *idx) |
| 1079 | #else |
| 1080 | static void |
| 1081 | yydestruct (yymsg, yytype, yyvaluep, list, idx) |
| 1082 | const char *yymsg; |
| 1083 | int yytype; |
| 1084 | YYSTYPE *yyvaluep; |
| 1085 | struct list_head *list; |
| 1086 | int *idx; |
| 1087 | #endif |
| 1088 | { |
| 1089 | YYUSE (yyvaluep); |
| 1090 | YYUSE (list); |
| 1091 | YYUSE (idx); |
| 1092 | |
| 1093 | if (!yymsg) |
| 1094 | yymsg = "Deleting"; |
| 1095 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1096 | |
| 1097 | switch (yytype) |
| 1098 | { |
| 1099 | |
| 1100 | default: |
| 1101 | break; |
| 1102 | } |
| 1103 | } |
| 1104 | |
| 1105 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 1106 | #ifdef YYPARSE_PARAM |
| 1107 | #if defined __STDC__ || defined __cplusplus |
| 1108 | int yyparse (void *YYPARSE_PARAM); |
| 1109 | #else |
| 1110 | int yyparse (); |
| 1111 | #endif |
| 1112 | #else /* ! YYPARSE_PARAM */ |
| 1113 | #if defined __STDC__ || defined __cplusplus |
| 1114 | int yyparse (struct list_head *list, int *idx); |
| 1115 | #else |
| 1116 | int yyparse (); |
| 1117 | #endif |
| 1118 | #endif /* ! YYPARSE_PARAM */ |
| 1119 | |
| 1120 | |
| 1121 | /* The lookahead symbol. */ |
| 1122 | int yychar; |
| 1123 | |
| 1124 | /* The semantic value of the lookahead symbol. */ |
| 1125 | YYSTYPE yylval; |
| 1126 | |
| 1127 | /* Number of syntax errors so far. */ |
| 1128 | int yynerrs; |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | /*-------------------------. |
| 1133 | | yyparse or yypush_parse. | |
| 1134 | `-------------------------*/ |
| 1135 | |
| 1136 | #ifdef YYPARSE_PARAM |
| 1137 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1138 | || defined __cplusplus || defined _MSC_VER) |
| 1139 | int |
| 1140 | yyparse (void *YYPARSE_PARAM) |
| 1141 | #else |
| 1142 | int |
| 1143 | yyparse (YYPARSE_PARAM) |
| 1144 | void *YYPARSE_PARAM; |
| 1145 | #endif |
| 1146 | #else /* ! YYPARSE_PARAM */ |
| 1147 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1148 | || defined __cplusplus || defined _MSC_VER) |
| 1149 | int |
| 1150 | yyparse (struct list_head *list, int *idx) |
| 1151 | #else |
| 1152 | int |
| 1153 | yyparse (list, idx) |
| 1154 | struct list_head *list; |
| 1155 | int *idx; |
| 1156 | #endif |
| 1157 | #endif |
| 1158 | { |
| 1159 | |
| 1160 | |
| 1161 | int yystate; |
| 1162 | /* Number of tokens to shift before error messages enabled. */ |
| 1163 | int yyerrstatus; |
| 1164 | |
| 1165 | /* The stacks and their tools: |
| 1166 | `yyss': related to states. |
| 1167 | `yyvs': related to semantic values. |
| 1168 | |
| 1169 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 1170 | to reallocate them elsewhere. */ |
| 1171 | |
| 1172 | /* The state stack. */ |
| 1173 | yytype_int16 yyssa[YYINITDEPTH]; |
| 1174 | yytype_int16 *yyss; |
| 1175 | yytype_int16 *yyssp; |
| 1176 | |
| 1177 | /* The semantic value stack. */ |
| 1178 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 1179 | YYSTYPE *yyvs; |
| 1180 | YYSTYPE *yyvsp; |
| 1181 | |
| 1182 | YYSIZE_T yystacksize; |
| 1183 | |
| 1184 | int yyn; |
| 1185 | int yyresult; |
| 1186 | /* Lookahead token as an internal (translated) token number. */ |
| 1187 | int yytoken; |
| 1188 | /* The variables used to return semantic value and location from the |
| 1189 | action routines. */ |
| 1190 | YYSTYPE yyval; |
| 1191 | |
| 1192 | #if YYERROR_VERBOSE |
| 1193 | /* Buffer for error messages, and its allocated size. */ |
| 1194 | char yymsgbuf[128]; |
| 1195 | char *yymsg = yymsgbuf; |
| 1196 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 1197 | #endif |
| 1198 | |
| 1199 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
| 1200 | |
| 1201 | /* The number of symbols on the RHS of the reduced rule. |
| 1202 | Keep to zero when no symbol should be popped. */ |
| 1203 | int yylen = 0; |
| 1204 | |
| 1205 | yytoken = 0; |
| 1206 | yyss = yyssa; |
| 1207 | yyvs = yyvsa; |
| 1208 | yystacksize = YYINITDEPTH; |
| 1209 | |
| 1210 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 1211 | |
| 1212 | yystate = 0; |
| 1213 | yyerrstatus = 0; |
| 1214 | yynerrs = 0; |
| 1215 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 1216 | |
| 1217 | /* Initialize stack pointers. |
| 1218 | Waste one element of value and location stack |
| 1219 | so that they stay on the same level as the state stack. |
| 1220 | The wasted elements are never initialized. */ |
| 1221 | yyssp = yyss; |
| 1222 | yyvsp = yyvs; |
| 1223 | |
| 1224 | goto yysetstate; |
| 1225 | |
| 1226 | /*------------------------------------------------------------. |
| 1227 | | yynewstate -- Push a new state, which is found in yystate. | |
| 1228 | `------------------------------------------------------------*/ |
| 1229 | yynewstate: |
| 1230 | /* In all cases, when you get here, the value and location stacks |
| 1231 | have just been pushed. So pushing a state here evens the stacks. */ |
| 1232 | yyssp++; |
| 1233 | |
| 1234 | yysetstate: |
| 1235 | *yyssp = yystate; |
| 1236 | |
| 1237 | if (yyss + yystacksize - 1 <= yyssp) |
| 1238 | { |
| 1239 | /* Get the current used size of the three stacks, in elements. */ |
| 1240 | YYSIZE_T yysize = yyssp - yyss + 1; |
| 1241 | |
| 1242 | #ifdef yyoverflow |
| 1243 | { |
| 1244 | /* Give user a chance to reallocate the stack. Use copies of |
| 1245 | these so that the &'s don't force the real ones into |
| 1246 | memory. */ |
| 1247 | YYSTYPE *yyvs1 = yyvs; |
| 1248 | yytype_int16 *yyss1 = yyss; |
| 1249 | |
| 1250 | /* Each stack pointer address is followed by the size of the |
| 1251 | data in use in that stack, in bytes. This used to be a |
| 1252 | conditional around just the two extra args, but that might |
| 1253 | be undefined if yyoverflow is a macro. */ |
| 1254 | yyoverflow (YY_("memory exhausted"), |
| 1255 | &yyss1, yysize * sizeof (*yyssp), |
| 1256 | &yyvs1, yysize * sizeof (*yyvsp), |
| 1257 | &yystacksize); |
| 1258 | |
| 1259 | yyss = yyss1; |
| 1260 | yyvs = yyvs1; |
| 1261 | } |
| 1262 | #else /* no yyoverflow */ |
| 1263 | # ifndef YYSTACK_RELOCATE |
| 1264 | goto yyexhaustedlab; |
| 1265 | # else |
| 1266 | /* Extend the stack our own way. */ |
| 1267 | if (YYMAXDEPTH <= yystacksize) |
| 1268 | goto yyexhaustedlab; |
| 1269 | yystacksize *= 2; |
| 1270 | if (YYMAXDEPTH < yystacksize) |
| 1271 | yystacksize = YYMAXDEPTH; |
| 1272 | |
| 1273 | { |
| 1274 | yytype_int16 *yyss1 = yyss; |
| 1275 | union yyalloc *yyptr = |
| 1276 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 1277 | if (! yyptr) |
| 1278 | goto yyexhaustedlab; |
| 1279 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1280 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
| 1281 | # undef YYSTACK_RELOCATE |
| 1282 | if (yyss1 != yyssa) |
| 1283 | YYSTACK_FREE (yyss1); |
| 1284 | } |
| 1285 | # endif |
| 1286 | #endif /* no yyoverflow */ |
| 1287 | |
| 1288 | yyssp = yyss + yysize - 1; |
| 1289 | yyvsp = yyvs + yysize - 1; |
| 1290 | |
| 1291 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 1292 | (unsigned long int) yystacksize)); |
| 1293 | |
| 1294 | if (yyss + yystacksize - 1 <= yyssp) |
| 1295 | YYABORT; |
| 1296 | } |
| 1297 | |
| 1298 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 1299 | |
| 1300 | if (yystate == YYFINAL) |
| 1301 | YYACCEPT; |
| 1302 | |
| 1303 | goto yybackup; |
| 1304 | |
| 1305 | /*-----------. |
| 1306 | | yybackup. | |
| 1307 | `-----------*/ |
| 1308 | yybackup: |
| 1309 | |
| 1310 | /* Do appropriate processing given the current state. Read a |
| 1311 | lookahead token if we need one and don't already have one. */ |
| 1312 | |
| 1313 | /* First try to decide what to do without reference to lookahead token. */ |
| 1314 | yyn = yypact[yystate]; |
| 1315 | if (yyn == YYPACT_NINF) |
| 1316 | goto yydefault; |
| 1317 | |
| 1318 | /* Not known => get a lookahead token if don't already have one. */ |
| 1319 | |
| 1320 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 1321 | if (yychar == YYEMPTY) |
| 1322 | { |
| 1323 | YYDPRINTF ((stderr, "Reading a token: ")); |
| 1324 | yychar = YYLEX; |
| 1325 | } |
| 1326 | |
| 1327 | if (yychar <= YYEOF) |
| 1328 | { |
| 1329 | yychar = yytoken = YYEOF; |
| 1330 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 1331 | } |
| 1332 | else |
| 1333 | { |
| 1334 | yytoken = YYTRANSLATE (yychar); |
| 1335 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 1336 | } |
| 1337 | |
| 1338 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 1339 | detect an error, take that action. */ |
| 1340 | yyn += yytoken; |
| 1341 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
| 1342 | goto yydefault; |
| 1343 | yyn = yytable[yyn]; |
| 1344 | if (yyn <= 0) |
| 1345 | { |
| 1346 | if (yyn == 0 || yyn == YYTABLE_NINF) |
| 1347 | goto yyerrlab; |
| 1348 | yyn = -yyn; |
| 1349 | goto yyreduce; |
| 1350 | } |
| 1351 | |
| 1352 | /* Count tokens shifted since error; after three, turn off error |
| 1353 | status. */ |
| 1354 | if (yyerrstatus) |
| 1355 | yyerrstatus--; |
| 1356 | |
| 1357 | /* Shift the lookahead token. */ |
| 1358 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 1359 | |
| 1360 | /* Discard the shifted token. */ |
| 1361 | yychar = YYEMPTY; |
| 1362 | |
| 1363 | yystate = yyn; |
| 1364 | *++yyvsp = yylval; |
| 1365 | |
| 1366 | goto yynewstate; |
| 1367 | |
| 1368 | |
| 1369 | /*-----------------------------------------------------------. |
| 1370 | | yydefault -- do the default action for the current state. | |
| 1371 | `-----------------------------------------------------------*/ |
| 1372 | yydefault: |
| 1373 | yyn = yydefact[yystate]; |
| 1374 | if (yyn == 0) |
| 1375 | goto yyerrlab; |
| 1376 | goto yyreduce; |
| 1377 | |
| 1378 | |
| 1379 | /*-----------------------------. |
| 1380 | | yyreduce -- Do a reduction. | |
| 1381 | `-----------------------------*/ |
| 1382 | yyreduce: |
| 1383 | /* yyn is the number of a rule to reduce with. */ |
| 1384 | yylen = yyr2[yyn]; |
| 1385 | |
| 1386 | /* If YYLEN is nonzero, implement the default value of the action: |
| 1387 | `$$ = $1'. |
| 1388 | |
| 1389 | Otherwise, the following line sets YYVAL to garbage. |
| 1390 | This behavior is undocumented and Bison |
| 1391 | users should not rely upon it. Assigning to YYVAL |
| 1392 | unconditionally makes the parser a bit smaller, and it avoids a |
| 1393 | GCC warning that YYVAL may be used uninitialized. */ |
| 1394 | yyval = yyvsp[1-yylen]; |
| 1395 | |
| 1396 | |
| 1397 | YY_REDUCE_PRINT (yyn); |
| 1398 | switch (yyn) |
| 1399 | { |
| 1400 | case 4: |
| 1401 | |
| 1402 | /* Line 1464 of yacc.c */ |
| 1403 | #line 53 "util/parse-events.y" |
| 1404 | { |
| 1405 | ABORT_ON(parse_events_modifier(list, (yyvsp[(2) - (2)].str))); |
| 1406 | ;} |
| 1407 | break; |
| 1408 | |
| 1409 | case 12: |
| 1410 | |
| 1411 | /* Line 1464 of yacc.c */ |
| 1412 | #line 68 "util/parse-events.y" |
| 1413 | { |
| 1414 | int type = (yyvsp[(1) - (1)].num) >> 16; |
| 1415 | int config = (yyvsp[(1) - (1)].num) & 255; |
| 1416 | |
| 1417 | ABORT_ON(parse_events_add_numeric(list, idx, type, config)); |
| 1418 | ;} |
| 1419 | break; |
| 1420 | |
| 1421 | case 13: |
| 1422 | |
| 1423 | /* Line 1464 of yacc.c */ |
| 1424 | #line 77 "util/parse-events.y" |
| 1425 | { |
| 1426 | ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str))); |
| 1427 | ;} |
| 1428 | break; |
| 1429 | |
| 1430 | case 14: |
| 1431 | |
| 1432 | /* Line 1464 of yacc.c */ |
| 1433 | #line 82 "util/parse-events.y" |
| 1434 | { |
| 1435 | ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str), NULL)); |
| 1436 | ;} |
| 1437 | break; |
| 1438 | |
| 1439 | case 15: |
| 1440 | |
| 1441 | /* Line 1464 of yacc.c */ |
| 1442 | #line 87 "util/parse-events.y" |
| 1443 | { |
| 1444 | ABORT_ON(parse_events_add_cache(list, idx, (yyvsp[(1) - (1)].str), NULL, NULL)); |
| 1445 | ;} |
| 1446 | break; |
| 1447 | |
| 1448 | case 16: |
| 1449 | |
| 1450 | /* Line 1464 of yacc.c */ |
| 1451 | #line 93 "util/parse-events.y" |
| 1452 | { |
| 1453 | ABORT_ON(parse_events_add_breakpoint(list, idx, (void *) (yyvsp[(2) - (5)].num), (yyvsp[(4) - (5)].str))); |
| 1454 | ;} |
| 1455 | break; |
| 1456 | |
| 1457 | case 17: |
| 1458 | |
| 1459 | /* Line 1464 of yacc.c */ |
| 1460 | #line 98 "util/parse-events.y" |
| 1461 | { |
| 1462 | ABORT_ON(parse_events_add_breakpoint(list, idx, (void *) (yyvsp[(2) - (3)].num), NULL)); |
| 1463 | ;} |
| 1464 | break; |
| 1465 | |
| 1466 | case 18: |
| 1467 | |
| 1468 | /* Line 1464 of yacc.c */ |
| 1469 | #line 104 "util/parse-events.y" |
| 1470 | { |
| 1471 | ABORT_ON(parse_events_add_tracepoint(list, idx, (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str))); |
| 1472 | ;} |
| 1473 | break; |
| 1474 | |
| 1475 | case 19: |
| 1476 | |
| 1477 | /* Line 1464 of yacc.c */ |
| 1478 | #line 110 "util/parse-events.y" |
| 1479 | { |
| 1480 | ABORT_ON(parse_events_add_numeric(list, idx, (yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num))); |
| 1481 | ;} |
| 1482 | break; |
| 1483 | |
| 1484 | case 20: |
| 1485 | |
| 1486 | /* Line 1464 of yacc.c */ |
| 1487 | #line 116 "util/parse-events.y" |
| 1488 | { |
| 1489 | ABORT_ON(parse_events_add_numeric(list, idx, PERF_TYPE_RAW, (yyvsp[(1) - (1)].num))); |
| 1490 | ;} |
| 1491 | break; |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | /* Line 1464 of yacc.c */ |
| 1496 | #line 1497 "util/parse-events-bison.c" |
| 1497 | default: break; |
| 1498 | } |
| 1499 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 1500 | |
| 1501 | YYPOPSTACK (yylen); |
| 1502 | yylen = 0; |
| 1503 | YY_STACK_PRINT (yyss, yyssp); |
| 1504 | |
| 1505 | *++yyvsp = yyval; |
| 1506 | |
| 1507 | /* Now `shift' the result of the reduction. Determine what state |
| 1508 | that goes to, based on the state we popped back to and the rule |
| 1509 | number reduced by. */ |
| 1510 | |
| 1511 | yyn = yyr1[yyn]; |
| 1512 | |
| 1513 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 1514 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 1515 | yystate = yytable[yystate]; |
| 1516 | else |
| 1517 | yystate = yydefgoto[yyn - YYNTOKENS]; |
| 1518 | |
| 1519 | goto yynewstate; |
| 1520 | |
| 1521 | |
| 1522 | /*------------------------------------. |
| 1523 | | yyerrlab -- here on detecting error | |
| 1524 | `------------------------------------*/ |
| 1525 | yyerrlab: |
| 1526 | /* If not already recovering from an error, report this error. */ |
| 1527 | if (!yyerrstatus) |
| 1528 | { |
| 1529 | ++yynerrs; |
| 1530 | #if ! YYERROR_VERBOSE |
| 1531 | yyerror (list, idx, YY_("syntax error")); |
| 1532 | #else |
| 1533 | { |
| 1534 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| 1535 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| 1536 | { |
| 1537 | YYSIZE_T yyalloc = 2 * yysize; |
| 1538 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 1539 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| 1540 | if (yymsg != yymsgbuf) |
| 1541 | YYSTACK_FREE (yymsg); |
| 1542 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| 1543 | if (yymsg) |
| 1544 | yymsg_alloc = yyalloc; |
| 1545 | else |
| 1546 | { |
| 1547 | yymsg = yymsgbuf; |
| 1548 | yymsg_alloc = sizeof yymsgbuf; |
| 1549 | } |
| 1550 | } |
| 1551 | |
| 1552 | if (0 < yysize && yysize <= yymsg_alloc) |
| 1553 | { |
| 1554 | (void) yysyntax_error (yymsg, yystate, yychar); |
| 1555 | yyerror (list, idx, yymsg); |
| 1556 | } |
| 1557 | else |
| 1558 | { |
| 1559 | yyerror (list, idx, YY_("syntax error")); |
| 1560 | if (yysize != 0) |
| 1561 | goto yyexhaustedlab; |
| 1562 | } |
| 1563 | } |
| 1564 | #endif |
| 1565 | } |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | if (yyerrstatus == 3) |
| 1570 | { |
| 1571 | /* If just tried and failed to reuse lookahead token after an |
| 1572 | error, discard it. */ |
| 1573 | |
| 1574 | if (yychar <= YYEOF) |
| 1575 | { |
| 1576 | /* Return failure if at end of input. */ |
| 1577 | if (yychar == YYEOF) |
| 1578 | YYABORT; |
| 1579 | } |
| 1580 | else |
| 1581 | { |
| 1582 | yydestruct ("Error: discarding", |
| 1583 | yytoken, &yylval, list, idx); |
| 1584 | yychar = YYEMPTY; |
| 1585 | } |
| 1586 | } |
| 1587 | |
| 1588 | /* Else will try to reuse lookahead token after shifting the error |
| 1589 | token. */ |
| 1590 | goto yyerrlab1; |
| 1591 | |
| 1592 | |
| 1593 | /*---------------------------------------------------. |
| 1594 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 1595 | `---------------------------------------------------*/ |
| 1596 | yyerrorlab: |
| 1597 | |
| 1598 | /* Pacify compilers like GCC when the user code never invokes |
| 1599 | YYERROR and the label yyerrorlab therefore never appears in user |
| 1600 | code. */ |
| 1601 | if (/*CONSTCOND*/ 0) |
| 1602 | goto yyerrorlab; |
| 1603 | |
| 1604 | /* Do not reclaim the symbols of the rule which action triggered |
| 1605 | this YYERROR. */ |
| 1606 | YYPOPSTACK (yylen); |
| 1607 | yylen = 0; |
| 1608 | YY_STACK_PRINT (yyss, yyssp); |
| 1609 | yystate = *yyssp; |
| 1610 | goto yyerrlab1; |
| 1611 | |
| 1612 | |
| 1613 | /*-------------------------------------------------------------. |
| 1614 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 1615 | `-------------------------------------------------------------*/ |
| 1616 | yyerrlab1: |
| 1617 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 1618 | |
| 1619 | for (;;) |
| 1620 | { |
| 1621 | yyn = yypact[yystate]; |
| 1622 | if (yyn != YYPACT_NINF) |
| 1623 | { |
| 1624 | yyn += YYTERROR; |
| 1625 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 1626 | { |
| 1627 | yyn = yytable[yyn]; |
| 1628 | if (0 < yyn) |
| 1629 | break; |
| 1630 | } |
| 1631 | } |
| 1632 | |
| 1633 | /* Pop the current state because it cannot handle the error token. */ |
| 1634 | if (yyssp == yyss) |
| 1635 | YYABORT; |
| 1636 | |
| 1637 | |
| 1638 | yydestruct ("Error: popping", |
| 1639 | yystos[yystate], yyvsp, list, idx); |
| 1640 | YYPOPSTACK (1); |
| 1641 | yystate = *yyssp; |
| 1642 | YY_STACK_PRINT (yyss, yyssp); |
| 1643 | } |
| 1644 | |
| 1645 | *++yyvsp = yylval; |
| 1646 | |
| 1647 | |
| 1648 | /* Shift the error token. */ |
| 1649 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 1650 | |
| 1651 | yystate = yyn; |
| 1652 | goto yynewstate; |
| 1653 | |
| 1654 | |
| 1655 | /*-------------------------------------. |
| 1656 | | yyacceptlab -- YYACCEPT comes here. | |
| 1657 | `-------------------------------------*/ |
| 1658 | yyacceptlab: |
| 1659 | yyresult = 0; |
| 1660 | goto yyreturn; |
| 1661 | |
| 1662 | /*-----------------------------------. |
| 1663 | | yyabortlab -- YYABORT comes here. | |
| 1664 | `-----------------------------------*/ |
| 1665 | yyabortlab: |
| 1666 | yyresult = 1; |
| 1667 | goto yyreturn; |
| 1668 | |
| 1669 | #if !defined(yyoverflow) || YYERROR_VERBOSE |
| 1670 | /*-------------------------------------------------. |
| 1671 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 1672 | `-------------------------------------------------*/ |
| 1673 | yyexhaustedlab: |
| 1674 | yyerror (list, idx, YY_("memory exhausted")); |
| 1675 | yyresult = 2; |
| 1676 | /* Fall through. */ |
| 1677 | #endif |
| 1678 | |
| 1679 | yyreturn: |
| 1680 | if (yychar != YYEMPTY) |
| 1681 | yydestruct ("Cleanup: discarding lookahead", |
| 1682 | yytoken, &yylval, list, idx); |
| 1683 | /* Do not reclaim the symbols of the rule which action triggered |
| 1684 | this YYABORT or YYACCEPT. */ |
| 1685 | YYPOPSTACK (yylen); |
| 1686 | YY_STACK_PRINT (yyss, yyssp); |
| 1687 | while (yyssp != yyss) |
| 1688 | { |
| 1689 | yydestruct ("Cleanup: popping", |
| 1690 | yystos[*yyssp], yyvsp, list, idx); |
| 1691 | YYPOPSTACK (1); |
| 1692 | } |
| 1693 | #ifndef yyoverflow |
| 1694 | if (yyss != yyssa) |
| 1695 | YYSTACK_FREE (yyss); |
| 1696 | #endif |
| 1697 | #if YYERROR_VERBOSE |
| 1698 | if (yymsg != yymsgbuf) |
| 1699 | YYSTACK_FREE (yymsg); |
| 1700 | #endif |
| 1701 | /* Make sure YYID is used. */ |
| 1702 | return YYID (yyresult); |
| 1703 | } |
| 1704 | |
| 1705 | |
| 1706 | |
| 1707 | /* Line 1684 of yacc.c */ |
| 1708 | #line 122 "util/parse-events.y" |
| 1709 | |
| 1710 | |
| 1711 | void parse_events_error(struct list_head *list __used, int *idx __used, |
| 1712 | char const *msg __used) |
| 1713 | { |
| 1714 | } |
| 1715 | |