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