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