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  126
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,   160,
445      161,   170,   180,   188,   189,   190,   191,   197,   202,   209,
446      210,   214,   219,   228,   227,   242,   246,   254,   255,   259,
447      260,   261,   272,   276,   283,   284,   288,   289,   293,   294,
448      299,   300,   325,   326,   336,   331,   363,   362,   390,   401,
449      423,   424,   425,   446,   465,   466,   471,   480,   503,   511,
450      510,   524,   525,   527,   528,   532,   533,   537,   538,   545,
451      554,   578,   599,   603,   611,   625,   645,   652,   669,   678,
452      687,   695,   703,   704,   705,   710,   711,   712,   734,   746,
453      760,   768,   775,   783,   787,   800,   808,   807,   833,   834,
454      835,   836,   844,   851,   860,   869,   878
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 -120
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       96,  -110,     9,   108,   109,    11,    99,  -110,  -110,  -110,
510     -110,  -110,  -110,   112,  -110,  -110,  -110,   113,  -110,  -110,
511     -110,   116,  -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,    36,  -110,  -110,  -110,  -110,    17,   117,  -110,
515       55,  -110,  -110,     1,    28,  -110,    31,  -110,  -110,  -110,
516     -110,  -110,    29,    61,  -110,  -110,     7,    74,  -110,  -110,
517     -110,  -110,  -110,  -110,    37,  -110,  -110,    62,  -110,  -110,
518        3,  -110,  -110,  -110,  -110,  -110,  -110,  -110,    12,  -110,
519     -110,  -110,  -110,     4,    12,  -110,    82,  -110,    85,    45,
520     -110,  -110,    88,  -110,  -110,  -110,  -110,     8,   107,  -110,
521       74,  -110,  -110,    82,  -110,    85,  -110,    70,    58,  -110,
522     -110,  -110,  -110,   120,    12,     4,    51,  -110,  -110,    75,
523     -110,  -110,  -110,  -110,  -110,  -110,    82,  -110,    85,  -110,
524      110,    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,    46,    45,    10,    43,    36,    41,
537       38,    35,     0,    39,    79,    11,    12,     0,     0,    34,
538        0,    51,    53,     0,    48,    49,     0,    42,    40,    91,
539       90,    95,     0,     0,    83,    86,     0,     0,    85,    44,
540       50,    69,    68,    52,     0,    56,    59,     0,    62,    63,
541        0,    58,    80,    84,    88,    87,    93,    92,     0,    57,
542       60,    61,    94,     0,     0,   101,    96,    97,    98,     0,
543       89,    99,     0,   100,    78,    77,    67,     0,    73,    74,
544        0,    64,   112,   108,   109,   110,   102,     0,     0,   111,
545      116,   115,    72,     0,     0,     0,     0,   103,   107,     0,
546       75,    76,    65,   104,   106,   126,   122,   123,   124,   125,
547        0,     0,   117,     0,   121,   120
548 };
549 
550   /* YYPGOTO[NTERM-NUM].  */
551 static const yytype_int8 yypgoto[] =
552 {
553     -110,  -110,  -110,   122,  -110,  -110,  -110,  -110,  -110,  -110,
554     -110,  -110,  -110,  -110,  -110,  -110,  -110,  -110,  -110,   123,
555       48,    56,  -110,    77,  -110,    72,  -110,  -110,    91,  -110,
556     -110,    68,  -110,  -110,  -110,    49,  -110,  -110,  -110,  -110,
557     -110,  -110,  -110,    -1,  -110,  -110,     5,  -110,    92,  -110,
558     -110,  -110,    63,  -110,  -110,  -110,    19,  -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,   -66,   115,    94,   132,
580       11,    24,    12,   105,   102,   106,   107,    79,    61,    45,
581       91,   -66,   -70,    62,   108,    95,   -71,   129,    39,   109,
582      149,   141,    81,   -47,    62,    82,    71,   -54,    81,   -42,
583      -42,    82,    71,   -55,   149,    92,   122,   -54,   123,   124,
584       50,    58,   122,   -55,   123,   124,    69,   125,    70,   138,
585       71,   126,    69,   125,    70,    34,    71,   143,   154,    38,
586       48,   -81,    49,  -105,  -105,    96,   145,   -82,   146,   147,
587      100,  -119,  -119,    50,    97,   136,   137,   148,    42,  -118,
588     -118,   145,    43,   146,   147,  -113,    -2,     1,  -114,    -3,
589        1,   130,   148,     2,     3,     4,     2,     3,     4,    16,
590       20,    12,    12,    26,    31,    27,    27,    35,    67,    27,
591       49,   114,   133,   115,   152,   153,    19,    23,    25,    59,
592       68,    47,    80,    99,   142,    56,    93,   155,   140,   134,
593        0,     0,   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,     6,     4,     5,     6,     1,    14,
602       15,     4,     5,     6,   153,    16,     1,    16,     3,     4,
603       14,    15,     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,     1,     1,    16,     3,     4,
606       18,    14,    15,    14,    10,    15,    16,    12,    32,    14,
607       15,     1,    36,     3,     4,    13,     0,     1,    13,     0,
608        1,    13,    12,     7,     8,     9,     7,     8,     9,     1,
609        1,     3,     3,     1,     1,     3,     3,     1,     1,     3,
610        3,     1,    15,     3,    14,    15,     3,     4,     6,    52,
611       58,    40,    64,    84,   135,    43,    73,   153,   133,   120,
612       -1,    -1,   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,    15,    42,
625       68,     1,     6,    48,    49,    50,    51,     1,    44,     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,    44,    44,    46,    45,    47,    47,    48,    48,    49,
645       49,    49,    50,    51,    52,    52,    53,    53,    54,    54,
646       55,    55,    56,    56,    58,    57,    60,    59,    61,    61,
647       62,    62,    62,    63,    64,    64,    65,    66,    66,    68,
648       67,    69,    69,    70,    70,    71,    71,    72,    72,    73,
649       74,    74,    75,    75,    76,    77,    78,    78,    78,    78,
650       78,    78,    79,    79,    79,    80,    80,    80,    81,    81,
651       81,    81,    81,    82,    82,    83,    85,    84,    86,    86,
652       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        3,     1,     1,     0,     4,     1,     1,     0,     1,     1,
663        2,     1,     2,     1,     0,     1,     1,     2,     1,     1,
664        2,     2,     1,     1,     0,     5,     0,     3,     1,     1,
665        0,     1,     2,     1,     1,     3,     3,     1,     1,     0,
666        4,     0,     1,     1,     2,     1,     1,     2,     2,     3,
667        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
668        1,     1,     2,     3,     4,     1,     3,     2,     1,     1,
669        1,     1,     1,     1,     1,     2,     0,     4,     0,     1,
670        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                           ParserDebug("\tP:promise:%s:%s\n", P.blocktype, P.blockid);
1488                           CURRENT_BLOCKID_LINE = P.line_no;
1489                        }
1490 #line 1491 "cf3parse.c" /* yacc.c:1646  */
1491     break;
1492 
1493   case 30:
1494 #line 162 "cf3parse.y" /* yacc.c:1646  */
1495     {
1496                            yyclearin;
1497                            ParseError("Expected promise type identifier, wrong input '%s'", yytext);
1498                            INSTALL_SKIP = true;
1499                        }
1500 #line 1501 "cf3parse.c" /* yacc.c:1646  */
1501     break;
1502 
1503   case 31:
1504 #line 171 "cf3parse.y" /* yacc.c:1646  */
1505     {
1506                            strncpy(P.blocktype,P.currentid,CF_MAXVARSIZE);
1507 
1508                            RlistDestroy(P.useargs);
1509                            P.useargs = NULL;
1510                        }
1511 #line 1512 "cf3parse.c" /* yacc.c:1646  */
1512     break;
1513 
1514   case 32:
1515 #line 181 "cf3parse.y" /* yacc.c:1646  */
1516     {
1517                            strncpy(P.blockid,P.currentid,CF_MAXVARSIZE);
1518                            P.offsets.last_block_id = P.offsets.last_id;
1519                        }
1520 #line 1521 "cf3parse.c" /* yacc.c:1646  */
1521     break;
1522 
1523   case 36:
1524 #line 192 "cf3parse.y" /* yacc.c:1646  */
1525     {
1526                           yyclearin;
1527                           ParseError("Error in bundle parameter list, expected ')', wrong input '%s'", yytext);
1528                        }
1529 #line 1530 "cf3parse.c" /* yacc.c:1646  */
1530     break;
1531 
1532   case 37:
1533 #line 198 "cf3parse.y" /* yacc.c:1646  */
1534     {
1535                            ParserDebug("P:%s:%s:%s arglist begin:%s\n", ParserBlockString(P.block),P.blocktype,P.blockid, yytext);
1536                        }
1537 #line 1538 "cf3parse.c" /* yacc.c:1646  */
1538     break;
1539 
1540   case 38:
1541 #line 203 "cf3parse.y" /* yacc.c:1646  */
1542     {
1543                            ParserDebug("P:%s:%s:%s arglist end:%s\n", ParserBlockString(P.block),P.blocktype,P.blockid, yytext);
1544                        }
1545 #line 1546 "cf3parse.c" /* yacc.c:1646  */
1546     break;
1547 
1548   case 41:
1549 #line 215 "cf3parse.y" /* yacc.c:1646  */
1550     {
1551                            ParserDebug("P:%s:%s:%s  arg id: %s\n", ParserBlockString(P.block),P.blocktype,P.blockid, P.currentid);
1552                            RlistAppendScalar(&(P.useargs),P.currentid);
1553                        }
1554 #line 1555 "cf3parse.c" /* yacc.c:1646  */
1555     break;
1556 
1557   case 42:
1558 #line 220 "cf3parse.y" /* yacc.c:1646  */
1559     {
1560                           yyclearin;
1561                           ParseError("Expected identifier, wrong input '%s'", yytext);
1562                        }
1563 #line 1564 "cf3parse.c" /* yacc.c:1646  */
1564     break;
1565 
1566   case 43:
1567 #line 228 "cf3parse.y" /* yacc.c:1646  */
1568     {
1569                            ParserBeginBundleBody();
1570                        }
1571 #line 1572 "cf3parse.c" /* yacc.c:1646  */
1572     break;
1573 
1574   case 44:
1575 #line 235 "cf3parse.y" /* yacc.c:1646  */
1576     {
1577                            INSTALL_SKIP = false;
1578                            ParserEndCurrentBlock();
1579                        }
1580 #line 1581 "cf3parse.c" /* yacc.c:1646  */
1581     break;
1582 
1583   case 45:
1584 #line 243 "cf3parse.y" /* yacc.c:1646  */
1585     {
1586                            ParserDebug("P:%s:%s:%s begin body open\n", ParserBlockString(P.block),P.blocktype,P.blockid);
1587                        }
1588 #line 1589 "cf3parse.c" /* yacc.c:1646  */
1589     break;
1590 
1591   case 46:
1592 #line 247 "cf3parse.y" /* yacc.c:1646  */
1593     {
1594                            ParseError("Expected body open '{', wrong input '%s'", yytext);
1595                        }
1596 #line 1597 "cf3parse.c" /* yacc.c:1646  */
1597     break;
1598 
1599   case 51:
1600 #line 262 "cf3parse.y" /* yacc.c:1646  */
1601     {
1602                           INSTALL_SKIP = true;
1603                           ParseError("Expected promise type, got '%s'", yytext);
1604                           ParserDebug("P:promise_type:error yychar = %d, %c, yyempty = %d\n", yychar, yychar, YYEMPTY);
1605                           yyclearin;
1606                        }
1607 #line 1608 "cf3parse.c" /* yacc.c:1646  */
1608     break;
1609 
1610   case 53:
1611 #line 277 "cf3parse.y" /* yacc.c:1646  */
1612     {
1613                            ParserHandlePromiseGuard();
1614                        }
1615 #line 1616 "cf3parse.c" /* yacc.c:1646  */
1616     break;
1617 
1618   case 61:
1619 #line 301 "cf3parse.y" /* yacc.c:1646  */
1620     {
1621                            /*
1622                             * Based on yychar display right error message
1623                            */
1624                            ParserDebug("P:promiser:error yychar = %d\n", yychar);
1625                            if (yychar =='-' || yychar == '>')
1626                            {
1627                               ParseError("Expected '->', got '%s'", yytext);
1628                            }
1629                            else if (yychar == IDENTIFIER)
1630                            {
1631                               ParseError("Expected attribute, got '%s'", yytext);
1632                            }
1633                            else if (yychar == ',')
1634                            {
1635                               ParseError("Expected attribute, got '%s' (comma after promiser is not allowed since 3.5.0)", yytext);
1636                            }
1637                            else
1638                            {
1639                               ParseError("Expected ';', got '%s'", yytext);
1640                            }
1641                            yyclearin;
1642                        }
1643 #line 1644 "cf3parse.c" /* yacc.c:1646  */
1644     break;
1645 
1646   case 64:
1647 #line 336 "cf3parse.y" /* yacc.c:1646  */
1648     {
1649                            if (!INSTALL_SKIP)
1650                            {
1651                                if (!P.currentstype)
1652                                {
1653                                    ParseError("Missing promise type declaration");
1654                                }
1655 
1656                                P.currentpromise = BundleSectionAppendPromise(P.currentstype, P.promiser,
1657                                                                              RvalCopy(P.rval),
1658                                                                              P.currentclasses ? P.currentclasses : "any",
1659                                                                              P.currentvarclasses);
1660                                P.currentpromise->offset.line = CURRENT_PROMISER_LINE;
1661                                P.currentpromise->offset.start = P.offsets.last_string;
1662                                P.currentpromise->offset.context = P.offsets.last_class_id;
1663                            }
1664                            else
1665                            {
1666                                P.currentpromise = NULL;
1667                            }
1668                        }
1669 #line 1670 "cf3parse.c" /* yacc.c:1646  */
1670     break;
1671 
1672   case 66:
1673 #line 363 "cf3parse.y" /* yacc.c:1646  */
1674     {
1675 
1676                            if (!INSTALL_SKIP)
1677                            {
1678                                if (!P.currentstype)
1679                                {
1680                                    ParseError("Missing promise type declaration");
1681                                }
1682 
1683                                P.currentpromise = BundleSectionAppendPromise(P.currentstype, P.promiser,
1684                                                                              (Rval) { NULL, RVAL_TYPE_NOPROMISEE },
1685                                                                              P.currentclasses ? P.currentclasses : "any",
1686                                                                              P.currentvarclasses);
1687                                P.currentpromise->offset.line = CURRENT_PROMISER_LINE;
1688                                P.currentpromise->offset.start = P.offsets.last_string;
1689                                P.currentpromise->offset.context = P.offsets.last_class_id;
1690                            }
1691                            else
1692                            {
1693                                P.currentpromise = NULL;
1694                            }
1695                        }
1696 #line 1697 "cf3parse.c" /* yacc.c:1646  */
1697     break;
1698 
1699   case 68:
1700 #line 391 "cf3parse.y" /* yacc.c:1646  */
1701     {
1702                            if (P.promiser)
1703                            {
1704                                free(P.promiser);
1705                            }
1706                            P.promiser = P.currentstring;
1707                            P.currentstring = NULL;
1708                            CURRENT_PROMISER_LINE = P.line_no;
1709                            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);
1710                        }
1711 #line 1712 "cf3parse.c" /* yacc.c:1646  */
1712     break;
1713 
1714   case 69:
1715 #line 402 "cf3parse.y" /* yacc.c:1646  */
1716     {
1717                           INSTALL_SKIP = true;
1718                           ParserDebug("P:promiser:qstring::error yychar = %d\n", yychar);
1719 
1720                           if (yychar == BUNDLE || yychar == BODY)
1721                           {
1722                              ParseError("Expected '}', got '%s'", yytext);
1723                              /*
1724                              YYABORT;
1725                              */
1726                           }
1727                           else
1728                           {
1729                              ParseError("Expected promiser string, got '%s'", yytext);
1730                           }
1731 
1732                           yyclearin;
1733                        }
1734 #line 1735 "cf3parse.c" /* yacc.c:1646  */
1735     break;
1736 
1737   case 72:
1738 #line 426 "cf3parse.y" /* yacc.c:1646  */
1739     {
1740                                    /*
1741                                     * Based on next token id display right error message
1742                                    */
1743                                    ParserDebug("P:constraints_decl:error yychar = %d\n", yychar);
1744                                    if ( yychar == IDENTIFIER )
1745                                    {
1746                                        ParseError("Check previous line, Expected ',', got '%s'", yytext);
1747                                    }
1748                                    else
1749                                    {
1750                                        ParseError("Check previous line, Expected ';', got '%s'", yytext);
1751                                    }
1752                                    yyclearin;
1753 
1754                                 }
1755 #line 1756 "cf3parse.c" /* yacc.c:1646  */
1756     break;
1757 
1758   case 73:
1759 #line 447 "cf3parse.y" /* yacc.c:1646  */
1760     {
1761                            /* Don't free these */
1762                            strcpy(P.currentid,"");
1763                            RlistDestroy(P.currentRlist);
1764                            P.currentRlist = NULL;
1765                            free(P.promiser);
1766                            if (P.currentstring)
1767                            {
1768                                free(P.currentstring);
1769                            }
1770                            P.currentstring = NULL;
1771                            P.promiser = NULL;
1772                            P.promisee = NULL;
1773                            /* reset argptrs etc*/
1774                        }
1775 #line 1776 "cf3parse.c" /* yacc.c:1646  */
1776     break;
1777 
1778   case 76:
1779 #line 474 "cf3parse.y" /* yacc.c:1646  */
1780     {
1781                            ParserHandleBundlePromiseRval();
1782                        }
1783 #line 1784 "cf3parse.c" /* yacc.c:1646  */
1784     break;
1785 
1786   case 77:
1787 #line 481 "cf3parse.y" /* yacc.c:1646  */
1788     {
1789                            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);
1790 
1791                            if (!PolicyHasCustomPromiseType(P.policy, P.currenttype))
1792                            {
1793                                const PromiseTypeSyntax *promise_type_syntax = PromiseTypeSyntaxGet(P.blocktype, P.currenttype);
1794                                if (!promise_type_syntax)
1795                                {
1796                                    ParseError("Invalid promise type '%s' in bundle '%s' of type '%s'", P.currenttype, P.blockid, P.blocktype);
1797                                    INSTALL_SKIP = true;
1798                                }
1799                                else if (!PromiseTypeSyntaxGetConstraintSyntax(promise_type_syntax, P.currentid))
1800                                {
1801                                    ParseError("Unknown attribute '%s' for promise type '%s' in bundle with type '%s'", P.currentid, P.currenttype, P.blocktype);
1802                                    INSTALL_SKIP = true;
1803                                }
1804                            }
1805 
1806                            strncpy(P.lval,P.currentid,CF_MAXVARSIZE);
1807                            RlistDestroy(P.currentRlist);
1808                            P.currentRlist = NULL;
1809                        }
1810 #line 1811 "cf3parse.c" /* yacc.c:1646  */
1811     break;
1812 
1813   case 78:
1814 #line 504 "cf3parse.y" /* yacc.c:1646  */
1815     {
1816                              ParseError("Expected attribute, got '%s'\n", yytext);
1817                        }
1818 #line 1819 "cf3parse.c" /* yacc.c:1646  */
1819     break;
1820 
1821   case 79:
1822 #line 511 "cf3parse.y" /* yacc.c:1646  */
1823     {
1824                            ParserBeginBlockBody();
1825                        }
1826 #line 1827 "cf3parse.c" /* yacc.c:1646  */
1827     break;
1828 
1829   case 80:
1830 #line 518 "cf3parse.y" /* yacc.c:1646  */
1831     {
1832                            ParserEndCurrentBlock();
1833                        }
1834 #line 1835 "cf3parse.c" /* yacc.c:1646  */
1835     break;
1836 
1837   case 88:
1838 #line 539 "cf3parse.y" /* yacc.c:1646  */
1839     {
1840                           ParseError("Expected ';' check previous statement, got '%s'", yytext);
1841                        }
1842 #line 1843 "cf3parse.c" /* yacc.c:1646  */
1843     break;
1844 
1845   case 89:
1846 #line 548 "cf3parse.y" /* yacc.c:1646  */
1847     {
1848                            ParserHandleBlockAttributeRval();
1849                        }
1850 #line 1851 "cf3parse.c" /* yacc.c:1646  */
1851     break;
1852 
1853   case 90:
1854 #line 555 "cf3parse.y" /* yacc.c:1646  */
1855     {
1856                            ParserDebug("\tP:%s:%s:%s:%s attribute = %s\n", ParserBlockString(P.block), P.blocktype, P.blockid, P.currentclasses ? P.currentclasses : "any", P.currentid);
1857 
1858                            if (!INSTALL_SKIP)
1859                            {
1860                                const BodySyntax *body_syntax = BodySyntaxGet(P.block, P.currentbody->type);
1861 
1862                                if (!body_syntax || !BodySyntaxGetConstraintSyntax(body_syntax->constraints, P.currentid))
1863                                {
1864                                    ParseError(
1865                                        "Unknown attribute '%s' for '%s %s %s'",
1866                                        P.currentid,                // attribute name (lval)
1867                                        ParserBlockString(P.block), // body     (block type)
1868                                        P.currentbody->type,        // file     (body type)
1869                                        P.blockid);                 // control  (body name)
1870                                    INSTALL_SKIP = true;
1871                                }
1872 
1873                                strncpy(P.lval,P.currentid,CF_MAXVARSIZE);
1874                            }
1875                            RlistDestroy(P.currentRlist);
1876                            P.currentRlist = NULL;
1877                        }
1878 #line 1879 "cf3parse.c" /* yacc.c:1646  */
1879     break;
1880 
1881   case 91:
1882 #line 579 "cf3parse.y" /* yacc.c:1646  */
1883     {
1884                           ParserDebug("P:selection_id:idsyntax:error yychar = %d\n", yychar);
1885 
1886                           if ( yychar == BUNDLE || yychar == BODY )
1887                           {
1888                              ParseError("Expected '}', got '%s'", yytext);
1889                              /*
1890                              YYABORT;
1891                              */
1892                           }
1893                           else
1894                           {
1895                              ParseError("Expected attribute, got '%s'", yytext);
1896                           }
1897 
1898                           yyclearin;
1899                        }
1900 #line 1901 "cf3parse.c" /* yacc.c:1646  */
1901     break;
1902 
1903   case 92:
1904 #line 600 "cf3parse.y" /* yacc.c:1646  */
1905     {
1906                            ParserDebug("\tP:=>\n");
1907                        }
1908 #line 1909 "cf3parse.c" /* yacc.c:1646  */
1909     break;
1910 
1911   case 93:
1912 #line 604 "cf3parse.y" /* yacc.c:1646  */
1913     {
1914                           yyclearin;
1915                           ParseError("Expected '=>', got '%s'", yytext);
1916                        }
1917 #line 1918 "cf3parse.c" /* yacc.c:1646  */
1918     break;
1919 
1920   case 94:
1921 #line 612 "cf3parse.y" /* yacc.c:1646  */
1922     {
1923                            ParserDebug("\tP:->\n");
1924                        }
1925 #line 1926 "cf3parse.c" /* yacc.c:1646  */
1926     break;
1927 
1928   case 95:
1929 #line 626 "cf3parse.y" /* yacc.c:1646  */
1930     {
1931                            P.offsets.last_class_id = P.offsets.current - strlen(P.currentclasses ? P.currentclasses : P.currentvarclasses) - 2;
1932                            ParserDebug("\tP:%s:%s:%s:%s %s = %s\n", ParserBlockString(P.block), P.blocktype, P.blockid, P.currenttype, P.currentclasses ? "class": "varclass", yytext);
1933 
1934                            if (P.currentclasses != NULL)
1935                            {
1936                                char *literal = xstrdup(P.currentclasses);
1937 
1938                                ValidateClassLiteral(literal);
1939 
1940                                free(literal);
1941                            }
1942                        }
1943 #line 1944 "cf3parse.c" /* yacc.c:1646  */
1944     break;
1945 
1946   case 96:
1947 #line 646 "cf3parse.y" /* yacc.c:1646  */
1948     {
1949                            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);
1950                            RvalDestroy(P.rval);
1951                            P.rval = (Rval) { xstrdup(P.currentid), RVAL_TYPE_SCALAR };
1952                            P.references_body = true;
1953                        }
1954 #line 1955 "cf3parse.c" /* yacc.c:1646  */
1955     break;
1956 
1957   case 97:
1958 #line 653 "cf3parse.y" /* yacc.c:1646  */
1959     {
1960                            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);
1961                            RvalDestroy(P.rval);
1962                            P.rval = (Rval) { P.currentstring, RVAL_TYPE_SCALAR };
1963 
1964                            P.currentstring = NULL;
1965                            P.references_body = false;
1966 
1967                            if (P.currentpromise)
1968                            {
1969                                if (LvalWantsBody(P.currentpromise->parent_section->promise_type, P.lval))
1970                                {
1971                                    yyerror("An rvalue is quoted, but we expect an unquoted body identifier");
1972                                }
1973                            }
1974                        }
1975 #line 1976 "cf3parse.c" /* yacc.c:1646  */
1976     break;
1977 
1978   case 98:
1979 #line 670 "cf3parse.y" /* yacc.c:1646  */
1980     {
1981                            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);
1982                            RvalDestroy(P.rval);
1983                            P.rval = (Rval) { P.currentstring, RVAL_TYPE_SCALAR };
1984 
1985                            P.currentstring = NULL;
1986                            P.references_body = false;
1987                        }
1988 #line 1989 "cf3parse.c" /* yacc.c:1646  */
1989     break;
1990 
1991   case 99:
1992 #line 679 "cf3parse.y" /* yacc.c:1646  */
1993     {
1994                            ParserDebug("\tP:%s:%s:%s:%s install list =  %s\n", ParserBlockString(P.block), P.blocktype, P.blockid, P.currentclasses ? P.currentclasses : "any", P.lval);
1995                            RvalDestroy(P.rval);
1996                            P.rval = (Rval) { RlistCopy(P.currentRlist), RVAL_TYPE_LIST };
1997                            RlistDestroy(P.currentRlist);
1998                            P.currentRlist = NULL;
1999                            P.references_body = false;
2000                        }
2001 #line 2002 "cf3parse.c" /* yacc.c:1646  */
2002     break;
2003 
2004   case 100:
2005 #line 688 "cf3parse.y" /* yacc.c:1646  */
2006     {
2007                            RvalDestroy(P.rval);
2008                            P.rval = (Rval) { P.currentfncall[P.arg_nesting+1], RVAL_TYPE_FNCALL };
2009                            P.currentfncall[P.arg_nesting+1] = NULL;
2010                            P.references_body = false;
2011                        }
2012 #line 2013 "cf3parse.c" /* yacc.c:1646  */
2013     break;
2014 
2015   case 101:
2016 #line 696 "cf3parse.y" /* yacc.c:1646  */
2017     {
2018                            yyclearin;
2019                            ParseError("Invalid r-value type '%s'", yytext);
2020                        }
2021 #line 2022 "cf3parse.c" /* yacc.c:1646  */
2022     break;
2023 
2024   case 107:
2025 #line 713 "cf3parse.y" /* yacc.c:1646  */
2026     {
2027                            ParserDebug("P:rval:list:error yychar = %d\n", yychar);
2028                            if ( yychar ==';' )
2029                            {
2030                                ParseError("Expected '}', wrong input '%s'", yytext);
2031                            }
2032                            else if ( yychar == FAT_ARROW )
2033                            {
2034                                ParseError("Check list statement previous line,"
2035                                           " Expected '}', wrong input '%s'",
2036                                           yytext);
2037                            }
2038                            else
2039                            {
2040                                ParseError("Expected ',', wrong input '%s'", yytext);
2041                            }
2042                            yyclearin;
2043                        }
2044 #line 2045 "cf3parse.c" /* yacc.c:1646  */
2045     break;
2046 
2047   case 108:
2048 #line 735 "cf3parse.y" /* yacc.c:1646  */
2049     {
2050                            ParserDebug("\tP:%s:%s:%s:%s list append: "
2051                                        "id = %s\n",
2052                                        ParserBlockString(P.block), P.blocktype, P.blockid,
2053                                        (P.currentclasses ?
2054                                             P.currentclasses : "any"),
2055                                        P.currentid);
2056                            RlistAppendScalar((Rlist **) &P.currentRlist,
2057                                              P.currentid);
2058                        }
2059 #line 2060 "cf3parse.c" /* yacc.c:1646  */
2060     break;
2061 
2062   case 109:
2063 #line 747 "cf3parse.y" /* yacc.c:1646  */
2064     {
2065                            ParserDebug("\tP:%s:%s:%s:%s list append: "
2066                                        "qstring = %s\n",
2067                                        ParserBlockString(P.block), P.blocktype, P.blockid,
2068                                        (P.currentclasses ?
2069                                             P.currentclasses : "any"),
2070                                        P.currentstring);
2071                            RlistAppendScalar((Rlist **) &P.currentRlist,
2072                                              (void *) P.currentstring);
2073                            free(P.currentstring);
2074                            P.currentstring = NULL;
2075                        }
2076 #line 2077 "cf3parse.c" /* yacc.c:1646  */
2077     break;
2078 
2079   case 110:
2080 #line 761 "cf3parse.y" /* yacc.c:1646  */
2081     {
2082                            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);
2083                            RlistAppendScalar((Rlist **)&P.currentRlist,(void *)P.currentstring);
2084                            free(P.currentstring);
2085                            P.currentstring = NULL;
2086                        }
2087 #line 2088 "cf3parse.c" /* yacc.c:1646  */
2088     break;
2089 
2090   case 111:
2091 #line 769 "cf3parse.y" /* yacc.c:1646  */
2092     {
2093                            RlistAppend(&P.currentRlist, P.currentfncall[P.arg_nesting+1], RVAL_TYPE_FNCALL);
2094                            FnCallDestroy(P.currentfncall[P.arg_nesting+1]);
2095                            P.currentfncall[P.arg_nesting+1] = NULL;
2096                        }
2097 #line 2098 "cf3parse.c" /* yacc.c:1646  */
2098     break;
2099 
2100   case 112:
2101 #line 776 "cf3parse.y" /* yacc.c:1646  */
2102     {
2103                           yyclearin;
2104                           ParseError("Invalid input for a list item, got '%s'", yytext);
2105                        }
2106 #line 2107 "cf3parse.c" /* yacc.c:1646  */
2107     break;
2108 
2109   case 113:
2110 #line 784 "cf3parse.y" /* yacc.c:1646  */
2111     {
2112                            ParserDebug("\tP:%s:%s:%s:%s function id = %s\n", ParserBlockString(P.block), P.blocktype, P.blockid, P.currentclasses ? P.currentclasses : "any", P.currentid);
2113                        }
2114 #line 2115 "cf3parse.c" /* yacc.c:1646  */
2115     break;
2116 
2117   case 114:
2118 #line 788 "cf3parse.y" /* yacc.c:1646  */
2119     {
2120                            ParserDebug("\tP:%s:%s:%s:%s function nakedvar = %s\n", ParserBlockString(P.block), P.blocktype, P.blockid, P.currentclasses ? P.currentclasses : "any", P.currentstring);
2121                            strncpy(P.currentid, P.currentstring, CF_MAXVARSIZE - 1); // Make a var look like an ID
2122                            free(P.currentstring);
2123                            P.currentstring = NULL;
2124                        }
2125 #line 2126 "cf3parse.c" /* yacc.c:1646  */
2126     break;
2127 
2128   case 115:
2129 #line 801 "cf3parse.y" /* yacc.c:1646  */
2130     {
2131                            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);
2132                        }
2133 #line 2134 "cf3parse.c" /* yacc.c:1646  */
2134     break;
2135 
2136   case 116:
2137 #line 808 "cf3parse.y" /* yacc.c:1646  */
2138     {
2139                            if (++P.arg_nesting >= CF_MAX_NESTING)
2140                            {
2141                                fatal_yyerror("Nesting of functions is deeper than recommended");
2142                            }
2143                            P.currentfnid[P.arg_nesting] = xstrdup(P.currentid);
2144                            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 );
2145                        }
2146 #line 2147 "cf3parse.c" /* yacc.c:1646  */
2147     break;
2148 
2149   case 117:
2150 #line 820 "cf3parse.y" /* yacc.c:1646  */
2151     {
2152                            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 );
2153                            P.currentfncall[P.arg_nesting] = FnCallNew(P.currentfnid[P.arg_nesting], P.giveargs[P.arg_nesting]);
2154                            P.giveargs[P.arg_nesting] = NULL;
2155                            strcpy(P.currentid,"");
2156                            free(P.currentfnid[P.arg_nesting]);
2157                            P.currentfnid[P.arg_nesting] = NULL;
2158                            P.arg_nesting--;
2159                        }
2160 #line 2161 "cf3parse.c" /* yacc.c:1646  */
2161     break;
2162 
2163   case 121:
2164 #line 837 "cf3parse.y" /* yacc.c:1646  */
2165     {
2166                            ParseError("Expected ',', wrong input '%s'", yytext);
2167                            yyclearin;
2168                        }
2169 #line 2170 "cf3parse.c" /* yacc.c:1646  */
2170     break;
2171 
2172   case 122:
2173 #line 845 "cf3parse.y" /* yacc.c:1646  */
2174     {
2175                            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);
2176                            /* currently inside a use function */
2177                            RlistAppendScalar(&P.giveargs[P.arg_nesting],P.currentid);
2178                        }
2179 #line 2180 "cf3parse.c" /* yacc.c:1646  */
2180     break;
2181 
2182   case 123:
2183 #line 852 "cf3parse.y" /* yacc.c:1646  */
2184     {
2185                            /* currently inside a use function */
2186                            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);
2187                            RlistAppendScalar(&P.giveargs[P.arg_nesting],P.currentstring);
2188                            free(P.currentstring);
2189                            P.currentstring = NULL;
2190                        }
2191 #line 2192 "cf3parse.c" /* yacc.c:1646  */
2192     break;
2193 
2194   case 124:
2195 #line 861 "cf3parse.y" /* yacc.c:1646  */
2196     {
2197                            /* currently inside a use function */
2198                            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);
2199                            RlistAppendScalar(&P.giveargs[P.arg_nesting],P.currentstring);
2200                            free(P.currentstring);
2201                            P.currentstring = NULL;
2202                        }
2203 #line 2204 "cf3parse.c" /* yacc.c:1646  */
2204     break;
2205 
2206   case 125:
2207 #line 870 "cf3parse.y" /* yacc.c:1646  */
2208     {
2209                            /* Careful about recursion */
2210                            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);
2211                            RlistAppend(&P.giveargs[P.arg_nesting], P.currentfncall[P.arg_nesting+1], RVAL_TYPE_FNCALL);
2212                            RvalDestroy((Rval) { P.currentfncall[P.arg_nesting+1], RVAL_TYPE_FNCALL });
2213                            P.currentfncall[P.arg_nesting+1] = NULL;
2214                        }
2215 #line 2216 "cf3parse.c" /* yacc.c:1646  */
2216     break;
2217 
2218   case 126:
2219 #line 879 "cf3parse.y" /* yacc.c:1646  */
2220     {
2221                            ParserDebug("P:rval:function:gaitem:error yychar = %d\n", yychar);
2222                            if (yychar == ';')
2223                            {
2224                               ParseError("Expected ')', wrong input '%s'", yytext);
2225                            }
2226                            else if (yychar == FAT_ARROW )
2227                            {
2228                               ParseError("Check function statement  previous line, Expected ')', wrong input '%s'", yytext);
2229                            }
2230                            else
2231                            {
2232                               ParseError("Invalid function argument, wrong input '%s'", yytext);
2233                            }
2234                            yyclearin;
2235                        }
2236 #line 2237 "cf3parse.c" /* yacc.c:1646  */
2237     break;
2238 
2239 
2240 #line 2241 "cf3parse.c" /* yacc.c:1646  */
2241       default: break;
2242     }
2243   /* User semantic actions sometimes alter yychar, and that requires
2244      that yytoken be updated with the new translation.  We take the
2245      approach of translating immediately before every use of yytoken.
2246      One alternative is translating here after every semantic action,
2247      but that translation would be missed if the semantic action invokes
2248      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2249      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
2250      incorrect destructor might then be invoked immediately.  In the
2251      case of YYERROR or YYBACKUP, subsequent parser actions might lead
2252      to an incorrect destructor call or verbose syntax error message
2253      before the lookahead is translated.  */
2254   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2255 
2256   YYPOPSTACK (yylen);
2257   yylen = 0;
2258   YY_STACK_PRINT (yyss, yyssp);
2259 
2260   *++yyvsp = yyval;
2261 
2262   /* Now 'shift' the result of the reduction.  Determine what state
2263      that goes to, based on the state we popped back to and the rule
2264      number reduced by.  */
2265 
2266   yyn = yyr1[yyn];
2267 
2268   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2269   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2270     yystate = yytable[yystate];
2271   else
2272     yystate = yydefgoto[yyn - YYNTOKENS];
2273 
2274   goto yynewstate;
2275 
2276 
2277 /*--------------------------------------.
2278 | yyerrlab -- here on detecting error.  |
2279 `--------------------------------------*/
2280 yyerrlab:
2281   /* Make sure we have latest lookahead translation.  See comments at
2282      user semantic actions for why this is necessary.  */
2283   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2284 
2285   /* If not already recovering from an error, report this error.  */
2286   if (!yyerrstatus)
2287     {
2288       ++yynerrs;
2289 #if ! YYERROR_VERBOSE
2290       yyerror (YY_("syntax error"));
2291 #else
2292 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2293                                         yyssp, yytoken)
2294       {
2295         char const *yymsgp = YY_("syntax error");
2296         int yysyntax_error_status;
2297         yysyntax_error_status = YYSYNTAX_ERROR;
2298         if (yysyntax_error_status == 0)
2299           yymsgp = yymsg;
2300         else if (yysyntax_error_status == 1)
2301           {
2302             if (yymsg != yymsgbuf)
2303               YYSTACK_FREE (yymsg);
2304             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2305             if (!yymsg)
2306               {
2307                 yymsg = yymsgbuf;
2308                 yymsg_alloc = sizeof yymsgbuf;
2309                 yysyntax_error_status = 2;
2310               }
2311             else
2312               {
2313                 yysyntax_error_status = YYSYNTAX_ERROR;
2314                 yymsgp = yymsg;
2315               }
2316           }
2317         yyerror (yymsgp);
2318         if (yysyntax_error_status == 2)
2319           goto yyexhaustedlab;
2320       }
2321 # undef YYSYNTAX_ERROR
2322 #endif
2323     }
2324 
2325 
2326 
2327   if (yyerrstatus == 3)
2328     {
2329       /* If just tried and failed to reuse lookahead token after an
2330          error, discard it.  */
2331 
2332       if (yychar <= YYEOF)
2333         {
2334           /* Return failure if at end of input.  */
2335           if (yychar == YYEOF)
2336             YYABORT;
2337         }
2338       else
2339         {
2340           yydestruct ("Error: discarding",
2341                       yytoken, &yylval);
2342           yychar = YYEMPTY;
2343         }
2344     }
2345 
2346   /* Else will try to reuse lookahead token after shifting the error
2347      token.  */
2348   goto yyerrlab1;
2349 
2350 
2351 /*---------------------------------------------------.
2352 | yyerrorlab -- error raised explicitly by YYERROR.  |
2353 `---------------------------------------------------*/
2354 yyerrorlab:
2355 
2356   /* Pacify compilers like GCC when the user code never invokes
2357      YYERROR and the label yyerrorlab therefore never appears in user
2358      code.  */
2359   if (/*CONSTCOND*/ 0)
2360      goto yyerrorlab;
2361 
2362   /* Do not reclaim the symbols of the rule whose action triggered
2363      this YYERROR.  */
2364   YYPOPSTACK (yylen);
2365   yylen = 0;
2366   YY_STACK_PRINT (yyss, yyssp);
2367   yystate = *yyssp;
2368   goto yyerrlab1;
2369 
2370 
2371 /*-------------------------------------------------------------.
2372 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2373 `-------------------------------------------------------------*/
2374 yyerrlab1:
2375   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2376 
2377   for (;;)
2378     {
2379       yyn = yypact[yystate];
2380       if (!yypact_value_is_default (yyn))
2381         {
2382           yyn += YYTERROR;
2383           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2384             {
2385               yyn = yytable[yyn];
2386               if (0 < yyn)
2387                 break;
2388             }
2389         }
2390 
2391       /* Pop the current state because it cannot handle the error token.  */
2392       if (yyssp == yyss)
2393         YYABORT;
2394 
2395 
2396       yydestruct ("Error: popping",
2397                   yystos[yystate], yyvsp);
2398       YYPOPSTACK (1);
2399       yystate = *yyssp;
2400       YY_STACK_PRINT (yyss, yyssp);
2401     }
2402 
2403   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2404   *++yyvsp = yylval;
2405   YY_IGNORE_MAYBE_UNINITIALIZED_END
2406 
2407 
2408   /* Shift the error token.  */
2409   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2410 
2411   yystate = yyn;
2412   goto yynewstate;
2413 
2414 
2415 /*-------------------------------------.
2416 | yyacceptlab -- YYACCEPT comes here.  |
2417 `-------------------------------------*/
2418 yyacceptlab:
2419   yyresult = 0;
2420   goto yyreturn;
2421 
2422 /*-----------------------------------.
2423 | yyabortlab -- YYABORT comes here.  |
2424 `-----------------------------------*/
2425 yyabortlab:
2426   yyresult = 1;
2427   goto yyreturn;
2428 
2429 #if !defined yyoverflow || YYERROR_VERBOSE
2430 /*-------------------------------------------------.
2431 | yyexhaustedlab -- memory exhaustion comes here.  |
2432 `-------------------------------------------------*/
2433 yyexhaustedlab:
2434   yyerror (YY_("memory exhausted"));
2435   yyresult = 2;
2436   /* Fall through.  */
2437 #endif
2438 
2439 yyreturn:
2440   if (yychar != YYEMPTY)
2441     {
2442       /* Make sure we have latest lookahead translation.  See comments at
2443          user semantic actions for why this is necessary.  */
2444       yytoken = YYTRANSLATE (yychar);
2445       yydestruct ("Cleanup: discarding lookahead",
2446                   yytoken, &yylval);
2447     }
2448   /* Do not reclaim the symbols of the rule whose action triggered
2449      this YYABORT or YYACCEPT.  */
2450   YYPOPSTACK (yylen);
2451   YY_STACK_PRINT (yyss, yyssp);
2452   while (yyssp != yyss)
2453     {
2454       yydestruct ("Cleanup: popping",
2455                   yystos[*yyssp], yyvsp);
2456       YYPOPSTACK (1);
2457     }
2458 #ifndef yyoverflow
2459   if (yyss != yyssa)
2460     YYSTACK_FREE (yyss);
2461 #endif
2462 #if YYERROR_VERBOSE
2463   if (yymsg != yymsgbuf)
2464     YYSTACK_FREE (yymsg);
2465 #endif
2466   return yyresult;
2467 }
2468 #line 896 "cf3parse.y" /* yacc.c:1906  */
2469 
2470