Line data Source code
1 : /* A Bison parser, made by GNU Bison 3.7.5. */
2 :
3 : /* Bison implementation for Yacc-like parsers in C
4 :
5 : Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 : /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 : especially those whose name start with YY_ or yy_. They are
39 : private implementation details that can be changed or removed. */
40 :
41 : /* All symbols defined below should begin with yy or YY, to avoid
42 : infringing on user name space. This should be done even for local
43 : variables, as they might otherwise be expanded by user macros.
44 : There are some unavoidable exceptions within include files to
45 : define necessary library symbols; they are noted "INFRINGES ON
46 : USER NAME SPACE" below. */
47 :
48 : /* Identify Bison output, and Bison version. */
49 : #define YYBISON 30705
50 :
51 : /* Bison version string. */
52 : #define YYBISON_VERSION "3.7.5"
53 :
54 : /* Skeleton name. */
55 : #define YYSKELETON_NAME "yacc.c"
56 :
57 : /* Pure parsers. */
58 : #define YYPURE 0
59 :
60 : /* Push parsers. */
61 : #define YYPUSH 0
62 :
63 : /* Pull parsers. */
64 : #define YYPULL 1
65 :
66 :
67 : /* Substitute the variable and function names. */
68 : #define yyparse spec_yyparse
69 : #define yylex spec_yylex
70 : #define yyerror spec_yyerror
71 : #define yydebug spec_yydebug
72 : #define yynerrs spec_yynerrs
73 : #define yylval spec_yylval
74 : #define yychar spec_yychar
75 :
76 : /* First part of user prologue. */
77 : #line 1 "specparse.y"
78 :
79 : /*-------------------------------------------------------------------------
80 : *
81 : * specparse.y
82 : * bison grammar for the isolation test file format
83 : *
84 : * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
85 : * Portions Copyright (c) 1994, Regents of the University of California
86 : *
87 : *-------------------------------------------------------------------------
88 : */
89 :
90 : #include "postgres_fe.h"
91 :
92 : #include "isolationtester.h"
93 : #include "specparse.h"
94 :
95 : /* silence -Wmissing-variable-declarations */
96 : extern int spec_yychar;
97 : extern int spec_yynerrs;
98 :
99 : TestSpec parseresult; /* result of parsing is left here */
100 :
101 :
102 : #line 103 "specparse.c"
103 :
104 : # ifndef YY_CAST
105 : # ifdef __cplusplus
106 : # define YY_CAST(Type, Val) static_cast<Type> (Val)
107 : # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
108 : # else
109 : # define YY_CAST(Type, Val) ((Type) (Val))
110 : # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
111 : # endif
112 : # endif
113 : # ifndef YY_NULLPTR
114 : # if defined __cplusplus
115 : # if 201103L <= __cplusplus
116 : # define YY_NULLPTR nullptr
117 : # else
118 : # define YY_NULLPTR 0
119 : # endif
120 : # else
121 : # define YY_NULLPTR ((void*)0)
122 : # endif
123 : # endif
124 :
125 : #include "specparse.h"
126 : /* Symbol kind. */
127 : enum yysymbol_kind_t
128 : {
129 : YYSYMBOL_YYEMPTY = -2,
130 : YYSYMBOL_YYEOF = 0, /* "end of file" */
131 : YYSYMBOL_YYerror = 1, /* error */
132 : YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
133 : YYSYMBOL_sqlblock = 3, /* sqlblock */
134 : YYSYMBOL_identifier = 4, /* identifier */
135 : YYSYMBOL_INTEGER = 5, /* INTEGER */
136 : YYSYMBOL_NOTICES = 6, /* NOTICES */
137 : YYSYMBOL_PERMUTATION = 7, /* PERMUTATION */
138 : YYSYMBOL_SESSION = 8, /* SESSION */
139 : YYSYMBOL_SETUP = 9, /* SETUP */
140 : YYSYMBOL_STEP = 10, /* STEP */
141 : YYSYMBOL_TEARDOWN = 11, /* TEARDOWN */
142 : YYSYMBOL_TEST = 12, /* TEST */
143 : YYSYMBOL_13_ = 13, /* '(' */
144 : YYSYMBOL_14_ = 14, /* ')' */
145 : YYSYMBOL_15_ = 15, /* ',' */
146 : YYSYMBOL_16_ = 16, /* '*' */
147 : YYSYMBOL_YYACCEPT = 17, /* $accept */
148 : YYSYMBOL_TestSpec = 18, /* TestSpec */
149 : YYSYMBOL_setup_list = 19, /* setup_list */
150 : YYSYMBOL_opt_setup = 20, /* opt_setup */
151 : YYSYMBOL_setup = 21, /* setup */
152 : YYSYMBOL_opt_teardown = 22, /* opt_teardown */
153 : YYSYMBOL_session_list = 23, /* session_list */
154 : YYSYMBOL_session = 24, /* session */
155 : YYSYMBOL_step_list = 25, /* step_list */
156 : YYSYMBOL_step = 26, /* step */
157 : YYSYMBOL_opt_permutation_list = 27, /* opt_permutation_list */
158 : YYSYMBOL_permutation_list = 28, /* permutation_list */
159 : YYSYMBOL_permutation = 29, /* permutation */
160 : YYSYMBOL_permutation_step_list = 30, /* permutation_step_list */
161 : YYSYMBOL_permutation_step = 31, /* permutation_step */
162 : YYSYMBOL_blocker_list = 32, /* blocker_list */
163 : YYSYMBOL_blocker = 33 /* blocker */
164 : };
165 : typedef enum yysymbol_kind_t yysymbol_kind_t;
166 :
167 :
168 :
169 :
170 : #ifdef short
171 : # undef short
172 : #endif
173 :
174 : /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
175 : <limits.h> and (if available) <stdint.h> are included
176 : so that the code can choose integer types of a good width. */
177 :
178 : #ifndef __PTRDIFF_MAX__
179 : # include <limits.h> /* INFRINGES ON USER NAME SPACE */
180 : # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
181 : # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
182 : # define YY_STDINT_H
183 : # endif
184 : #endif
185 :
186 : /* Narrow types that promote to a signed type and that can represent a
187 : signed or unsigned integer of at least N bits. In tables they can
188 : save space and decrease cache pressure. Promoting to a signed type
189 : helps avoid bugs in integer arithmetic. */
190 :
191 : #ifdef __INT_LEAST8_MAX__
192 : typedef __INT_LEAST8_TYPE__ yytype_int8;
193 : #elif defined YY_STDINT_H
194 : typedef int_least8_t yytype_int8;
195 : #else
196 : typedef signed char yytype_int8;
197 : #endif
198 :
199 : #ifdef __INT_LEAST16_MAX__
200 : typedef __INT_LEAST16_TYPE__ yytype_int16;
201 : #elif defined YY_STDINT_H
202 : typedef int_least16_t yytype_int16;
203 : #else
204 : typedef short yytype_int16;
205 : #endif
206 :
207 : /* Work around bug in HP-UX 11.23, which defines these macros
208 : incorrectly for preprocessor constants. This workaround can likely
209 : be removed in 2023, as HPE has promised support for HP-UX 11.23
210 : (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
211 : <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
212 : #ifdef __hpux
213 : # undef UINT_LEAST8_MAX
214 : # undef UINT_LEAST16_MAX
215 : # define UINT_LEAST8_MAX 255
216 : # define UINT_LEAST16_MAX 65535
217 : #endif
218 :
219 : #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
220 : typedef __UINT_LEAST8_TYPE__ yytype_uint8;
221 : #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
222 : && UINT_LEAST8_MAX <= INT_MAX)
223 : typedef uint_least8_t yytype_uint8;
224 : #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
225 : typedef unsigned char yytype_uint8;
226 : #else
227 : typedef short yytype_uint8;
228 : #endif
229 :
230 : #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
231 : typedef __UINT_LEAST16_TYPE__ yytype_uint16;
232 : #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
233 : && UINT_LEAST16_MAX <= INT_MAX)
234 : typedef uint_least16_t yytype_uint16;
235 : #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
236 : typedef unsigned short yytype_uint16;
237 : #else
238 : typedef int yytype_uint16;
239 : #endif
240 :
241 : #ifndef YYPTRDIFF_T
242 : # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
243 : # define YYPTRDIFF_T __PTRDIFF_TYPE__
244 : # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
245 : # elif defined PTRDIFF_MAX
246 : # ifndef ptrdiff_t
247 : # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
248 : # endif
249 : # define YYPTRDIFF_T ptrdiff_t
250 : # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
251 : # else
252 : # define YYPTRDIFF_T long
253 : # define YYPTRDIFF_MAXIMUM LONG_MAX
254 : # endif
255 : #endif
256 :
257 : #ifndef YYSIZE_T
258 : # ifdef __SIZE_TYPE__
259 : # define YYSIZE_T __SIZE_TYPE__
260 : # elif defined size_t
261 : # define YYSIZE_T size_t
262 : # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
263 : # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
264 : # define YYSIZE_T size_t
265 : # else
266 : # define YYSIZE_T unsigned
267 : # endif
268 : #endif
269 :
270 : #define YYSIZE_MAXIMUM \
271 : YY_CAST (YYPTRDIFF_T, \
272 : (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
273 : ? YYPTRDIFF_MAXIMUM \
274 : : YY_CAST (YYSIZE_T, -1)))
275 :
276 : #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
277 :
278 :
279 : /* Stored state numbers (used for stacks). */
280 : typedef yytype_int8 yy_state_t;
281 :
282 : /* State numbers in computations. */
283 : typedef int yy_state_fast_t;
284 :
285 : #ifndef YY_
286 : # if defined YYENABLE_NLS && YYENABLE_NLS
287 : # if ENABLE_NLS
288 : # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
289 : # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
290 : # endif
291 : # endif
292 : # ifndef YY_
293 : # define YY_(Msgid) Msgid
294 : # endif
295 : #endif
296 :
297 :
298 : #ifndef YY_ATTRIBUTE_PURE
299 : # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
300 : # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
301 : # else
302 : # define YY_ATTRIBUTE_PURE
303 : # endif
304 : #endif
305 :
306 : #ifndef YY_ATTRIBUTE_UNUSED
307 : # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
308 : # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
309 : # else
310 : # define YY_ATTRIBUTE_UNUSED
311 : # endif
312 : #endif
313 :
314 : /* Suppress unused-variable warnings by "using" E. */
315 : #if ! defined lint || defined __GNUC__
316 : # define YY_USE(E) ((void) (E))
317 : #else
318 : # define YY_USE(E) /* empty */
319 : #endif
320 :
321 : #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
322 : /* Suppress an incorrect diagnostic about yylval being uninitialized. */
323 : # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
324 : _Pragma ("GCC diagnostic push") \
325 : _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
326 : _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
327 : # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
328 : _Pragma ("GCC diagnostic pop")
329 : #else
330 : # define YY_INITIAL_VALUE(Value) Value
331 : #endif
332 : #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
333 : # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
334 : # define YY_IGNORE_MAYBE_UNINITIALIZED_END
335 : #endif
336 : #ifndef YY_INITIAL_VALUE
337 : # define YY_INITIAL_VALUE(Value) /* Nothing. */
338 : #endif
339 :
340 : #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
341 : # define YY_IGNORE_USELESS_CAST_BEGIN \
342 : _Pragma ("GCC diagnostic push") \
343 : _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
344 : # define YY_IGNORE_USELESS_CAST_END \
345 : _Pragma ("GCC diagnostic pop")
346 : #endif
347 : #ifndef YY_IGNORE_USELESS_CAST_BEGIN
348 : # define YY_IGNORE_USELESS_CAST_BEGIN
349 : # define YY_IGNORE_USELESS_CAST_END
350 : #endif
351 :
352 :
353 : #define YY_ASSERT(E) ((void) (0 && (E)))
354 :
355 : #if !defined yyoverflow
356 :
357 : /* The parser invokes alloca or malloc; define the necessary symbols. */
358 :
359 : # ifdef YYSTACK_USE_ALLOCA
360 : # if YYSTACK_USE_ALLOCA
361 : # ifdef __GNUC__
362 : # define YYSTACK_ALLOC __builtin_alloca
363 : # elif defined __BUILTIN_VA_ARG_INCR
364 : # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
365 : # elif defined _AIX
366 : # define YYSTACK_ALLOC __alloca
367 : # elif defined _MSC_VER
368 : # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
369 : # define alloca _alloca
370 : # else
371 : # define YYSTACK_ALLOC alloca
372 : # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
373 : # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
374 : /* Use EXIT_SUCCESS as a witness for stdlib.h. */
375 : # ifndef EXIT_SUCCESS
376 : # define EXIT_SUCCESS 0
377 : # endif
378 : # endif
379 : # endif
380 : # endif
381 : # endif
382 :
383 : # ifdef YYSTACK_ALLOC
384 : /* Pacify GCC's 'empty if-body' warning. */
385 : # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
386 : # ifndef YYSTACK_ALLOC_MAXIMUM
387 : /* The OS might guarantee only one guard page at the bottom of the stack,
388 : and a page size can be as small as 4096 bytes. So we cannot safely
389 : invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
390 : to allow for a few compiler-allocated temporary stack slots. */
391 : # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
392 : # endif
393 : # else
394 : # define YYSTACK_ALLOC YYMALLOC
395 : # define YYSTACK_FREE YYFREE
396 : # ifndef YYSTACK_ALLOC_MAXIMUM
397 : # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
398 : # endif
399 : # if (defined __cplusplus && ! defined EXIT_SUCCESS \
400 : && ! ((defined YYMALLOC || defined malloc) \
401 : && (defined YYFREE || defined free)))
402 : # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
403 : # ifndef EXIT_SUCCESS
404 : # define EXIT_SUCCESS 0
405 : # endif
406 : # endif
407 : # ifndef YYMALLOC
408 : # define YYMALLOC malloc
409 : # if ! defined malloc && ! defined EXIT_SUCCESS
410 : void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
411 : # endif
412 : # endif
413 : # ifndef YYFREE
414 : # define YYFREE free
415 : # if ! defined free && ! defined EXIT_SUCCESS
416 : void free (void *); /* INFRINGES ON USER NAME SPACE */
417 : # endif
418 : # endif
419 : # endif
420 : #endif /* !defined yyoverflow */
421 :
422 : #if (! defined yyoverflow \
423 : && (! defined __cplusplus \
424 : || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
425 :
426 : /* A type that is properly aligned for any stack member. */
427 : union yyalloc
428 : {
429 : yy_state_t yyss_alloc;
430 : YYSTYPE yyvs_alloc;
431 : };
432 :
433 : /* The size of the maximum gap between one aligned stack and the next. */
434 : # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
435 :
436 : /* The size of an array large to enough to hold all stacks, each with
437 : N elements. */
438 : # define YYSTACK_BYTES(N) \
439 : ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
440 : + YYSTACK_GAP_MAXIMUM)
441 :
442 : # define YYCOPY_NEEDED 1
443 :
444 : /* Relocate STACK from its old location to the new one. The
445 : local variables YYSIZE and YYSTACKSIZE give the old and new number of
446 : elements in the stack, and YYPTR gives the new location of the
447 : stack. Advance YYPTR to a properly aligned location for the next
448 : stack. */
449 : # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
450 : do \
451 : { \
452 : YYPTRDIFF_T yynewbytes; \
453 : YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
454 : Stack = &yyptr->Stack_alloc; \
455 : yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
456 : yyptr += yynewbytes / YYSIZEOF (*yyptr); \
457 : } \
458 : while (0)
459 :
460 : #endif
461 :
462 : #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
463 : /* Copy COUNT objects from SRC to DST. The source and destination do
464 : not overlap. */
465 : # ifndef YYCOPY
466 : # if defined __GNUC__ && 1 < __GNUC__
467 : # define YYCOPY(Dst, Src, Count) \
468 : __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
469 : # else
470 : # define YYCOPY(Dst, Src, Count) \
471 : do \
472 : { \
473 : YYPTRDIFF_T yyi; \
474 : for (yyi = 0; yyi < (Count); yyi++) \
475 : (Dst)[yyi] = (Src)[yyi]; \
476 : } \
477 : while (0)
478 : # endif
479 : # endif
480 : #endif /* !YYCOPY_NEEDED */
481 :
482 : /* YYFINAL -- State number of the termination state. */
483 : #define YYFINAL 3
484 : /* YYLAST -- Last index in YYTABLE. */
485 : #define YYLAST 41
486 :
487 : /* YYNTOKENS -- Number of terminals. */
488 : #define YYNTOKENS 17
489 : /* YYNNTS -- Number of nonterminals. */
490 : #define YYNNTS 17
491 : /* YYNRULES -- Number of rules. */
492 : #define YYNRULES 29
493 : /* YYNSTATES -- Number of states. */
494 : #define YYNSTATES 43
495 :
496 : /* YYMAXUTOK -- Last valid token kind. */
497 : #define YYMAXUTOK 267
498 :
499 :
500 : /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
501 : as returned by yylex, with out-of-bounds checking. */
502 : #define YYTRANSLATE(YYX) \
503 : (0 <= (YYX) && (YYX) <= YYMAXUTOK \
504 : ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
505 : : YYSYMBOL_YYUNDEF)
506 :
507 : /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
508 : as returned by yylex. */
509 : static const yytype_int8 yytranslate[] =
510 : {
511 : 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
512 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
515 : 13, 14, 16, 2, 15, 2, 2, 2, 2, 2,
516 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 : 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
537 : 5, 6, 7, 8, 9, 10, 11, 12
538 : };
539 :
540 : #if YYDEBUG
541 : /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
542 : static const yytype_int16 yyrline[] =
543 : {
544 : 0, 63, 63, 80, 84, 94, 95, 99, 103, 104,
545 : 108, 115, 124, 136, 143, 153, 165, 170, 176, 183,
546 : 193, 202, 209, 218, 226, 237, 244, 253, 262, 271
547 : };
548 : #endif
549 :
550 : /** Accessing symbol of state STATE. */
551 : #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
552 :
553 : #if YYDEBUG || 0
554 : /* The user-facing name of the symbol whose (internal) number is
555 : YYSYMBOL. No bounds checking. */
556 : static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
557 :
558 : /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
559 : First, the terminals, then, starting at YYNTOKENS, nonterminals. */
560 : static const char *const yytname[] =
561 : {
562 : "\"end of file\"", "error", "\"invalid token\"", "sqlblock",
563 : "identifier", "INTEGER", "NOTICES", "PERMUTATION", "SESSION", "SETUP",
564 : "STEP", "TEARDOWN", "TEST", "'('", "')'", "','", "'*'", "$accept",
565 : "TestSpec", "setup_list", "opt_setup", "setup", "opt_teardown",
566 : "session_list", "session", "step_list", "step", "opt_permutation_list",
567 : "permutation_list", "permutation", "permutation_step_list",
568 : "permutation_step", "blocker_list", "blocker", YY_NULLPTR
569 : };
570 :
571 : static const char *
572 : yysymbol_name (yysymbol_kind_t yysymbol)
573 : {
574 : return yytname[yysymbol];
575 : }
576 : #endif
577 :
578 : #ifdef YYPRINT
579 : /* YYTOKNUM[NUM] -- (External) token number corresponding to the
580 : (internal) symbol number NUM (which must be that of a token). */
581 : static const yytype_int16 yytoknum[] =
582 : {
583 : 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
584 : 265, 266, 267, 40, 41, 44, 42
585 : };
586 : #endif
587 :
588 : #define YYPACT_NINF (-14)
589 :
590 : #define yypact_value_is_default(Yyn) \
591 : ((Yyn) == YYPACT_NINF)
592 :
593 : #define YYTABLE_NINF (-1)
594 :
595 : #define yytable_value_is_error(Yyn) \
596 : 0
597 :
598 : /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
599 : STATE-NUM. */
600 : static const yytype_int8 yypact[] =
601 : {
602 : -14, 2, -8, -14, 3, 4, -14, 7, -14, -14,
603 : 6, -3, -14, 8, 12, -14, -14, 11, -14, 1,
604 : -14, 9, 12, -14, -14, 15, -2, -14, -4, -14,
605 : 17, -14, -14, 18, -14, -1, -14, -14, 16, -14,
606 : -4, -14, -14
607 : };
608 :
609 : /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
610 : Performed when YYTABLE does not specify something else to do. Zero
611 : means the default is an error. */
612 : static const yytype_int8 yydefact[] =
613 : {
614 : 3, 0, 8, 1, 0, 0, 4, 0, 7, 9,
615 : 0, 17, 11, 5, 0, 10, 2, 16, 19, 0,
616 : 6, 23, 20, 22, 18, 0, 8, 14, 0, 21,
617 : 0, 12, 13, 27, 29, 0, 26, 15, 0, 24,
618 : 0, 28, 25
619 : };
620 :
621 : /* YYPGOTO[NTERM-NUM]. */
622 : static const yytype_int8 yypgoto[] =
623 : {
624 : -14, -14, -14, -14, 10, 0, -14, 14, -14, 5,
625 : -14, -14, 13, -14, 19, -14, -13
626 : };
627 :
628 : /* YYDEFGOTO[NTERM-NUM]. */
629 : static const yytype_int8 yydefgoto[] =
630 : {
631 : 0, 1, 2, 19, 6, 7, 11, 12, 26, 27,
632 : 16, 17, 18, 22, 23, 35, 36
633 : };
634 :
635 : /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
636 : positive, shift that token. If negative, reduce the rule whose
637 : number is the opposite. If YYTABLE_NINF, syntax error. */
638 : static const yytype_int8 yytable[] =
639 : {
640 : 33, 4, 3, 5, 14, 10, 8, 9, 25, 5,
641 : 13, 25, 34, 39, 40, 10, 21, 4, 14, 30,
642 : 37, 41, 28, 20, 38, 15, 31, 42, 0, 0,
643 : 24, 32, 0, 0, 0, 0, 0, 0, 0, 0,
644 : 0, 29
645 : };
646 :
647 : static const yytype_int8 yycheck[] =
648 : {
649 : 4, 9, 0, 11, 7, 8, 3, 3, 10, 11,
650 : 4, 10, 16, 14, 15, 8, 4, 9, 7, 4,
651 : 3, 5, 13, 13, 6, 11, 26, 40, -1, -1,
652 : 17, 26, -1, -1, -1, -1, -1, -1, -1, -1,
653 : -1, 22
654 : };
655 :
656 : /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
657 : symbol of state STATE-NUM. */
658 : static const yytype_int8 yystos[] =
659 : {
660 : 0, 18, 19, 0, 9, 11, 21, 22, 3, 3,
661 : 8, 23, 24, 4, 7, 24, 27, 28, 29, 20,
662 : 21, 4, 30, 31, 29, 10, 25, 26, 13, 31,
663 : 4, 22, 26, 4, 16, 32, 33, 3, 6, 14,
664 : 15, 5, 33
665 : };
666 :
667 : /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
668 : static const yytype_int8 yyr1[] =
669 : {
670 : 0, 17, 18, 19, 19, 20, 20, 21, 22, 22,
671 : 23, 23, 24, 25, 25, 26, 27, 27, 28, 28,
672 : 29, 30, 30, 31, 31, 32, 32, 33, 33, 33
673 : };
674 :
675 : /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
676 : static const yytype_int8 yyr2[] =
677 : {
678 : 0, 2, 4, 0, 2, 0, 1, 2, 0, 2,
679 : 2, 1, 5, 2, 1, 3, 1, 0, 2, 1,
680 : 2, 2, 1, 1, 4, 3, 1, 1, 3, 1
681 : };
682 :
683 :
684 : enum { YYENOMEM = -2 };
685 :
686 : #define yyerrok (yyerrstatus = 0)
687 : #define yyclearin (yychar = YYEMPTY)
688 :
689 : #define YYACCEPT goto yyacceptlab
690 : #define YYABORT goto yyabortlab
691 : #define YYERROR goto yyerrorlab
692 :
693 :
694 : #define YYRECOVERING() (!!yyerrstatus)
695 :
696 : #define YYBACKUP(Token, Value) \
697 : do \
698 : if (yychar == YYEMPTY) \
699 : { \
700 : yychar = (Token); \
701 : yylval = (Value); \
702 : YYPOPSTACK (yylen); \
703 : yystate = *yyssp; \
704 : goto yybackup; \
705 : } \
706 : else \
707 : { \
708 : yyerror (YY_("syntax error: cannot back up")); \
709 : YYERROR; \
710 : } \
711 : while (0)
712 :
713 : /* Backward compatibility with an undocumented macro.
714 : Use YYerror or YYUNDEF. */
715 : #define YYERRCODE YYUNDEF
716 :
717 :
718 : /* Enable debugging if requested. */
719 : #if YYDEBUG
720 :
721 : # ifndef YYFPRINTF
722 : # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
723 : # define YYFPRINTF fprintf
724 : # endif
725 :
726 : # define YYDPRINTF(Args) \
727 : do { \
728 : if (yydebug) \
729 : YYFPRINTF Args; \
730 : } while (0)
731 :
732 : /* This macro is provided for backward compatibility. */
733 : # ifndef YY_LOCATION_PRINT
734 : # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
735 : # endif
736 :
737 :
738 : # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
739 : do { \
740 : if (yydebug) \
741 : { \
742 : YYFPRINTF (stderr, "%s ", Title); \
743 : yy_symbol_print (stderr, \
744 : Kind, Value); \
745 : YYFPRINTF (stderr, "\n"); \
746 : } \
747 : } while (0)
748 :
749 :
750 : /*-----------------------------------.
751 : | Print this symbol's value on YYO. |
752 : `-----------------------------------*/
753 :
754 : static void
755 : yy_symbol_value_print (FILE *yyo,
756 : yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
757 : {
758 : FILE *yyoutput = yyo;
759 : YY_USE (yyoutput);
760 : if (!yyvaluep)
761 : return;
762 : # ifdef YYPRINT
763 : if (yykind < YYNTOKENS)
764 : YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
765 : # endif
766 : YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
767 : YY_USE (yykind);
768 : YY_IGNORE_MAYBE_UNINITIALIZED_END
769 : }
770 :
771 :
772 : /*---------------------------.
773 : | Print this symbol on YYO. |
774 : `---------------------------*/
775 :
776 : static void
777 : yy_symbol_print (FILE *yyo,
778 : yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
779 : {
780 : YYFPRINTF (yyo, "%s %s (",
781 : yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
782 :
783 : yy_symbol_value_print (yyo, yykind, yyvaluep);
784 : YYFPRINTF (yyo, ")");
785 : }
786 :
787 : /*------------------------------------------------------------------.
788 : | yy_stack_print -- Print the state stack from its BOTTOM up to its |
789 : | TOP (included). |
790 : `------------------------------------------------------------------*/
791 :
792 : static void
793 : yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
794 : {
795 : YYFPRINTF (stderr, "Stack now");
796 : for (; yybottom <= yytop; yybottom++)
797 : {
798 : int yybot = *yybottom;
799 : YYFPRINTF (stderr, " %d", yybot);
800 : }
801 : YYFPRINTF (stderr, "\n");
802 : }
803 :
804 : # define YY_STACK_PRINT(Bottom, Top) \
805 : do { \
806 : if (yydebug) \
807 : yy_stack_print ((Bottom), (Top)); \
808 : } while (0)
809 :
810 :
811 : /*------------------------------------------------.
812 : | Report that the YYRULE is going to be reduced. |
813 : `------------------------------------------------*/
814 :
815 : static void
816 : yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
817 : int yyrule)
818 : {
819 : int yylno = yyrline[yyrule];
820 : int yynrhs = yyr2[yyrule];
821 : int yyi;
822 : YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
823 : yyrule - 1, yylno);
824 : /* The symbols being reduced. */
825 : for (yyi = 0; yyi < yynrhs; yyi++)
826 : {
827 : YYFPRINTF (stderr, " $%d = ", yyi + 1);
828 : yy_symbol_print (stderr,
829 : YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
830 : &yyvsp[(yyi + 1) - (yynrhs)]);
831 : YYFPRINTF (stderr, "\n");
832 : }
833 : }
834 :
835 : # define YY_REDUCE_PRINT(Rule) \
836 : do { \
837 : if (yydebug) \
838 : yy_reduce_print (yyssp, yyvsp, Rule); \
839 : } while (0)
840 :
841 : /* Nonzero means print parse trace. It is left uninitialized so that
842 : multiple parsers can coexist. */
843 : int yydebug;
844 : #else /* !YYDEBUG */
845 : # define YYDPRINTF(Args) ((void) 0)
846 : # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
847 : # define YY_STACK_PRINT(Bottom, Top)
848 : # define YY_REDUCE_PRINT(Rule)
849 : #endif /* !YYDEBUG */
850 :
851 :
852 : /* YYINITDEPTH -- initial size of the parser's stacks. */
853 : #ifndef YYINITDEPTH
854 : # define YYINITDEPTH 200
855 : #endif
856 :
857 : /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
858 : if the built-in stack extension method is used).
859 :
860 : Do not make this value too large; the results are undefined if
861 : YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
862 : evaluated with infinite-precision integer arithmetic. */
863 :
864 : #ifndef YYMAXDEPTH
865 : # define YYMAXDEPTH 10000
866 : #endif
867 :
868 :
869 :
870 :
871 :
872 :
873 : /*-----------------------------------------------.
874 : | Release the memory associated to this symbol. |
875 : `-----------------------------------------------*/
876 :
877 : static void
878 548 : yydestruct (const char *yymsg,
879 : yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
880 : {
881 : YY_USE (yyvaluep);
882 548 : if (!yymsg)
883 0 : yymsg = "Deleting";
884 : YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
885 :
886 : YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
887 : YY_USE (yykind);
888 : YY_IGNORE_MAYBE_UNINITIALIZED_END
889 548 : }
890 :
891 :
892 : /* Lookahead token kind. */
893 : int yychar;
894 :
895 : /* The semantic value of the lookahead symbol. */
896 : YYSTYPE yylval;
897 : /* Number of syntax errors so far. */
898 : int yynerrs;
899 :
900 :
901 :
902 :
903 : /*----------.
904 : | yyparse. |
905 : `----------*/
906 :
907 : int
908 274 : yyparse (void)
909 : {
910 274 : yy_state_fast_t yystate = 0;
911 : /* Number of tokens to shift before error messages enabled. */
912 274 : int yyerrstatus = 0;
913 :
914 : /* Refer to the stacks through separate pointers, to allow yyoverflow
915 : to reallocate them elsewhere. */
916 :
917 : /* Their size. */
918 274 : YYPTRDIFF_T yystacksize = YYINITDEPTH;
919 :
920 : /* The state stack: array, bottom, top. */
921 : yy_state_t yyssa[YYINITDEPTH];
922 274 : yy_state_t *yyss = yyssa;
923 274 : yy_state_t *yyssp = yyss;
924 :
925 : /* The semantic value stack: array, bottom, top. */
926 : YYSTYPE yyvsa[YYINITDEPTH];
927 274 : YYSTYPE *yyvs = yyvsa;
928 274 : YYSTYPE *yyvsp = yyvs;
929 :
930 : int yyn;
931 : /* The return value of yyparse. */
932 : int yyresult;
933 : /* Lookahead symbol kind. */
934 274 : yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
935 : /* The variables used to return semantic value and location from the
936 : action routines. */
937 : YYSTYPE yyval;
938 :
939 :
940 :
941 : #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
942 :
943 : /* The number of symbols on the RHS of the reduced rule.
944 : Keep to zero when no symbol should be popped. */
945 274 : int yylen = 0;
946 :
947 : YYDPRINTF ((stderr, "Starting parse\n"));
948 :
949 274 : yychar = YYEMPTY; /* Cause a token to be read. */
950 274 : goto yysetstate;
951 :
952 :
953 : /*------------------------------------------------------------.
954 : | yynewstate -- push a new state, which is found in yystate. |
955 : `------------------------------------------------------------*/
956 83382 : yynewstate:
957 : /* In all cases, when you get here, the value and location stacks
958 : have just been pushed. So pushing a state here evens the stacks. */
959 83382 : yyssp++;
960 :
961 :
962 : /*--------------------------------------------------------------------.
963 : | yysetstate -- set current state (the top of the stack) to yystate. |
964 : `--------------------------------------------------------------------*/
965 83656 : yysetstate:
966 : YYDPRINTF ((stderr, "Entering state %d\n", yystate));
967 : YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
968 : YY_IGNORE_USELESS_CAST_BEGIN
969 83656 : *yyssp = YY_CAST (yy_state_t, yystate);
970 : YY_IGNORE_USELESS_CAST_END
971 : YY_STACK_PRINT (yyss, yyssp);
972 :
973 83656 : if (yyss + yystacksize - 1 <= yyssp)
974 : #if !defined yyoverflow && !defined YYSTACK_RELOCATE
975 : goto yyexhaustedlab;
976 : #else
977 : {
978 : /* Get the current used size of the three stacks, in elements. */
979 0 : YYPTRDIFF_T yysize = yyssp - yyss + 1;
980 :
981 : # if defined yyoverflow
982 : {
983 : /* Give user a chance to reallocate the stack. Use copies of
984 : these so that the &'s don't force the real ones into
985 : memory. */
986 : yy_state_t *yyss1 = yyss;
987 : YYSTYPE *yyvs1 = yyvs;
988 :
989 : /* Each stack pointer address is followed by the size of the
990 : data in use in that stack, in bytes. This used to be a
991 : conditional around just the two extra args, but that might
992 : be undefined if yyoverflow is a macro. */
993 : yyoverflow (YY_("memory exhausted"),
994 : &yyss1, yysize * YYSIZEOF (*yyssp),
995 : &yyvs1, yysize * YYSIZEOF (*yyvsp),
996 : &yystacksize);
997 : yyss = yyss1;
998 : yyvs = yyvs1;
999 : }
1000 : # else /* defined YYSTACK_RELOCATE */
1001 : /* Extend the stack our own way. */
1002 0 : if (YYMAXDEPTH <= yystacksize)
1003 0 : goto yyexhaustedlab;
1004 0 : yystacksize *= 2;
1005 0 : if (YYMAXDEPTH < yystacksize)
1006 0 : yystacksize = YYMAXDEPTH;
1007 :
1008 : {
1009 0 : yy_state_t *yyss1 = yyss;
1010 : union yyalloc *yyptr =
1011 0 : YY_CAST (union yyalloc *,
1012 : YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1013 0 : if (! yyptr)
1014 0 : goto yyexhaustedlab;
1015 0 : YYSTACK_RELOCATE (yyss_alloc, yyss);
1016 0 : YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1017 : # undef YYSTACK_RELOCATE
1018 0 : if (yyss1 != yyssa)
1019 0 : YYSTACK_FREE (yyss1);
1020 : }
1021 : # endif
1022 :
1023 0 : yyssp = yyss + yysize - 1;
1024 0 : yyvsp = yyvs + yysize - 1;
1025 :
1026 : YY_IGNORE_USELESS_CAST_BEGIN
1027 : YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1028 : YY_CAST (long, yystacksize)));
1029 : YY_IGNORE_USELESS_CAST_END
1030 :
1031 0 : if (yyss + yystacksize - 1 <= yyssp)
1032 0 : YYABORT;
1033 : }
1034 : #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1035 :
1036 83656 : if (yystate == YYFINAL)
1037 274 : YYACCEPT;
1038 :
1039 83382 : goto yybackup;
1040 :
1041 :
1042 : /*-----------.
1043 : | yybackup. |
1044 : `-----------*/
1045 83382 : yybackup:
1046 : /* Do appropriate processing given the current state. Read a
1047 : lookahead token if we need one and don't already have one. */
1048 :
1049 : /* First try to decide what to do without reference to lookahead token. */
1050 83382 : yyn = yypact[yystate];
1051 83382 : if (yypact_value_is_default (yyn))
1052 29582 : goto yydefault;
1053 :
1054 : /* Not known => get a lookahead token if don't already have one. */
1055 :
1056 : /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
1057 53800 : if (yychar == YYEMPTY)
1058 : {
1059 : YYDPRINTF ((stderr, "Reading a token\n"));
1060 32506 : yychar = yylex ();
1061 : }
1062 :
1063 53800 : if (yychar <= YYEOF)
1064 : {
1065 1064 : yychar = YYEOF;
1066 1064 : yytoken = YYSYMBOL_YYEOF;
1067 : YYDPRINTF ((stderr, "Now at end of input.\n"));
1068 : }
1069 52736 : else if (yychar == YYerror)
1070 : {
1071 : /* The scanner already issued an error message, process directly
1072 : to error recovery. But do not keep the error token as
1073 : lookahead, it is too special and may lead us to an endless
1074 : loop in error recovery. */
1075 0 : yychar = YYUNDEF;
1076 0 : yytoken = YYSYMBOL_YYerror;
1077 0 : goto yyerrlab1;
1078 : }
1079 : else
1080 : {
1081 52736 : yytoken = YYTRANSLATE (yychar);
1082 : YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1083 : }
1084 :
1085 : /* If the proper action on seeing token YYTOKEN is to reduce or to
1086 : detect an error, take that action. */
1087 53800 : yyn += yytoken;
1088 53800 : if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1089 21294 : goto yydefault;
1090 32506 : yyn = yytable[yyn];
1091 32506 : if (yyn <= 0)
1092 : {
1093 : if (yytable_value_is_error (yyn))
1094 : goto yyerrlab;
1095 0 : yyn = -yyn;
1096 0 : goto yyreduce;
1097 : }
1098 :
1099 : /* Count tokens shifted since error; after three, turn off error
1100 : status. */
1101 32506 : if (yyerrstatus)
1102 0 : yyerrstatus--;
1103 :
1104 : /* Shift the lookahead token. */
1105 : YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1106 32506 : yystate = yyn;
1107 : YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1108 32506 : *++yyvsp = yylval;
1109 : YY_IGNORE_MAYBE_UNINITIALIZED_END
1110 :
1111 : /* Discard the shifted token. */
1112 32506 : yychar = YYEMPTY;
1113 32506 : goto yynewstate;
1114 :
1115 :
1116 : /*-----------------------------------------------------------.
1117 : | yydefault -- do the default action for the current state. |
1118 : `-----------------------------------------------------------*/
1119 50876 : yydefault:
1120 50876 : yyn = yydefact[yystate];
1121 50876 : if (yyn == 0)
1122 0 : goto yyerrlab;
1123 50876 : goto yyreduce;
1124 :
1125 :
1126 : /*-----------------------------.
1127 : | yyreduce -- do a reduction. |
1128 : `-----------------------------*/
1129 50876 : yyreduce:
1130 : /* yyn is the number of a rule to reduce with. */
1131 50876 : yylen = yyr2[yyn];
1132 :
1133 : /* If YYLEN is nonzero, implement the default value of the action:
1134 : '$$ = $1'.
1135 :
1136 : Otherwise, the following line sets YYVAL to garbage.
1137 : This behavior is undocumented and Bison
1138 : users should not rely upon it. Assigning to YYVAL
1139 : unconditionally makes the parser a bit smaller, and it avoids a
1140 : GCC warning that YYVAL may be used uninitialized. */
1141 50876 : yyval = yyvsp[1-yylen];
1142 :
1143 :
1144 : YY_REDUCE_PRINT (yyn);
1145 50876 : switch (yyn)
1146 : {
1147 274 : case 2: /* TestSpec: setup_list opt_teardown session_list opt_permutation_list */
1148 : #line 67 "specparse.y"
1149 : {
1150 : parseresult.setupsqls = (char **) (yyvsp[-3].ptr_list).elements;
1151 : parseresult.nsetupsqls = (yyvsp[-3].ptr_list).nelements;
1152 : parseresult.teardownsql = (yyvsp[-2].str);
1153 : parseresult.sessions = (Session **) (yyvsp[-1].ptr_list).elements;
1154 : parseresult.nsessions = (yyvsp[-1].ptr_list).nelements;
1155 : parseresult.permutations = (Permutation **) (yyvsp[0].ptr_list).elements;
1156 : parseresult.npermutations = (yyvsp[0].ptr_list).nelements;
1157 : }
1158 : #line 1159 "specparse.c"
1159 274 : break;
1160 :
1161 274 : case 3: /* setup_list: %empty */
1162 : #line 80 "specparse.y"
1163 : {
1164 : (yyval.ptr_list).elements = NULL;
1165 : (yyval.ptr_list).nelements = 0;
1166 : }
1167 : #line 1168 "specparse.c"
1168 274 : break;
1169 :
1170 280 : case 4: /* setup_list: setup_list setup */
1171 : #line 85 "specparse.y"
1172 : {
1173 : (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements,
1174 : ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *));
1175 : (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].str);
1176 : (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1;
1177 : }
1178 : #line 1179 "specparse.c"
1179 280 : break;
1180 :
1181 266 : case 5: /* opt_setup: %empty */
1182 : #line 94 "specparse.y"
1183 : { (yyval.str) = NULL; }
1184 : #line 1185 "specparse.c"
1185 266 : break;
1186 :
1187 412 : case 6: /* opt_setup: setup */
1188 : #line 95 "specparse.y"
1189 : { (yyval.str) = (yyvsp[0].str); }
1190 : #line 1191 "specparse.c"
1191 412 : break;
1192 :
1193 692 : case 7: /* setup: SETUP sqlblock */
1194 : #line 99 "specparse.y"
1195 : { (yyval.str) = (yyvsp[0].str); }
1196 : #line 1197 "specparse.c"
1197 692 : break;
1198 :
1199 654 : case 8: /* opt_teardown: %empty */
1200 : #line 103 "specparse.y"
1201 : { (yyval.str) = NULL; }
1202 : #line 1203 "specparse.c"
1203 654 : break;
1204 :
1205 298 : case 9: /* opt_teardown: TEARDOWN sqlblock */
1206 : #line 104 "specparse.y"
1207 : { (yyval.str) = (yyvsp[0].str); }
1208 : #line 1209 "specparse.c"
1209 298 : break;
1210 :
1211 404 : case 10: /* session_list: session_list session */
1212 : #line 109 "specparse.y"
1213 : {
1214 : (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements,
1215 : ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *));
1216 : (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].session);
1217 : (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1;
1218 : }
1219 : #line 1220 "specparse.c"
1220 404 : break;
1221 :
1222 274 : case 11: /* session_list: session */
1223 : #line 116 "specparse.y"
1224 : {
1225 : (yyval.ptr_list).nelements = 1;
1226 : (yyval.ptr_list).elements = pg_malloc(sizeof(void *));
1227 : (yyval.ptr_list).elements[0] = (yyvsp[0].session);
1228 : }
1229 : #line 1230 "specparse.c"
1230 274 : break;
1231 :
1232 678 : case 12: /* session: SESSION identifier opt_setup step_list opt_teardown */
1233 : #line 125 "specparse.y"
1234 : {
1235 : (yyval.session) = pg_malloc(sizeof(Session));
1236 : (yyval.session)->name = (yyvsp[-3].str);
1237 : (yyval.session)->setupsql = (yyvsp[-2].str);
1238 : (yyval.session)->steps = (Step **) (yyvsp[-1].ptr_list).elements;
1239 : (yyval.session)->nsteps = (yyvsp[-1].ptr_list).nelements;
1240 : (yyval.session)->teardownsql = (yyvsp[0].str);
1241 : }
1242 : #line 1243 "specparse.c"
1243 678 : break;
1244 :
1245 2110 : case 13: /* step_list: step_list step */
1246 : #line 137 "specparse.y"
1247 : {
1248 : (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements,
1249 : ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *));
1250 : (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].step);
1251 : (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1;
1252 : }
1253 : #line 1254 "specparse.c"
1254 2110 : break;
1255 :
1256 678 : case 14: /* step_list: step */
1257 : #line 144 "specparse.y"
1258 : {
1259 : (yyval.ptr_list).nelements = 1;
1260 : (yyval.ptr_list).elements = pg_malloc(sizeof(void *));
1261 : (yyval.ptr_list).elements[0] = (yyvsp[0].step);
1262 : }
1263 : #line 1264 "specparse.c"
1264 678 : break;
1265 :
1266 2788 : case 15: /* step: STEP identifier sqlblock */
1267 : #line 154 "specparse.y"
1268 : {
1269 : (yyval.step) = pg_malloc(sizeof(Step));
1270 : (yyval.step)->name = (yyvsp[-1].str);
1271 : (yyval.step)->sql = (yyvsp[0].str);
1272 : (yyval.step)->session = -1; /* until filled */
1273 : (yyval.step)->used = false;
1274 : }
1275 : #line 1276 "specparse.c"
1276 2788 : break;
1277 :
1278 246 : case 16: /* opt_permutation_list: permutation_list */
1279 : #line 166 "specparse.y"
1280 : {
1281 : (yyval.ptr_list) = (yyvsp[0].ptr_list);
1282 : }
1283 : #line 1284 "specparse.c"
1284 246 : break;
1285 :
1286 28 : case 17: /* opt_permutation_list: %empty */
1287 : #line 170 "specparse.y"
1288 : {
1289 : (yyval.ptr_list).elements = NULL;
1290 : (yyval.ptr_list).nelements = 0;
1291 : }
1292 : #line 1293 "specparse.c"
1293 28 : break;
1294 :
1295 2144 : case 18: /* permutation_list: permutation_list permutation */
1296 : #line 177 "specparse.y"
1297 : {
1298 : (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements,
1299 : ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *));
1300 : (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].permutation);
1301 : (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1;
1302 : }
1303 : #line 1304 "specparse.c"
1304 2144 : break;
1305 :
1306 246 : case 19: /* permutation_list: permutation */
1307 : #line 184 "specparse.y"
1308 : {
1309 : (yyval.ptr_list).nelements = 1;
1310 : (yyval.ptr_list).elements = pg_malloc(sizeof(void *));
1311 : (yyval.ptr_list).elements[0] = (yyvsp[0].permutation);
1312 : }
1313 : #line 1314 "specparse.c"
1314 246 : break;
1315 :
1316 2390 : case 20: /* permutation: PERMUTATION permutation_step_list */
1317 : #line 194 "specparse.y"
1318 : {
1319 : (yyval.permutation) = pg_malloc(sizeof(Permutation));
1320 : (yyval.permutation)->nsteps = (yyvsp[0].ptr_list).nelements;
1321 : (yyval.permutation)->steps = (PermutationStep **) (yyvsp[0].ptr_list).elements;
1322 : }
1323 : #line 1324 "specparse.c"
1324 2390 : break;
1325 :
1326 15346 : case 21: /* permutation_step_list: permutation_step_list permutation_step */
1327 : #line 203 "specparse.y"
1328 : {
1329 : (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements,
1330 : ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *));
1331 : (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].permutationstep);
1332 : (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1;
1333 : }
1334 : #line 1335 "specparse.c"
1335 15346 : break;
1336 :
1337 2390 : case 22: /* permutation_step_list: permutation_step */
1338 : #line 210 "specparse.y"
1339 : {
1340 : (yyval.ptr_list).nelements = 1;
1341 : (yyval.ptr_list).elements = pg_malloc(sizeof(void *));
1342 : (yyval.ptr_list).elements[0] = (yyvsp[0].permutationstep);
1343 : }
1344 : #line 1345 "specparse.c"
1345 2390 : break;
1346 :
1347 17602 : case 23: /* permutation_step: identifier */
1348 : #line 219 "specparse.y"
1349 : {
1350 : (yyval.permutationstep) = pg_malloc(sizeof(PermutationStep));
1351 : (yyval.permutationstep)->name = (yyvsp[0].str);
1352 : (yyval.permutationstep)->blockers = NULL;
1353 : (yyval.permutationstep)->nblockers = 0;
1354 : (yyval.permutationstep)->step = NULL;
1355 : }
1356 : #line 1357 "specparse.c"
1357 17602 : break;
1358 :
1359 134 : case 24: /* permutation_step: identifier '(' blocker_list ')' */
1360 : #line 227 "specparse.y"
1361 : {
1362 : (yyval.permutationstep) = pg_malloc(sizeof(PermutationStep));
1363 : (yyval.permutationstep)->name = (yyvsp[-3].str);
1364 : (yyval.permutationstep)->blockers = (PermutationStepBlocker **) (yyvsp[-1].ptr_list).elements;
1365 : (yyval.permutationstep)->nblockers = (yyvsp[-1].ptr_list).nelements;
1366 : (yyval.permutationstep)->step = NULL;
1367 : }
1368 : #line 1369 "specparse.c"
1369 134 : break;
1370 :
1371 0 : case 25: /* blocker_list: blocker_list ',' blocker */
1372 : #line 238 "specparse.y"
1373 : {
1374 : (yyval.ptr_list).elements = pg_realloc((yyvsp[-2].ptr_list).elements,
1375 : ((yyvsp[-2].ptr_list).nelements + 1) * sizeof(void *));
1376 : (yyval.ptr_list).elements[(yyvsp[-2].ptr_list).nelements] = (yyvsp[0].blocker);
1377 : (yyval.ptr_list).nelements = (yyvsp[-2].ptr_list).nelements + 1;
1378 : }
1379 : #line 1380 "specparse.c"
1380 0 : break;
1381 :
1382 134 : case 26: /* blocker_list: blocker */
1383 : #line 245 "specparse.y"
1384 : {
1385 : (yyval.ptr_list).nelements = 1;
1386 : (yyval.ptr_list).elements = pg_malloc(sizeof(void *));
1387 : (yyval.ptr_list).elements[0] = (yyvsp[0].blocker);
1388 : }
1389 : #line 1390 "specparse.c"
1390 134 : break;
1391 :
1392 108 : case 27: /* blocker: identifier */
1393 : #line 254 "specparse.y"
1394 : {
1395 : (yyval.blocker) = pg_malloc(sizeof(PermutationStepBlocker));
1396 : (yyval.blocker)->stepname = (yyvsp[0].str);
1397 : (yyval.blocker)->blocktype = PSB_OTHER_STEP;
1398 : (yyval.blocker)->num_notices = -1;
1399 : (yyval.blocker)->step = NULL;
1400 : (yyval.blocker)->target_notices = -1;
1401 : }
1402 : #line 1403 "specparse.c"
1403 108 : break;
1404 :
1405 2 : case 28: /* blocker: identifier NOTICES INTEGER */
1406 : #line 263 "specparse.y"
1407 : {
1408 : (yyval.blocker) = pg_malloc(sizeof(PermutationStepBlocker));
1409 : (yyval.blocker)->stepname = (yyvsp[-2].str);
1410 : (yyval.blocker)->blocktype = PSB_NUM_NOTICES;
1411 : (yyval.blocker)->num_notices = (yyvsp[0].integer);
1412 : (yyval.blocker)->step = NULL;
1413 : (yyval.blocker)->target_notices = -1;
1414 : }
1415 : #line 1416 "specparse.c"
1416 2 : break;
1417 :
1418 24 : case 29: /* blocker: '*' */
1419 : #line 272 "specparse.y"
1420 : {
1421 : (yyval.blocker) = pg_malloc(sizeof(PermutationStepBlocker));
1422 : (yyval.blocker)->stepname = NULL;
1423 : (yyval.blocker)->blocktype = PSB_ONCE;
1424 : (yyval.blocker)->num_notices = -1;
1425 : (yyval.blocker)->step = NULL;
1426 : (yyval.blocker)->target_notices = -1;
1427 : }
1428 : #line 1429 "specparse.c"
1429 24 : break;
1430 :
1431 :
1432 : #line 1433 "specparse.c"
1433 :
1434 0 : default: break;
1435 : }
1436 : /* User semantic actions sometimes alter yychar, and that requires
1437 : that yytoken be updated with the new translation. We take the
1438 : approach of translating immediately before every use of yytoken.
1439 : One alternative is translating here after every semantic action,
1440 : but that translation would be missed if the semantic action invokes
1441 : YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1442 : if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1443 : incorrect destructor might then be invoked immediately. In the
1444 : case of YYERROR or YYBACKUP, subsequent parser actions might lead
1445 : to an incorrect destructor call or verbose syntax error message
1446 : before the lookahead is translated. */
1447 : YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1448 :
1449 50876 : YYPOPSTACK (yylen);
1450 50876 : yylen = 0;
1451 :
1452 50876 : *++yyvsp = yyval;
1453 :
1454 : /* Now 'shift' the result of the reduction. Determine what state
1455 : that goes to, based on the state we popped back to and the rule
1456 : number reduced by. */
1457 : {
1458 50876 : const int yylhs = yyr1[yyn] - YYNTOKENS;
1459 50876 : const int yyi = yypgoto[yylhs] + *yyssp;
1460 46028 : yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1461 21094 : ? yytable[yyi]
1462 96904 : : yydefgoto[yylhs]);
1463 : }
1464 :
1465 50876 : goto yynewstate;
1466 :
1467 :
1468 : /*--------------------------------------.
1469 : | yyerrlab -- here on detecting error. |
1470 : `--------------------------------------*/
1471 0 : yyerrlab:
1472 : /* Make sure we have latest lookahead translation. See comments at
1473 : user semantic actions for why this is necessary. */
1474 0 : yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1475 : /* If not already recovering from an error, report this error. */
1476 0 : if (!yyerrstatus)
1477 : {
1478 0 : ++yynerrs;
1479 0 : yyerror (YY_("syntax error"));
1480 : }
1481 :
1482 0 : if (yyerrstatus == 3)
1483 : {
1484 : /* If just tried and failed to reuse lookahead token after an
1485 : error, discard it. */
1486 :
1487 0 : if (yychar <= YYEOF)
1488 : {
1489 : /* Return failure if at end of input. */
1490 0 : if (yychar == YYEOF)
1491 0 : YYABORT;
1492 : }
1493 : else
1494 : {
1495 0 : yydestruct ("Error: discarding",
1496 : yytoken, &yylval);
1497 0 : yychar = YYEMPTY;
1498 : }
1499 : }
1500 :
1501 : /* Else will try to reuse lookahead token after shifting the error
1502 : token. */
1503 0 : goto yyerrlab1;
1504 :
1505 :
1506 : /*---------------------------------------------------.
1507 : | yyerrorlab -- error raised explicitly by YYERROR. |
1508 : `---------------------------------------------------*/
1509 : yyerrorlab:
1510 : /* Pacify compilers when the user code never invokes YYERROR and the
1511 : label yyerrorlab therefore never appears in user code. */
1512 : if (0)
1513 : YYERROR;
1514 :
1515 : /* Do not reclaim the symbols of the rule whose action triggered
1516 : this YYERROR. */
1517 : YYPOPSTACK (yylen);
1518 : yylen = 0;
1519 : YY_STACK_PRINT (yyss, yyssp);
1520 : yystate = *yyssp;
1521 : goto yyerrlab1;
1522 :
1523 :
1524 : /*-------------------------------------------------------------.
1525 : | yyerrlab1 -- common code for both syntax error and YYERROR. |
1526 : `-------------------------------------------------------------*/
1527 0 : yyerrlab1:
1528 0 : yyerrstatus = 3; /* Each real token shifted decrements this. */
1529 :
1530 : /* Pop stack until we find a state that shifts the error token. */
1531 : for (;;)
1532 : {
1533 0 : yyn = yypact[yystate];
1534 0 : if (!yypact_value_is_default (yyn))
1535 : {
1536 0 : yyn += YYSYMBOL_YYerror;
1537 0 : if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1538 : {
1539 0 : yyn = yytable[yyn];
1540 0 : if (0 < yyn)
1541 0 : break;
1542 : }
1543 : }
1544 :
1545 : /* Pop the current state because it cannot handle the error token. */
1546 0 : if (yyssp == yyss)
1547 0 : YYABORT;
1548 :
1549 :
1550 0 : yydestruct ("Error: popping",
1551 0 : YY_ACCESSING_SYMBOL (yystate), yyvsp);
1552 0 : YYPOPSTACK (1);
1553 0 : yystate = *yyssp;
1554 : YY_STACK_PRINT (yyss, yyssp);
1555 : }
1556 :
1557 : YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1558 0 : *++yyvsp = yylval;
1559 : YY_IGNORE_MAYBE_UNINITIALIZED_END
1560 :
1561 :
1562 : /* Shift the error token. */
1563 : YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1564 :
1565 0 : yystate = yyn;
1566 0 : goto yynewstate;
1567 :
1568 :
1569 : /*-------------------------------------.
1570 : | yyacceptlab -- YYACCEPT comes here. |
1571 : `-------------------------------------*/
1572 274 : yyacceptlab:
1573 274 : yyresult = 0;
1574 274 : goto yyreturn;
1575 :
1576 :
1577 : /*-----------------------------------.
1578 : | yyabortlab -- YYABORT comes here. |
1579 : `-----------------------------------*/
1580 0 : yyabortlab:
1581 0 : yyresult = 1;
1582 0 : goto yyreturn;
1583 :
1584 :
1585 : #if !defined yyoverflow
1586 : /*-------------------------------------------------.
1587 : | yyexhaustedlab -- memory exhaustion comes here. |
1588 : `-------------------------------------------------*/
1589 0 : yyexhaustedlab:
1590 0 : yyerror (YY_("memory exhausted"));
1591 0 : yyresult = 2;
1592 0 : goto yyreturn;
1593 : #endif
1594 :
1595 :
1596 : /*-------------------------------------------------------.
1597 : | yyreturn -- parsing is finished, clean up and return. |
1598 : `-------------------------------------------------------*/
1599 274 : yyreturn:
1600 274 : if (yychar != YYEMPTY)
1601 : {
1602 : /* Make sure we have latest lookahead translation. See comments at
1603 : user semantic actions for why this is necessary. */
1604 0 : yytoken = YYTRANSLATE (yychar);
1605 0 : yydestruct ("Cleanup: discarding lookahead",
1606 : yytoken, &yylval);
1607 : }
1608 : /* Do not reclaim the symbols of the rule whose action triggered
1609 : this YYABORT or YYACCEPT. */
1610 274 : YYPOPSTACK (yylen);
1611 : YY_STACK_PRINT (yyss, yyssp);
1612 822 : while (yyssp != yyss)
1613 : {
1614 548 : yydestruct ("Cleanup: popping",
1615 548 : YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1616 548 : YYPOPSTACK (1);
1617 : }
1618 : #ifndef yyoverflow
1619 274 : if (yyss != yyssa)
1620 0 : YYSTACK_FREE (yyss);
1621 : #endif
1622 :
1623 274 : return yyresult;
1624 : }
1625 :
1626 : #line 282 "specparse.y"
1627 :
|