e95a569f6d62a96b8195ffa587cf9b4940fa0a72
[platform/upstream/libconfig.git] / lib / grammar.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    This program is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "yacc.c"
53
54 /* Pure parsers.  */
55 #define YYPURE 1
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66 /* Substitute the variable and function names.  */
67 #define yyparse         libconfig_yyparse
68 #define yylex           libconfig_yylex
69 #define yyerror         libconfig_yyerror
70 #define yylval          libconfig_yylval
71 #define yychar          libconfig_yychar
72 #define yydebug         libconfig_yydebug
73 #define yynerrs         libconfig_yynerrs
74
75
76 /* Copy the first part of user declarations.  */
77
78 /* Line 189 of yacc.c  */
79 #line 32 "grammar.y"
80
81 #include <string.h>
82 #include <stdlib.h>
83 #include "libconfig.h"
84 #ifdef WIN32
85 #include "wincompat.h"
86
87 /* prevent warnings about redefined malloc/free in generated code: */
88 #ifndef _STDLIB_H
89 #define _STDLIB_H
90 #endif
91
92 #include <malloc.h>
93 #endif
94 #include "parsectx.h"
95 #include "scanctx.h"
96
97 /* these delcarations are provided to suppress compiler warnings */
98 extern int libconfig_yylex();
99 extern int libconfig_yyget_lineno();
100
101 static const char *err_array_elem_type = "mismatched element type in array";
102 static const char *err_duplicate_setting = "duplicate setting name";
103
104 #define _delete(P) free((void *)(P))
105
106 #define IN_ARRAY() \
107   (ctx->parent && (ctx->parent->type == CONFIG_TYPE_ARRAY))
108
109 #define IN_LIST() \
110   (ctx->parent && (ctx->parent->type == CONFIG_TYPE_LIST))
111
112 static void capture_parse_pos(void *scanner, struct scan_context *scan_ctx,
113                               config_setting_t *setting)
114 {
115   setting->line = (unsigned int)libconfig_yyget_lineno(scanner);
116   setting->file = scanctx_current_filename(scan_ctx);
117 }
118
119 #define CAPTURE_PARSE_POS(S) \
120   capture_parse_pos(scanner, scan_ctx, (S))
121
122 void libconfig_yyerror(void *scanner, struct parse_context *ctx,
123                        struct scan_context *scan_ctx, char const *s)
124 {
125   if(ctx->config->error_text) return;
126   ctx->config->error_line = libconfig_yyget_lineno(scanner);
127   ctx->config->error_text = s;
128 }
129
130
131
132 /* Line 189 of yacc.c  */
133 #line 134 "grammar.c"
134
135 /* Enabling traces.  */
136 #ifndef YYDEBUG
137 # define YYDEBUG 0
138 #endif
139
140 /* Enabling verbose error messages.  */
141 #ifdef YYERROR_VERBOSE
142 # undef YYERROR_VERBOSE
143 # define YYERROR_VERBOSE 1
144 #else
145 # define YYERROR_VERBOSE 0
146 #endif
147
148 /* Enabling the token table.  */
149 #ifndef YYTOKEN_TABLE
150 # define YYTOKEN_TABLE 0
151 #endif
152
153
154 /* Tokens.  */
155 #ifndef YYTOKENTYPE
156 # define YYTOKENTYPE
157    /* Put the tokens into the symbol table, so that GDB and other debuggers
158       know about them.  */
159    enum yytokentype {
160      TOK_BOOLEAN = 258,
161      TOK_INTEGER = 259,
162      TOK_HEX = 260,
163      TOK_INTEGER64 = 261,
164      TOK_HEX64 = 262,
165      TOK_FLOAT = 263,
166      TOK_STRING = 264,
167      TOK_NAME = 265,
168      TOK_EQUALS = 266,
169      TOK_NEWLINE = 267,
170      TOK_ARRAY_START = 268,
171      TOK_ARRAY_END = 269,
172      TOK_LIST_START = 270,
173      TOK_LIST_END = 271,
174      TOK_COMMA = 272,
175      TOK_GROUP_START = 273,
176      TOK_GROUP_END = 274,
177      TOK_SEMICOLON = 275,
178      TOK_GARBAGE = 276,
179      TOK_ERROR = 277
180    };
181 #endif
182 /* Tokens.  */
183 #define TOK_BOOLEAN 258
184 #define TOK_INTEGER 259
185 #define TOK_HEX 260
186 #define TOK_INTEGER64 261
187 #define TOK_HEX64 262
188 #define TOK_FLOAT 263
189 #define TOK_STRING 264
190 #define TOK_NAME 265
191 #define TOK_EQUALS 266
192 #define TOK_NEWLINE 267
193 #define TOK_ARRAY_START 268
194 #define TOK_ARRAY_END 269
195 #define TOK_LIST_START 270
196 #define TOK_LIST_END 271
197 #define TOK_COMMA 272
198 #define TOK_GROUP_START 273
199 #define TOK_GROUP_END 274
200 #define TOK_SEMICOLON 275
201 #define TOK_GARBAGE 276
202 #define TOK_ERROR 277
203
204
205
206
207 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
208 typedef union YYSTYPE
209 {
210
211 /* Line 214 of yacc.c  */
212 #line 85 "grammar.y"
213
214   int ival;
215   long long llval;
216   double fval;
217   char *sval;
218
219
220
221 /* Line 214 of yacc.c  */
222 #line 223 "grammar.c"
223 } YYSTYPE;
224 # define YYSTYPE_IS_TRIVIAL 1
225 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
226 # define YYSTYPE_IS_DECLARED 1
227 #endif
228
229
230 /* Copy the second part of user declarations.  */
231
232
233 /* Line 264 of yacc.c  */
234 #line 235 "grammar.c"
235
236 #ifdef short
237 # undef short
238 #endif
239
240 #ifdef YYTYPE_UINT8
241 typedef YYTYPE_UINT8 yytype_uint8;
242 #else
243 typedef unsigned char yytype_uint8;
244 #endif
245
246 #ifdef YYTYPE_INT8
247 typedef YYTYPE_INT8 yytype_int8;
248 #elif (defined __STDC__ || defined __C99__FUNC__ \
249      || defined __cplusplus || defined _MSC_VER)
250 typedef signed char yytype_int8;
251 #else
252 typedef short int yytype_int8;
253 #endif
254
255 #ifdef YYTYPE_UINT16
256 typedef YYTYPE_UINT16 yytype_uint16;
257 #else
258 typedef unsigned short int yytype_uint16;
259 #endif
260
261 #ifdef YYTYPE_INT16
262 typedef YYTYPE_INT16 yytype_int16;
263 #else
264 typedef short int yytype_int16;
265 #endif
266
267 #ifndef YYSIZE_T
268 # ifdef __SIZE_TYPE__
269 #  define YYSIZE_T __SIZE_TYPE__
270 # elif defined size_t
271 #  define YYSIZE_T size_t
272 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
273      || defined __cplusplus || defined _MSC_VER)
274 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
275 #  define YYSIZE_T size_t
276 # else
277 #  define YYSIZE_T unsigned int
278 # endif
279 #endif
280
281 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
282
283 #ifndef YY_
284 # if YYENABLE_NLS
285 #  if ENABLE_NLS
286 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
287 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
288 #  endif
289 # endif
290 # ifndef YY_
291 #  define YY_(msgid) msgid
292 # endif
293 #endif
294
295 /* Suppress unused-variable warnings by "using" E.  */
296 #if ! defined lint || defined __GNUC__
297 # define YYUSE(e) ((void) (e))
298 #else
299 # define YYUSE(e) /* empty */
300 #endif
301
302 /* Identity function, used to suppress warnings about constant conditions.  */
303 #ifndef lint
304 # define YYID(n) (n)
305 #else
306 #if (defined __STDC__ || defined __C99__FUNC__ \
307      || defined __cplusplus || defined _MSC_VER)
308 static int
309 YYID (int yyi)
310 #else
311 static int
312 YYID (yyi)
313     int yyi;
314 #endif
315 {
316   return yyi;
317 }
318 #endif
319
320 #if ! defined yyoverflow || YYERROR_VERBOSE
321
322 /* The parser invokes alloca or malloc; define the necessary symbols.  */
323
324 # ifdef YYSTACK_USE_ALLOCA
325 #  if YYSTACK_USE_ALLOCA
326 #   ifdef __GNUC__
327 #    define YYSTACK_ALLOC __builtin_alloca
328 #   elif defined __BUILTIN_VA_ARG_INCR
329 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
330 #   elif defined _AIX
331 #    define YYSTACK_ALLOC __alloca
332 #   elif defined _MSC_VER
333 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
334 #    define alloca _alloca
335 #   else
336 #    define YYSTACK_ALLOC alloca
337 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
338      || defined __cplusplus || defined _MSC_VER)
339 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
340 #     ifndef _STDLIB_H
341 #      define _STDLIB_H 1
342 #     endif
343 #    endif
344 #   endif
345 #  endif
346 # endif
347
348 # ifdef YYSTACK_ALLOC
349    /* Pacify GCC's `empty if-body' warning.  */
350 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
351 #  ifndef YYSTACK_ALLOC_MAXIMUM
352     /* The OS might guarantee only one guard page at the bottom of the stack,
353        and a page size can be as small as 4096 bytes.  So we cannot safely
354        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
355        to allow for a few compiler-allocated temporary stack slots.  */
356 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
357 #  endif
358 # else
359 #  define YYSTACK_ALLOC YYMALLOC
360 #  define YYSTACK_FREE YYFREE
361 #  ifndef YYSTACK_ALLOC_MAXIMUM
362 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
363 #  endif
364 #  if (defined __cplusplus && ! defined _STDLIB_H \
365        && ! ((defined YYMALLOC || defined malloc) \
366              && (defined YYFREE || defined free)))
367 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
368 #   ifndef _STDLIB_H
369 #    define _STDLIB_H 1
370 #   endif
371 #  endif
372 #  ifndef YYMALLOC
373 #   define YYMALLOC malloc
374 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
375      || defined __cplusplus || defined _MSC_VER)
376 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
377 #   endif
378 #  endif
379 #  ifndef YYFREE
380 #   define YYFREE free
381 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
382      || defined __cplusplus || defined _MSC_VER)
383 void free (void *); /* INFRINGES ON USER NAME SPACE */
384 #   endif
385 #  endif
386 # endif
387 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
388
389
390 #if (! defined yyoverflow \
391      && (! defined __cplusplus \
392          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
393
394 /* A type that is properly aligned for any stack member.  */
395 union yyalloc
396 {
397   yytype_int16 yyss_alloc;
398   YYSTYPE yyvs_alloc;
399 };
400
401 /* The size of the maximum gap between one aligned stack and the next.  */
402 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
403
404 /* The size of an array large to enough to hold all stacks, each with
405    N elements.  */
406 # define YYSTACK_BYTES(N) \
407      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
408       + YYSTACK_GAP_MAXIMUM)
409
410 /* Copy COUNT objects from FROM to TO.  The source and destination do
411    not overlap.  */
412 # ifndef YYCOPY
413 #  if defined __GNUC__ && 1 < __GNUC__
414 #   define YYCOPY(To, From, Count) \
415       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
416 #  else
417 #   define YYCOPY(To, From, Count)              \
418       do                                        \
419         {                                       \
420           YYSIZE_T yyi;                         \
421           for (yyi = 0; yyi < (Count); yyi++)   \
422             (To)[yyi] = (From)[yyi];            \
423         }                                       \
424       while (YYID (0))
425 #  endif
426 # endif
427
428 /* Relocate STACK from its old location to the new one.  The
429    local variables YYSIZE and YYSTACKSIZE give the old and new number of
430    elements in the stack, and YYPTR gives the new location of the
431    stack.  Advance YYPTR to a properly aligned location for the next
432    stack.  */
433 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
434     do                                                                  \
435       {                                                                 \
436         YYSIZE_T yynewbytes;                                            \
437         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
438         Stack = &yyptr->Stack_alloc;                                    \
439         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
440         yyptr += yynewbytes / sizeof (*yyptr);                          \
441       }                                                                 \
442     while (YYID (0))
443
444 #endif
445
446 /* YYFINAL -- State number of the termination state.  */
447 #define YYFINAL  6
448 /* YYLAST -- Last index in YYTABLE.  */
449 #define YYLAST   35
450
451 /* YYNTOKENS -- Number of terminals.  */
452 #define YYNTOKENS  23
453 /* YYNNTS -- Number of nonterminals.  */
454 #define YYNNTS  20
455 /* YYNRULES -- Number of rules.  */
456 #define YYNRULES  39
457 /* YYNRULES -- Number of states.  */
458 #define YYNSTATES  47
459
460 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
461 #define YYUNDEFTOK  2
462 #define YYMAXUTOK   277
463
464 #define YYTRANSLATE(YYX)                                                \
465   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
466
467 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
468 static const yytype_uint8 yytranslate[] =
469 {
470        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
471        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
472        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
474        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
475        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
476        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
477        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
478        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
479        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
480        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
481        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
482        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
483        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
484        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
485        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
486        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
487        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
488        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
489        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
490        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
491        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
492        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
493        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
494        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
495        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
496        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
497       15,    16,    17,    18,    19,    20,    21,    22
498 };
499
500 #if YYDEBUG
501 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
502    YYRHS.  */
503 static const yytype_uint8 yyprhs[] =
504 {
505        0,     0,     3,     4,     6,     8,    11,    12,    14,    15,
506       17,    19,    20,    26,    27,    32,    33,    38,    40,    42,
507       44,    46,    48,    51,    53,    55,    57,    59,    61,    63,
508       65,    67,    71,    72,    74,    76,    80,    81,    83,    84
509 };
510
511 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
512 static const yytype_int8 yyrhs[] =
513 {
514       24,     0,    -1,    -1,    25,    -1,    28,    -1,    25,    28,
515       -1,    -1,    25,    -1,    -1,    20,    -1,    17,    -1,    -1,
516       10,    29,    11,    34,    27,    -1,    -1,    13,    31,    40,
517       14,    -1,    -1,    15,    33,    38,    16,    -1,    36,    -1,
518       30,    -1,    32,    -1,    41,    -1,     9,    -1,    35,     9,
519       -1,     3,    -1,     4,    -1,     6,    -1,     5,    -1,     7,
520       -1,     8,    -1,    35,    -1,    34,    -1,    37,    17,    34,
521       -1,    -1,    37,    -1,    36,    -1,    39,    17,    36,    -1,
522       -1,    39,    -1,    -1,    18,    42,    26,    19,    -1
523 };
524
525 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
526 static const yytype_uint16 yyrline[] =
527 {
528        0,   100,   100,   102,   106,   107,   110,   112,   115,   117,
529      118,   123,   122,   142,   141,   165,   164,   187,   188,   189,
530      190,   194,   195,   199,   219,   241,   263,   285,   307,   325,
531      353,   354,   357,   359,   363,   364,   367,   369,   374,   373
532 };
533 #endif
534
535 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
536 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
537    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
538 static const char *const yytname[] =
539 {
540   "$end", "error", "$undefined", "TOK_BOOLEAN", "TOK_INTEGER", "TOK_HEX",
541   "TOK_INTEGER64", "TOK_HEX64", "TOK_FLOAT", "TOK_STRING", "TOK_NAME",
542   "TOK_EQUALS", "TOK_NEWLINE", "TOK_ARRAY_START", "TOK_ARRAY_END",
543   "TOK_LIST_START", "TOK_LIST_END", "TOK_COMMA", "TOK_GROUP_START",
544   "TOK_GROUP_END", "TOK_SEMICOLON", "TOK_GARBAGE", "TOK_ERROR", "$accept",
545   "configuration", "setting_list", "setting_list_optional",
546   "setting_terminator", "setting", "$@1", "array", "$@2", "list", "$@3",
547   "value", "string", "simple_value", "value_list", "value_list_optional",
548   "simple_value_list", "simple_value_list_optional", "group", "$@4", 0
549 };
550 #endif
551
552 # ifdef YYPRINT
553 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
554    token YYLEX-NUM.  */
555 static const yytype_uint16 yytoknum[] =
556 {
557        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
558      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
559      275,   276,   277
560 };
561 # endif
562
563 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
564 static const yytype_uint8 yyr1[] =
565 {
566        0,    23,    24,    24,    25,    25,    26,    26,    27,    27,
567       27,    29,    28,    31,    30,    33,    32,    34,    34,    34,
568       34,    35,    35,    36,    36,    36,    36,    36,    36,    36,
569       37,    37,    38,    38,    39,    39,    40,    40,    42,    41
570 };
571
572 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
573 static const yytype_uint8 yyr2[] =
574 {
575        0,     2,     0,     1,     1,     2,     0,     1,     0,     1,
576        1,     0,     5,     0,     4,     0,     4,     1,     1,     1,
577        1,     1,     2,     1,     1,     1,     1,     1,     1,     1,
578        1,     3,     0,     1,     1,     3,     0,     1,     0,     4
579 };
580
581 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
582    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
583    means the default is an error.  */
584 static const yytype_uint8 yydefact[] =
585 {
586        2,    11,     0,     3,     4,     0,     1,     5,     0,    23,
587       24,    26,    25,    27,    28,    21,    13,    15,    38,    18,
588       19,     8,    29,    17,    20,    36,    32,     6,    10,     9,
589       12,    22,    34,    37,     0,    30,    33,     0,     7,     0,
590        0,    14,     0,    16,    39,    35,    31
591 };
592
593 /* YYDEFGOTO[NTERM-NUM].  */
594 static const yytype_int8 yydefgoto[] =
595 {
596       -1,     2,     3,    39,    30,     4,     5,    19,    25,    20,
597       26,    21,    22,    23,    36,    37,    33,    34,    24,    27
598 };
599
600 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
601    STATE-NUM.  */
602 #define YYPACT_NINF -26
603 static const yytype_int8 yypact[] =
604 {
605       -8,   -26,    12,    -8,   -26,     5,   -26,   -26,     0,   -26,
606      -26,   -26,   -26,   -26,   -26,   -26,   -26,   -26,   -26,   -26,
607      -26,    -6,    10,   -26,   -26,    23,     0,    -8,   -26,   -26,
608      -26,   -26,   -26,     3,     7,   -26,     6,     8,    -8,    14,
609       23,   -26,     0,   -26,   -26,   -26,   -26
610 };
611
612 /* YYPGOTO[NTERM-NUM].  */
613 static const yytype_int8 yypgoto[] =
614 {
615      -26,   -26,    -5,   -26,   -26,    -3,   -26,   -26,   -26,   -26,
616      -26,   -25,   -26,   -15,   -26,   -26,   -26,   -26,   -26,   -26
617 };
618
619 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
620    positive, shift that token.  If negative, reduce the rule which
621    number is the opposite.  If zero, do what YYDEFACT says.
622    If YYTABLE_NINF, syntax error.  */
623 #define YYTABLE_NINF -1
624 static const yytype_uint8 yytable[] =
625 {
626        7,    35,     1,     9,    10,    11,    12,    13,    14,    15,
627       32,    28,     6,    16,    29,    17,     8,    46,    18,    31,
628       40,    41,    38,    42,    43,    45,     9,    10,    11,    12,
629       13,    14,    15,    44,     0,     7
630 };
631
632 static const yytype_int8 yycheck[] =
633 {
634        3,    26,    10,     3,     4,     5,     6,     7,     8,     9,
635       25,    17,     0,    13,    20,    15,    11,    42,    18,     9,
636       17,    14,    27,    17,    16,    40,     3,     4,     5,     6,
637        7,     8,     9,    19,    -1,    38
638 };
639
640 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
641    symbol of state STATE-NUM.  */
642 static const yytype_uint8 yystos[] =
643 {
644        0,    10,    24,    25,    28,    29,     0,    28,    11,     3,
645        4,     5,     6,     7,     8,     9,    13,    15,    18,    30,
646       32,    34,    35,    36,    41,    31,    33,    42,    17,    20,
647       27,     9,    36,    39,    40,    34,    37,    38,    25,    26,
648       17,    14,    17,    16,    19,    36,    34
649 };
650
651 #define yyerrok         (yyerrstatus = 0)
652 #define yyclearin       (yychar = YYEMPTY)
653 #define YYEMPTY         (-2)
654 #define YYEOF           0
655
656 #define YYACCEPT        goto yyacceptlab
657 #define YYABORT         goto yyabortlab
658 #define YYERROR         goto yyerrorlab
659
660
661 /* Like YYERROR except do call yyerror.  This remains here temporarily
662    to ease the transition to the new meaning of YYERROR, for GCC.
663    Once GCC version 2 has supplanted version 1, this can go.  */
664
665 #define YYFAIL          goto yyerrlab
666
667 #define YYRECOVERING()  (!!yyerrstatus)
668
669 #define YYBACKUP(Token, Value)                                  \
670 do                                                              \
671   if (yychar == YYEMPTY && yylen == 1)                          \
672     {                                                           \
673       yychar = (Token);                                         \
674       yylval = (Value);                                         \
675       yytoken = YYTRANSLATE (yychar);                           \
676       YYPOPSTACK (1);                                           \
677       goto yybackup;                                            \
678     }                                                           \
679   else                                                          \
680     {                                                           \
681       yyerror (scanner, ctx, scan_ctx, YY_("syntax error: cannot back up")); \
682       YYERROR;                                                  \
683     }                                                           \
684 while (YYID (0))
685
686
687 #define YYTERROR        1
688 #define YYERRCODE       256
689
690
691 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
692    If N is 0, then set CURRENT to the empty location which ends
693    the previous symbol: RHS[0] (always defined).  */
694
695 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
696 #ifndef YYLLOC_DEFAULT
697 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
698     do                                                                  \
699       if (YYID (N))                                                    \
700         {                                                               \
701           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
702           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
703           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
704           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
705         }                                                               \
706       else                                                              \
707         {                                                               \
708           (Current).first_line   = (Current).last_line   =              \
709             YYRHSLOC (Rhs, 0).last_line;                                \
710           (Current).first_column = (Current).last_column =              \
711             YYRHSLOC (Rhs, 0).last_column;                              \
712         }                                                               \
713     while (YYID (0))
714 #endif
715
716
717 /* YY_LOCATION_PRINT -- Print the location on the stream.
718    This macro was not mandated originally: define only if we know
719    we won't break user code: when these are the locations we know.  */
720
721 #ifndef YY_LOCATION_PRINT
722 # if YYLTYPE_IS_TRIVIAL
723 #  define YY_LOCATION_PRINT(File, Loc)                  \
724      fprintf (File, "%d.%d-%d.%d",                      \
725               (Loc).first_line, (Loc).first_column,     \
726               (Loc).last_line,  (Loc).last_column)
727 # else
728 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
729 # endif
730 #endif
731
732
733 /* YYLEX -- calling `yylex' with the right arguments.  */
734
735 #ifdef YYLEX_PARAM
736 # define YYLEX yylex (&yylval, YYLEX_PARAM)
737 #else
738 # define YYLEX yylex (&yylval, scanner)
739 #endif
740
741 /* Enable debugging if requested.  */
742 #if YYDEBUG
743
744 # ifndef YYFPRINTF
745 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
746 #  define YYFPRINTF fprintf
747 # endif
748
749 # define YYDPRINTF(Args)                        \
750 do {                                            \
751   if (yydebug)                                  \
752     YYFPRINTF Args;                             \
753 } while (YYID (0))
754
755 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
756 do {                                                                      \
757   if (yydebug)                                                            \
758     {                                                                     \
759       YYFPRINTF (stderr, "%s ", Title);                                   \
760       yy_symbol_print (stderr,                                            \
761                   Type, Value, scanner, ctx, scan_ctx); \
762       YYFPRINTF (stderr, "\n");                                           \
763     }                                                                     \
764 } while (YYID (0))
765
766
767 /*--------------------------------.
768 | Print this symbol on YYOUTPUT.  |
769 `--------------------------------*/
770
771 /*ARGSUSED*/
772 #if (defined __STDC__ || defined __C99__FUNC__ \
773      || defined __cplusplus || defined _MSC_VER)
774 static void
775 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
776 #else
777 static void
778 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
779     FILE *yyoutput;
780     int yytype;
781     YYSTYPE const * const yyvaluep;
782     void *scanner;
783     struct parse_context *ctx;
784     struct scan_context *scan_ctx;
785 #endif
786 {
787   if (!yyvaluep)
788     return;
789   YYUSE (scanner);
790   YYUSE (ctx);
791   YYUSE (scan_ctx);
792 # ifdef YYPRINT
793   if (yytype < YYNTOKENS)
794     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
795 # else
796   YYUSE (yyoutput);
797 # endif
798   switch (yytype)
799     {
800       default:
801         break;
802     }
803 }
804
805
806 /*--------------------------------.
807 | Print this symbol on YYOUTPUT.  |
808 `--------------------------------*/
809
810 #if (defined __STDC__ || defined __C99__FUNC__ \
811      || defined __cplusplus || defined _MSC_VER)
812 static void
813 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
814 #else
815 static void
816 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
817     FILE *yyoutput;
818     int yytype;
819     YYSTYPE const * const yyvaluep;
820     void *scanner;
821     struct parse_context *ctx;
822     struct scan_context *scan_ctx;
823 #endif
824 {
825   if (yytype < YYNTOKENS)
826     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
827   else
828     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
829
830   yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx);
831   YYFPRINTF (yyoutput, ")");
832 }
833
834 /*------------------------------------------------------------------.
835 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
836 | TOP (included).                                                   |
837 `------------------------------------------------------------------*/
838
839 #if (defined __STDC__ || defined __C99__FUNC__ \
840      || defined __cplusplus || defined _MSC_VER)
841 static void
842 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
843 #else
844 static void
845 yy_stack_print (yybottom, yytop)
846     yytype_int16 *yybottom;
847     yytype_int16 *yytop;
848 #endif
849 {
850   YYFPRINTF (stderr, "Stack now");
851   for (; yybottom <= yytop; yybottom++)
852     {
853       int yybot = *yybottom;
854       YYFPRINTF (stderr, " %d", yybot);
855     }
856   YYFPRINTF (stderr, "\n");
857 }
858
859 # define YY_STACK_PRINT(Bottom, Top)                            \
860 do {                                                            \
861   if (yydebug)                                                  \
862     yy_stack_print ((Bottom), (Top));                           \
863 } while (YYID (0))
864
865
866 /*------------------------------------------------.
867 | Report that the YYRULE is going to be reduced.  |
868 `------------------------------------------------*/
869
870 #if (defined __STDC__ || defined __C99__FUNC__ \
871      || defined __cplusplus || defined _MSC_VER)
872 static void
873 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
874 #else
875 static void
876 yy_reduce_print (yyvsp, yyrule, scanner, ctx, scan_ctx)
877     YYSTYPE *yyvsp;
878     int yyrule;
879     void *scanner;
880     struct parse_context *ctx;
881     struct scan_context *scan_ctx;
882 #endif
883 {
884   int yynrhs = yyr2[yyrule];
885   int yyi;
886   unsigned long int yylno = yyrline[yyrule];
887   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
888              yyrule - 1, yylno);
889   /* The symbols being reduced.  */
890   for (yyi = 0; yyi < yynrhs; yyi++)
891     {
892       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
893       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
894                        &(yyvsp[(yyi + 1) - (yynrhs)])
895                                        , scanner, ctx, scan_ctx);
896       YYFPRINTF (stderr, "\n");
897     }
898 }
899
900 # define YY_REDUCE_PRINT(Rule)          \
901 do {                                    \
902   if (yydebug)                          \
903     yy_reduce_print (yyvsp, Rule, scanner, ctx, scan_ctx); \
904 } while (YYID (0))
905
906 /* Nonzero means print parse trace.  It is left uninitialized so that
907    multiple parsers can coexist.  */
908 int yydebug;
909 #else /* !YYDEBUG */
910 # define YYDPRINTF(Args)
911 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
912 # define YY_STACK_PRINT(Bottom, Top)
913 # define YY_REDUCE_PRINT(Rule)
914 #endif /* !YYDEBUG */
915
916
917 /* YYINITDEPTH -- initial size of the parser's stacks.  */
918 #ifndef YYINITDEPTH
919 # define YYINITDEPTH 200
920 #endif
921
922 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
923    if the built-in stack extension method is used).
924
925    Do not make this value too large; the results are undefined if
926    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
927    evaluated with infinite-precision integer arithmetic.  */
928
929 #ifndef YYMAXDEPTH
930 # define YYMAXDEPTH 10000
931 #endif
932
933 \f
934
935 #if YYERROR_VERBOSE
936
937 # ifndef yystrlen
938 #  if defined __GLIBC__ && defined _STRING_H
939 #   define yystrlen strlen
940 #  else
941 /* Return the length of YYSTR.  */
942 #if (defined __STDC__ || defined __C99__FUNC__ \
943      || defined __cplusplus || defined _MSC_VER)
944 static YYSIZE_T
945 yystrlen (const char *yystr)
946 #else
947 static YYSIZE_T
948 yystrlen (yystr)
949     const char *yystr;
950 #endif
951 {
952   YYSIZE_T yylen;
953   for (yylen = 0; yystr[yylen]; yylen++)
954     continue;
955   return yylen;
956 }
957 #  endif
958 # endif
959
960 # ifndef yystpcpy
961 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
962 #   define yystpcpy stpcpy
963 #  else
964 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
965    YYDEST.  */
966 #if (defined __STDC__ || defined __C99__FUNC__ \
967      || defined __cplusplus || defined _MSC_VER)
968 static char *
969 yystpcpy (char *yydest, const char *yysrc)
970 #else
971 static char *
972 yystpcpy (yydest, yysrc)
973     char *yydest;
974     const char *yysrc;
975 #endif
976 {
977   char *yyd = yydest;
978   const char *yys = yysrc;
979
980   while ((*yyd++ = *yys++) != '\0')
981     continue;
982
983   return yyd - 1;
984 }
985 #  endif
986 # endif
987
988 # ifndef yytnamerr
989 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
990    quotes and backslashes, so that it's suitable for yyerror.  The
991    heuristic is that double-quoting is unnecessary unless the string
992    contains an apostrophe, a comma, or backslash (other than
993    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
994    null, do not copy; instead, return the length of what the result
995    would have been.  */
996 static YYSIZE_T
997 yytnamerr (char *yyres, const char *yystr)
998 {
999   if (*yystr == '"')
1000     {
1001       YYSIZE_T yyn = 0;
1002       char const *yyp = yystr;
1003
1004       for (;;)
1005         switch (*++yyp)
1006           {
1007           case '\'':
1008           case ',':
1009             goto do_not_strip_quotes;
1010
1011           case '\\':
1012             if (*++yyp != '\\')
1013               goto do_not_strip_quotes;
1014             /* Fall through.  */
1015           default:
1016             if (yyres)
1017               yyres[yyn] = *yyp;
1018             yyn++;
1019             break;
1020
1021           case '"':
1022             if (yyres)
1023               yyres[yyn] = '\0';
1024             return yyn;
1025           }
1026     do_not_strip_quotes: ;
1027     }
1028
1029   if (! yyres)
1030     return yystrlen (yystr);
1031
1032   return yystpcpy (yyres, yystr) - yyres;
1033 }
1034 # endif
1035
1036 /* Copy into YYRESULT an error message about the unexpected token
1037    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1038    including the terminating null byte.  If YYRESULT is null, do not
1039    copy anything; just return the number of bytes that would be
1040    copied.  As a special case, return 0 if an ordinary "syntax error"
1041    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1042    size calculation.  */
1043 static YYSIZE_T
1044 yysyntax_error (char *yyresult, int yystate, int yychar)
1045 {
1046   int yyn = yypact[yystate];
1047
1048   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1049     return 0;
1050   else
1051     {
1052       int yytype = YYTRANSLATE (yychar);
1053       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1054       YYSIZE_T yysize = yysize0;
1055       YYSIZE_T yysize1;
1056       int yysize_overflow = 0;
1057       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1058       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1059       int yyx;
1060
1061 # if 0
1062       /* This is so xgettext sees the translatable formats that are
1063          constructed on the fly.  */
1064       YY_("syntax error, unexpected %s");
1065       YY_("syntax error, unexpected %s, expecting %s");
1066       YY_("syntax error, unexpected %s, expecting %s or %s");
1067       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1068       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1069 # endif
1070       char *yyfmt;
1071       char const *yyf;
1072       static char const yyunexpected[] = "syntax error, unexpected %s";
1073       static char const yyexpecting[] = ", expecting %s";
1074       static char const yyor[] = " or %s";
1075       char yyformat[sizeof yyunexpected
1076                     + sizeof yyexpecting - 1
1077                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1078                        * (sizeof yyor - 1))];
1079       char const *yyprefix = yyexpecting;
1080
1081       /* Start YYX at -YYN if negative to avoid negative indexes in
1082          YYCHECK.  */
1083       int yyxbegin = yyn < 0 ? -yyn : 0;
1084
1085       /* Stay within bounds of both yycheck and yytname.  */
1086       int yychecklim = YYLAST - yyn + 1;
1087       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1088       int yycount = 1;
1089
1090       yyarg[0] = yytname[yytype];
1091       yyfmt = yystpcpy (yyformat, yyunexpected);
1092
1093       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1094         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1095           {
1096             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1097               {
1098                 yycount = 1;
1099                 yysize = yysize0;
1100                 yyformat[sizeof yyunexpected - 1] = '\0';
1101                 break;
1102               }
1103             yyarg[yycount++] = yytname[yyx];
1104             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1105             yysize_overflow |= (yysize1 < yysize);
1106             yysize = yysize1;
1107             yyfmt = yystpcpy (yyfmt, yyprefix);
1108             yyprefix = yyor;
1109           }
1110
1111       yyf = YY_(yyformat);
1112       yysize1 = yysize + yystrlen (yyf);
1113       yysize_overflow |= (yysize1 < yysize);
1114       yysize = yysize1;
1115
1116       if (yysize_overflow)
1117         return YYSIZE_MAXIMUM;
1118
1119       if (yyresult)
1120         {
1121           /* Avoid sprintf, as that infringes on the user's name space.
1122              Don't have undefined behavior even if the translation
1123              produced a string with the wrong number of "%s"s.  */
1124           char *yyp = yyresult;
1125           int yyi = 0;
1126           while ((*yyp = *yyf) != '\0')
1127             {
1128               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1129                 {
1130                   yyp += yytnamerr (yyp, yyarg[yyi++]);
1131                   yyf += 2;
1132                 }
1133               else
1134                 {
1135                   yyp++;
1136                   yyf++;
1137                 }
1138             }
1139         }
1140       return yysize;
1141     }
1142 }
1143 #endif /* YYERROR_VERBOSE */
1144 \f
1145
1146 /*-----------------------------------------------.
1147 | Release the memory associated to this symbol.  |
1148 `-----------------------------------------------*/
1149
1150 /*ARGSUSED*/
1151 #if (defined __STDC__ || defined __C99__FUNC__ \
1152      || defined __cplusplus || defined _MSC_VER)
1153 static void
1154 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
1155 #else
1156 static void
1157 yydestruct (yymsg, yytype, yyvaluep, scanner, ctx, scan_ctx)
1158     const char *yymsg;
1159     int yytype;
1160     YYSTYPE *yyvaluep;
1161     void *scanner;
1162     struct parse_context *ctx;
1163     struct scan_context *scan_ctx;
1164 #endif
1165 {
1166   YYUSE (yyvaluep);
1167   YYUSE (scanner);
1168   YYUSE (ctx);
1169   YYUSE (scan_ctx);
1170
1171   if (!yymsg)
1172     yymsg = "Deleting";
1173   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1174
1175   switch (yytype)
1176     {
1177
1178       default:
1179         break;
1180     }
1181 }
1182
1183 /* Prevent warnings from -Wmissing-prototypes.  */
1184 #ifdef YYPARSE_PARAM
1185 #if defined __STDC__ || defined __cplusplus
1186 int yyparse (void *YYPARSE_PARAM);
1187 #else
1188 int yyparse ();
1189 #endif
1190 #else /* ! YYPARSE_PARAM */
1191 #if defined __STDC__ || defined __cplusplus
1192 int yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx);
1193 #else
1194 int yyparse ();
1195 #endif
1196 #endif /* ! YYPARSE_PARAM */
1197
1198
1199
1200
1201
1202 /*-------------------------.
1203 | yyparse or yypush_parse.  |
1204 `-------------------------*/
1205
1206 #ifdef YYPARSE_PARAM
1207 #if (defined __STDC__ || defined __C99__FUNC__ \
1208      || defined __cplusplus || defined _MSC_VER)
1209 int
1210 yyparse (void *YYPARSE_PARAM)
1211 #else
1212 int
1213 yyparse (YYPARSE_PARAM)
1214     void *YYPARSE_PARAM;
1215 #endif
1216 #else /* ! YYPARSE_PARAM */
1217 #if (defined __STDC__ || defined __C99__FUNC__ \
1218      || defined __cplusplus || defined _MSC_VER)
1219 int
1220 yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
1221 #else
1222 int
1223 yyparse (scanner, ctx, scan_ctx)
1224     void *scanner;
1225     struct parse_context *ctx;
1226     struct scan_context *scan_ctx;
1227 #endif
1228 #endif
1229 {
1230 /* The lookahead symbol.  */
1231 int yychar;
1232
1233 /* The semantic value of the lookahead symbol.  */
1234 YYSTYPE yylval;
1235
1236     /* Number of syntax errors so far.  */
1237     int yynerrs;
1238
1239     int yystate;
1240     /* Number of tokens to shift before error messages enabled.  */
1241     int yyerrstatus;
1242
1243     /* The stacks and their tools:
1244        `yyss': related to states.
1245        `yyvs': related to semantic values.
1246
1247        Refer to the stacks thru separate pointers, to allow yyoverflow
1248        to reallocate them elsewhere.  */
1249
1250     /* The state stack.  */
1251     yytype_int16 yyssa[YYINITDEPTH];
1252     yytype_int16 *yyss;
1253     yytype_int16 *yyssp;
1254
1255     /* The semantic value stack.  */
1256     YYSTYPE yyvsa[YYINITDEPTH];
1257     YYSTYPE *yyvs;
1258     YYSTYPE *yyvsp;
1259
1260     YYSIZE_T yystacksize;
1261
1262   int yyn;
1263   int yyresult;
1264   /* Lookahead token as an internal (translated) token number.  */
1265   int yytoken;
1266   /* The variables used to return semantic value and location from the
1267      action routines.  */
1268   YYSTYPE yyval;
1269
1270 #if YYERROR_VERBOSE
1271   /* Buffer for error messages, and its allocated size.  */
1272   char yymsgbuf[128];
1273   char *yymsg = yymsgbuf;
1274   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1275 #endif
1276
1277 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1278
1279   /* The number of symbols on the RHS of the reduced rule.
1280      Keep to zero when no symbol should be popped.  */
1281   int yylen = 0;
1282
1283   yytoken = 0;
1284   yyss = yyssa;
1285   yyvs = yyvsa;
1286   yystacksize = YYINITDEPTH;
1287
1288   YYDPRINTF ((stderr, "Starting parse\n"));
1289
1290   yystate = 0;
1291   yyerrstatus = 0;
1292   yynerrs = 0;
1293   yychar = YYEMPTY; /* Cause a token to be read.  */
1294
1295   /* Initialize stack pointers.
1296      Waste one element of value and location stack
1297      so that they stay on the same level as the state stack.
1298      The wasted elements are never initialized.  */
1299   yyssp = yyss;
1300   yyvsp = yyvs;
1301
1302   goto yysetstate;
1303
1304 /*------------------------------------------------------------.
1305 | yynewstate -- Push a new state, which is found in yystate.  |
1306 `------------------------------------------------------------*/
1307  yynewstate:
1308   /* In all cases, when you get here, the value and location stacks
1309      have just been pushed.  So pushing a state here evens the stacks.  */
1310   yyssp++;
1311
1312  yysetstate:
1313   *yyssp = yystate;
1314
1315   if (yyss + yystacksize - 1 <= yyssp)
1316     {
1317       /* Get the current used size of the three stacks, in elements.  */
1318       YYSIZE_T yysize = yyssp - yyss + 1;
1319
1320 #ifdef yyoverflow
1321       {
1322         /* Give user a chance to reallocate the stack.  Use copies of
1323            these so that the &'s don't force the real ones into
1324            memory.  */
1325         YYSTYPE *yyvs1 = yyvs;
1326         yytype_int16 *yyss1 = yyss;
1327
1328         /* Each stack pointer address is followed by the size of the
1329            data in use in that stack, in bytes.  This used to be a
1330            conditional around just the two extra args, but that might
1331            be undefined if yyoverflow is a macro.  */
1332         yyoverflow (YY_("memory exhausted"),
1333                     &yyss1, yysize * sizeof (*yyssp),
1334                     &yyvs1, yysize * sizeof (*yyvsp),
1335                     &yystacksize);
1336
1337         yyss = yyss1;
1338         yyvs = yyvs1;
1339       }
1340 #else /* no yyoverflow */
1341 # ifndef YYSTACK_RELOCATE
1342       goto yyexhaustedlab;
1343 # else
1344       /* Extend the stack our own way.  */
1345       if (YYMAXDEPTH <= yystacksize)
1346         goto yyexhaustedlab;
1347       yystacksize *= 2;
1348       if (YYMAXDEPTH < yystacksize)
1349         yystacksize = YYMAXDEPTH;
1350
1351       {
1352         yytype_int16 *yyss1 = yyss;
1353         union yyalloc *yyptr =
1354           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1355         if (! yyptr)
1356           goto yyexhaustedlab;
1357         YYSTACK_RELOCATE (yyss_alloc, yyss);
1358         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1359 #  undef YYSTACK_RELOCATE
1360         if (yyss1 != yyssa)
1361           YYSTACK_FREE (yyss1);
1362       }
1363 # endif
1364 #endif /* no yyoverflow */
1365
1366       yyssp = yyss + yysize - 1;
1367       yyvsp = yyvs + yysize - 1;
1368
1369       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1370                   (unsigned long int) yystacksize));
1371
1372       if (yyss + yystacksize - 1 <= yyssp)
1373         YYABORT;
1374     }
1375
1376   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1377
1378   if (yystate == YYFINAL)
1379     YYACCEPT;
1380
1381   goto yybackup;
1382
1383 /*-----------.
1384 | yybackup.  |
1385 `-----------*/
1386 yybackup:
1387
1388   /* Do appropriate processing given the current state.  Read a
1389      lookahead token if we need one and don't already have one.  */
1390
1391   /* First try to decide what to do without reference to lookahead token.  */
1392   yyn = yypact[yystate];
1393   if (yyn == YYPACT_NINF)
1394     goto yydefault;
1395
1396   /* Not known => get a lookahead token if don't already have one.  */
1397
1398   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1399   if (yychar == YYEMPTY)
1400     {
1401       YYDPRINTF ((stderr, "Reading a token: "));
1402       yychar = YYLEX;
1403     }
1404
1405   if (yychar <= YYEOF)
1406     {
1407       yychar = yytoken = YYEOF;
1408       YYDPRINTF ((stderr, "Now at end of input.\n"));
1409     }
1410   else
1411     {
1412       yytoken = YYTRANSLATE (yychar);
1413       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1414     }
1415
1416   /* If the proper action on seeing token YYTOKEN is to reduce or to
1417      detect an error, take that action.  */
1418   yyn += yytoken;
1419   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1420     goto yydefault;
1421   yyn = yytable[yyn];
1422   if (yyn <= 0)
1423     {
1424       if (yyn == 0 || yyn == YYTABLE_NINF)
1425         goto yyerrlab;
1426       yyn = -yyn;
1427       goto yyreduce;
1428     }
1429
1430   /* Count tokens shifted since error; after three, turn off error
1431      status.  */
1432   if (yyerrstatus)
1433     yyerrstatus--;
1434
1435   /* Shift the lookahead token.  */
1436   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1437
1438   /* Discard the shifted token.  */
1439   yychar = YYEMPTY;
1440
1441   yystate = yyn;
1442   *++yyvsp = yylval;
1443
1444   goto yynewstate;
1445
1446
1447 /*-----------------------------------------------------------.
1448 | yydefault -- do the default action for the current state.  |
1449 `-----------------------------------------------------------*/
1450 yydefault:
1451   yyn = yydefact[yystate];
1452   if (yyn == 0)
1453     goto yyerrlab;
1454   goto yyreduce;
1455
1456
1457 /*-----------------------------.
1458 | yyreduce -- Do a reduction.  |
1459 `-----------------------------*/
1460 yyreduce:
1461   /* yyn is the number of a rule to reduce with.  */
1462   yylen = yyr2[yyn];
1463
1464   /* If YYLEN is nonzero, implement the default value of the action:
1465      `$$ = $1'.
1466
1467      Otherwise, the following line sets YYVAL to garbage.
1468      This behavior is undocumented and Bison
1469      users should not rely upon it.  Assigning to YYVAL
1470      unconditionally makes the parser a bit smaller, and it avoids a
1471      GCC warning that YYVAL may be used uninitialized.  */
1472   yyval = yyvsp[1-yylen];
1473
1474
1475   YY_REDUCE_PRINT (yyn);
1476   switch (yyn)
1477     {
1478         case 11:
1479
1480 /* Line 1455 of yacc.c  */
1481 #line 123 "grammar.y"
1482     {
1483     ctx->setting = config_setting_add(ctx->parent, (yyvsp[(1) - (1)].sval), CONFIG_TYPE_NONE);
1484
1485     if(ctx->setting == NULL)
1486     {
1487       libconfig_yyerror(scanner, ctx, scan_ctx, err_duplicate_setting);
1488       YYABORT;
1489     }
1490     else
1491     {
1492       CAPTURE_PARSE_POS(ctx->setting);
1493     }
1494   }
1495     break;
1496
1497   case 13:
1498
1499 /* Line 1455 of yacc.c  */
1500 #line 142 "grammar.y"
1501     {
1502     if(IN_LIST())
1503     {
1504       ctx->parent = config_setting_add(ctx->parent, NULL, CONFIG_TYPE_ARRAY);
1505       CAPTURE_PARSE_POS(ctx->parent);
1506     }
1507     else
1508     {
1509       ctx->setting->type = CONFIG_TYPE_ARRAY;
1510       ctx->parent = ctx->setting;
1511       ctx->setting = NULL;
1512     }
1513   }
1514     break;
1515
1516   case 14:
1517
1518 /* Line 1455 of yacc.c  */
1519 #line 157 "grammar.y"
1520     {
1521     if(ctx->parent)
1522       ctx->parent = ctx->parent->parent;
1523   }
1524     break;
1525
1526   case 15:
1527
1528 /* Line 1455 of yacc.c  */
1529 #line 165 "grammar.y"
1530     {
1531     if(IN_LIST())
1532     {
1533       ctx->parent = config_setting_add(ctx->parent, NULL, CONFIG_TYPE_LIST);
1534       CAPTURE_PARSE_POS(ctx->parent);
1535     }
1536     else
1537     {
1538       ctx->setting->type = CONFIG_TYPE_LIST;
1539       ctx->parent = ctx->setting;
1540       ctx->setting = NULL;
1541     }
1542   }
1543     break;
1544
1545   case 16:
1546
1547 /* Line 1455 of yacc.c  */
1548 #line 180 "grammar.y"
1549     {
1550     if(ctx->parent)
1551       ctx->parent = ctx->parent->parent;
1552   }
1553     break;
1554
1555   case 21:
1556
1557 /* Line 1455 of yacc.c  */
1558 #line 194 "grammar.y"
1559     { parsectx_append_string(ctx, (yyvsp[(1) - (1)].sval)); free((yyvsp[(1) - (1)].sval)); }
1560     break;
1561
1562   case 22:
1563
1564 /* Line 1455 of yacc.c  */
1565 #line 195 "grammar.y"
1566     { parsectx_append_string(ctx, (yyvsp[(2) - (2)].sval)); free((yyvsp[(2) - (2)].sval)); }
1567     break;
1568
1569   case 23:
1570
1571 /* Line 1455 of yacc.c  */
1572 #line 200 "grammar.y"
1573     {
1574     if(IN_ARRAY() || IN_LIST())
1575     {
1576       config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
1577                                                          (int)(yyvsp[(1) - (1)].ival));
1578
1579       if(! e)
1580       {
1581         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1582         YYABORT;
1583       }
1584       else
1585       {
1586         CAPTURE_PARSE_POS(e);
1587       }
1588     }
1589     else
1590       config_setting_set_bool(ctx->setting, (int)(yyvsp[(1) - (1)].ival));
1591   }
1592     break;
1593
1594   case 24:
1595
1596 /* Line 1455 of yacc.c  */
1597 #line 220 "grammar.y"
1598     {
1599     if(IN_ARRAY() || IN_LIST())
1600     {
1601       config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
1602       if(! e)
1603       {
1604         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1605         YYABORT;
1606       }
1607       else
1608       {
1609         config_setting_set_format(e, CONFIG_FORMAT_DEFAULT);
1610         CAPTURE_PARSE_POS(e);
1611       }
1612     }
1613     else
1614     {
1615       config_setting_set_int(ctx->setting, (yyvsp[(1) - (1)].ival));
1616       config_setting_set_format(ctx->setting, CONFIG_FORMAT_DEFAULT);
1617     }
1618   }
1619     break;
1620
1621   case 25:
1622
1623 /* Line 1455 of yacc.c  */
1624 #line 242 "grammar.y"
1625     {
1626     if(IN_ARRAY() || IN_LIST())
1627     {
1628       config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
1629       if(! e)
1630       {
1631         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1632         YYABORT;
1633       }
1634       else
1635       {
1636         config_setting_set_format(e, CONFIG_FORMAT_DEFAULT);
1637         CAPTURE_PARSE_POS(e);
1638       }
1639     }
1640     else
1641     {
1642       config_setting_set_int64(ctx->setting, (yyvsp[(1) - (1)].llval));
1643       config_setting_set_format(ctx->setting, CONFIG_FORMAT_DEFAULT);
1644     }
1645   }
1646     break;
1647
1648   case 26:
1649
1650 /* Line 1455 of yacc.c  */
1651 #line 264 "grammar.y"
1652     {
1653     if(IN_ARRAY() || IN_LIST())
1654     {
1655       config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
1656       if(! e)
1657       {
1658         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1659         YYABORT;
1660       }
1661       else
1662       {
1663         config_setting_set_format(e, CONFIG_FORMAT_HEX);
1664         CAPTURE_PARSE_POS(e);
1665       }
1666     }
1667     else
1668     {
1669       config_setting_set_int(ctx->setting, (yyvsp[(1) - (1)].ival));
1670       config_setting_set_format(ctx->setting, CONFIG_FORMAT_HEX);
1671     }
1672   }
1673     break;
1674
1675   case 27:
1676
1677 /* Line 1455 of yacc.c  */
1678 #line 286 "grammar.y"
1679     {
1680     if(IN_ARRAY() || IN_LIST())
1681     {
1682       config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
1683       if(! e)
1684       {
1685         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1686         YYABORT;
1687       }
1688       else
1689       {
1690         config_setting_set_format(e, CONFIG_FORMAT_HEX);
1691         CAPTURE_PARSE_POS(e);
1692       }
1693     }
1694     else
1695     {
1696       config_setting_set_int64(ctx->setting, (yyvsp[(1) - (1)].llval));
1697       config_setting_set_format(ctx->setting, CONFIG_FORMAT_HEX);
1698     }
1699   }
1700     break;
1701
1702   case 28:
1703
1704 /* Line 1455 of yacc.c  */
1705 #line 308 "grammar.y"
1706     {
1707     if(IN_ARRAY() || IN_LIST())
1708     {
1709       config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, (yyvsp[(1) - (1)].fval));
1710       if(! e)
1711       {
1712         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1713         YYABORT;
1714       }
1715       else
1716       {
1717         CAPTURE_PARSE_POS(e);
1718       }
1719     }
1720     else
1721       config_setting_set_float(ctx->setting, (yyvsp[(1) - (1)].fval));
1722   }
1723     break;
1724
1725   case 29:
1726
1727 /* Line 1455 of yacc.c  */
1728 #line 326 "grammar.y"
1729     {
1730     if(IN_ARRAY() || IN_LIST())
1731     {
1732       const char *s = parsectx_take_string(ctx);
1733       config_setting_t *e = config_setting_set_string_elem(ctx->parent, -1, s);
1734       _delete(s);
1735
1736       if(! e)
1737       {
1738         libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
1739         YYABORT;
1740       }
1741       else
1742       {
1743         CAPTURE_PARSE_POS(e);
1744       }
1745     }
1746     else
1747     {
1748       const char *s = parsectx_take_string(ctx);
1749       config_setting_set_string(ctx->setting, s);
1750       _delete(s);
1751     }
1752   }
1753     break;
1754
1755   case 38:
1756
1757 /* Line 1455 of yacc.c  */
1758 #line 374 "grammar.y"
1759     {
1760     if(IN_LIST())
1761     {
1762       ctx->parent = config_setting_add(ctx->parent, NULL, CONFIG_TYPE_GROUP);
1763       CAPTURE_PARSE_POS(ctx->parent);
1764     }
1765     else
1766     {
1767       ctx->setting->type = CONFIG_TYPE_GROUP;
1768       ctx->parent = ctx->setting;
1769       ctx->setting = NULL;
1770     }
1771   }
1772     break;
1773
1774   case 39:
1775
1776 /* Line 1455 of yacc.c  */
1777 #line 389 "grammar.y"
1778     {
1779     if(ctx->parent)
1780       ctx->parent = ctx->parent->parent;
1781   }
1782     break;
1783
1784
1785
1786 /* Line 1455 of yacc.c  */
1787 #line 1788 "grammar.c"
1788       default: break;
1789     }
1790   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1791
1792   YYPOPSTACK (yylen);
1793   yylen = 0;
1794   YY_STACK_PRINT (yyss, yyssp);
1795
1796   *++yyvsp = yyval;
1797
1798   /* Now `shift' the result of the reduction.  Determine what state
1799      that goes to, based on the state we popped back to and the rule
1800      number reduced by.  */
1801
1802   yyn = yyr1[yyn];
1803
1804   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1805   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1806     yystate = yytable[yystate];
1807   else
1808     yystate = yydefgoto[yyn - YYNTOKENS];
1809
1810   goto yynewstate;
1811
1812
1813 /*------------------------------------.
1814 | yyerrlab -- here on detecting error |
1815 `------------------------------------*/
1816 yyerrlab:
1817   /* If not already recovering from an error, report this error.  */
1818   if (!yyerrstatus)
1819     {
1820       ++yynerrs;
1821 #if ! YYERROR_VERBOSE
1822       yyerror (scanner, ctx, scan_ctx, YY_("syntax error"));
1823 #else
1824       {
1825         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1826         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1827           {
1828             YYSIZE_T yyalloc = 2 * yysize;
1829             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1830               yyalloc = YYSTACK_ALLOC_MAXIMUM;
1831             if (yymsg != yymsgbuf)
1832               YYSTACK_FREE (yymsg);
1833             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1834             if (yymsg)
1835               yymsg_alloc = yyalloc;
1836             else
1837               {
1838                 yymsg = yymsgbuf;
1839                 yymsg_alloc = sizeof yymsgbuf;
1840               }
1841           }
1842
1843         if (0 < yysize && yysize <= yymsg_alloc)
1844           {
1845             (void) yysyntax_error (yymsg, yystate, yychar);
1846             yyerror (scanner, ctx, scan_ctx, yymsg);
1847           }
1848         else
1849           {
1850             yyerror (scanner, ctx, scan_ctx, YY_("syntax error"));
1851             if (yysize != 0)
1852               goto yyexhaustedlab;
1853           }
1854       }
1855 #endif
1856     }
1857
1858
1859
1860   if (yyerrstatus == 3)
1861     {
1862       /* If just tried and failed to reuse lookahead token after an
1863          error, discard it.  */
1864
1865       if (yychar <= YYEOF)
1866         {
1867           /* Return failure if at end of input.  */
1868           if (yychar == YYEOF)
1869             YYABORT;
1870         }
1871       else
1872         {
1873           yydestruct ("Error: discarding",
1874                       yytoken, &yylval, scanner, ctx, scan_ctx);
1875           yychar = YYEMPTY;
1876         }
1877     }
1878
1879   /* Else will try to reuse lookahead token after shifting the error
1880      token.  */
1881   goto yyerrlab1;
1882
1883
1884 /*---------------------------------------------------.
1885 | yyerrorlab -- error raised explicitly by YYERROR.  |
1886 `---------------------------------------------------*/
1887 yyerrorlab:
1888
1889   /* Pacify compilers like GCC when the user code never invokes
1890      YYERROR and the label yyerrorlab therefore never appears in user
1891      code.  */
1892   if (/*CONSTCOND*/ 0)
1893      goto yyerrorlab;
1894
1895   /* Do not reclaim the symbols of the rule which action triggered
1896      this YYERROR.  */
1897   YYPOPSTACK (yylen);
1898   yylen = 0;
1899   YY_STACK_PRINT (yyss, yyssp);
1900   yystate = *yyssp;
1901   goto yyerrlab1;
1902
1903
1904 /*-------------------------------------------------------------.
1905 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1906 `-------------------------------------------------------------*/
1907 yyerrlab1:
1908   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1909
1910   for (;;)
1911     {
1912       yyn = yypact[yystate];
1913       if (yyn != YYPACT_NINF)
1914         {
1915           yyn += YYTERROR;
1916           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1917             {
1918               yyn = yytable[yyn];
1919               if (0 < yyn)
1920                 break;
1921             }
1922         }
1923
1924       /* Pop the current state because it cannot handle the error token.  */
1925       if (yyssp == yyss)
1926         YYABORT;
1927
1928
1929       yydestruct ("Error: popping",
1930                   yystos[yystate], yyvsp, scanner, ctx, scan_ctx);
1931       YYPOPSTACK (1);
1932       yystate = *yyssp;
1933       YY_STACK_PRINT (yyss, yyssp);
1934     }
1935
1936   *++yyvsp = yylval;
1937
1938
1939   /* Shift the error token.  */
1940   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1941
1942   yystate = yyn;
1943   goto yynewstate;
1944
1945
1946 /*-------------------------------------.
1947 | yyacceptlab -- YYACCEPT comes here.  |
1948 `-------------------------------------*/
1949 yyacceptlab:
1950   yyresult = 0;
1951   goto yyreturn;
1952
1953 /*-----------------------------------.
1954 | yyabortlab -- YYABORT comes here.  |
1955 `-----------------------------------*/
1956 yyabortlab:
1957   yyresult = 1;
1958   goto yyreturn;
1959
1960 #if !defined(yyoverflow) || YYERROR_VERBOSE
1961 /*-------------------------------------------------.
1962 | yyexhaustedlab -- memory exhaustion comes here.  |
1963 `-------------------------------------------------*/
1964 yyexhaustedlab:
1965   yyerror (scanner, ctx, scan_ctx, YY_("memory exhausted"));
1966   yyresult = 2;
1967   /* Fall through.  */
1968 #endif
1969
1970 yyreturn:
1971   if (yychar != YYEMPTY)
1972      yydestruct ("Cleanup: discarding lookahead",
1973                  yytoken, &yylval, scanner, ctx, scan_ctx);
1974   /* Do not reclaim the symbols of the rule which action triggered
1975      this YYABORT or YYACCEPT.  */
1976   YYPOPSTACK (yylen);
1977   YY_STACK_PRINT (yyss, yyssp);
1978   while (yyssp != yyss)
1979     {
1980       yydestruct ("Cleanup: popping",
1981                   yystos[*yyssp], yyvsp, scanner, ctx, scan_ctx);
1982       YYPOPSTACK (1);
1983     }
1984 #ifndef yyoverflow
1985   if (yyss != yyssa)
1986     YYSTACK_FREE (yyss);
1987 #endif
1988 #if YYERROR_VERBOSE
1989   if (yymsg != yymsgbuf)
1990     YYSTACK_FREE (yymsg);
1991 #endif
1992   /* Make sure YYID is used.  */
1993   return YYID (yyresult);
1994 }
1995
1996
1997
1998 /* Line 1675 of yacc.c  */
1999 #line 395 "grammar.y"
2000
2001