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