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