1 /* A Bison parser, made by GNU Bison 3.3.2. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, 6 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 /* Undocumented macros, especially those whose name start with YY_, 45 are private implementation details. Do not rely on them. */ 46 47 /* Identify Bison output. */ 48 #define YYBISON 1 49 50 /* Bison version. */ 51 #define YYBISON_VERSION "3.3.2" 52 53 /* Skeleton name. */ 54 #define YYSKELETON_NAME "yacc.c" 55 56 /* Pure parsers. */ 57 #define YYPURE 0 58 59 /* Push parsers. */ 60 #define YYPUSH 0 61 62 /* Pull parsers. */ 63 #define YYPULL 1 64 65 66 /* Substitute the variable and function names. */ 67 #define yyparse boot_yyparse 68 #define yylex boot_yylex 69 #define yyerror boot_yyerror 70 #define yydebug boot_yydebug 71 #define yynerrs boot_yynerrs 72 73 #define yylval boot_yylval 74 #define yychar boot_yychar 75 76 /* First part of user prologue. */ 77 #line 1 "bootparse.y" /* yacc.c:337 */ 78 79 /*------------------------------------------------------------------------- 80 * 81 * bootparse.y 82 * yacc grammar for the "bootstrap" mode (BKI file format) 83 * 84 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group 85 * Portions Copyright (c) 1994, Regents of the University of California 86 * 87 * 88 * IDENTIFICATION 89 * src/backend/bootstrap/bootparse.y 90 * 91 *------------------------------------------------------------------------- 92 */ 93 94 #include "postgres.h" 95 96 #include <unistd.h> 97 98 #include "access/attnum.h" 99 #include "access/htup.h" 100 #include "access/itup.h" 101 #include "access/tupdesc.h" 102 #include "bootstrap/bootstrap.h" 103 #include "catalog/catalog.h" 104 #include "catalog/heap.h" 105 #include "catalog/namespace.h" 106 #include "catalog/pg_am.h" 107 #include "catalog/pg_attribute.h" 108 #include "catalog/pg_authid.h" 109 #include "catalog/pg_class.h" 110 #include "catalog/pg_namespace.h" 111 #include "catalog/pg_tablespace.h" 112 #include "catalog/toasting.h" 113 #include "commands/defrem.h" 114 #include "miscadmin.h" 115 #include "nodes/makefuncs.h" 116 #include "nodes/nodes.h" 117 #include "nodes/parsenodes.h" 118 #include "nodes/pg_list.h" 119 #include "nodes/primnodes.h" 120 #include "rewrite/prs2lock.h" 121 #include "storage/block.h" 122 #include "storage/fd.h" 123 #include "storage/ipc.h" 124 #include "storage/itemptr.h" 125 #include "storage/off.h" 126 #include "storage/smgr.h" 127 #include "tcop/dest.h" 128 #include "utils/memutils.h" 129 #include "utils/rel.h" 130 131 132 /* 133 * Bison doesn't allocate anything that needs to live across parser calls, 134 * so we can easily have it use palloc instead of malloc. This prevents 135 * memory leaks if we error out during parsing. Note this only works with 136 * bison >= 2.0. However, in bison 1.875 the default is to use alloca() 137 * if possible, so there's not really much problem anyhow, at least if 138 * you're building with gcc. 139 */ 140 #define YYMALLOC palloc 141 #define YYFREE pfree 142 143 static MemoryContext per_line_ctx = NULL; 144 145 static void 146 do_start(void) 147 { 148 Assert(CurrentMemoryContext == CurTransactionContext); 149 /* First time through, create the per-line working context */ 150 if (per_line_ctx == NULL) 151 per_line_ctx = AllocSetContextCreate(CurTransactionContext, 152 "bootstrap per-line processing", 153 ALLOCSET_DEFAULT_SIZES); 154 MemoryContextSwitchTo(per_line_ctx); 155 } 156 157 158 static void 159 do_end(void) 160 { 161 /* Reclaim memory allocated while processing this line */ 162 MemoryContextSwitchTo(CurTransactionContext); 163 MemoryContextReset(per_line_ctx); 164 CHECK_FOR_INTERRUPTS(); /* allow SIGINT to kill bootstrap run */ 165 if (isatty(0)) 166 { 167 printf("bootstrap> "); 168 fflush(stdout); 169 } 170 } 171 172 173 static int num_columns_read = 0; 174 175 176 #line 177 "bootparse.c" /* yacc.c:337 */ 177 # ifndef YY_NULLPTR 178 # if defined __cplusplus 179 # if 201103L <= __cplusplus 180 # define YY_NULLPTR nullptr 181 # else 182 # define YY_NULLPTR 0 183 # endif 184 # else 185 # define YY_NULLPTR ((void*)0) 186 # endif 187 # endif 188 189 /* Enabling verbose error messages. */ 190 #ifdef YYERROR_VERBOSE 191 # undef YYERROR_VERBOSE 192 # define YYERROR_VERBOSE 1 193 #else 194 # define YYERROR_VERBOSE 0 195 #endif 196 197 198 /* Debug traces. */ 199 #ifndef YYDEBUG 200 # define YYDEBUG 0 201 #endif 202 #if YYDEBUG 203 extern int boot_yydebug; 204 #endif 205 206 /* Token type. */ 207 #ifndef YYTOKENTYPE 208 # define YYTOKENTYPE 209 enum yytokentype 210 { 211 ID = 258, 212 COMMA = 259, 213 EQUALS = 260, 214 LPAREN = 261, 215 RPAREN = 262, 216 NULLVAL = 263, 217 OPEN = 264, 218 XCLOSE = 265, 219 XCREATE = 266, 220 INSERT_TUPLE = 267, 221 XDECLARE = 268, 222 INDEX = 269, 223 ON = 270, 224 USING = 271, 225 XBUILD = 272, 226 INDICES = 273, 227 UNIQUE = 274, 228 XTOAST = 275, 229 OBJ_ID = 276, 230 XBOOTSTRAP = 277, 231 XSHARED_RELATION = 278, 232 XROWTYPE_OID = 279, 233 XFORCE = 280, 234 XNOT = 281, 235 XNULL = 282 236 }; 237 #endif 238 239 /* Value type. */ 240 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 241 242 union YYSTYPE 243 { 244 #line 104 "bootparse.y" /* yacc.c:352 */ 245 246 List *list; 247 IndexElem *ielem; 248 char *str; 249 const char *kw; 250 int ival; 251 Oid oidval; 252 253 #line 254 "bootparse.c" /* yacc.c:352 */ 254 }; 255 256 typedef union YYSTYPE YYSTYPE; 257 # define YYSTYPE_IS_TRIVIAL 1 258 # define YYSTYPE_IS_DECLARED 1 259 #endif 260 261 262 extern YYSTYPE boot_yylval; 263 264 int boot_yyparse (void); 265 266 267 268 269 270 #ifdef short 271 # undef short 272 #endif 273 274 #ifdef YYTYPE_UINT8 275 typedef YYTYPE_UINT8 yytype_uint8; 276 #else 277 typedef unsigned char yytype_uint8; 278 #endif 279 280 #ifdef YYTYPE_INT8 281 typedef YYTYPE_INT8 yytype_int8; 282 #else 283 typedef signed char yytype_int8; 284 #endif 285 286 #ifdef YYTYPE_UINT16 287 typedef YYTYPE_UINT16 yytype_uint16; 288 #else 289 typedef unsigned short yytype_uint16; 290 #endif 291 292 #ifdef YYTYPE_INT16 293 typedef YYTYPE_INT16 yytype_int16; 294 #else 295 typedef short yytype_int16; 296 #endif 297 298 #ifndef YYSIZE_T 299 # ifdef __SIZE_TYPE__ 300 # define YYSIZE_T __SIZE_TYPE__ 301 # elif defined size_t 302 # define YYSIZE_T size_t 303 # elif ! defined YYSIZE_T 304 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 305 # define YYSIZE_T size_t 306 # else 307 # define YYSIZE_T unsigned 308 # endif 309 #endif 310 311 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 312 313 #ifndef YY_ 314 # if defined YYENABLE_NLS && YYENABLE_NLS 315 # if ENABLE_NLS 316 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 317 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 318 # endif 319 # endif 320 # ifndef YY_ 321 # define YY_(Msgid) Msgid 322 # endif 323 #endif 324 325 #ifndef YY_ATTRIBUTE 326 # if (defined __GNUC__ \ 327 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 328 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 329 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 330 # else 331 # define YY_ATTRIBUTE(Spec) /* empty */ 332 # endif 333 #endif 334 335 #ifndef YY_ATTRIBUTE_PURE 336 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 337 #endif 338 339 #ifndef YY_ATTRIBUTE_UNUSED 340 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 341 #endif 342 343 /* Suppress unused-variable warnings by "using" E. */ 344 #if ! defined lint || defined __GNUC__ 345 # define YYUSE(E) ((void) (E)) 346 #else 347 # define YYUSE(E) /* empty */ 348 #endif 349 350 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 351 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 352 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 353 _Pragma ("GCC diagnostic push") \ 354 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 355 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 356 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 357 _Pragma ("GCC diagnostic pop") 358 #else 359 # define YY_INITIAL_VALUE(Value) Value 360 #endif 361 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 362 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 363 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 364 #endif 365 #ifndef YY_INITIAL_VALUE 366 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 367 #endif 368 369 370 #if ! defined yyoverflow || YYERROR_VERBOSE 371 372 /* The parser invokes alloca or malloc; define the necessary symbols. */ 373 374 # ifdef YYSTACK_USE_ALLOCA 375 # if YYSTACK_USE_ALLOCA 376 # ifdef __GNUC__ 377 # define YYSTACK_ALLOC __builtin_alloca 378 # elif defined __BUILTIN_VA_ARG_INCR 379 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 380 # elif defined _AIX 381 # define YYSTACK_ALLOC __alloca 382 # elif defined _MSC_VER 383 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 384 # define alloca _alloca 385 # else 386 # define YYSTACK_ALLOC alloca 387 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 388 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 389 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 390 # ifndef EXIT_SUCCESS 391 # define EXIT_SUCCESS 0 392 # endif 393 # endif 394 # endif 395 # endif 396 # endif 397 398 # ifdef YYSTACK_ALLOC 399 /* Pacify GCC's 'empty if-body' warning. */ 400 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 401 # ifndef YYSTACK_ALLOC_MAXIMUM 402 /* The OS might guarantee only one guard page at the bottom of the stack, 403 and a page size can be as small as 4096 bytes. So we cannot safely 404 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 405 to allow for a few compiler-allocated temporary stack slots. */ 406 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 407 # endif 408 # else 409 # define YYSTACK_ALLOC YYMALLOC 410 # define YYSTACK_FREE YYFREE 411 # ifndef YYSTACK_ALLOC_MAXIMUM 412 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 413 # endif 414 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 415 && ! ((defined YYMALLOC || defined malloc) \ 416 && (defined YYFREE || defined free))) 417 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 418 # ifndef EXIT_SUCCESS 419 # define EXIT_SUCCESS 0 420 # endif 421 # endif 422 # ifndef YYMALLOC 423 # define YYMALLOC malloc 424 # if ! defined malloc && ! defined EXIT_SUCCESS 425 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 426 # endif 427 # endif 428 # ifndef YYFREE 429 # define YYFREE free 430 # if ! defined free && ! defined EXIT_SUCCESS 431 void free (void *); /* INFRINGES ON USER NAME SPACE */ 432 # endif 433 # endif 434 # endif 435 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 436 437 438 #if (! defined yyoverflow \ 439 && (! defined __cplusplus \ 440 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 441 442 /* A type that is properly aligned for any stack member. */ 443 union yyalloc 444 { 445 yytype_int16 yyss_alloc; 446 YYSTYPE yyvs_alloc; 447 }; 448 449 /* The size of the maximum gap between one aligned stack and the next. */ 450 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 451 452 /* The size of an array large to enough to hold all stacks, each with 453 N elements. */ 454 # define YYSTACK_BYTES(N) \ 455 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 456 + YYSTACK_GAP_MAXIMUM) 457 458 # define YYCOPY_NEEDED 1 459 460 /* Relocate STACK from its old location to the new one. The 461 local variables YYSIZE and YYSTACKSIZE give the old and new number of 462 elements in the stack, and YYPTR gives the new location of the 463 stack. Advance YYPTR to a properly aligned location for the next 464 stack. */ 465 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 466 do \ 467 { \ 468 YYSIZE_T yynewbytes; \ 469 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 470 Stack = &yyptr->Stack_alloc; \ 471 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 472 yyptr += yynewbytes / sizeof (*yyptr); \ 473 } \ 474 while (0) 475 476 #endif 477 478 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 479 /* Copy COUNT objects from SRC to DST. The source and destination do 480 not overlap. */ 481 # ifndef YYCOPY 482 # if defined __GNUC__ && 1 < __GNUC__ 483 # define YYCOPY(Dst, Src, Count) \ 484 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 485 # else 486 # define YYCOPY(Dst, Src, Count) \ 487 do \ 488 { \ 489 YYSIZE_T yyi; \ 490 for (yyi = 0; yyi < (Count); yyi++) \ 491 (Dst)[yyi] = (Src)[yyi]; \ 492 } \ 493 while (0) 494 # endif 495 # endif 496 #endif /* !YYCOPY_NEEDED */ 497 498 /* YYFINAL -- State number of the termination state. */ 499 #define YYFINAL 46 500 /* YYLAST -- Last index in YYTABLE. */ 501 #define YYLAST 169 502 503 /* YYNTOKENS -- Number of terminals. */ 504 #define YYNTOKENS 28 505 /* YYNNTS -- Number of nonterminals. */ 506 #define YYNNTS 27 507 /* YYNRULES -- Number of rules. */ 508 #define YYNRULES 65 509 /* YYNSTATES -- Number of states. */ 510 #define YYNSTATES 110 511 512 #define YYUNDEFTOK 2 513 #define YYMAXUTOK 282 514 515 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM 516 as returned by yylex, with out-of-bounds checking. */ 517 #define YYTRANSLATE(YYX) \ 518 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 519 520 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 521 as returned by yylex. */ 522 static const yytype_uint8 yytranslate[] = 523 { 524 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 549 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 550 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 551 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 552 25, 26, 27 553 }; 554 555 #if YYDEBUG 556 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 557 static const yytype_uint16 yyrline[] = 558 { 559 0, 134, 134, 135, 139, 140, 144, 145, 146, 147, 560 148, 149, 150, 151, 155, 164, 174, 184, 173, 270, 561 269, 288, 338, 388, 400, 410, 411, 415, 430, 431, 562 435, 436, 440, 441, 445, 446, 450, 459, 460, 461, 563 465, 469, 470, 471, 475, 477, 482, 483, 484, 485, 564 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 565 496, 497, 498, 499, 500, 501 566 }; 567 #endif 568 569 #if YYDEBUG || YYERROR_VERBOSE || 0 570 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 571 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 572 static const char *const yytname[] = 573 { 574 "$end", "error", "$undefined", "ID", "COMMA", "EQUALS", "LPAREN", 575 "RPAREN", "NULLVAL", "OPEN", "XCLOSE", "XCREATE", "INSERT_TUPLE", 576 "XDECLARE", "INDEX", "ON", "USING", "XBUILD", "INDICES", "UNIQUE", 577 "XTOAST", "OBJ_ID", "XBOOTSTRAP", "XSHARED_RELATION", "XROWTYPE_OID", 578 "XFORCE", "XNOT", "XNULL", "$accept", "TopLevel", "Boot_Queries", 579 "Boot_Query", "Boot_OpenStmt", "Boot_CloseStmt", "Boot_CreateStmt", 580 "$@1", "$@2", "Boot_InsertStmt", "$@3", "Boot_DeclareIndexStmt", 581 "Boot_DeclareUniqueIndexStmt", "Boot_DeclareToastStmt", 582 "Boot_BuildIndsStmt", "boot_index_params", "boot_index_param", 583 "optbootstrap", "optsharedrelation", "optrowtypeoid", "boot_column_list", 584 "boot_column_def", "boot_column_nullness", "oidspec", 585 "boot_column_val_list", "boot_column_val", "boot_ident", YY_NULLPTR 586 }; 587 #endif 588 589 # ifdef YYPRINT 590 /* YYTOKNUM[NUM] -- (External) token number corresponding to the 591 (internal) symbol number NUM (which must be that of a token). */ 592 static const yytype_uint16 yytoknum[] = 593 { 594 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 595 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 596 275, 276, 277, 278, 279, 280, 281, 282 597 }; 598 # endif 599 600 #define YYPACT_NINF -53 601 602 #define yypact_value_is_default(Yystate) \ 603 (!!((Yystate) == (-53))) 604 605 #define YYTABLE_NINF -1 606 607 #define yytable_value_is_error(Yytable_value) \ 608 0 609 610 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 611 STATE-NUM. */ 612 static const yytype_int16 yypact[] = 613 { 614 -4, 142, 142, 142, -53, 2, -14, 25, -4, -53, 615 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 616 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 617 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 618 142, 20, 142, 13, 142, -53, -53, -53, 6, -53, 619 117, 142, 142, 142, -53, 8, -53, 92, -53, -53, 620 14, 142, 17, -53, 9, 117, -53, -53, 142, 19, 621 142, 142, 29, -53, 21, 142, -53, -53, -53, 142, 622 22, 142, 30, 142, 35, -53, 37, 142, 34, 142, 623 36, 142, 10, -53, 142, 142, -53, -53, 23, 142, 624 -53, -53, 11, -3, -53, -53, -53, 18, -53, -53 625 }; 626 627 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 628 Performed when YYTABLE does not specify something else to do. Zero 629 means the default is an error. */ 630 static const yytype_uint8 yydefact[] = 631 { 632 3, 0, 0, 0, 19, 0, 0, 0, 2, 4, 633 6, 7, 8, 9, 10, 11, 12, 13, 46, 47, 634 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 635 58, 59, 60, 61, 62, 63, 64, 65, 14, 15, 636 0, 0, 0, 0, 0, 24, 1, 5, 29, 40, 637 0, 0, 0, 0, 28, 31, 45, 0, 41, 44, 638 0, 0, 0, 30, 33, 0, 20, 42, 0, 0, 639 0, 0, 0, 43, 0, 0, 23, 32, 16, 0, 640 0, 0, 0, 0, 17, 34, 0, 0, 0, 0, 641 0, 0, 0, 26, 0, 0, 35, 18, 39, 0, 642 21, 27, 0, 0, 36, 25, 22, 0, 38, 37 643 }; 644 645 /* YYPGOTO[NTERM-NUM]. */ 646 static const yytype_int8 yypgoto[] = 647 { 648 -53, -53, -53, 38, -53, -53, -53, -53, -53, -53, 649 -53, -53, -53, -53, -53, -51, -52, -53, -53, -53, 650 -53, -39, -53, -41, -53, -46, -1 651 }; 652 653 /* YYDEFGOTO[NTERM-NUM]. */ 654 static const yytype_int8 yydefgoto[] = 655 { 656 -1, 7, 8, 9, 10, 11, 12, 81, 90, 13, 657 41, 14, 15, 16, 17, 92, 93, 55, 64, 72, 658 84, 85, 104, 48, 57, 58, 49 659 }; 660 661 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 662 positive, shift that token. If negative, reduce the rule whose 663 number is the opposite. If YYTABLE_NINF, syntax error. */ 664 static const yytype_uint8 yytable[] = 665 { 666 38, 39, 40, 53, 45, 1, 2, 3, 4, 5, 667 60, 67, 62, 6, 99, 99, 42, 100, 106, 73, 668 69, 43, 44, 107, 108, 46, 50, 52, 54, 68, 669 77, 63, 70, 71, 75, 78, 87, 79, 83, 89, 670 95, 51, 91, 97, 102, 109, 47, 105, 103, 59, 671 96, 61, 0, 0, 0, 0, 59, 0, 0, 0, 672 0, 0, 0, 0, 59, 0, 0, 74, 0, 76, 673 0, 0, 0, 0, 80, 0, 0, 0, 82, 0, 674 86, 0, 88, 0, 0, 0, 94, 0, 86, 0, 675 98, 0, 0, 101, 94, 18, 65, 0, 94, 66, 676 56, 19, 20, 21, 22, 23, 24, 25, 26, 27, 677 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 678 18, 0, 0, 0, 0, 56, 19, 20, 21, 22, 679 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 680 33, 34, 35, 36, 37, 18, 0, 0, 0, 0, 681 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, 682 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 683 }; 684 685 static const yytype_int8 yycheck[] = 686 { 687 1, 2, 3, 44, 18, 9, 10, 11, 12, 13, 688 51, 57, 53, 17, 4, 4, 14, 7, 7, 65, 689 61, 19, 20, 26, 27, 0, 6, 14, 22, 15, 690 71, 23, 15, 24, 15, 6, 6, 16, 16, 4, 691 6, 42, 5, 7, 95, 27, 8, 99, 25, 50, 692 89, 52, -1, -1, -1, -1, 57, -1, -1, -1, 693 -1, -1, -1, -1, 65, -1, -1, 68, -1, 70, 694 -1, -1, -1, -1, 75, -1, -1, -1, 79, -1, 695 81, -1, 83, -1, -1, -1, 87, -1, 89, -1, 696 91, -1, -1, 94, 95, 3, 4, -1, 99, 7, 697 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 698 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 699 3, -1, -1, -1, -1, 8, 9, 10, 11, 12, 700 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 701 23, 24, 25, 26, 27, 3, -1, -1, -1, -1, 702 -1, 9, 10, 11, 12, 13, 14, 15, 16, 17, 703 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 704 }; 705 706 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 707 symbol of state STATE-NUM. */ 708 static const yytype_uint8 yystos[] = 709 { 710 0, 9, 10, 11, 12, 13, 17, 29, 30, 31, 711 32, 33, 34, 37, 39, 40, 41, 42, 3, 9, 712 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 713 20, 21, 22, 23, 24, 25, 26, 27, 54, 54, 714 54, 38, 14, 19, 20, 18, 0, 31, 51, 54, 715 6, 54, 14, 51, 22, 45, 8, 52, 53, 54, 716 51, 54, 51, 23, 46, 4, 7, 53, 15, 51, 717 15, 24, 47, 53, 54, 15, 54, 51, 6, 16, 718 54, 35, 54, 16, 48, 49, 54, 6, 54, 4, 719 36, 5, 43, 44, 54, 6, 49, 7, 54, 4, 720 7, 54, 43, 25, 50, 44, 7, 26, 27, 27 721 }; 722 723 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 724 static const yytype_uint8 yyr1[] = 725 { 726 0, 28, 29, 29, 30, 30, 31, 31, 31, 31, 727 31, 31, 31, 31, 32, 33, 35, 36, 34, 38, 728 37, 39, 40, 41, 42, 43, 43, 44, 45, 45, 729 46, 46, 47, 47, 48, 48, 49, 50, 50, 50, 730 51, 52, 52, 52, 53, 53, 54, 54, 54, 54, 731 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 732 54, 54, 54, 54, 54, 54 733 }; 734 735 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 736 static const yytype_uint8 yyr2[] = 737 { 738 0, 2, 1, 0, 1, 2, 1, 1, 1, 1, 739 1, 1, 1, 1, 2, 2, 0, 0, 11, 0, 740 5, 11, 12, 6, 2, 3, 1, 2, 1, 0, 741 1, 0, 2, 0, 1, 3, 4, 3, 2, 0, 742 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 743 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 744 1, 1, 1, 1, 1, 1 745 }; 746 747 748 #define yyerrok (yyerrstatus = 0) 749 #define yyclearin (yychar = YYEMPTY) 750 #define YYEMPTY (-2) 751 #define YYEOF 0 752 753 #define YYACCEPT goto yyacceptlab 754 #define YYABORT goto yyabortlab 755 #define YYERROR goto yyerrorlab 756 757 758 #define YYRECOVERING() (!!yyerrstatus) 759 760 #define YYBACKUP(Token, Value) \ 761 do \ 762 if (yychar == YYEMPTY) \ 763 { \ 764 yychar = (Token); \ 765 yylval = (Value); \ 766 YYPOPSTACK (yylen); \ 767 yystate = *yyssp; \ 768 goto yybackup; \ 769 } \ 770 else \ 771 { \ 772 yyerror (YY_("syntax error: cannot back up")); \ 773 YYERROR; \ 774 } \ 775 while (0) 776 777 /* Error token number */ 778 #define YYTERROR 1 779 #define YYERRCODE 256 780 781 782 783 /* Enable debugging if requested. */ 784 #if YYDEBUG 785 786 # ifndef YYFPRINTF 787 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 788 # define YYFPRINTF fprintf 789 # endif 790 791 # define YYDPRINTF(Args) \ 792 do { \ 793 if (yydebug) \ 794 YYFPRINTF Args; \ 795 } while (0) 796 797 /* This macro is provided for backward compatibility. */ 798 #ifndef YY_LOCATION_PRINT 799 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 800 #endif 801 802 803 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 804 do { \ 805 if (yydebug) \ 806 { \ 807 YYFPRINTF (stderr, "%s ", Title); \ 808 yy_symbol_print (stderr, \ 809 Type, Value); \ 810 YYFPRINTF (stderr, "\n"); \ 811 } \ 812 } while (0) 813 814 815 /*-----------------------------------. 816 | Print this symbol's value on YYO. | 817 `-----------------------------------*/ 818 819 static void 820 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) 821 { 822 FILE *yyoutput = yyo; 823 YYUSE (yyoutput); 824 if (!yyvaluep) 825 return; 826 # ifdef YYPRINT 827 if (yytype < YYNTOKENS) 828 YYPRINT (yyo, yytoknum[yytype], *yyvaluep); 829 # endif 830 YYUSE (yytype); 831 } 832 833 834 /*---------------------------. 835 | Print this symbol on YYO. | 836 `---------------------------*/ 837 838 static void 839 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) 840 { 841 YYFPRINTF (yyo, "%s %s (", 842 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 843 844 yy_symbol_value_print (yyo, yytype, yyvaluep); 845 YYFPRINTF (yyo, ")"); 846 } 847 848 /*------------------------------------------------------------------. 849 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 850 | TOP (included). | 851 `------------------------------------------------------------------*/ 852 853 static void 854 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 855 { 856 YYFPRINTF (stderr, "Stack now"); 857 for (; yybottom <= yytop; yybottom++) 858 { 859 int yybot = *yybottom; 860 YYFPRINTF (stderr, " %d", yybot); 861 } 862 YYFPRINTF (stderr, "\n"); 863 } 864 865 # define YY_STACK_PRINT(Bottom, Top) \ 866 do { \ 867 if (yydebug) \ 868 yy_stack_print ((Bottom), (Top)); \ 869 } while (0) 870 871 872 /*------------------------------------------------. 873 | Report that the YYRULE is going to be reduced. | 874 `------------------------------------------------*/ 875 876 static void 877 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 878 { 879 unsigned long yylno = yyrline[yyrule]; 880 int yynrhs = yyr2[yyrule]; 881 int yyi; 882 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 883 yyrule - 1, yylno); 884 /* The symbols being reduced. */ 885 for (yyi = 0; yyi < yynrhs; yyi++) 886 { 887 YYFPRINTF (stderr, " $%d = ", yyi + 1); 888 yy_symbol_print (stderr, 889 yystos[yyssp[yyi + 1 - yynrhs]], 890 &yyvsp[(yyi + 1) - (yynrhs)] 891 ); 892 YYFPRINTF (stderr, "\n"); 893 } 894 } 895 896 # define YY_REDUCE_PRINT(Rule) \ 897 do { \ 898 if (yydebug) \ 899 yy_reduce_print (yyssp, yyvsp, Rule); \ 900 } while (0) 901 902 /* Nonzero means print parse trace. It is left uninitialized so that 903 multiple parsers can coexist. */ 904 int yydebug; 905 #else /* !YYDEBUG */ 906 # define YYDPRINTF(Args) 907 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 908 # define YY_STACK_PRINT(Bottom, Top) 909 # define YY_REDUCE_PRINT(Rule) 910 #endif /* !YYDEBUG */ 911 912 913 /* YYINITDEPTH -- initial size of the parser's stacks. */ 914 #ifndef YYINITDEPTH 915 # define YYINITDEPTH 200 916 #endif 917 918 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 919 if the built-in stack extension method is used). 920 921 Do not make this value too large; the results are undefined if 922 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 923 evaluated with infinite-precision integer arithmetic. */ 924 925 #ifndef YYMAXDEPTH 926 # define YYMAXDEPTH 10000 927 #endif 928 929 930 #if YYERROR_VERBOSE 931 932 # ifndef yystrlen 933 # if defined __GLIBC__ && defined _STRING_H 934 # define yystrlen strlen 935 # else 936 /* Return the length of YYSTR. */ 937 static YYSIZE_T 938 yystrlen (const char *yystr) 939 { 940 YYSIZE_T yylen; 941 for (yylen = 0; yystr[yylen]; yylen++) 942 continue; 943 return yylen; 944 } 945 # endif 946 # endif 947 948 # ifndef yystpcpy 949 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 950 # define yystpcpy stpcpy 951 # else 952 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 953 YYDEST. */ 954 static char * 955 yystpcpy (char *yydest, const char *yysrc) 956 { 957 char *yyd = yydest; 958 const char *yys = yysrc; 959 960 while ((*yyd++ = *yys++) != '\0') 961 continue; 962 963 return yyd - 1; 964 } 965 # endif 966 # endif 967 968 # ifndef yytnamerr 969 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 970 quotes and backslashes, so that it's suitable for yyerror. The 971 heuristic is that double-quoting is unnecessary unless the string 972 contains an apostrophe, a comma, or backslash (other than 973 backslash-backslash). YYSTR is taken from yytname. If YYRES is 974 null, do not copy; instead, return the length of what the result 975 would have been. */ 976 static YYSIZE_T 977 yytnamerr (char *yyres, const char *yystr) 978 { 979 if (*yystr == '"') 980 { 981 YYSIZE_T yyn = 0; 982 char const *yyp = yystr; 983 984 for (;;) 985 switch (*++yyp) 986 { 987 case '\'': 988 case ',': 989 goto do_not_strip_quotes; 990 991 case '\\': 992 if (*++yyp != '\\') 993 goto do_not_strip_quotes; 994 else 995 goto append; 996 997 append: 998 default: 999 if (yyres) 1000 yyres[yyn] = *yyp; 1001 yyn++; 1002 break; 1003 1004 case '"': 1005 if (yyres) 1006 yyres[yyn] = '\0'; 1007 return yyn; 1008 } 1009 do_not_strip_quotes: ; 1010 } 1011 1012 if (! yyres) 1013 return yystrlen (yystr); 1014 1015 return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); 1016 } 1017 # endif 1018 1019 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1020 about the unexpected token YYTOKEN for the state stack whose top is 1021 YYSSP. 1022 1023 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1024 not large enough to hold the message. In that case, also set 1025 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1026 required number of bytes is too large to store. */ 1027 static int 1028 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1029 yytype_int16 *yyssp, int yytoken) 1030 { 1031 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 1032 YYSIZE_T yysize = yysize0; 1033 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1034 /* Internationalized format string. */ 1035 const char *yyformat = YY_NULLPTR; 1036 /* Arguments of yyformat. */ 1037 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1038 /* Number of reported tokens (one for the "unexpected", one per 1039 "expected"). */ 1040 int yycount = 0; 1041 1042 /* There are many possibilities here to consider: 1043 - If this state is a consistent state with a default action, then 1044 the only way this function was invoked is if the default action 1045 is an error action. In that case, don't check for expected 1046 tokens because there are none. 1047 - The only way there can be no lookahead present (in yychar) is if 1048 this state is a consistent state with a default action. Thus, 1049 detecting the absence of a lookahead is sufficient to determine 1050 that there is no unexpected or expected token to report. In that 1051 case, just report a simple "syntax error". 1052 - Don't assume there isn't a lookahead just because this state is a 1053 consistent state with a default action. There might have been a 1054 previous inconsistent state, consistent state with a non-default 1055 action, or user semantic action that manipulated yychar. 1056 - Of course, the expected token list depends on states to have 1057 correct lookahead information, and it depends on the parser not 1058 to perform extra reductions after fetching a lookahead from the 1059 scanner and before detecting a syntax error. Thus, state merging 1060 (from LALR or IELR) and default reductions corrupt the expected 1061 token list. However, the list is correct for canonical LR with 1062 one exception: it will still contain any token that will not be 1063 accepted due to an error action in a later state. 1064 */ 1065 if (yytoken != YYEMPTY) 1066 { 1067 int yyn = yypact[*yyssp]; 1068 yyarg[yycount++] = yytname[yytoken]; 1069 if (!yypact_value_is_default (yyn)) 1070 { 1071 /* Start YYX at -YYN if negative to avoid negative indexes in 1072 YYCHECK. In other words, skip the first -YYN actions for 1073 this state because they are default actions. */ 1074 int yyxbegin = yyn < 0 ? -yyn : 0; 1075 /* Stay within bounds of both yycheck and yytname. */ 1076 int yychecklim = YYLAST - yyn + 1; 1077 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1078 int yyx; 1079 1080 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1081 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1082 && !yytable_value_is_error (yytable[yyx + yyn])) 1083 { 1084 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1085 { 1086 yycount = 1; 1087 yysize = yysize0; 1088 break; 1089 } 1090 yyarg[yycount++] = yytname[yyx]; 1091 { 1092 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 1093 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) 1094 yysize = yysize1; 1095 else 1096 return 2; 1097 } 1098 } 1099 } 1100 } 1101 1102 switch (yycount) 1103 { 1104 # define YYCASE_(N, S) \ 1105 case N: \ 1106 yyformat = S; \ 1107 break 1108 default: /* Avoid compiler warnings. */ 1109 YYCASE_(0, YY_("syntax error")); 1110 YYCASE_(1, YY_("syntax error, unexpected %s")); 1111 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1112 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1113 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1114 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1115 # undef YYCASE_ 1116 } 1117 1118 { 1119 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1120 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) 1121 yysize = yysize1; 1122 else 1123 return 2; 1124 } 1125 1126 if (*yymsg_alloc < yysize) 1127 { 1128 *yymsg_alloc = 2 * yysize; 1129 if (! (yysize <= *yymsg_alloc 1130 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1131 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1132 return 1; 1133 } 1134 1135 /* Avoid sprintf, as that infringes on the user's name space. 1136 Don't have undefined behavior even if the translation 1137 produced a string with the wrong number of "%s"s. */ 1138 { 1139 char *yyp = *yymsg; 1140 int yyi = 0; 1141 while ((*yyp = *yyformat) != '\0') 1142 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1143 { 1144 yyp += yytnamerr (yyp, yyarg[yyi++]); 1145 yyformat += 2; 1146 } 1147 else 1148 { 1149 yyp++; 1150 yyformat++; 1151 } 1152 } 1153 return 0; 1154 } 1155 #endif /* YYERROR_VERBOSE */ 1156 1157 /*-----------------------------------------------. 1158 | Release the memory associated to this symbol. | 1159 `-----------------------------------------------*/ 1160 1161 static void 1162 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1163 { 1164 YYUSE (yyvaluep); 1165 if (!yymsg) 1166 yymsg = "Deleting"; 1167 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1168 1169 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1170 YYUSE (yytype); 1171 YY_IGNORE_MAYBE_UNINITIALIZED_END 1172 } 1173 1174 1175 1176 1177 /* The lookahead symbol. */ 1178 int yychar; 1179 1180 /* The semantic value of the lookahead symbol. */ 1181 YYSTYPE yylval; 1182 /* Number of syntax errors so far. */ 1183 int yynerrs; 1184 1185 1186 /*----------. 1187 | yyparse. | 1188 `----------*/ 1189 1190 int 1191 yyparse (void) 1192 { 1193 int yystate; 1194 /* Number of tokens to shift before error messages enabled. */ 1195 int yyerrstatus; 1196 1197 /* The stacks and their tools: 1198 'yyss': related to states. 1199 'yyvs': related to semantic values. 1200 1201 Refer to the stacks through separate pointers, to allow yyoverflow 1202 to reallocate them elsewhere. */ 1203 1204 /* The state stack. */ 1205 yytype_int16 yyssa[YYINITDEPTH]; 1206 yytype_int16 *yyss; 1207 yytype_int16 *yyssp; 1208 1209 /* The semantic value stack. */ 1210 YYSTYPE yyvsa[YYINITDEPTH]; 1211 YYSTYPE *yyvs; 1212 YYSTYPE *yyvsp; 1213 1214 YYSIZE_T yystacksize; 1215 1216 int yyn; 1217 int yyresult; 1218 /* Lookahead token as an internal (translated) token number. */ 1219 int yytoken = 0; 1220 /* The variables used to return semantic value and location from the 1221 action routines. */ 1222 YYSTYPE yyval; 1223 1224 #if YYERROR_VERBOSE 1225 /* Buffer for error messages, and its allocated size. */ 1226 char yymsgbuf[128]; 1227 char *yymsg = yymsgbuf; 1228 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1229 #endif 1230 1231 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1232 1233 /* The number of symbols on the RHS of the reduced rule. 1234 Keep to zero when no symbol should be popped. */ 1235 int yylen = 0; 1236 1237 yyssp = yyss = yyssa; 1238 yyvsp = yyvs = yyvsa; 1239 yystacksize = YYINITDEPTH; 1240 1241 YYDPRINTF ((stderr, "Starting parse\n")); 1242 1243 yystate = 0; 1244 yyerrstatus = 0; 1245 yynerrs = 0; 1246 yychar = YYEMPTY; /* Cause a token to be read. */ 1247 goto yysetstate; 1248 1249 1250 /*------------------------------------------------------------. 1251 | yynewstate -- push a new state, which is found in yystate. | 1252 `------------------------------------------------------------*/ 1253 yynewstate: 1254 /* In all cases, when you get here, the value and location stacks 1255 have just been pushed. So pushing a state here evens the stacks. */ 1256 yyssp++; 1257 1258 1259 /*--------------------------------------------------------------------. 1260 | yynewstate -- set current state (the top of the stack) to yystate. | 1261 `--------------------------------------------------------------------*/ 1262 yysetstate: 1263 *yyssp = (yytype_int16) yystate; 1264 1265 if (yyss + yystacksize - 1 <= yyssp) 1266 #if !defined yyoverflow && !defined YYSTACK_RELOCATE 1267 goto yyexhaustedlab; 1268 #else 1269 { 1270 /* Get the current used size of the three stacks, in elements. */ 1271 YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); 1272 1273 # if defined yyoverflow 1274 { 1275 /* Give user a chance to reallocate the stack. Use copies of 1276 these so that the &'s don't force the real ones into 1277 memory. */ 1278 YYSTYPE *yyvs1 = yyvs; 1279 yytype_int16 *yyss1 = yyss; 1280 1281 /* Each stack pointer address is followed by the size of the 1282 data in use in that stack, in bytes. This used to be a 1283 conditional around just the two extra args, but that might 1284 be undefined if yyoverflow is a macro. */ 1285 yyoverflow (YY_("memory exhausted"), 1286 &yyss1, yysize * sizeof (*yyssp), 1287 &yyvs1, yysize * sizeof (*yyvsp), 1288 &yystacksize); 1289 yyss = yyss1; 1290 yyvs = yyvs1; 1291 } 1292 # else /* defined YYSTACK_RELOCATE */ 1293 /* Extend the stack our own way. */ 1294 if (YYMAXDEPTH <= yystacksize) 1295 goto yyexhaustedlab; 1296 yystacksize *= 2; 1297 if (YYMAXDEPTH < yystacksize) 1298 yystacksize = YYMAXDEPTH; 1299 1300 { 1301 yytype_int16 *yyss1 = yyss; 1302 union yyalloc *yyptr = 1303 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1304 if (! yyptr) 1305 goto yyexhaustedlab; 1306 YYSTACK_RELOCATE (yyss_alloc, yyss); 1307 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1308 # undef YYSTACK_RELOCATE 1309 if (yyss1 != yyssa) 1310 YYSTACK_FREE (yyss1); 1311 } 1312 # endif 1313 1314 yyssp = yyss + yysize - 1; 1315 yyvsp = yyvs + yysize - 1; 1316 1317 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1318 (unsigned long) yystacksize)); 1319 1320 if (yyss + yystacksize - 1 <= yyssp) 1321 YYABORT; 1322 } 1323 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ 1324 1325 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1326 1327 if (yystate == YYFINAL) 1328 YYACCEPT; 1329 1330 goto yybackup; 1331 1332 1333 /*-----------. 1334 | yybackup. | 1335 `-----------*/ 1336 yybackup: 1337 /* Do appropriate processing given the current state. Read a 1338 lookahead token if we need one and don't already have one. */ 1339 1340 /* First try to decide what to do without reference to lookahead token. */ 1341 yyn = yypact[yystate]; 1342 if (yypact_value_is_default (yyn)) 1343 goto yydefault; 1344 1345 /* Not known => get a lookahead token if don't already have one. */ 1346 1347 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1348 if (yychar == YYEMPTY) 1349 { 1350 YYDPRINTF ((stderr, "Reading a token: ")); 1351 yychar = yylex (); 1352 } 1353 1354 if (yychar <= YYEOF) 1355 { 1356 yychar = yytoken = YYEOF; 1357 YYDPRINTF ((stderr, "Now at end of input.\n")); 1358 } 1359 else 1360 { 1361 yytoken = YYTRANSLATE (yychar); 1362 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1363 } 1364 1365 /* If the proper action on seeing token YYTOKEN is to reduce or to 1366 detect an error, take that action. */ 1367 yyn += yytoken; 1368 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1369 goto yydefault; 1370 yyn = yytable[yyn]; 1371 if (yyn <= 0) 1372 { 1373 if (yytable_value_is_error (yyn)) 1374 goto yyerrlab; 1375 yyn = -yyn; 1376 goto yyreduce; 1377 } 1378 1379 /* Count tokens shifted since error; after three, turn off error 1380 status. */ 1381 if (yyerrstatus) 1382 yyerrstatus--; 1383 1384 /* Shift the lookahead token. */ 1385 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1386 1387 /* Discard the shifted token. */ 1388 yychar = YYEMPTY; 1389 1390 yystate = yyn; 1391 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1392 *++yyvsp = yylval; 1393 YY_IGNORE_MAYBE_UNINITIALIZED_END 1394 1395 goto yynewstate; 1396 1397 1398 /*-----------------------------------------------------------. 1399 | yydefault -- do the default action for the current state. | 1400 `-----------------------------------------------------------*/ 1401 yydefault: 1402 yyn = yydefact[yystate]; 1403 if (yyn == 0) 1404 goto yyerrlab; 1405 goto yyreduce; 1406 1407 1408 /*-----------------------------. 1409 | yyreduce -- do a reduction. | 1410 `-----------------------------*/ 1411 yyreduce: 1412 /* yyn is the number of a rule to reduce with. */ 1413 yylen = yyr2[yyn]; 1414 1415 /* If YYLEN is nonzero, implement the default value of the action: 1416 '$$ = $1'. 1417 1418 Otherwise, the following line sets YYVAL to garbage. 1419 This behavior is undocumented and Bison 1420 users should not rely upon it. Assigning to YYVAL 1421 unconditionally makes the parser a bit smaller, and it avoids a 1422 GCC warning that YYVAL may be used uninitialized. */ 1423 yyval = yyvsp[1-yylen]; 1424 1425 1426 YY_REDUCE_PRINT (yyn); 1427 switch (yyn) 1428 { 1429 case 14: 1430 #line 156 "bootparse.y" /* yacc.c:1652 */ 1431 { 1432 do_start(); 1433 boot_openrel((yyvsp[0].str)); 1434 do_end(); 1435 } 1436 #line 1437 "bootparse.c" /* yacc.c:1652 */ 1437 break; 1438 1439 case 15: 1440 #line 165 "bootparse.y" /* yacc.c:1652 */ 1441 { 1442 do_start(); 1443 closerel((yyvsp[0].str)); 1444 do_end(); 1445 } 1446 #line 1447 "bootparse.c" /* yacc.c:1652 */ 1447 break; 1448 1449 case 16: 1450 #line 174 "bootparse.y" /* yacc.c:1652 */ 1451 { 1452 do_start(); 1453 numattr = 0; 1454 elog(DEBUG4, "creating%s%s relation %s %u", 1455 (yyvsp[-3].ival) ? " bootstrap" : "", 1456 (yyvsp[-2].ival) ? " shared" : "", 1457 (yyvsp[-5].str), 1458 (yyvsp[-4].oidval)); 1459 } 1460 #line 1461 "bootparse.c" /* yacc.c:1652 */ 1461 break; 1462 1463 case 17: 1464 #line 184 "bootparse.y" /* yacc.c:1652 */ 1465 { 1466 do_end(); 1467 } 1468 #line 1469 "bootparse.c" /* yacc.c:1652 */ 1469 break; 1470 1471 case 18: 1472 #line 188 "bootparse.y" /* yacc.c:1652 */ 1473 { 1474 TupleDesc tupdesc; 1475 bool shared_relation; 1476 bool mapped_relation; 1477 1478 do_start(); 1479 1480 tupdesc = CreateTupleDesc(numattr, attrtypes); 1481 1482 shared_relation = (yyvsp[-6].ival); 1483 1484 /* 1485 * The catalogs that use the relation mapper are the 1486 * bootstrap catalogs plus the shared catalogs. If this 1487 * ever gets more complicated, we should invent a BKI 1488 * keyword to mark the mapped catalogs, but for now a 1489 * quick hack seems the most appropriate thing. Note in 1490 * particular that all "nailed" heap rels (see formrdesc 1491 * in relcache.c) must be mapped. 1492 */ 1493 mapped_relation = ((yyvsp[-7].ival) || shared_relation); 1494 1495 if ((yyvsp[-7].ival)) 1496 { 1497 TransactionId relfrozenxid; 1498 MultiXactId relminmxid; 1499 1500 if (boot_reldesc) 1501 { 1502 elog(DEBUG4, "create bootstrap: warning, open relation exists, closing first"); 1503 closerel(NULL); 1504 } 1505 1506 boot_reldesc = heap_create((yyvsp[-9].str), 1507 PG_CATALOG_NAMESPACE, 1508 shared_relation ? GLOBALTABLESPACE_OID : 0, 1509 (yyvsp[-8].oidval), 1510 InvalidOid, 1511 HEAP_TABLE_AM_OID, 1512 tupdesc, 1513 RELKIND_RELATION, 1514 RELPERSISTENCE_PERMANENT, 1515 shared_relation, 1516 mapped_relation, 1517 true, 1518 &relfrozenxid, 1519 &relminmxid); 1520 elog(DEBUG4, "bootstrap relation created"); 1521 } 1522 else 1523 { 1524 Oid id; 1525 1526 id = heap_create_with_catalog((yyvsp[-9].str), 1527 PG_CATALOG_NAMESPACE, 1528 shared_relation ? GLOBALTABLESPACE_OID : 0, 1529 (yyvsp[-8].oidval), 1530 (yyvsp[-5].oidval), 1531 InvalidOid, 1532 BOOTSTRAP_SUPERUSERID, 1533 HEAP_TABLE_AM_OID, 1534 tupdesc, 1535 NIL, 1536 RELKIND_RELATION, 1537 RELPERSISTENCE_PERMANENT, 1538 shared_relation, 1539 mapped_relation, 1540 ONCOMMIT_NOOP, 1541 (Datum) 0, 1542 false, 1543 true, 1544 false, 1545 InvalidOid, 1546 NULL); 1547 elog(DEBUG4, "relation created with OID %u", id); 1548 } 1549 do_end(); 1550 } 1551 #line 1552 "bootparse.c" /* yacc.c:1652 */ 1552 break; 1553 1554 case 19: 1555 #line 270 "bootparse.y" /* yacc.c:1652 */ 1556 { 1557 do_start(); 1558 elog(DEBUG4, "inserting row"); 1559 num_columns_read = 0; 1560 } 1561 #line 1562 "bootparse.c" /* yacc.c:1652 */ 1562 break; 1563 1564 case 20: 1565 #line 276 "bootparse.y" /* yacc.c:1652 */ 1566 { 1567 if (num_columns_read != numattr) 1568 elog(ERROR, "incorrect number of columns in row (expected %d, got %d)", 1569 numattr, num_columns_read); 1570 if (boot_reldesc == NULL) 1571 elog(FATAL, "relation not open"); 1572 InsertOneTuple(); 1573 do_end(); 1574 } 1575 #line 1576 "bootparse.c" /* yacc.c:1652 */ 1576 break; 1577 1578 case 21: 1579 #line 289 "bootparse.y" /* yacc.c:1652 */ 1580 { 1581 IndexStmt *stmt = makeNode(IndexStmt); 1582 Oid relationId; 1583 1584 elog(DEBUG4, "creating index \"%s\"", (yyvsp[-8].str)); 1585 1586 do_start(); 1587 1588 stmt->idxname = (yyvsp[-8].str); 1589 stmt->relation = makeRangeVar(NULL, (yyvsp[-5].str), -1); 1590 stmt->accessMethod = (yyvsp[-3].str); 1591 stmt->tableSpace = NULL; 1592 stmt->indexParams = (yyvsp[-1].list); 1593 stmt->indexIncludingParams = NIL; 1594 stmt->options = NIL; 1595 stmt->whereClause = NULL; 1596 stmt->excludeOpNames = NIL; 1597 stmt->idxcomment = NULL; 1598 stmt->indexOid = InvalidOid; 1599 stmt->oldNode = InvalidOid; 1600 stmt->unique = false; 1601 stmt->primary = false; 1602 stmt->isconstraint = false; 1603 stmt->deferrable = false; 1604 stmt->initdeferred = false; 1605 stmt->transformed = false; 1606 stmt->concurrent = false; 1607 stmt->if_not_exists = false; 1608 stmt->reset_default_tblspc = false; 1609 1610 /* locks and races need not concern us in bootstrap mode */ 1611 relationId = RangeVarGetRelid(stmt->relation, NoLock, 1612 false); 1613 1614 DefineIndex(relationId, 1615 stmt, 1616 (yyvsp[-7].oidval), 1617 InvalidOid, 1618 InvalidOid, 1619 false, 1620 false, 1621 false, 1622 true, /* skip_build */ 1623 false); 1624 do_end(); 1625 } 1626 #line 1627 "bootparse.c" /* yacc.c:1652 */ 1627 break; 1628 1629 case 22: 1630 #line 339 "bootparse.y" /* yacc.c:1652 */ 1631 { 1632 IndexStmt *stmt = makeNode(IndexStmt); 1633 Oid relationId; 1634 1635 elog(DEBUG4, "creating unique index \"%s\"", (yyvsp[-8].str)); 1636 1637 do_start(); 1638 1639 stmt->idxname = (yyvsp[-8].str); 1640 stmt->relation = makeRangeVar(NULL, (yyvsp[-5].str), -1); 1641 stmt->accessMethod = (yyvsp[-3].str); 1642 stmt->tableSpace = NULL; 1643 stmt->indexParams = (yyvsp[-1].list); 1644 stmt->indexIncludingParams = NIL; 1645 stmt->options = NIL; 1646 stmt->whereClause = NULL; 1647 stmt->excludeOpNames = NIL; 1648 stmt->idxcomment = NULL; 1649 stmt->indexOid = InvalidOid; 1650 stmt->oldNode = InvalidOid; 1651 stmt->unique = true; 1652 stmt->primary = false; 1653 stmt->isconstraint = false; 1654 stmt->deferrable = false; 1655 stmt->initdeferred = false; 1656 stmt->transformed = false; 1657 stmt->concurrent = false; 1658 stmt->if_not_exists = false; 1659 stmt->reset_default_tblspc = false; 1660 1661 /* locks and races need not concern us in bootstrap mode */ 1662 relationId = RangeVarGetRelid(stmt->relation, NoLock, 1663 false); 1664 1665 DefineIndex(relationId, 1666 stmt, 1667 (yyvsp[-7].oidval), 1668 InvalidOid, 1669 InvalidOid, 1670 false, 1671 false, 1672 false, 1673 true, /* skip_build */ 1674 false); 1675 do_end(); 1676 } 1677 #line 1678 "bootparse.c" /* yacc.c:1652 */ 1678 break; 1679 1680 case 23: 1681 #line 389 "bootparse.y" /* yacc.c:1652 */ 1682 { 1683 elog(DEBUG4, "creating toast table for table \"%s\"", (yyvsp[0].str)); 1684 1685 do_start(); 1686 1687 BootstrapToastTable((yyvsp[0].str), (yyvsp[-3].oidval), (yyvsp[-2].oidval)); 1688 do_end(); 1689 } 1690 #line 1691 "bootparse.c" /* yacc.c:1652 */ 1691 break; 1692 1693 case 24: 1694 #line 401 "bootparse.y" /* yacc.c:1652 */ 1695 { 1696 do_start(); 1697 build_indices(); 1698 do_end(); 1699 } 1700 #line 1701 "bootparse.c" /* yacc.c:1652 */ 1701 break; 1702 1703 case 25: 1704 #line 410 "bootparse.y" /* yacc.c:1652 */ 1705 { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } 1706 #line 1707 "bootparse.c" /* yacc.c:1652 */ 1707 break; 1708 1709 case 26: 1710 #line 411 "bootparse.y" /* yacc.c:1652 */ 1711 { (yyval.list) = list_make1((yyvsp[0].ielem)); } 1712 #line 1713 "bootparse.c" /* yacc.c:1652 */ 1713 break; 1714 1715 case 27: 1716 #line 416 "bootparse.y" /* yacc.c:1652 */ 1717 { 1718 IndexElem *n = makeNode(IndexElem); 1719 n->name = (yyvsp[-1].str); 1720 n->expr = NULL; 1721 n->indexcolname = NULL; 1722 n->collation = NIL; 1723 n->opclass = list_make1(makeString((yyvsp[0].str))); 1724 n->ordering = SORTBY_DEFAULT; 1725 n->nulls_ordering = SORTBY_NULLS_DEFAULT; 1726 (yyval.ielem) = n; 1727 } 1728 #line 1729 "bootparse.c" /* yacc.c:1652 */ 1729 break; 1730 1731 case 28: 1732 #line 430 "bootparse.y" /* yacc.c:1652 */ 1733 { (yyval.ival) = 1; } 1734 #line 1735 "bootparse.c" /* yacc.c:1652 */ 1735 break; 1736 1737 case 29: 1738 #line 431 "bootparse.y" /* yacc.c:1652 */ 1739 { (yyval.ival) = 0; } 1740 #line 1741 "bootparse.c" /* yacc.c:1652 */ 1741 break; 1742 1743 case 30: 1744 #line 435 "bootparse.y" /* yacc.c:1652 */ 1745 { (yyval.ival) = 1; } 1746 #line 1747 "bootparse.c" /* yacc.c:1652 */ 1747 break; 1748 1749 case 31: 1750 #line 436 "bootparse.y" /* yacc.c:1652 */ 1751 { (yyval.ival) = 0; } 1752 #line 1753 "bootparse.c" /* yacc.c:1652 */ 1753 break; 1754 1755 case 32: 1756 #line 440 "bootparse.y" /* yacc.c:1652 */ 1757 { (yyval.oidval) = (yyvsp[0].oidval); } 1758 #line 1759 "bootparse.c" /* yacc.c:1652 */ 1759 break; 1760 1761 case 33: 1762 #line 441 "bootparse.y" /* yacc.c:1652 */ 1763 { (yyval.oidval) = InvalidOid; } 1764 #line 1765 "bootparse.c" /* yacc.c:1652 */ 1765 break; 1766 1767 case 36: 1768 #line 451 "bootparse.y" /* yacc.c:1652 */ 1769 { 1770 if (++numattr > MAXATTR) 1771 elog(FATAL, "too many columns"); 1772 DefineAttr((yyvsp[-3].str), (yyvsp[-1].str), numattr-1, (yyvsp[0].ival)); 1773 } 1774 #line 1775 "bootparse.c" /* yacc.c:1652 */ 1775 break; 1776 1777 case 37: 1778 #line 459 "bootparse.y" /* yacc.c:1652 */ 1779 { (yyval.ival) = BOOTCOL_NULL_FORCE_NOT_NULL; } 1780 #line 1781 "bootparse.c" /* yacc.c:1652 */ 1781 break; 1782 1783 case 38: 1784 #line 460 "bootparse.y" /* yacc.c:1652 */ 1785 { (yyval.ival) = BOOTCOL_NULL_FORCE_NULL; } 1786 #line 1787 "bootparse.c" /* yacc.c:1652 */ 1787 break; 1788 1789 case 39: 1790 #line 461 "bootparse.y" /* yacc.c:1652 */ 1791 { (yyval.ival) = BOOTCOL_NULL_AUTO; } 1792 #line 1793 "bootparse.c" /* yacc.c:1652 */ 1793 break; 1794 1795 case 40: 1796 #line 465 "bootparse.y" /* yacc.c:1652 */ 1797 { (yyval.oidval) = atooid((yyvsp[0].str)); } 1798 #line 1799 "bootparse.c" /* yacc.c:1652 */ 1799 break; 1800 1801 case 44: 1802 #line 476 "bootparse.y" /* yacc.c:1652 */ 1803 { InsertOneValue((yyvsp[0].str), num_columns_read++); } 1804 #line 1805 "bootparse.c" /* yacc.c:1652 */ 1805 break; 1806 1807 case 45: 1808 #line 478 "bootparse.y" /* yacc.c:1652 */ 1809 { InsertOneNull(num_columns_read++); } 1810 #line 1811 "bootparse.c" /* yacc.c:1652 */ 1811 break; 1812 1813 case 46: 1814 #line 482 "bootparse.y" /* yacc.c:1652 */ 1815 { (yyval.str) = (yyvsp[0].str); } 1816 #line 1817 "bootparse.c" /* yacc.c:1652 */ 1817 break; 1818 1819 case 47: 1820 #line 483 "bootparse.y" /* yacc.c:1652 */ 1821 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1822 #line 1823 "bootparse.c" /* yacc.c:1652 */ 1823 break; 1824 1825 case 48: 1826 #line 484 "bootparse.y" /* yacc.c:1652 */ 1827 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1828 #line 1829 "bootparse.c" /* yacc.c:1652 */ 1829 break; 1830 1831 case 49: 1832 #line 485 "bootparse.y" /* yacc.c:1652 */ 1833 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1834 #line 1835 "bootparse.c" /* yacc.c:1652 */ 1835 break; 1836 1837 case 50: 1838 #line 486 "bootparse.y" /* yacc.c:1652 */ 1839 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1840 #line 1841 "bootparse.c" /* yacc.c:1652 */ 1841 break; 1842 1843 case 51: 1844 #line 487 "bootparse.y" /* yacc.c:1652 */ 1845 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1846 #line 1847 "bootparse.c" /* yacc.c:1652 */ 1847 break; 1848 1849 case 52: 1850 #line 488 "bootparse.y" /* yacc.c:1652 */ 1851 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1852 #line 1853 "bootparse.c" /* yacc.c:1652 */ 1853 break; 1854 1855 case 53: 1856 #line 489 "bootparse.y" /* yacc.c:1652 */ 1857 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1858 #line 1859 "bootparse.c" /* yacc.c:1652 */ 1859 break; 1860 1861 case 54: 1862 #line 490 "bootparse.y" /* yacc.c:1652 */ 1863 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1864 #line 1865 "bootparse.c" /* yacc.c:1652 */ 1865 break; 1866 1867 case 55: 1868 #line 491 "bootparse.y" /* yacc.c:1652 */ 1869 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1870 #line 1871 "bootparse.c" /* yacc.c:1652 */ 1871 break; 1872 1873 case 56: 1874 #line 492 "bootparse.y" /* yacc.c:1652 */ 1875 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1876 #line 1877 "bootparse.c" /* yacc.c:1652 */ 1877 break; 1878 1879 case 57: 1880 #line 493 "bootparse.y" /* yacc.c:1652 */ 1881 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1882 #line 1883 "bootparse.c" /* yacc.c:1652 */ 1883 break; 1884 1885 case 58: 1886 #line 494 "bootparse.y" /* yacc.c:1652 */ 1887 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1888 #line 1889 "bootparse.c" /* yacc.c:1652 */ 1889 break; 1890 1891 case 59: 1892 #line 495 "bootparse.y" /* yacc.c:1652 */ 1893 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1894 #line 1895 "bootparse.c" /* yacc.c:1652 */ 1895 break; 1896 1897 case 60: 1898 #line 496 "bootparse.y" /* yacc.c:1652 */ 1899 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1900 #line 1901 "bootparse.c" /* yacc.c:1652 */ 1901 break; 1902 1903 case 61: 1904 #line 497 "bootparse.y" /* yacc.c:1652 */ 1905 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1906 #line 1907 "bootparse.c" /* yacc.c:1652 */ 1907 break; 1908 1909 case 62: 1910 #line 498 "bootparse.y" /* yacc.c:1652 */ 1911 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1912 #line 1913 "bootparse.c" /* yacc.c:1652 */ 1913 break; 1914 1915 case 63: 1916 #line 499 "bootparse.y" /* yacc.c:1652 */ 1917 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1918 #line 1919 "bootparse.c" /* yacc.c:1652 */ 1919 break; 1920 1921 case 64: 1922 #line 500 "bootparse.y" /* yacc.c:1652 */ 1923 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1924 #line 1925 "bootparse.c" /* yacc.c:1652 */ 1925 break; 1926 1927 case 65: 1928 #line 501 "bootparse.y" /* yacc.c:1652 */ 1929 { (yyval.str) = pstrdup((yyvsp[0].kw)); } 1930 #line 1931 "bootparse.c" /* yacc.c:1652 */ 1931 break; 1932 1933 1934 #line 1935 "bootparse.c" /* yacc.c:1652 */ 1935 default: break; 1936 } 1937 /* User semantic actions sometimes alter yychar, and that requires 1938 that yytoken be updated with the new translation. We take the 1939 approach of translating immediately before every use of yytoken. 1940 One alternative is translating here after every semantic action, 1941 but that translation would be missed if the semantic action invokes 1942 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 1943 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 1944 incorrect destructor might then be invoked immediately. In the 1945 case of YYERROR or YYBACKUP, subsequent parser actions might lead 1946 to an incorrect destructor call or verbose syntax error message 1947 before the lookahead is translated. */ 1948 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1949 1950 YYPOPSTACK (yylen); 1951 yylen = 0; 1952 YY_STACK_PRINT (yyss, yyssp); 1953 1954 *++yyvsp = yyval; 1955 1956 /* Now 'shift' the result of the reduction. Determine what state 1957 that goes to, based on the state we popped back to and the rule 1958 number reduced by. */ 1959 { 1960 const int yylhs = yyr1[yyn] - YYNTOKENS; 1961 const int yyi = yypgoto[yylhs] + *yyssp; 1962 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp 1963 ? yytable[yyi] 1964 : yydefgoto[yylhs]); 1965 } 1966 1967 goto yynewstate; 1968 1969 1970 /*--------------------------------------. 1971 | yyerrlab -- here on detecting error. | 1972 `--------------------------------------*/ 1973 yyerrlab: 1974 /* Make sure we have latest lookahead translation. See comments at 1975 user semantic actions for why this is necessary. */ 1976 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 1977 1978 /* If not already recovering from an error, report this error. */ 1979 if (!yyerrstatus) 1980 { 1981 ++yynerrs; 1982 #if ! YYERROR_VERBOSE 1983 yyerror (YY_("syntax error")); 1984 #else 1985 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1986 yyssp, yytoken) 1987 { 1988 char const *yymsgp = YY_("syntax error"); 1989 int yysyntax_error_status; 1990 yysyntax_error_status = YYSYNTAX_ERROR; 1991 if (yysyntax_error_status == 0) 1992 yymsgp = yymsg; 1993 else if (yysyntax_error_status == 1) 1994 { 1995 if (yymsg != yymsgbuf) 1996 YYSTACK_FREE (yymsg); 1997 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 1998 if (!yymsg) 1999 { 2000 yymsg = yymsgbuf; 2001 yymsg_alloc = sizeof yymsgbuf; 2002 yysyntax_error_status = 2; 2003 } 2004 else 2005 { 2006 yysyntax_error_status = YYSYNTAX_ERROR; 2007 yymsgp = yymsg; 2008 } 2009 } 2010 yyerror (yymsgp); 2011 if (yysyntax_error_status == 2) 2012 goto yyexhaustedlab; 2013 } 2014 # undef YYSYNTAX_ERROR 2015 #endif 2016 } 2017 2018 2019 2020 if (yyerrstatus == 3) 2021 { 2022 /* If just tried and failed to reuse lookahead token after an 2023 error, discard it. */ 2024 2025 if (yychar <= YYEOF) 2026 { 2027 /* Return failure if at end of input. */ 2028 if (yychar == YYEOF) 2029 YYABORT; 2030 } 2031 else 2032 { 2033 yydestruct ("Error: discarding", 2034 yytoken, &yylval); 2035 yychar = YYEMPTY; 2036 } 2037 } 2038 2039 /* Else will try to reuse lookahead token after shifting the error 2040 token. */ 2041 goto yyerrlab1; 2042 2043 2044 /*---------------------------------------------------. 2045 | yyerrorlab -- error raised explicitly by YYERROR. | 2046 `---------------------------------------------------*/ 2047 yyerrorlab: 2048 /* Pacify compilers when the user code never invokes YYERROR and the 2049 label yyerrorlab therefore never appears in user code. */ 2050 if (0) 2051 YYERROR; 2052 2053 /* Do not reclaim the symbols of the rule whose action triggered 2054 this YYERROR. */ 2055 YYPOPSTACK (yylen); 2056 yylen = 0; 2057 YY_STACK_PRINT (yyss, yyssp); 2058 yystate = *yyssp; 2059 goto yyerrlab1; 2060 2061 2062 /*-------------------------------------------------------------. 2063 | yyerrlab1 -- common code for both syntax error and YYERROR. | 2064 `-------------------------------------------------------------*/ 2065 yyerrlab1: 2066 yyerrstatus = 3; /* Each real token shifted decrements this. */ 2067 2068 for (;;) 2069 { 2070 yyn = yypact[yystate]; 2071 if (!yypact_value_is_default (yyn)) 2072 { 2073 yyn += YYTERROR; 2074 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 2075 { 2076 yyn = yytable[yyn]; 2077 if (0 < yyn) 2078 break; 2079 } 2080 } 2081 2082 /* Pop the current state because it cannot handle the error token. */ 2083 if (yyssp == yyss) 2084 YYABORT; 2085 2086 2087 yydestruct ("Error: popping", 2088 yystos[yystate], yyvsp); 2089 YYPOPSTACK (1); 2090 yystate = *yyssp; 2091 YY_STACK_PRINT (yyss, yyssp); 2092 } 2093 2094 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 2095 *++yyvsp = yylval; 2096 YY_IGNORE_MAYBE_UNINITIALIZED_END 2097 2098 2099 /* Shift the error token. */ 2100 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2101 2102 yystate = yyn; 2103 goto yynewstate; 2104 2105 2106 /*-------------------------------------. 2107 | yyacceptlab -- YYACCEPT comes here. | 2108 `-------------------------------------*/ 2109 yyacceptlab: 2110 yyresult = 0; 2111 goto yyreturn; 2112 2113 2114 /*-----------------------------------. 2115 | yyabortlab -- YYABORT comes here. | 2116 `-----------------------------------*/ 2117 yyabortlab: 2118 yyresult = 1; 2119 goto yyreturn; 2120 2121 2122 #if !defined yyoverflow || YYERROR_VERBOSE 2123 /*-------------------------------------------------. 2124 | yyexhaustedlab -- memory exhaustion comes here. | 2125 `-------------------------------------------------*/ 2126 yyexhaustedlab: 2127 yyerror (YY_("memory exhausted")); 2128 yyresult = 2; 2129 /* Fall through. */ 2130 #endif 2131 2132 2133 /*-----------------------------------------------------. 2134 | yyreturn -- parsing is finished, return the result. | 2135 `-----------------------------------------------------*/ 2136 yyreturn: 2137 if (yychar != YYEMPTY) 2138 { 2139 /* Make sure we have latest lookahead translation. See comments at 2140 user semantic actions for why this is necessary. */ 2141 yytoken = YYTRANSLATE (yychar); 2142 yydestruct ("Cleanup: discarding lookahead", 2143 yytoken, &yylval); 2144 } 2145 /* Do not reclaim the symbols of the rule whose action triggered 2146 this YYABORT or YYACCEPT. */ 2147 YYPOPSTACK (yylen); 2148 YY_STACK_PRINT (yyss, yyssp); 2149 while (yyssp != yyss) 2150 { 2151 yydestruct ("Cleanup: popping", 2152 yystos[*yyssp], yyvsp); 2153 YYPOPSTACK (1); 2154 } 2155 #ifndef yyoverflow 2156 if (yyss != yyssa) 2157 YYSTACK_FREE (yyss); 2158 #endif 2159 #if YYERROR_VERBOSE 2160 if (yymsg != yymsgbuf) 2161 YYSTACK_FREE (yymsg); 2162 #endif 2163 return yyresult; 2164 } 2165 #line 503 "bootparse.y" /* yacc.c:1918 */ 2166 2167 2168 #include "bootscanner.c" 2169