1 /* A Bison parser, made by GNU Bison 3.0.2.  */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2013 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.2"
48 
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers.  */
53 #define YYPURE 1
54 
55 /* Push parsers.  */
56 #define YYPUSH 0
57 
58 /* Pull parsers.  */
59 #define YYPULL 1
60 
61 
62 /* Substitute the variable and function names.  */
63 #define yyparse         xlu__cfg_yyparse
64 #define yylex           xlu__cfg_yylex
65 #define yyerror         xlu__cfg_yyerror
66 #define yydebug         xlu__cfg_yydebug
67 #define yynerrs         xlu__cfg_yynerrs
68 
69 
70 /* Copy the first part of user declarations.  */
71 #line 19 "libxlu_cfg_y.y" /* yacc.c:339  */
72 
73 #define ctx_scanner ctx->scanner
74 #include "libxlu_cfg_i.h"
75 #include "libxlu_cfg_l.h"
76 
77 #line 78 "libxlu_cfg_y.c" /* yacc.c:339  */
78 
79 # ifndef YY_NULLPTR
80 #  if defined __cplusplus && 201103L <= __cplusplus
81 #   define YY_NULLPTR nullptr
82 #  else
83 #   define YY_NULLPTR 0
84 #  endif
85 # endif
86 
87 /* Enabling verbose error messages.  */
88 #ifdef YYERROR_VERBOSE
89 # undef YYERROR_VERBOSE
90 # define YYERROR_VERBOSE 1
91 #else
92 # define YYERROR_VERBOSE 1
93 #endif
94 
95 /* In a future release of Bison, this section will be replaced
96    by #include "libxlu_cfg_y.h".  */
97 #ifndef YY_XLU_CFG_YY_LIBXLU_CFG_Y_H_INCLUDED
98 # define YY_XLU_CFG_YY_LIBXLU_CFG_Y_H_INCLUDED
99 /* Debug traces.  */
100 #ifndef YYDEBUG
101 # define YYDEBUG 0
102 #endif
103 #if YYDEBUG
104 extern int xlu__cfg_yydebug;
105 #endif
106 
107 /* Token type.  */
108 #ifndef YYTOKENTYPE
109 # define YYTOKENTYPE
110   enum yytokentype
111   {
112     IDENT = 258,
113     STRING = 259,
114     NUMBER = 260,
115     NEWLINE = 261
116   };
117 #endif
118 
119 /* Value type.  */
120 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
121 typedef union YYSTYPE YYSTYPE;
122 union YYSTYPE
123 {
124 #line 25 "libxlu_cfg_y.y" /* yacc.c:355  */
125 
126   char *string;
127   XLU_ConfigValue *value;
128 
129 #line 130 "libxlu_cfg_y.c" /* yacc.c:355  */
130 };
131 # define YYSTYPE_IS_TRIVIAL 1
132 # define YYSTYPE_IS_DECLARED 1
133 #endif
134 
135 /* Location type.  */
136 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
137 typedef struct YYLTYPE YYLTYPE;
138 struct YYLTYPE
139 {
140   int first_line;
141   int first_column;
142   int last_line;
143   int last_column;
144 };
145 # define YYLTYPE_IS_DECLARED 1
146 # define YYLTYPE_IS_TRIVIAL 1
147 #endif
148 
149 
150 
151 int xlu__cfg_yyparse (CfgParseContext *ctx);
152 
153 #endif /* !YY_XLU_CFG_YY_LIBXLU_CFG_Y_H_INCLUDED  */
154 
155 /* Copy the second part of user declarations.  */
156 
157 #line 158 "libxlu_cfg_y.c" /* yacc.c:358  */
158 
159 #ifdef short
160 # undef short
161 #endif
162 
163 #ifdef YYTYPE_UINT8
164 typedef YYTYPE_UINT8 yytype_uint8;
165 #else
166 typedef unsigned char yytype_uint8;
167 #endif
168 
169 #ifdef YYTYPE_INT8
170 typedef YYTYPE_INT8 yytype_int8;
171 #else
172 typedef signed char yytype_int8;
173 #endif
174 
175 #ifdef YYTYPE_UINT16
176 typedef YYTYPE_UINT16 yytype_uint16;
177 #else
178 typedef unsigned short int yytype_uint16;
179 #endif
180 
181 #ifdef YYTYPE_INT16
182 typedef YYTYPE_INT16 yytype_int16;
183 #else
184 typedef short int yytype_int16;
185 #endif
186 
187 #ifndef YYSIZE_T
188 # ifdef __SIZE_TYPE__
189 #  define YYSIZE_T __SIZE_TYPE__
190 # elif defined size_t
191 #  define YYSIZE_T size_t
192 # elif ! defined YYSIZE_T
193 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
194 #  define YYSIZE_T size_t
195 # else
196 #  define YYSIZE_T unsigned int
197 # endif
198 #endif
199 
200 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
201 
202 #ifndef YY_
203 # if defined YYENABLE_NLS && YYENABLE_NLS
204 #  if ENABLE_NLS
205 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
206 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
207 #  endif
208 # endif
209 # ifndef YY_
210 #  define YY_(Msgid) Msgid
211 # endif
212 #endif
213 
214 #ifndef YY_ATTRIBUTE
215 # if (defined __GNUC__                                               \
216       && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
217      || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
218 #  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
219 # else
220 #  define YY_ATTRIBUTE(Spec) /* empty */
221 # endif
222 #endif
223 
224 #ifndef YY_ATTRIBUTE_PURE
225 # define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
226 #endif
227 
228 #ifndef YY_ATTRIBUTE_UNUSED
229 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
230 #endif
231 
232 #if !defined _Noreturn \
233      && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
234 # if defined _MSC_VER && 1200 <= _MSC_VER
235 #  define _Noreturn __declspec (noreturn)
236 # else
237 #  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
238 # endif
239 #endif
240 
241 /* Suppress unused-variable warnings by "using" E.  */
242 #if ! defined lint || defined __GNUC__
243 # define YYUSE(E) ((void) (E))
244 #else
245 # define YYUSE(E) /* empty */
246 #endif
247 
248 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
249 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
250 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
251     _Pragma ("GCC diagnostic push") \
252     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
253     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
254 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
255     _Pragma ("GCC diagnostic pop")
256 #else
257 # define YY_INITIAL_VALUE(Value) Value
258 #endif
259 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
260 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
261 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
262 #endif
263 #ifndef YY_INITIAL_VALUE
264 # define YY_INITIAL_VALUE(Value) /* Nothing. */
265 #endif
266 
267 
268 #if ! defined yyoverflow || YYERROR_VERBOSE
269 
270 /* The parser invokes alloca or malloc; define the necessary symbols.  */
271 
272 # ifdef YYSTACK_USE_ALLOCA
273 #  if YYSTACK_USE_ALLOCA
274 #   ifdef __GNUC__
275 #    define YYSTACK_ALLOC __builtin_alloca
276 #   elif defined __BUILTIN_VA_ARG_INCR
277 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
278 #   elif defined _AIX
279 #    define YYSTACK_ALLOC __alloca
280 #   elif defined _MSC_VER
281 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
282 #    define alloca _alloca
283 #   else
284 #    define YYSTACK_ALLOC alloca
285 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
286 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
287       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
288 #     ifndef EXIT_SUCCESS
289 #      define EXIT_SUCCESS 0
290 #     endif
291 #    endif
292 #   endif
293 #  endif
294 # endif
295 
296 # ifdef YYSTACK_ALLOC
297    /* Pacify GCC's 'empty if-body' warning.  */
298 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
299 #  ifndef YYSTACK_ALLOC_MAXIMUM
300     /* The OS might guarantee only one guard page at the bottom of the stack,
301        and a page size can be as small as 4096 bytes.  So we cannot safely
302        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
303        to allow for a few compiler-allocated temporary stack slots.  */
304 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
305 #  endif
306 # else
307 #  define YYSTACK_ALLOC YYMALLOC
308 #  define YYSTACK_FREE YYFREE
309 #  ifndef YYSTACK_ALLOC_MAXIMUM
310 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
311 #  endif
312 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
313        && ! ((defined YYMALLOC || defined malloc) \
314              && (defined YYFREE || defined free)))
315 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
316 #   ifndef EXIT_SUCCESS
317 #    define EXIT_SUCCESS 0
318 #   endif
319 #  endif
320 #  ifndef YYMALLOC
321 #   define YYMALLOC malloc
322 #   if ! defined malloc && ! defined EXIT_SUCCESS
323 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
324 #   endif
325 #  endif
326 #  ifndef YYFREE
327 #   define YYFREE free
328 #   if ! defined free && ! defined EXIT_SUCCESS
329 void free (void *); /* INFRINGES ON USER NAME SPACE */
330 #   endif
331 #  endif
332 # endif
333 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
334 
335 
336 #if (! defined yyoverflow \
337      && (! defined __cplusplus \
338          || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
339              && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
340 
341 /* A type that is properly aligned for any stack member.  */
342 union yyalloc
343 {
344   yytype_int16 yyss_alloc;
345   YYSTYPE yyvs_alloc;
346   YYLTYPE yyls_alloc;
347 };
348 
349 /* The size of the maximum gap between one aligned stack and the next.  */
350 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
351 
352 /* The size of an array large to enough to hold all stacks, each with
353    N elements.  */
354 # define YYSTACK_BYTES(N) \
355      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
356       + 2 * YYSTACK_GAP_MAXIMUM)
357 
358 # define YYCOPY_NEEDED 1
359 
360 /* Relocate STACK from its old location to the new one.  The
361    local variables YYSIZE and YYSTACKSIZE give the old and new number of
362    elements in the stack, and YYPTR gives the new location of the
363    stack.  Advance YYPTR to a properly aligned location for the next
364    stack.  */
365 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
366     do                                                                  \
367       {                                                                 \
368         YYSIZE_T yynewbytes;                                            \
369         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
370         Stack = &yyptr->Stack_alloc;                                    \
371         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
372         yyptr += yynewbytes / sizeof (*yyptr);                          \
373       }                                                                 \
374     while (0)
375 
376 #endif
377 
378 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
379 /* Copy COUNT objects from SRC to DST.  The source and destination do
380    not overlap.  */
381 # ifndef YYCOPY
382 #  if defined __GNUC__ && 1 < __GNUC__
383 #   define YYCOPY(Dst, Src, Count) \
384       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
385 #  else
386 #   define YYCOPY(Dst, Src, Count)              \
387       do                                        \
388         {                                       \
389           YYSIZE_T yyi;                         \
390           for (yyi = 0; yyi < (Count); yyi++)   \
391             (Dst)[yyi] = (Src)[yyi];            \
392         }                                       \
393       while (0)
394 #  endif
395 # endif
396 #endif /* !YYCOPY_NEEDED */
397 
398 /* YYFINAL -- State number of the termination state.  */
399 #define YYFINAL  3
400 /* YYLAST -- Last index in YYTABLE.  */
401 #define YYLAST   25
402 
403 /* YYNTOKENS -- Number of terminals.  */
404 #define YYNTOKENS  12
405 /* YYNNTS -- Number of nonterminals.  */
406 #define YYNNTS  11
407 /* YYNRULES -- Number of rules.  */
408 #define YYNRULES  22
409 /* YYNSTATES -- Number of states.  */
410 #define YYNSTATES  30
411 
412 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
413    by yylex, with out-of-bounds checking.  */
414 #define YYUNDEFTOK  2
415 #define YYMAXUTOK   261
416 
417 #define YYTRANSLATE(YYX)                                                \
418   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
419 
420 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
421    as returned by yylex, without out-of-bounds checking.  */
422 static const yytype_uint8 yytranslate[] =
423 {
424        0,     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,    11,     2,     2,     2,     2,     2,
429        2,     2,     2,     2,     2,     2,     2,     2,     2,     8,
430        2,     7,     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,     9,     2,    10,     2,     2,     2,     2,     2,     2,
434        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
435        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
436        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
437        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
438        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
439        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
440        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
441        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
442        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
443        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
444        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
445        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
446        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
447        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
448        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
449        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
450        5,     6
451 };
452 
453 #if YYDEBUG
454   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
455 static const yytype_uint8 yyrline[] =
456 {
457        0,    47,    47,    48,    50,    51,    53,    54,    55,    57,
458       59,    60,    62,    63,    65,    66,    68,    69,    70,    72,
459       73,    75,    77
460 };
461 #endif
462 
463 #if YYDEBUG || YYERROR_VERBOSE || 1
464 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
465    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
466 static const char *const yytname[] =
467 {
468   "$end", "error", "$undefined", "IDENT", "STRING", "NUMBER", "NEWLINE",
469   "'='", "';'", "'['", "']'", "','", "$accept", "file", "stmts", "stmt",
470   "assignment", "endstmt", "value", "atom", "valuelist", "values", "nlok", YY_NULLPTR
471 };
472 #endif
473 
474 # ifdef YYPRINT
475 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
476    (internal) symbol number NUM (which must be that of a token).  */
477 static const yytype_uint16 yytoknum[] =
478 {
479        0,   256,   257,   258,   259,   260,   261,    61,    59,    91,
480       93,    44
481 };
482 # endif
483 
484 #define YYPACT_NINF -18
485 
486 #define yypact_value_is_default(Yystate) \
487   (!!((Yystate) == (-18)))
488 
489 #define YYTABLE_NINF -3
490 
491 #define yytable_value_is_error(Yytable_value) \
492   0
493 
494   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
495      STATE-NUM.  */
496 static const yytype_int8 yypact[] =
497 {
498      -18,     4,     0,   -18,    -1,     6,   -18,   -18,   -18,     3,
499      -18,   -18,    14,   -18,   -18,   -18,   -18,   -18,   -18,    11,
500      -18,   -18,    12,    10,    18,   -18,   -18,    11,   -18,    18
501 };
502 
503   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
504      Performed when YYTABLE does not specify something else to do.  Zero
505      means the default is an error.  */
506 static const yytype_uint8 yydefact[] =
507 {
508        4,     0,     0,     1,     0,     0,    10,    11,     5,     3,
509        7,     8,     0,     6,    14,    15,    21,     9,    12,    16,
510       22,    21,     0,    17,    19,    13,    21,    18,    21,    20
511 };
512 
513   /* YYPGOTO[NTERM-NUM].  */
514 static const yytype_int8 yypgoto[] =
515 {
516      -18,   -18,   -18,   -18,   -18,    16,   -17,   -18,   -18,   -18,
517      -14
518 };
519 
520   /* YYDEFGOTO[NTERM-NUM].  */
521 static const yytype_int8 yydefgoto[] =
522 {
523       -1,     1,     2,     8,     9,    10,    17,    18,    22,    23,
524       19
525 };
526 
527   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
528      positive, shift that token.  If negative, reduce the rule whose
529      number is the opposite.  If YYTABLE_NINF, syntax error.  */
530 static const yytype_int8 yytable[] =
531 {
532       -2,     4,    21,     5,     3,    11,     6,    24,     7,     6,
533       28,     7,    27,    12,    29,    14,    15,    20,    14,    15,
534       16,    26,    25,    16,    20,    13
535 };
536 
537 static const yytype_uint8 yycheck[] =
538 {
539        0,     1,    19,     3,     0,     6,     6,    21,     8,     6,
540       27,     8,    26,     7,    28,     4,     5,     6,     4,     5,
541        9,    11,    10,     9,     6,     9
542 };
543 
544   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
545      symbol of state STATE-NUM.  */
546 static const yytype_uint8 yystos[] =
547 {
548        0,    13,    14,     0,     1,     3,     6,     8,    15,    16,
549       17,     6,     7,    17,     4,     5,     9,    18,    19,    22,
550        6,    18,    20,    21,    22,    10,    11,    22,    18,    22
551 };
552 
553   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
554 static const yytype_uint8 yyr1[] =
555 {
556        0,    12,    13,    13,    14,    14,    15,    15,    15,    16,
557       17,    17,    18,    18,    19,    19,    20,    20,    20,    21,
558       21,    22,    22
559 };
560 
561   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
562 static const yytype_uint8 yyr2[] =
563 {
564        0,     2,     1,     2,     0,     2,     2,     1,     2,     3,
565        1,     1,     1,     4,     1,     1,     0,     1,     3,     2,
566        5,     0,     2
567 };
568 
569 
570 #define yyerrok         (yyerrstatus = 0)
571 #define yyclearin       (yychar = YYEMPTY)
572 #define YYEMPTY         (-2)
573 #define YYEOF           0
574 
575 #define YYACCEPT        goto yyacceptlab
576 #define YYABORT         goto yyabortlab
577 #define YYERROR         goto yyerrorlab
578 
579 
580 #define YYRECOVERING()  (!!yyerrstatus)
581 
582 #define YYBACKUP(Token, Value)                                  \
583 do                                                              \
584   if (yychar == YYEMPTY)                                        \
585     {                                                           \
586       yychar = (Token);                                         \
587       yylval = (Value);                                         \
588       YYPOPSTACK (yylen);                                       \
589       yystate = *yyssp;                                         \
590       goto yybackup;                                            \
591     }                                                           \
592   else                                                          \
593     {                                                           \
594       yyerror (&yylloc, ctx, YY_("syntax error: cannot back up")); \
595       YYERROR;                                                  \
596     }                                                           \
597 while (0)
598 
599 /* Error token number */
600 #define YYTERROR        1
601 #define YYERRCODE       256
602 
603 
604 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
605    If N is 0, then set CURRENT to the empty location which ends
606    the previous symbol: RHS[0] (always defined).  */
607 
608 #ifndef YYLLOC_DEFAULT
609 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
610     do                                                                  \
611       if (N)                                                            \
612         {                                                               \
613           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
614           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
615           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
616           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
617         }                                                               \
618       else                                                              \
619         {                                                               \
620           (Current).first_line   = (Current).last_line   =              \
621             YYRHSLOC (Rhs, 0).last_line;                                \
622           (Current).first_column = (Current).last_column =              \
623             YYRHSLOC (Rhs, 0).last_column;                              \
624         }                                                               \
625     while (0)
626 #endif
627 
628 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
629 
630 
631 /* Enable debugging if requested.  */
632 #if YYDEBUG
633 
634 # ifndef YYFPRINTF
635 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
636 #  define YYFPRINTF fprintf
637 # endif
638 
639 # define YYDPRINTF(Args)                        \
640 do {                                            \
641   if (yydebug)                                  \
642     YYFPRINTF Args;                             \
643 } while (0)
644 
645 
646 /* YY_LOCATION_PRINT -- Print the location on the stream.
647    This macro was not mandated originally: define only if we know
648    we won't break user code: when these are the locations we know.  */
649 
650 #ifndef YY_LOCATION_PRINT
651 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
652 
653 /* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
654 
655 YY_ATTRIBUTE_UNUSED
656 static unsigned
yy_location_print_(FILE * yyo,YYLTYPE const * const yylocp)657 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
658 {
659   unsigned res = 0;
660   int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
661   if (0 <= yylocp->first_line)
662     {
663       res += YYFPRINTF (yyo, "%d", yylocp->first_line);
664       if (0 <= yylocp->first_column)
665         res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
666     }
667   if (0 <= yylocp->last_line)
668     {
669       if (yylocp->first_line < yylocp->last_line)
670         {
671           res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
672           if (0 <= end_col)
673             res += YYFPRINTF (yyo, ".%d", end_col);
674         }
675       else if (0 <= end_col && yylocp->first_column < end_col)
676         res += YYFPRINTF (yyo, "-%d", end_col);
677     }
678   return res;
679  }
680 
681 #  define YY_LOCATION_PRINT(File, Loc)          \
682   yy_location_print_ (File, &(Loc))
683 
684 # else
685 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
686 # endif
687 #endif
688 
689 
690 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
691 do {                                                                      \
692   if (yydebug)                                                            \
693     {                                                                     \
694       YYFPRINTF (stderr, "%s ", Title);                                   \
695       yy_symbol_print (stderr,                                            \
696                   Type, Value, Location, ctx); \
697       YYFPRINTF (stderr, "\n");                                           \
698     }                                                                     \
699 } while (0)
700 
701 
702 /*----------------------------------------.
703 | Print this symbol's value on YYOUTPUT.  |
704 `----------------------------------------*/
705 
706 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep,YYLTYPE const * const yylocationp,CfgParseContext * ctx)707 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, CfgParseContext *ctx)
708 {
709   FILE *yyo = yyoutput;
710   YYUSE (yyo);
711   YYUSE (yylocationp);
712   YYUSE (ctx);
713   if (!yyvaluep)
714     return;
715 # ifdef YYPRINT
716   if (yytype < YYNTOKENS)
717     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
718 # endif
719   YYUSE (yytype);
720 }
721 
722 
723 /*--------------------------------.
724 | Print this symbol on YYOUTPUT.  |
725 `--------------------------------*/
726 
727 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep,YYLTYPE const * const yylocationp,CfgParseContext * ctx)728 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, CfgParseContext *ctx)
729 {
730   YYFPRINTF (yyoutput, "%s %s (",
731              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
732 
733   YY_LOCATION_PRINT (yyoutput, *yylocationp);
734   YYFPRINTF (yyoutput, ": ");
735   yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx);
736   YYFPRINTF (yyoutput, ")");
737 }
738 
739 /*------------------------------------------------------------------.
740 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
741 | TOP (included).                                                   |
742 `------------------------------------------------------------------*/
743 
744 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)745 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
746 {
747   YYFPRINTF (stderr, "Stack now");
748   for (; yybottom <= yytop; yybottom++)
749     {
750       int yybot = *yybottom;
751       YYFPRINTF (stderr, " %d", yybot);
752     }
753   YYFPRINTF (stderr, "\n");
754 }
755 
756 # define YY_STACK_PRINT(Bottom, Top)                            \
757 do {                                                            \
758   if (yydebug)                                                  \
759     yy_stack_print ((Bottom), (Top));                           \
760 } while (0)
761 
762 
763 /*------------------------------------------------.
764 | Report that the YYRULE is going to be reduced.  |
765 `------------------------------------------------*/
766 
767 static void
yy_reduce_print(yytype_int16 * yyssp,YYSTYPE * yyvsp,YYLTYPE * yylsp,int yyrule,CfgParseContext * ctx)768 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, CfgParseContext *ctx)
769 {
770   unsigned long int yylno = yyrline[yyrule];
771   int yynrhs = yyr2[yyrule];
772   int yyi;
773   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
774              yyrule - 1, yylno);
775   /* The symbols being reduced.  */
776   for (yyi = 0; yyi < yynrhs; yyi++)
777     {
778       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
779       yy_symbol_print (stderr,
780                        yystos[yyssp[yyi + 1 - yynrhs]],
781                        &(yyvsp[(yyi + 1) - (yynrhs)])
782                        , &(yylsp[(yyi + 1) - (yynrhs)])                       , ctx);
783       YYFPRINTF (stderr, "\n");
784     }
785 }
786 
787 # define YY_REDUCE_PRINT(Rule)          \
788 do {                                    \
789   if (yydebug)                          \
790     yy_reduce_print (yyssp, yyvsp, yylsp, Rule, ctx); \
791 } while (0)
792 
793 /* Nonzero means print parse trace.  It is left uninitialized so that
794    multiple parsers can coexist.  */
795 int yydebug;
796 #else /* !YYDEBUG */
797 # define YYDPRINTF(Args)
798 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
799 # define YY_STACK_PRINT(Bottom, Top)
800 # define YY_REDUCE_PRINT(Rule)
801 #endif /* !YYDEBUG */
802 
803 
804 /* YYINITDEPTH -- initial size of the parser's stacks.  */
805 #ifndef YYINITDEPTH
806 # define YYINITDEPTH 200
807 #endif
808 
809 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
810    if the built-in stack extension method is used).
811 
812    Do not make this value too large; the results are undefined if
813    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
814    evaluated with infinite-precision integer arithmetic.  */
815 
816 #ifndef YYMAXDEPTH
817 # define YYMAXDEPTH 10000
818 #endif
819 
820 
821 #if YYERROR_VERBOSE
822 
823 # ifndef yystrlen
824 #  if defined __GLIBC__ && defined _STRING_H
825 #   define yystrlen strlen
826 #  else
827 /* Return the length of YYSTR.  */
828 static YYSIZE_T
yystrlen(const char * yystr)829 yystrlen (const char *yystr)
830 {
831   YYSIZE_T yylen;
832   for (yylen = 0; yystr[yylen]; yylen++)
833     continue;
834   return yylen;
835 }
836 #  endif
837 # endif
838 
839 # ifndef yystpcpy
840 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
841 #   define yystpcpy stpcpy
842 #  else
843 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
844    YYDEST.  */
845 static char *
yystpcpy(char * yydest,const char * yysrc)846 yystpcpy (char *yydest, const char *yysrc)
847 {
848   char *yyd = yydest;
849   const char *yys = yysrc;
850 
851   while ((*yyd++ = *yys++) != '\0')
852     continue;
853 
854   return yyd - 1;
855 }
856 #  endif
857 # endif
858 
859 # ifndef yytnamerr
860 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
861    quotes and backslashes, so that it's suitable for yyerror.  The
862    heuristic is that double-quoting is unnecessary unless the string
863    contains an apostrophe, a comma, or backslash (other than
864    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
865    null, do not copy; instead, return the length of what the result
866    would have been.  */
867 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)868 yytnamerr (char *yyres, const char *yystr)
869 {
870   if (*yystr == '"')
871     {
872       YYSIZE_T yyn = 0;
873       char const *yyp = yystr;
874 
875       for (;;)
876         switch (*++yyp)
877           {
878           case '\'':
879           case ',':
880             goto do_not_strip_quotes;
881 
882           case '\\':
883             if (*++yyp != '\\')
884               goto do_not_strip_quotes;
885             /* Fall through.  */
886           default:
887             if (yyres)
888               yyres[yyn] = *yyp;
889             yyn++;
890             break;
891 
892           case '"':
893             if (yyres)
894               yyres[yyn] = '\0';
895             return yyn;
896           }
897     do_not_strip_quotes: ;
898     }
899 
900   if (! yyres)
901     return yystrlen (yystr);
902 
903   return yystpcpy (yyres, yystr) - yyres;
904 }
905 # endif
906 
907 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
908    about the unexpected token YYTOKEN for the state stack whose top is
909    YYSSP.
910 
911    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
912    not large enough to hold the message.  In that case, also set
913    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
914    required number of bytes is too large to store.  */
915 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)916 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
917                 yytype_int16 *yyssp, int yytoken)
918 {
919   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
920   YYSIZE_T yysize = yysize0;
921   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
922   /* Internationalized format string. */
923   const char *yyformat = YY_NULLPTR;
924   /* Arguments of yyformat. */
925   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
926   /* Number of reported tokens (one for the "unexpected", one per
927      "expected"). */
928   int yycount = 0;
929 
930   /* There are many possibilities here to consider:
931      - If this state is a consistent state with a default action, then
932        the only way this function was invoked is if the default action
933        is an error action.  In that case, don't check for expected
934        tokens because there are none.
935      - The only way there can be no lookahead present (in yychar) is if
936        this state is a consistent state with a default action.  Thus,
937        detecting the absence of a lookahead is sufficient to determine
938        that there is no unexpected or expected token to report.  In that
939        case, just report a simple "syntax error".
940      - Don't assume there isn't a lookahead just because this state is a
941        consistent state with a default action.  There might have been a
942        previous inconsistent state, consistent state with a non-default
943        action, or user semantic action that manipulated yychar.
944      - Of course, the expected token list depends on states to have
945        correct lookahead information, and it depends on the parser not
946        to perform extra reductions after fetching a lookahead from the
947        scanner and before detecting a syntax error.  Thus, state merging
948        (from LALR or IELR) and default reductions corrupt the expected
949        token list.  However, the list is correct for canonical LR with
950        one exception: it will still contain any token that will not be
951        accepted due to an error action in a later state.
952   */
953   if (yytoken != YYEMPTY)
954     {
955       int yyn = yypact[*yyssp];
956       yyarg[yycount++] = yytname[yytoken];
957       if (!yypact_value_is_default (yyn))
958         {
959           /* Start YYX at -YYN if negative to avoid negative indexes in
960              YYCHECK.  In other words, skip the first -YYN actions for
961              this state because they are default actions.  */
962           int yyxbegin = yyn < 0 ? -yyn : 0;
963           /* Stay within bounds of both yycheck and yytname.  */
964           int yychecklim = YYLAST - yyn + 1;
965           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
966           int yyx;
967 
968           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
969             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
970                 && !yytable_value_is_error (yytable[yyx + yyn]))
971               {
972                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
973                   {
974                     yycount = 1;
975                     yysize = yysize0;
976                     break;
977                   }
978                 yyarg[yycount++] = yytname[yyx];
979                 {
980                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
981                   if (! (yysize <= yysize1
982                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
983                     return 2;
984                   yysize = yysize1;
985                 }
986               }
987         }
988     }
989 
990   switch (yycount)
991     {
992 # define YYCASE_(N, S)                      \
993       case N:                               \
994         yyformat = S;                       \
995       break
996       YYCASE_(0, YY_("syntax error"));
997       YYCASE_(1, YY_("syntax error, unexpected %s"));
998       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
999       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1000       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1001       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1002 # undef YYCASE_
1003     }
1004 
1005   {
1006     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1007     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1008       return 2;
1009     yysize = yysize1;
1010   }
1011 
1012   if (*yymsg_alloc < yysize)
1013     {
1014       *yymsg_alloc = 2 * yysize;
1015       if (! (yysize <= *yymsg_alloc
1016              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1017         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1018       return 1;
1019     }
1020 
1021   /* Avoid sprintf, as that infringes on the user's name space.
1022      Don't have undefined behavior even if the translation
1023      produced a string with the wrong number of "%s"s.  */
1024   {
1025     char *yyp = *yymsg;
1026     int yyi = 0;
1027     while ((*yyp = *yyformat) != '\0')
1028       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1029         {
1030           yyp += yytnamerr (yyp, yyarg[yyi++]);
1031           yyformat += 2;
1032         }
1033       else
1034         {
1035           yyp++;
1036           yyformat++;
1037         }
1038   }
1039   return 0;
1040 }
1041 #endif /* YYERROR_VERBOSE */
1042 
1043 /*-----------------------------------------------.
1044 | Release the memory associated to this symbol.  |
1045 `-----------------------------------------------*/
1046 
1047 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep,YYLTYPE * yylocationp,CfgParseContext * ctx)1048 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, CfgParseContext *ctx)
1049 {
1050   YYUSE (yyvaluep);
1051   YYUSE (yylocationp);
1052   YYUSE (ctx);
1053   if (!yymsg)
1054     yymsg = "Deleting";
1055   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1056 
1057   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1058   switch (yytype)
1059     {
1060           case 3: /* IDENT  */
1061 #line 40 "libxlu_cfg_y.y" /* yacc.c:1257  */
1062       { free(((*yyvaluep).string)); }
1063 #line 1064 "libxlu_cfg_y.c" /* yacc.c:1257  */
1064         break;
1065 
1066     case 4: /* STRING  */
1067 #line 40 "libxlu_cfg_y.y" /* yacc.c:1257  */
1068       { free(((*yyvaluep).string)); }
1069 #line 1070 "libxlu_cfg_y.c" /* yacc.c:1257  */
1070         break;
1071 
1072     case 5: /* NUMBER  */
1073 #line 40 "libxlu_cfg_y.y" /* yacc.c:1257  */
1074       { free(((*yyvaluep).string)); }
1075 #line 1076 "libxlu_cfg_y.c" /* yacc.c:1257  */
1076         break;
1077 
1078     case 18: /* value  */
1079 #line 43 "libxlu_cfg_y.y" /* yacc.c:1257  */
1080       { xlu__cfg_value_free(((*yyvaluep).value)); }
1081 #line 1082 "libxlu_cfg_y.c" /* yacc.c:1257  */
1082         break;
1083 
1084     case 19: /* atom  */
1085 #line 40 "libxlu_cfg_y.y" /* yacc.c:1257  */
1086       { free(((*yyvaluep).string)); }
1087 #line 1088 "libxlu_cfg_y.c" /* yacc.c:1257  */
1088         break;
1089 
1090     case 20: /* valuelist  */
1091 #line 43 "libxlu_cfg_y.y" /* yacc.c:1257  */
1092       { xlu__cfg_value_free(((*yyvaluep).value)); }
1093 #line 1094 "libxlu_cfg_y.c" /* yacc.c:1257  */
1094         break;
1095 
1096     case 21: /* values  */
1097 #line 43 "libxlu_cfg_y.y" /* yacc.c:1257  */
1098       { xlu__cfg_value_free(((*yyvaluep).value)); }
1099 #line 1100 "libxlu_cfg_y.c" /* yacc.c:1257  */
1100         break;
1101 
1102 
1103       default:
1104         break;
1105     }
1106   YY_IGNORE_MAYBE_UNINITIALIZED_END
1107 }
1108 
1109 
1110 
1111 
1112 /*----------.
1113 | yyparse.  |
1114 `----------*/
1115 
1116 int
yyparse(CfgParseContext * ctx)1117 yyparse (CfgParseContext *ctx)
1118 {
1119 /* The lookahead symbol.  */
1120 int yychar;
1121 
1122 
1123 /* The semantic value of the lookahead symbol.  */
1124 /* Default value used for initialization, for pacifying older GCCs
1125    or non-GCC compilers.  */
1126 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1127 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1128 
1129 /* Location data for the lookahead symbol.  */
1130 static YYLTYPE yyloc_default
1131 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1132   = { 1, 1, 1, 1 }
1133 # endif
1134 ;
1135 YYLTYPE yylloc = yyloc_default;
1136 
1137     /* Number of syntax errors so far.  */
1138     int yynerrs;
1139 
1140     int yystate;
1141     /* Number of tokens to shift before error messages enabled.  */
1142     int yyerrstatus;
1143 
1144     /* The stacks and their tools:
1145        'yyss': related to states.
1146        'yyvs': related to semantic values.
1147        'yyls': related to locations.
1148 
1149        Refer to the stacks through separate pointers, to allow yyoverflow
1150        to reallocate them elsewhere.  */
1151 
1152     /* The state stack.  */
1153     yytype_int16 yyssa[YYINITDEPTH];
1154     yytype_int16 *yyss;
1155     yytype_int16 *yyssp;
1156 
1157     /* The semantic value stack.  */
1158     YYSTYPE yyvsa[YYINITDEPTH];
1159     YYSTYPE *yyvs;
1160     YYSTYPE *yyvsp;
1161 
1162     /* The location stack.  */
1163     YYLTYPE yylsa[YYINITDEPTH];
1164     YYLTYPE *yyls;
1165     YYLTYPE *yylsp;
1166 
1167     /* The locations where the error started and ended.  */
1168     YYLTYPE yyerror_range[3];
1169 
1170     YYSIZE_T yystacksize;
1171 
1172   int yyn;
1173   int yyresult;
1174   /* Lookahead token as an internal (translated) token number.  */
1175   int yytoken = 0;
1176   /* The variables used to return semantic value and location from the
1177      action routines.  */
1178   YYSTYPE yyval;
1179   YYLTYPE yyloc;
1180 
1181 #if YYERROR_VERBOSE
1182   /* Buffer for error messages, and its allocated size.  */
1183   char yymsgbuf[128];
1184   char *yymsg = yymsgbuf;
1185   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1186 #endif
1187 
1188 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1189 
1190   /* The number of symbols on the RHS of the reduced rule.
1191      Keep to zero when no symbol should be popped.  */
1192   int yylen = 0;
1193 
1194   yyssp = yyss = yyssa;
1195   yyvsp = yyvs = yyvsa;
1196   yylsp = yyls = yylsa;
1197   yystacksize = YYINITDEPTH;
1198 
1199   YYDPRINTF ((stderr, "Starting parse\n"));
1200 
1201   yystate = 0;
1202   yyerrstatus = 0;
1203   yynerrs = 0;
1204   yychar = YYEMPTY; /* Cause a token to be read.  */
1205   yylsp[0] = yylloc;
1206   goto yysetstate;
1207 
1208 /*------------------------------------------------------------.
1209 | yynewstate -- Push a new state, which is found in yystate.  |
1210 `------------------------------------------------------------*/
1211  yynewstate:
1212   /* In all cases, when you get here, the value and location stacks
1213      have just been pushed.  So pushing a state here evens the stacks.  */
1214   yyssp++;
1215 
1216  yysetstate:
1217   *yyssp = yystate;
1218 
1219   if (yyss + yystacksize - 1 <= yyssp)
1220     {
1221       /* Get the current used size of the three stacks, in elements.  */
1222       YYSIZE_T yysize = yyssp - yyss + 1;
1223 
1224 #ifdef yyoverflow
1225       {
1226         /* Give user a chance to reallocate the stack.  Use copies of
1227            these so that the &'s don't force the real ones into
1228            memory.  */
1229         YYSTYPE *yyvs1 = yyvs;
1230         yytype_int16 *yyss1 = yyss;
1231         YYLTYPE *yyls1 = yyls;
1232 
1233         /* Each stack pointer address is followed by the size of the
1234            data in use in that stack, in bytes.  This used to be a
1235            conditional around just the two extra args, but that might
1236            be undefined if yyoverflow is a macro.  */
1237         yyoverflow (YY_("memory exhausted"),
1238                     &yyss1, yysize * sizeof (*yyssp),
1239                     &yyvs1, yysize * sizeof (*yyvsp),
1240                     &yyls1, yysize * sizeof (*yylsp),
1241                     &yystacksize);
1242 
1243         yyls = yyls1;
1244         yyss = yyss1;
1245         yyvs = yyvs1;
1246       }
1247 #else /* no yyoverflow */
1248 # ifndef YYSTACK_RELOCATE
1249       goto yyexhaustedlab;
1250 # else
1251       /* Extend the stack our own way.  */
1252       if (YYMAXDEPTH <= yystacksize)
1253         goto yyexhaustedlab;
1254       yystacksize *= 2;
1255       if (YYMAXDEPTH < yystacksize)
1256         yystacksize = YYMAXDEPTH;
1257 
1258       {
1259         yytype_int16 *yyss1 = yyss;
1260         union yyalloc *yyptr =
1261           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1262         if (! yyptr)
1263           goto yyexhaustedlab;
1264         YYSTACK_RELOCATE (yyss_alloc, yyss);
1265         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1266         YYSTACK_RELOCATE (yyls_alloc, yyls);
1267 #  undef YYSTACK_RELOCATE
1268         if (yyss1 != yyssa)
1269           YYSTACK_FREE (yyss1);
1270       }
1271 # endif
1272 #endif /* no yyoverflow */
1273 
1274       yyssp = yyss + yysize - 1;
1275       yyvsp = yyvs + yysize - 1;
1276       yylsp = yyls + yysize - 1;
1277 
1278       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1279                   (unsigned long int) yystacksize));
1280 
1281       if (yyss + yystacksize - 1 <= yyssp)
1282         YYABORT;
1283     }
1284 
1285   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1286 
1287   if (yystate == YYFINAL)
1288     YYACCEPT;
1289 
1290   goto yybackup;
1291 
1292 /*-----------.
1293 | yybackup.  |
1294 `-----------*/
1295 yybackup:
1296 
1297   /* Do appropriate processing given the current state.  Read a
1298      lookahead token if we need one and don't already have one.  */
1299 
1300   /* First try to decide what to do without reference to lookahead token.  */
1301   yyn = yypact[yystate];
1302   if (yypact_value_is_default (yyn))
1303     goto yydefault;
1304 
1305   /* Not known => get a lookahead token if don't already have one.  */
1306 
1307   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1308   if (yychar == YYEMPTY)
1309     {
1310       YYDPRINTF ((stderr, "Reading a token: "));
1311       yychar = yylex (&yylval, &yylloc, ctx_scanner);
1312     }
1313 
1314   if (yychar <= YYEOF)
1315     {
1316       yychar = yytoken = YYEOF;
1317       YYDPRINTF ((stderr, "Now at end of input.\n"));
1318     }
1319   else
1320     {
1321       yytoken = YYTRANSLATE (yychar);
1322       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1323     }
1324 
1325   /* If the proper action on seeing token YYTOKEN is to reduce or to
1326      detect an error, take that action.  */
1327   yyn += yytoken;
1328   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1329     goto yydefault;
1330   yyn = yytable[yyn];
1331   if (yyn <= 0)
1332     {
1333       if (yytable_value_is_error (yyn))
1334         goto yyerrlab;
1335       yyn = -yyn;
1336       goto yyreduce;
1337     }
1338 
1339   /* Count tokens shifted since error; after three, turn off error
1340      status.  */
1341   if (yyerrstatus)
1342     yyerrstatus--;
1343 
1344   /* Shift the lookahead token.  */
1345   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1346 
1347   /* Discard the shifted token.  */
1348   yychar = YYEMPTY;
1349 
1350   yystate = yyn;
1351   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1352   *++yyvsp = yylval;
1353   YY_IGNORE_MAYBE_UNINITIALIZED_END
1354   *++yylsp = yylloc;
1355   goto yynewstate;
1356 
1357 
1358 /*-----------------------------------------------------------.
1359 | yydefault -- do the default action for the current state.  |
1360 `-----------------------------------------------------------*/
1361 yydefault:
1362   yyn = yydefact[yystate];
1363   if (yyn == 0)
1364     goto yyerrlab;
1365   goto yyreduce;
1366 
1367 
1368 /*-----------------------------.
1369 | yyreduce -- Do a reduction.  |
1370 `-----------------------------*/
1371 yyreduce:
1372   /* yyn is the number of a rule to reduce with.  */
1373   yylen = yyr2[yyn];
1374 
1375   /* If YYLEN is nonzero, implement the default value of the action:
1376      '$$ = $1'.
1377 
1378      Otherwise, the following line sets YYVAL to garbage.
1379      This behavior is undocumented and Bison
1380      users should not rely upon it.  Assigning to YYVAL
1381      unconditionally makes the parser a bit smaller, and it avoids a
1382      GCC warning that YYVAL may be used uninitialized.  */
1383   yyval = yyvsp[1-yylen];
1384 
1385   /* Default location.  */
1386   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1387   YY_REDUCE_PRINT (yyn);
1388   switch (yyn)
1389     {
1390         case 9:
1391 #line 57 "libxlu_cfg_y.y" /* yacc.c:1646  */
1392     { xlu__cfg_set_store(ctx,(yyvsp[-2].string),(yyvsp[0].value),(yylsp[0]).first_line); }
1393 #line 1394 "libxlu_cfg_y.c" /* yacc.c:1646  */
1394     break;
1395 
1396   case 12:
1397 #line 62 "libxlu_cfg_y.y" /* yacc.c:1646  */
1398     { (yyval.value)= xlu__cfg_string_mk(ctx,(yyvsp[0].string),&(yylsp[0])); }
1399 #line 1400 "libxlu_cfg_y.c" /* yacc.c:1646  */
1400     break;
1401 
1402   case 13:
1403 #line 63 "libxlu_cfg_y.y" /* yacc.c:1646  */
1404     { (yyval.value)= (yyvsp[-1].value); }
1405 #line 1406 "libxlu_cfg_y.c" /* yacc.c:1646  */
1406     break;
1407 
1408   case 14:
1409 #line 65 "libxlu_cfg_y.y" /* yacc.c:1646  */
1410     { (yyval.string)= (yyvsp[0].string); }
1411 #line 1412 "libxlu_cfg_y.c" /* yacc.c:1646  */
1412     break;
1413 
1414   case 15:
1415 #line 66 "libxlu_cfg_y.y" /* yacc.c:1646  */
1416     { (yyval.string)= (yyvsp[0].string); }
1417 #line 1418 "libxlu_cfg_y.c" /* yacc.c:1646  */
1418     break;
1419 
1420   case 16:
1421 #line 68 "libxlu_cfg_y.y" /* yacc.c:1646  */
1422     { (yyval.value)= xlu__cfg_list_mk(ctx,NULL,&yylloc); }
1423 #line 1424 "libxlu_cfg_y.c" /* yacc.c:1646  */
1424     break;
1425 
1426   case 17:
1427 #line 69 "libxlu_cfg_y.y" /* yacc.c:1646  */
1428     { (yyval.value)= (yyvsp[0].value); }
1429 #line 1430 "libxlu_cfg_y.c" /* yacc.c:1646  */
1430     break;
1431 
1432   case 18:
1433 #line 70 "libxlu_cfg_y.y" /* yacc.c:1646  */
1434     { (yyval.value)= (yyvsp[-2].value); }
1435 #line 1436 "libxlu_cfg_y.c" /* yacc.c:1646  */
1436     break;
1437 
1438   case 19:
1439 #line 72 "libxlu_cfg_y.y" /* yacc.c:1646  */
1440     { (yyval.value)= xlu__cfg_list_mk(ctx,(yyvsp[-1].value),&(yylsp[-1])); }
1441 #line 1442 "libxlu_cfg_y.c" /* yacc.c:1646  */
1442     break;
1443 
1444   case 20:
1445 #line 73 "libxlu_cfg_y.y" /* yacc.c:1646  */
1446     { xlu__cfg_list_append(ctx,(yyvsp[-4].value),(yyvsp[-1].value)); (yyval.value)= (yyvsp[-4].value); }
1447 #line 1448 "libxlu_cfg_y.c" /* yacc.c:1646  */
1448     break;
1449 
1450 
1451 #line 1452 "libxlu_cfg_y.c" /* yacc.c:1646  */
1452       default: break;
1453     }
1454   /* User semantic actions sometimes alter yychar, and that requires
1455      that yytoken be updated with the new translation.  We take the
1456      approach of translating immediately before every use of yytoken.
1457      One alternative is translating here after every semantic action,
1458      but that translation would be missed if the semantic action invokes
1459      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1460      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1461      incorrect destructor might then be invoked immediately.  In the
1462      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1463      to an incorrect destructor call or verbose syntax error message
1464      before the lookahead is translated.  */
1465   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1466 
1467   YYPOPSTACK (yylen);
1468   yylen = 0;
1469   YY_STACK_PRINT (yyss, yyssp);
1470 
1471   *++yyvsp = yyval;
1472   *++yylsp = yyloc;
1473 
1474   /* Now 'shift' the result of the reduction.  Determine what state
1475      that goes to, based on the state we popped back to and the rule
1476      number reduced by.  */
1477 
1478   yyn = yyr1[yyn];
1479 
1480   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1481   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1482     yystate = yytable[yystate];
1483   else
1484     yystate = yydefgoto[yyn - YYNTOKENS];
1485 
1486   goto yynewstate;
1487 
1488 
1489 /*--------------------------------------.
1490 | yyerrlab -- here on detecting error.  |
1491 `--------------------------------------*/
1492 yyerrlab:
1493   /* Make sure we have latest lookahead translation.  See comments at
1494      user semantic actions for why this is necessary.  */
1495   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1496 
1497   /* If not already recovering from an error, report this error.  */
1498   if (!yyerrstatus)
1499     {
1500       ++yynerrs;
1501 #if ! YYERROR_VERBOSE
1502       yyerror (&yylloc, ctx, YY_("syntax error"));
1503 #else
1504 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1505                                         yyssp, yytoken)
1506       {
1507         char const *yymsgp = YY_("syntax error");
1508         int yysyntax_error_status;
1509         yysyntax_error_status = YYSYNTAX_ERROR;
1510         if (yysyntax_error_status == 0)
1511           yymsgp = yymsg;
1512         else if (yysyntax_error_status == 1)
1513           {
1514             if (yymsg != yymsgbuf)
1515               YYSTACK_FREE (yymsg);
1516             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1517             if (!yymsg)
1518               {
1519                 yymsg = yymsgbuf;
1520                 yymsg_alloc = sizeof yymsgbuf;
1521                 yysyntax_error_status = 2;
1522               }
1523             else
1524               {
1525                 yysyntax_error_status = YYSYNTAX_ERROR;
1526                 yymsgp = yymsg;
1527               }
1528           }
1529         yyerror (&yylloc, ctx, yymsgp);
1530         if (yysyntax_error_status == 2)
1531           goto yyexhaustedlab;
1532       }
1533 # undef YYSYNTAX_ERROR
1534 #endif
1535     }
1536 
1537   yyerror_range[1] = yylloc;
1538 
1539   if (yyerrstatus == 3)
1540     {
1541       /* If just tried and failed to reuse lookahead token after an
1542          error, discard it.  */
1543 
1544       if (yychar <= YYEOF)
1545         {
1546           /* Return failure if at end of input.  */
1547           if (yychar == YYEOF)
1548             YYABORT;
1549         }
1550       else
1551         {
1552           yydestruct ("Error: discarding",
1553                       yytoken, &yylval, &yylloc, ctx);
1554           yychar = YYEMPTY;
1555         }
1556     }
1557 
1558   /* Else will try to reuse lookahead token after shifting the error
1559      token.  */
1560   goto yyerrlab1;
1561 
1562 
1563 /*---------------------------------------------------.
1564 | yyerrorlab -- error raised explicitly by YYERROR.  |
1565 `---------------------------------------------------*/
1566 yyerrorlab:
1567 
1568   /* Pacify compilers like GCC when the user code never invokes
1569      YYERROR and the label yyerrorlab therefore never appears in user
1570      code.  */
1571   if (/*CONSTCOND*/ 0)
1572      goto yyerrorlab;
1573 
1574   yyerror_range[1] = yylsp[1-yylen];
1575   /* Do not reclaim the symbols of the rule whose action triggered
1576      this YYERROR.  */
1577   YYPOPSTACK (yylen);
1578   yylen = 0;
1579   YY_STACK_PRINT (yyss, yyssp);
1580   yystate = *yyssp;
1581   goto yyerrlab1;
1582 
1583 
1584 /*-------------------------------------------------------------.
1585 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1586 `-------------------------------------------------------------*/
1587 yyerrlab1:
1588   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1589 
1590   for (;;)
1591     {
1592       yyn = yypact[yystate];
1593       if (!yypact_value_is_default (yyn))
1594         {
1595           yyn += YYTERROR;
1596           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1597             {
1598               yyn = yytable[yyn];
1599               if (0 < yyn)
1600                 break;
1601             }
1602         }
1603 
1604       /* Pop the current state because it cannot handle the error token.  */
1605       if (yyssp == yyss)
1606         YYABORT;
1607 
1608       yyerror_range[1] = *yylsp;
1609       yydestruct ("Error: popping",
1610                   yystos[yystate], yyvsp, yylsp, ctx);
1611       YYPOPSTACK (1);
1612       yystate = *yyssp;
1613       YY_STACK_PRINT (yyss, yyssp);
1614     }
1615 
1616   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1617   *++yyvsp = yylval;
1618   YY_IGNORE_MAYBE_UNINITIALIZED_END
1619 
1620   yyerror_range[2] = yylloc;
1621   /* Using YYLLOC is tempting, but would change the location of
1622      the lookahead.  YYLOC is available though.  */
1623   YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1624   *++yylsp = yyloc;
1625 
1626   /* Shift the error token.  */
1627   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1628 
1629   yystate = yyn;
1630   goto yynewstate;
1631 
1632 
1633 /*-------------------------------------.
1634 | yyacceptlab -- YYACCEPT comes here.  |
1635 `-------------------------------------*/
1636 yyacceptlab:
1637   yyresult = 0;
1638   goto yyreturn;
1639 
1640 /*-----------------------------------.
1641 | yyabortlab -- YYABORT comes here.  |
1642 `-----------------------------------*/
1643 yyabortlab:
1644   yyresult = 1;
1645   goto yyreturn;
1646 
1647 #if !defined yyoverflow || YYERROR_VERBOSE
1648 /*-------------------------------------------------.
1649 | yyexhaustedlab -- memory exhaustion comes here.  |
1650 `-------------------------------------------------*/
1651 yyexhaustedlab:
1652   yyerror (&yylloc, ctx, YY_("memory exhausted"));
1653   yyresult = 2;
1654   /* Fall through.  */
1655 #endif
1656 
1657 yyreturn:
1658   if (yychar != YYEMPTY)
1659     {
1660       /* Make sure we have latest lookahead translation.  See comments at
1661          user semantic actions for why this is necessary.  */
1662       yytoken = YYTRANSLATE (yychar);
1663       yydestruct ("Cleanup: discarding lookahead",
1664                   yytoken, &yylval, &yylloc, ctx);
1665     }
1666   /* Do not reclaim the symbols of the rule whose action triggered
1667      this YYABORT or YYACCEPT.  */
1668   YYPOPSTACK (yylen);
1669   YY_STACK_PRINT (yyss, yyssp);
1670   while (yyssp != yyss)
1671     {
1672       yydestruct ("Cleanup: popping",
1673                   yystos[*yyssp], yyvsp, yylsp, ctx);
1674       YYPOPSTACK (1);
1675     }
1676 #ifndef yyoverflow
1677   if (yyss != yyssa)
1678     YYSTACK_FREE (yyss);
1679 #endif
1680 #if YYERROR_VERBOSE
1681   if (yymsg != yymsgbuf)
1682     YYSTACK_FREE (yymsg);
1683 #endif
1684   return yyresult;
1685 }
1686