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