cprover
xml_y.tab.cpp
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.6.4. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6  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 3 of the License, or
11  (at your option) 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, see <http://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38  especially those whose name start with YY_ or yy_. They are
39  private implementation details that can be changed or removed. */
40 
41 /* All symbols defined below should begin with yy or YY, to avoid
42  infringing on user name space. This should be done even for local
43  variables, as they might otherwise be expanded by user macros.
44  There are some unavoidable exceptions within include files to
45  define necessary library symbols; they are noted "INFRINGES ON
46  USER NAME SPACE" below. */
47 
48 /* Identify Bison output. */
49 #define YYBISON 1
50 
51 /* Bison version. */
52 #define YYBISON_VERSION "3.6.4"
53 
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56 
57 /* Pure parsers. */
58 #define YYPURE 0
59 
60 /* Push parsers. */
61 #define YYPUSH 0
62 
63 /* Pull parsers. */
64 #define YYPULL 1
65 
66 
67 /* Substitute the variable and function names. */
68 #define yyparse yyxmlparse
69 #define yylex yyxmllex
70 #define yyerror yyxmlerror
71 #define yydebug yyxmldebug
72 #define yynerrs yyxmlnerrs
73 #define yylval yyxmllval
74 #define yychar yyxmlchar
75 
76 /* First part of user prologue. */
77 #line 1 "parser.y"
78 
79 #include <cstring>
80 
81 #include "xml_parser.h"
82 
83 int yyxmllex();
84 extern char *yyxmltext;
85 
86 int yyxmlerror(const std::string &error)
87 {
89  return 0;
90 }
91 
92 #ifdef _MSC_VER
93 // possible loss of data
94 #pragma warning(disable:4242)
95 // possible loss of data
96 #pragma warning(disable:4244)
97 // signed/unsigned mismatch
98 #pragma warning(disable:4365)
99 // switch with default but no case labels
100 #pragma warning(disable:4065)
101 // unreachable code
102 #pragma warning(disable:4702)
103 #endif
104 
105 #line 106 "xml_y.tab.cpp"
106 
107 # ifndef YY_CAST
108 # ifdef __cplusplus
109 # define YY_CAST(Type, Val) static_cast<Type> (Val)
110 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
111 # else
112 # define YY_CAST(Type, Val) ((Type) (Val))
113 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
114 # endif
115 # endif
116 # ifndef YY_NULLPTR
117 # if defined __cplusplus
118 # if 201103L <= __cplusplus
119 # define YY_NULLPTR nullptr
120 # else
121 # define YY_NULLPTR 0
122 # endif
123 # else
124 # define YY_NULLPTR ((void*)0)
125 # endif
126 # endif
127 
128 /* Use api.header.include to #include this header
129  instead of duplicating it here. */
130 #ifndef YY_YYXML_XML_Y_TAB_H_INCLUDED
131 # define YY_YYXML_XML_Y_TAB_H_INCLUDED
132 /* Debug traces. */
133 #ifndef YYDEBUG
134 # define YYDEBUG 0
135 #endif
136 #if YYDEBUG
137 extern int yyxmldebug;
138 #endif
139 
140 /* Token kinds. */
141 #ifndef YYTOKENTYPE
142 # define YYTOKENTYPE
144  {
145  YYEMPTY = -2,
146  YYEOF = 0, /* "end of file" */
147  YYerror = 256, /* error */
148  YYUNDEF = 257, /* "invalid token" */
149  STARTXMLDECL = 258, /* STARTXMLDECL */
150  VERSION = 259, /* VERSION */
151  STARTPI = 260, /* STARTPI */
152  ENDPI = 261, /* ENDPI */
153  EQ = 262, /* EQ */
154  SLASH = 263, /* SLASH */
155  CLOSE = 264, /* CLOSE */
156  END = 265, /* END */
157  ENCODING = 266, /* ENCODING */
158  NAME = 267, /* NAME */
159  VALUE = 268, /* VALUE */
160  DATA = 269, /* DATA */
161  COMMENT = 270, /* COMMENT */
162  START = 271 /* START */
163  };
164  typedef enum yytokentype yytoken_kind_t;
165 #endif
166 
167 /* Value type. */
168 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
169 union YYSTYPE
170 {
171 #line 29 "parser.y"
172 char *s;
173 
174 #line 175 "xml_y.tab.cpp"
175 
176 };
177 typedef union YYSTYPE YYSTYPE;
178 # define YYSTYPE_IS_TRIVIAL 1
179 # define YYSTYPE_IS_DECLARED 1
180 #endif
181 
182 
183 extern YYSTYPE yyxmllval;
184 
185 int yyxmlparse (void);
186 
187 #endif /* !YY_YYXML_XML_Y_TAB_H_INCLUDED */
188 /* Symbol kind. */
190 {
192  YYSYMBOL_YYEOF = 0, /* "end of file" */
193  YYSYMBOL_YYerror = 1, /* error */
194  YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
195  YYSYMBOL_STARTXMLDECL = 3, /* STARTXMLDECL */
196  YYSYMBOL_VERSION = 4, /* VERSION */
197  YYSYMBOL_STARTPI = 5, /* STARTPI */
198  YYSYMBOL_ENDPI = 6, /* ENDPI */
199  YYSYMBOL_EQ = 7, /* EQ */
200  YYSYMBOL_SLASH = 8, /* SLASH */
201  YYSYMBOL_CLOSE = 9, /* CLOSE */
202  YYSYMBOL_END = 10, /* END */
203  YYSYMBOL_ENCODING = 11, /* ENCODING */
204  YYSYMBOL_NAME = 12, /* NAME */
205  YYSYMBOL_VALUE = 13, /* VALUE */
206  YYSYMBOL_DATA = 14, /* DATA */
207  YYSYMBOL_COMMENT = 15, /* COMMENT */
208  YYSYMBOL_START = 16, /* START */
209  YYSYMBOL_YYACCEPT = 17, /* $accept */
210  YYSYMBOL_document = 18, /* document */
211  YYSYMBOL_prolog = 19, /* prolog */
212  YYSYMBOL_XMLDecl_opt = 20, /* XMLDecl_opt */
213  YYSYMBOL_21_1 = 21, /* $@1 */
214  YYSYMBOL_22_2 = 22, /* $@2 */
215  YYSYMBOL_misc_seq_opt = 23, /* misc_seq_opt */
216  YYSYMBOL_misc = 24, /* misc */
217  YYSYMBOL_PI = 25, /* PI */
218  YYSYMBOL_26_3 = 26, /* $@3 */
219  YYSYMBOL_27_4 = 27, /* $@4 */
220  YYSYMBOL_element = 28, /* element */
221  YYSYMBOL_29_5 = 29, /* $@5 */
222  YYSYMBOL_empty_or_content = 30, /* empty_or_content */
223  YYSYMBOL_31_6 = 31, /* $@6 */
224  YYSYMBOL_content = 32, /* content */
225  YYSYMBOL_33_7 = 33, /* $@7 */
226  YYSYMBOL_name_opt = 34, /* name_opt */
227  YYSYMBOL_attribute_seq_opt = 35, /* attribute_seq_opt */
228  YYSYMBOL_attribute = 36 /* attribute */
229 };
230 typedef enum yysymbol_kind_t yysymbol_kind_t;
231 
232 
233 
234 
235 #ifdef short
236 # undef short
237 #endif
238 
239 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
240  <limits.h> and (if available) <stdint.h> are included
241  so that the code can choose integer types of a good width. */
242 
243 #ifndef __PTRDIFF_MAX__
244 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
245 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
246 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
247 # define YY_STDINT_H
248 # endif
249 #endif
250 
251 /* Narrow types that promote to a signed type and that can represent a
252  signed or unsigned integer of at least N bits. In tables they can
253  save space and decrease cache pressure. Promoting to a signed type
254  helps avoid bugs in integer arithmetic. */
255 
256 #ifdef __INT_LEAST8_MAX__
257 typedef __INT_LEAST8_TYPE__ yytype_int8;
258 #elif defined YY_STDINT_H
259 typedef int_least8_t yytype_int8;
260 #else
261 typedef signed char yytype_int8;
262 #endif
263 
264 #ifdef __INT_LEAST16_MAX__
265 typedef __INT_LEAST16_TYPE__ yytype_int16;
266 #elif defined YY_STDINT_H
267 typedef int_least16_t yytype_int16;
268 #else
269 typedef short yytype_int16;
270 #endif
271 
272 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
273 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
274 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
275  && UINT_LEAST8_MAX <= INT_MAX)
276 typedef uint_least8_t yytype_uint8;
277 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
278 typedef unsigned char yytype_uint8;
279 #else
280 typedef short yytype_uint8;
281 #endif
282 
283 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
284 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
285 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
286  && UINT_LEAST16_MAX <= INT_MAX)
287 typedef uint_least16_t yytype_uint16;
288 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
289 typedef unsigned short yytype_uint16;
290 #else
291 typedef int yytype_uint16;
292 #endif
293 
294 #ifndef YYPTRDIFF_T
295 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
296 # define YYPTRDIFF_T __PTRDIFF_TYPE__
297 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
298 # elif defined PTRDIFF_MAX
299 # ifndef ptrdiff_t
300 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
301 # endif
302 # define YYPTRDIFF_T ptrdiff_t
303 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
304 # else
305 # define YYPTRDIFF_T long
306 # define YYPTRDIFF_MAXIMUM LONG_MAX
307 # endif
308 #endif
309 
310 #ifndef YYSIZE_T
311 # ifdef __SIZE_TYPE__
312 # define YYSIZE_T __SIZE_TYPE__
313 # elif defined size_t
314 # define YYSIZE_T size_t
315 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
316 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
317 # define YYSIZE_T size_t
318 # else
319 # define YYSIZE_T unsigned
320 # endif
321 #endif
322 
323 #define YYSIZE_MAXIMUM \
324  YY_CAST (YYPTRDIFF_T, \
325  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
326  ? YYPTRDIFF_MAXIMUM \
327  : YY_CAST (YYSIZE_T, -1)))
328 
329 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
330 
331 
332 /* Stored state numbers (used for stacks). */
334 
335 /* State numbers in computations. */
336 typedef int yy_state_fast_t;
337 
338 #ifndef YY_
339 # if defined YYENABLE_NLS && YYENABLE_NLS
340 # if ENABLE_NLS
341 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
342 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
343 # endif
344 # endif
345 # ifndef YY_
346 # define YY_(Msgid) Msgid
347 # endif
348 #endif
349 
350 
351 #ifndef YY_ATTRIBUTE_PURE
352 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
353 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
354 # else
355 # define YY_ATTRIBUTE_PURE
356 # endif
357 #endif
358 
359 #ifndef YY_ATTRIBUTE_UNUSED
360 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
361 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
362 # else
363 # define YY_ATTRIBUTE_UNUSED
364 # endif
365 #endif
366 
367 /* Suppress unused-variable warnings by "using" E. */
368 #if ! defined lint || defined __GNUC__
369 # define YYUSE(E) ((void) (E))
370 #else
371 # define YYUSE(E) /* empty */
372 #endif
373 
374 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
375 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
376 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
377  _Pragma ("GCC diagnostic push") \
378  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
379  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
380 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
381  _Pragma ("GCC diagnostic pop")
382 #else
383 # define YY_INITIAL_VALUE(Value) Value
384 #endif
385 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
386 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
387 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
388 #endif
389 #ifndef YY_INITIAL_VALUE
390 # define YY_INITIAL_VALUE(Value) /* Nothing. */
391 #endif
392 
393 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
394 # define YY_IGNORE_USELESS_CAST_BEGIN \
395  _Pragma ("GCC diagnostic push") \
396  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
397 # define YY_IGNORE_USELESS_CAST_END \
398  _Pragma ("GCC diagnostic pop")
399 #endif
400 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
401 # define YY_IGNORE_USELESS_CAST_BEGIN
402 # define YY_IGNORE_USELESS_CAST_END
403 #endif
404 
405 
406 #define YY_ASSERT(E) ((void) (0 && (E)))
407 
408 #if !defined yyoverflow
409 
410 /* The parser invokes alloca or malloc; define the necessary symbols. */
411 
412 # ifdef YYSTACK_USE_ALLOCA
413 # if YYSTACK_USE_ALLOCA
414 # ifdef __GNUC__
415 # define YYSTACK_ALLOC __builtin_alloca
416 # elif defined __BUILTIN_VA_ARG_INCR
417 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
418 # elif defined _AIX
419 # define YYSTACK_ALLOC __alloca
420 # elif defined _MSC_VER
421 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
422 # define alloca _alloca
423 # else
424 # define YYSTACK_ALLOC alloca
425 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
426 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
427  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
428 # ifndef EXIT_SUCCESS
429 # define EXIT_SUCCESS 0
430 # endif
431 # endif
432 # endif
433 # endif
434 # endif
435 
436 # ifdef YYSTACK_ALLOC
437  /* Pacify GCC's 'empty if-body' warning. */
438 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
439 # ifndef YYSTACK_ALLOC_MAXIMUM
440  /* The OS might guarantee only one guard page at the bottom of the stack,
441  and a page size can be as small as 4096 bytes. So we cannot safely
442  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
443  to allow for a few compiler-allocated temporary stack slots. */
444 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
445 # endif
446 # else
447 # define YYSTACK_ALLOC YYMALLOC
448 # define YYSTACK_FREE YYFREE
449 # ifndef YYSTACK_ALLOC_MAXIMUM
450 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
451 # endif
452 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
453  && ! ((defined YYMALLOC || defined malloc) \
454  && (defined YYFREE || defined free)))
455 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
456 # ifndef EXIT_SUCCESS
457 # define EXIT_SUCCESS 0
458 # endif
459 # endif
460 # ifndef YYMALLOC
461 # define YYMALLOC malloc
462 # if ! defined malloc && ! defined EXIT_SUCCESS
463 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
464 # endif
465 # endif
466 # ifndef YYFREE
467 # define YYFREE free
468 # if ! defined free && ! defined EXIT_SUCCESS
469 void free (void *); /* INFRINGES ON USER NAME SPACE */
470 # endif
471 # endif
472 # endif
473 #endif /* !defined yyoverflow */
474 
475 #if (! defined yyoverflow \
476  && (! defined __cplusplus \
477  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
478 
479 /* A type that is properly aligned for any stack member. */
480 union yyalloc
481 {
484 };
485 
486 /* The size of the maximum gap between one aligned stack and the next. */
487 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
488 
489 /* The size of an array large to enough to hold all stacks, each with
490  N elements. */
491 # define YYSTACK_BYTES(N) \
492  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
493  + YYSTACK_GAP_MAXIMUM)
494 
495 # define YYCOPY_NEEDED 1
496 
497 /* Relocate STACK from its old location to the new one. The
498  local variables YYSIZE and YYSTACKSIZE give the old and new number of
499  elements in the stack, and YYPTR gives the new location of the
500  stack. Advance YYPTR to a properly aligned location for the next
501  stack. */
502 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
503  do \
504  { \
505  YYPTRDIFF_T yynewbytes; \
506  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
507  Stack = &yyptr->Stack_alloc; \
508  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
509  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
510  } \
511  while (0)
512 
513 #endif
514 
515 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
516 /* Copy COUNT objects from SRC to DST. The source and destination do
517  not overlap. */
518 # ifndef YYCOPY
519 # if defined __GNUC__ && 1 < __GNUC__
520 # define YYCOPY(Dst, Src, Count) \
521  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
522 # else
523 # define YYCOPY(Dst, Src, Count) \
524  do \
525  { \
526  YYPTRDIFF_T yyi; \
527  for (yyi = 0; yyi < (Count); yyi++) \
528  (Dst)[yyi] = (Src)[yyi]; \
529  } \
530  while (0)
531 # endif
532 # endif
533 #endif /* !YYCOPY_NEEDED */
534 
535 /* YYFINAL -- State number of the termination state. */
536 #define YYFINAL 6
537 /* YYLAST -- Last index in YYTABLE. */
538 #define YYLAST 25
539 
540 /* YYNTOKENS -- Number of terminals. */
541 #define YYNTOKENS 17
542 /* YYNNTS -- Number of nonterminals. */
543 #define YYNNTS 20
544 /* YYNRULES -- Number of rules. */
545 #define YYNRULES 29
546 /* YYNSTATES -- Number of states. */
547 #define YYNSTATES 43
548 
549 #define YYMAXUTOK 271
550 
551 
552 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
553  as returned by yylex, with out-of-bounds checking. */
554 #define YYTRANSLATE(YYX) \
555  (0 <= (YYX) && (YYX) <= YYMAXUTOK \
556  ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
557  : YYSYMBOL_YYUNDEF)
558 
559 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
560  as returned by yylex. */
561 static const yytype_int8 yytranslate[] =
562 {
563  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
564  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
565  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
566  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
569  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
572  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
573  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
589  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
590  15, 16
591 };
592 
593 #if YYDEBUG
594  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
595 static const yytype_int8 yyrline[] =
596 {
597  0, 39, 39, 43, 48, 50, 47, 52, 56, 57,
598  61, 62, 67, 69, 66, 74, 74, 82, 83, 83,
599  88, 89, 91, 90, 94, 98, 99, 103, 104, 108
600 };
601 #endif
602 
604 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
605 
606 #if YYDEBUG || 0
607 /* The user-facing name of the symbol whose (internal) number is
608  YYSYMBOL. No bounds checking. */
609 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
610 
611 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
612  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
613 static const char *const yytname[] =
614 {
615  "\"end of file\"", "error", "\"invalid token\"", "STARTXMLDECL",
616  "VERSION", "STARTPI", "ENDPI", "EQ", "SLASH", "CLOSE", "END", "ENCODING",
617  "NAME", "VALUE", "DATA", "COMMENT", "START", "$accept", "document",
618  "prolog", "XMLDecl_opt", "$@1", "$@2", "misc_seq_opt", "misc", "PI",
619  "$@3", "$@4", "element", "$@5", "empty_or_content", "$@6", "content",
620  "$@7", "name_opt", "attribute_seq_opt", "attribute", YY_NULLPTR
621 };
622 
623 static const char *
624 yysymbol_name (yysymbol_kind_t yysymbol)
625 {
626  return yytname[yysymbol];
627 }
628 #endif
629 
630 #ifdef YYPRINT
631 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
632  (internal) symbol number NUM (which must be that of a token). */
633 static const yytype_int16 yytoknum[] =
634 {
635  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
636  265, 266, 267, 268, 269, 270, 271
637 };
638 #endif
639 
640 #define YYPACT_NINF (-13)
641 
642 #define yypact_value_is_default(Yyn) \
643  ((Yyn) == YYPACT_NINF)
644 
645 #define YYTABLE_NINF (-1)
646 
647 #define yytable_value_is_error(Yyn) \
648  0
649 
650  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
651  STATE-NUM. */
652 static const yytype_int8 yypact[] =
653 {
654  2, -13, 8, -7, -13, -13, -13, -13, -13, -3,
655  1, -13, -3, 3, -13, -13, -13, 7, 11, -13,
656  -5, -13, 5, -13, 10, -13, -13, -13, -13, -13,
657  -13, 1, -4, 14, 9, -13, -13, -7, -13, -13,
658  13, -13, -13
659 };
660 
661  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
662  Performed when YYTABLE does not specify something else to do. Zero
663  means the default is an error. */
664 static const yytype_int8 yydefact[] =
665 {
666  7, 4, 0, 0, 9, 28, 1, 15, 9, 3,
667  5, 28, 2, 0, 10, 8, 11, 0, 0, 27,
668  0, 12, 0, 6, 0, 18, 16, 28, 29, 17,
669  24, 13, 22, 0, 26, 20, 21, 0, 14, 25,
670  0, 23, 19
671 };
672 
673  /* YYPGOTO[NTERM-NUM]. */
674 static const yytype_int8 yypgoto[] =
675 {
676  -13, -13, -13, -13, -13, -13, 15, -8, -13, -13,
677  -13, -12, -13, -13, -13, -13, -13, -13, -11, -13
678 };
679 
680  /* YYDEFGOTO[NTERM-NUM]. */
681 static const yytype_int8 yydefgoto[] =
682 {
683  -1, 2, 3, 4, 5, 18, 9, 15, 16, 27,
684  33, 8, 11, 26, 30, 32, 37, 40, 10, 19
685 };
686 
687  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
688  positive, shift that token. If negative, reduce the rule whose
689  number is the opposite. If YYTABLE_NINF, syntax error. */
690 static const yytype_int8 yytable[] =
691 {
692  20, 13, 13, 24, 25, 1, 34, 17, 6, 7,
693  35, 14, 14, 17, 22, 21, 31, 23, 28, 29,
694  38, 39, 42, 12, 36, 41
695 };
696 
697 static const yytype_int8 yycheck[] =
698 {
699  11, 5, 5, 8, 9, 3, 10, 12, 0, 16,
700  14, 15, 15, 12, 7, 12, 27, 6, 13, 9,
701  6, 12, 9, 8, 32, 37
702 };
703 
704  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
705  symbol of state STATE-NUM. */
706 static const yytype_int8 yystos[] =
707 {
708  0, 3, 18, 19, 20, 21, 0, 16, 28, 23,
709  35, 29, 23, 5, 15, 24, 25, 12, 22, 36,
710  35, 12, 7, 6, 8, 9, 30, 26, 13, 9,
711  31, 35, 32, 27, 10, 14, 24, 33, 6, 12,
712  34, 28, 9
713 };
714 
715  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
716 static const yytype_int8 yyr1[] =
717 {
718  0, 17, 18, 19, 21, 22, 20, 20, 23, 23,
719  24, 24, 26, 27, 25, 29, 28, 30, 31, 30,
720  32, 32, 33, 32, 32, 34, 34, 35, 35, 36
721 };
722 
723  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
724 static const yytype_int8 yyr2[] =
725 {
726  0, 2, 3, 2, 0, 0, 5, 0, 2, 0,
727  1, 1, 0, 0, 6, 0, 4, 2, 0, 6,
728  2, 2, 0, 3, 0, 1, 0, 2, 0, 3
729 };
730 
731 
732 enum { YYENOMEM = -2 };
733 
734 #define yyerrok (yyerrstatus = 0)
735 #define yyclearin (yychar = YYEMPTY)
736 
737 #define YYACCEPT goto yyacceptlab
738 #define YYABORT goto yyabortlab
739 #define YYERROR goto yyerrorlab
740 
741 
742 #define YYRECOVERING() (!!yyerrstatus)
743 
744 #define YYBACKUP(Token, Value) \
745  do \
746  if (yychar == YYEMPTY) \
747  { \
748  yychar = (Token); \
749  yylval = (Value); \
750  YYPOPSTACK (yylen); \
751  yystate = *yyssp; \
752  goto yybackup; \
753  } \
754  else \
755  { \
756  yyerror (YY_("syntax error: cannot back up")); \
757  YYERROR; \
758  } \
759  while (0)
760 
761 /* Backward compatibility with an undocumented macro.
762  Use YYerror or YYUNDEF. */
763 #define YYERRCODE YYUNDEF
764 
765 
766 /* Enable debugging if requested. */
767 #if YYDEBUG
768 
769 # ifndef YYFPRINTF
770 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
771 # define YYFPRINTF fprintf
772 # endif
773 
774 # define YYDPRINTF(Args) \
775 do { \
776  if (yydebug) \
777  YYFPRINTF Args; \
778 } while (0)
779 
780 /* This macro is provided for backward compatibility. */
781 # ifndef YY_LOCATION_PRINT
782 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
783 # endif
784 
785 
786 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
787 do { \
788  if (yydebug) \
789  { \
790  YYFPRINTF (stderr, "%s ", Title); \
791  yy_symbol_print (stderr, \
792  Kind, Value); \
793  YYFPRINTF (stderr, "\n"); \
794  } \
795 } while (0)
796 
797 
798 /*-----------------------------------.
799 | Print this symbol's value on YYO. |
800 `-----------------------------------*/
801 
802 static void
803 yy_symbol_value_print (FILE *yyo,
804  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
805 {
806  FILE *yyoutput = yyo;
807  YYUSE (yyoutput);
808  if (!yyvaluep)
809  return;
810 # ifdef YYPRINT
811  if (yykind < YYNTOKENS)
812  YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
813 # endif
815  YYUSE (yykind);
817 }
818 
819 
820 /*---------------------------.
821 | Print this symbol on YYO. |
822 `---------------------------*/
823 
824 static void
825 yy_symbol_print (FILE *yyo,
826  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
827 {
828  YYFPRINTF (yyo, "%s %s (",
829  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
830 
831  yy_symbol_value_print (yyo, yykind, yyvaluep);
832  YYFPRINTF (yyo, ")");
833 }
834 
835 /*------------------------------------------------------------------.
836 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
837 | TOP (included). |
838 `------------------------------------------------------------------*/
839 
840 static void
841 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
842 {
843  YYFPRINTF (stderr, "Stack now");
844  for (; yybottom <= yytop; yybottom++)
845  {
846  int yybot = *yybottom;
847  YYFPRINTF (stderr, " %d", yybot);
848  }
849  YYFPRINTF (stderr, "\n");
850 }
851 
852 # define YY_STACK_PRINT(Bottom, Top) \
853 do { \
854  if (yydebug) \
855  yy_stack_print ((Bottom), (Top)); \
856 } while (0)
857 
858 
859 /*------------------------------------------------.
860 | Report that the YYRULE is going to be reduced. |
861 `------------------------------------------------*/
862 
863 static void
864 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
865  int yyrule)
866 {
867  int yylno = yyrline[yyrule];
868  int yynrhs = yyr2[yyrule];
869  int yyi;
870  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
871  yyrule - 1, yylno);
872  /* The symbols being reduced. */
873  for (yyi = 0; yyi < yynrhs; yyi++)
874  {
875  YYFPRINTF (stderr, " $%d = ", yyi + 1);
876  yy_symbol_print (stderr,
877  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
878  &yyvsp[(yyi + 1) - (yynrhs)]);
879  YYFPRINTF (stderr, "\n");
880  }
881 }
882 
883 # define YY_REDUCE_PRINT(Rule) \
884 do { \
885  if (yydebug) \
886  yy_reduce_print (yyssp, yyvsp, Rule); \
887 } while (0)
888 
889 /* Nonzero means print parse trace. It is left uninitialized so that
890  multiple parsers can coexist. */
891 int yydebug;
892 #else /* !YYDEBUG */
893 # define YYDPRINTF(Args) ((void) 0)
894 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
895 # define YY_STACK_PRINT(Bottom, Top)
896 # define YY_REDUCE_PRINT(Rule)
897 #endif /* !YYDEBUG */
898 
899 
900 /* YYINITDEPTH -- initial size of the parser's stacks. */
901 #ifndef YYINITDEPTH
902 # define YYINITDEPTH 200
903 #endif
904 
905 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
906  if the built-in stack extension method is used).
907 
908  Do not make this value too large; the results are undefined if
909  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
910  evaluated with infinite-precision integer arithmetic. */
911 
912 #ifndef YYMAXDEPTH
913 # define YYMAXDEPTH 10000
914 #endif
915 
916 
917 
918 
919 
920 
921 /*-----------------------------------------------.
922 | Release the memory associated to this symbol. |
923 `-----------------------------------------------*/
924 
925 static void
926 yydestruct (const char *yymsg,
927  yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
928 {
929  YYUSE (yyvaluep);
930  if (!yymsg)
931  yymsg = "Deleting";
932  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
933 
935  YYUSE (yykind);
937 }
938 
939 
940 /* The lookahead symbol. */
941 int yychar;
942 
943 /* The semantic value of the lookahead symbol. */
945 /* Number of syntax errors so far. */
947 
948 
949 
950 
951 /*----------.
952 | yyparse. |
953 `----------*/
954 
955 int
956 yyparse (void)
957 {
958  yy_state_fast_t yystate;
959  /* Number of tokens to shift before error messages enabled. */
960  int yyerrstatus;
961 
962  /* The stacks and their tools:
963  'yyss': related to states.
964  'yyvs': related to semantic values.
965 
966  Refer to the stacks through separate pointers, to allow yyoverflow
967  to reallocate them elsewhere. */
968 
969  /* Their size. */
970  YYPTRDIFF_T yystacksize;
971 
972  /* The state stack. */
973  yy_state_t yyssa[YYINITDEPTH];
974  yy_state_t *yyss;
975  yy_state_t *yyssp;
976 
977  /* The semantic value stack. */
978  YYSTYPE yyvsa[YYINITDEPTH];
979  YYSTYPE *yyvs;
980  YYSTYPE *yyvsp;
981 
982  int yyn;
983  /* The return value of yyparse. */
984  int yyresult;
985  /* Lookahead token as an internal (translated) token number. */
987  /* The variables used to return semantic value and location from the
988  action routines. */
989  YYSTYPE yyval;
990 
991 
992 
993 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
994 
995  /* The number of symbols on the RHS of the reduced rule.
996  Keep to zero when no symbol should be popped. */
997  int yylen = 0;
998 
999  yynerrs = 0;
1000  yystate = 0;
1001  yyerrstatus = 0;
1002 
1003  yystacksize = YYINITDEPTH;
1004  yyssp = yyss = yyssa;
1005  yyvsp = yyvs = yyvsa;
1006 
1007 
1008  YYDPRINTF ((stderr, "Starting parse\n"));
1009 
1010  yychar = YYEMPTY; /* Cause a token to be read. */
1011  goto yysetstate;
1012 
1013 
1014 /*------------------------------------------------------------.
1015 | yynewstate -- push a new state, which is found in yystate. |
1016 `------------------------------------------------------------*/
1017 yynewstate:
1018  /* In all cases, when you get here, the value and location stacks
1019  have just been pushed. So pushing a state here evens the stacks. */
1020  yyssp++;
1021 
1022 
1023 /*--------------------------------------------------------------------.
1024 | yysetstate -- set current state (the top of the stack) to yystate. |
1025 `--------------------------------------------------------------------*/
1026 yysetstate:
1027  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1028  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1030  *yyssp = YY_CAST (yy_state_t, yystate);
1032  YY_STACK_PRINT (yyss, yyssp);
1033 
1034  if (yyss + yystacksize - 1 <= yyssp)
1035 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1036  goto yyexhaustedlab;
1037 #else
1038  {
1039  /* Get the current used size of the three stacks, in elements. */
1040  YYPTRDIFF_T yysize = yyssp - yyss + 1;
1041 
1042 # if defined yyoverflow
1043  {
1044  /* Give user a chance to reallocate the stack. Use copies of
1045  these so that the &'s don't force the real ones into
1046  memory. */
1047  yy_state_t *yyss1 = yyss;
1048  YYSTYPE *yyvs1 = yyvs;
1049 
1050  /* Each stack pointer address is followed by the size of the
1051  data in use in that stack, in bytes. This used to be a
1052  conditional around just the two extra args, but that might
1053  be undefined if yyoverflow is a macro. */
1054  yyoverflow (YY_("memory exhausted"),
1055  &yyss1, yysize * YYSIZEOF (*yyssp),
1056  &yyvs1, yysize * YYSIZEOF (*yyvsp),
1057  &yystacksize);
1058  yyss = yyss1;
1059  yyvs = yyvs1;
1060  }
1061 # else /* defined YYSTACK_RELOCATE */
1062  /* Extend the stack our own way. */
1063  if (YYMAXDEPTH <= yystacksize)
1064  goto yyexhaustedlab;
1065  yystacksize *= 2;
1066  if (YYMAXDEPTH < yystacksize)
1067  yystacksize = YYMAXDEPTH;
1068 
1069  {
1070  yy_state_t *yyss1 = yyss;
1071  union yyalloc *yyptr =
1072  YY_CAST (union yyalloc *,
1073  YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1074  if (! yyptr)
1075  goto yyexhaustedlab;
1076  YYSTACK_RELOCATE (yyss_alloc, yyss);
1077  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1078 # undef YYSTACK_RELOCATE
1079  if (yyss1 != yyssa)
1080  YYSTACK_FREE (yyss1);
1081  }
1082 # endif
1083 
1084  yyssp = yyss + yysize - 1;
1085  yyvsp = yyvs + yysize - 1;
1086 
1088  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1089  YY_CAST (long, yystacksize)));
1091 
1092  if (yyss + yystacksize - 1 <= yyssp)
1093  YYABORT;
1094  }
1095 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1096 
1097  if (yystate == YYFINAL)
1098  YYACCEPT;
1099 
1100  goto yybackup;
1101 
1102 
1103 /*-----------.
1104 | yybackup. |
1105 `-----------*/
1106 yybackup:
1107  /* Do appropriate processing given the current state. Read a
1108  lookahead token if we need one and don't already have one. */
1109 
1110  /* First try to decide what to do without reference to lookahead token. */
1111  yyn = yypact[yystate];
1112  if (yypact_value_is_default (yyn))
1113  goto yydefault;
1114 
1115  /* Not known => get a lookahead token if don't already have one. */
1116 
1117  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
1118  if (yychar == YYEMPTY)
1119  {
1120  YYDPRINTF ((stderr, "Reading a token\n"));
1121  yychar = yylex ();
1122  }
1123 
1124  if (yychar <= YYEOF)
1125  {
1126  yychar = YYEOF;
1127  yytoken = YYSYMBOL_YYEOF;
1128  YYDPRINTF ((stderr, "Now at end of input.\n"));
1129  }
1130  else if (yychar == YYerror)
1131  {
1132  /* The scanner already issued an error message, process directly
1133  to error recovery. But do not keep the error token as
1134  lookahead, it is too special and may lead us to an endless
1135  loop in error recovery. */
1136  yychar = YYUNDEF;
1137  yytoken = YYSYMBOL_YYerror;
1138  goto yyerrlab1;
1139  }
1140  else
1141  {
1142  yytoken = YYTRANSLATE (yychar);
1143  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1144  }
1145 
1146  /* If the proper action on seeing token YYTOKEN is to reduce or to
1147  detect an error, take that action. */
1148  yyn += yytoken;
1149  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1150  goto yydefault;
1151  yyn = yytable[yyn];
1152  if (yyn <= 0)
1153  {
1154  if (yytable_value_is_error (yyn))
1155  goto yyerrlab;
1156  yyn = -yyn;
1157  goto yyreduce;
1158  }
1159 
1160  /* Count tokens shifted since error; after three, turn off error
1161  status. */
1162  if (yyerrstatus)
1163  yyerrstatus--;
1164 
1165  /* Shift the lookahead token. */
1166  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1167  yystate = yyn;
1169  *++yyvsp = yylval;
1171 
1172  /* Discard the shifted token. */
1173  yychar = YYEMPTY;
1174  goto yynewstate;
1175 
1176 
1177 /*-----------------------------------------------------------.
1178 | yydefault -- do the default action for the current state. |
1179 `-----------------------------------------------------------*/
1180 yydefault:
1181  yyn = yydefact[yystate];
1182  if (yyn == 0)
1183  goto yyerrlab;
1184  goto yyreduce;
1185 
1186 
1187 /*-----------------------------.
1188 | yyreduce -- do a reduction. |
1189 `-----------------------------*/
1190 yyreduce:
1191  /* yyn is the number of a rule to reduce with. */
1192  yylen = yyr2[yyn];
1193 
1194  /* If YYLEN is nonzero, implement the default value of the action:
1195  '$$ = $1'.
1196 
1197  Otherwise, the following line sets YYVAL to garbage.
1198  This behavior is undocumented and Bison
1199  users should not rely upon it. Assigning to YYVAL
1200  unconditionally makes the parser a bit smaller, and it avoids a
1201  GCC warning that YYVAL may be used uninitialized. */
1202  yyval = yyvsp[1-yylen];
1203 
1204 
1205  YY_REDUCE_PRINT (yyn);
1206  switch (yyn)
1207  {
1208  case 4:
1209 #line 48 "parser.y"
1210  { xml_parser.stack.push_back(&xml_parser.parse_tree.xml); }
1211 #line 1212 "xml_y.tab.cpp"
1212  break;
1213 
1214  case 5:
1215 #line 50 "parser.y"
1216  { xml_parser.stack.pop_back(); }
1217 #line 1218 "xml_y.tab.cpp"
1218  break;
1219 
1220  case 10:
1221 #line 61 "parser.y"
1222  { free((yyvsp[0].s)); }
1223 #line 1224 "xml_y.tab.cpp"
1224  break;
1225 
1226  case 12:
1227 #line 67 "parser.y"
1228  { free((yyvsp[0].s)); xml_parser.stack.push_back(&xml_parser.parse_tree.xml); }
1229 #line 1230 "xml_y.tab.cpp"
1230  break;
1231 
1232  case 13:
1233 #line 69 "parser.y"
1234  { xml_parser.stack.pop_back(); }
1235 #line 1236 "xml_y.tab.cpp"
1236  break;
1237 
1238  case 15:
1239 #line 74 "parser.y"
1240  { xml_parser.current().name=(yyvsp[0].s);
1241  free((yyvsp[0].s));
1242  }
1243 #line 1244 "xml_y.tab.cpp"
1244  break;
1245 
1246  case 17:
1247 #line 82 "parser.y"
1248  { }
1249 #line 1250 "xml_y.tab.cpp"
1250  break;
1251 
1252  case 18:
1253 #line 83 "parser.y"
1254  { }
1255 #line 1256 "xml_y.tab.cpp"
1256  break;
1257 
1258  case 19:
1259 #line 84 "parser.y"
1260  { free((yyvsp[-1].s)); }
1261 #line 1262 "xml_y.tab.cpp"
1262  break;
1263 
1264  case 20:
1265 #line 88 "parser.y"
1266  { xml_parser.current().data+=xmlt::unescape((yyvsp[0].s)); free((yyvsp[0].s)); }
1267 #line 1268 "xml_y.tab.cpp"
1268  break;
1269 
1270  case 22:
1271 #line 91 "parser.y"
1272  { xml_parser.new_level(); }
1273 #line 1274 "xml_y.tab.cpp"
1274  break;
1275 
1276  case 23:
1277 #line 93 "parser.y"
1278  { xml_parser.stack.pop_back(); }
1279 #line 1280 "xml_y.tab.cpp"
1280  break;
1281 
1282  case 25:
1283 #line 98 "parser.y"
1284  { (yyval.s)=(yyvsp[0].s); }
1285 #line 1286 "xml_y.tab.cpp"
1286  break;
1287 
1288  case 26:
1289 #line 99 "parser.y"
1290  { (yyval.s)=strdup(""); }
1291 #line 1292 "xml_y.tab.cpp"
1292  break;
1293 
1294  case 29:
1295 #line 108 "parser.y"
1297  xmlt::unescape((yyvsp[-2].s)), xmlt::unescape((yyvsp[0].s)));
1298  free((yyvsp[-2].s)); free((yyvsp[0].s));}
1299 #line 1300 "xml_y.tab.cpp"
1300  break;
1301 
1302 
1303 #line 1304 "xml_y.tab.cpp"
1304 
1305  default: break;
1306  }
1307  /* User semantic actions sometimes alter yychar, and that requires
1308  that yytoken be updated with the new translation. We take the
1309  approach of translating immediately before every use of yytoken.
1310  One alternative is translating here after every semantic action,
1311  but that translation would be missed if the semantic action invokes
1312  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1313  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1314  incorrect destructor might then be invoked immediately. In the
1315  case of YYERROR or YYBACKUP, subsequent parser actions might lead
1316  to an incorrect destructor call or verbose syntax error message
1317  before the lookahead is translated. */
1318  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1319 
1320  YYPOPSTACK (yylen);
1321  yylen = 0;
1322 
1323  *++yyvsp = yyval;
1324 
1325  /* Now 'shift' the result of the reduction. Determine what state
1326  that goes to, based on the state we popped back to and the rule
1327  number reduced by. */
1328  {
1329  const int yylhs = yyr1[yyn] - YYNTOKENS;
1330  const int yyi = yypgoto[yylhs] + *yyssp;
1331  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1332  ? yytable[yyi]
1333  : yydefgoto[yylhs]);
1334  }
1335 
1336  goto yynewstate;
1337 
1338 
1339 /*--------------------------------------.
1340 | yyerrlab -- here on detecting error. |
1341 `--------------------------------------*/
1342 yyerrlab:
1343  /* Make sure we have latest lookahead translation. See comments at
1344  user semantic actions for why this is necessary. */
1345  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1346  /* If not already recovering from an error, report this error. */
1347  if (!yyerrstatus)
1348  {
1349  ++yynerrs;
1350  yyerror (YY_("syntax error"));
1351  }
1352 
1353  if (yyerrstatus == 3)
1354  {
1355  /* If just tried and failed to reuse lookahead token after an
1356  error, discard it. */
1357 
1358  if (yychar <= YYEOF)
1359  {
1360  /* Return failure if at end of input. */
1361  if (yychar == YYEOF)
1362  YYABORT;
1363  }
1364  else
1365  {
1366  yydestruct ("Error: discarding",
1367  yytoken, &yylval);
1368  yychar = YYEMPTY;
1369  }
1370  }
1371 
1372  /* Else will try to reuse lookahead token after shifting the error
1373  token. */
1374  goto yyerrlab1;
1375 
1376 
1377 /*---------------------------------------------------.
1378 | yyerrorlab -- error raised explicitly by YYERROR. |
1379 `---------------------------------------------------*/
1380 yyerrorlab:
1381  /* Pacify compilers when the user code never invokes YYERROR and the
1382  label yyerrorlab therefore never appears in user code. */
1383  if (0)
1384  YYERROR;
1385 
1386  /* Do not reclaim the symbols of the rule whose action triggered
1387  this YYERROR. */
1388  YYPOPSTACK (yylen);
1389  yylen = 0;
1390  YY_STACK_PRINT (yyss, yyssp);
1391  yystate = *yyssp;
1392  goto yyerrlab1;
1393 
1394 
1395 /*-------------------------------------------------------------.
1396 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1397 `-------------------------------------------------------------*/
1398 yyerrlab1:
1399  yyerrstatus = 3; /* Each real token shifted decrements this. */
1400 
1401  /* Pop stack until we find a state that shifts the error token. */
1402  for (;;)
1403  {
1404  yyn = yypact[yystate];
1405  if (!yypact_value_is_default (yyn))
1406  {
1407  yyn += YYSYMBOL_YYerror;
1408  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1409  {
1410  yyn = yytable[yyn];
1411  if (0 < yyn)
1412  break;
1413  }
1414  }
1415 
1416  /* Pop the current state because it cannot handle the error token. */
1417  if (yyssp == yyss)
1418  YYABORT;
1419 
1420 
1421  yydestruct ("Error: popping",
1422  YY_ACCESSING_SYMBOL (yystate), yyvsp);
1423  YYPOPSTACK (1);
1424  yystate = *yyssp;
1425  YY_STACK_PRINT (yyss, yyssp);
1426  }
1427 
1429  *++yyvsp = yylval;
1431 
1432 
1433  /* Shift the error token. */
1434  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1435 
1436  yystate = yyn;
1437  goto yynewstate;
1438 
1439 
1440 /*-------------------------------------.
1441 | yyacceptlab -- YYACCEPT comes here. |
1442 `-------------------------------------*/
1443 yyacceptlab:
1444  yyresult = 0;
1445  goto yyreturn;
1446 
1447 
1448 /*-----------------------------------.
1449 | yyabortlab -- YYABORT comes here. |
1450 `-----------------------------------*/
1451 yyabortlab:
1452  yyresult = 1;
1453  goto yyreturn;
1454 
1455 
1456 #if !defined yyoverflow
1457 /*-------------------------------------------------.
1458 | yyexhaustedlab -- memory exhaustion comes here. |
1459 `-------------------------------------------------*/
1460 yyexhaustedlab:
1461  yyerror (YY_("memory exhausted"));
1462  yyresult = 2;
1463  /* Fall through. */
1464 #endif
1465 
1466 
1467 /*-----------------------------------------------------.
1468 | yyreturn -- parsing is finished, return the result. |
1469 `-----------------------------------------------------*/
1470 yyreturn:
1471  if (yychar != YYEMPTY)
1472  {
1473  /* Make sure we have latest lookahead translation. See comments at
1474  user semantic actions for why this is necessary. */
1475  yytoken = YYTRANSLATE (yychar);
1476  yydestruct ("Cleanup: discarding lookahead",
1477  yytoken, &yylval);
1478  }
1479  /* Do not reclaim the symbols of the rule whose action triggered
1480  this YYABORT or YYACCEPT. */
1481  YYPOPSTACK (yylen);
1482  YY_STACK_PRINT (yyss, yyssp);
1483  while (yyssp != yyss)
1484  {
1485  yydestruct ("Cleanup: popping",
1486  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1487  YYPOPSTACK (1);
1488  }
1489 #ifndef yyoverflow
1490  if (yyss != yyssa)
1491  YYSTACK_FREE (yyss);
1492 #endif
1493 
1494  return yyresult;
1495 }
1496 
YYSYMBOL_31_6
@ YYSYMBOL_31_6
Definition: xml_y.tab.cpp:223
yyxmlerror
int yyxmlerror(const std::string &error)
Definition: xml_y.tab.cpp:86
YYSTYPE::s
char * s
Definition: xml_y.tab.cpp:172
YYSIZE_T
#define YYSIZE_T
Definition: xml_y.tab.cpp:319
YYSIZEOF
#define YYSIZEOF(X)
Definition: xml_y.tab.cpp:329
COMMENT
@ COMMENT
Definition: xml_y.tab.cpp:161
YY_IGNORE_USELESS_CAST_BEGIN
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: xml_y.tab.cpp:401
YYerror
@ YYerror
Definition: xml_y.tab.cpp:147
yysymbol_kind_t
yysymbol_kind_t
Definition: ansi_c_y.tab.cpp:389
STARTXMLDECL
@ STARTXMLDECL
Definition: xml_y.tab.cpp:149
YYSYMBOL_attribute
@ YYSYMBOL_attribute
Definition: xml_y.tab.cpp:228
YYSYMBOL_YYUNDEF
@ YYSYMBOL_YYUNDEF
Definition: xml_y.tab.cpp:194
YYSTACK_RELOCATE
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: xml_y.tab.cpp:502
malloc
void * malloc(unsigned)
EQ
@ EQ
Definition: xml_y.tab.cpp:153
YYEOF
@ YYEOF
Definition: xml_y.tab.cpp:146
YYUSE
#define YYUSE(E)
Definition: xml_y.tab.cpp:369
YY_ATTRIBUTE_UNUSED
#define YY_ATTRIBUTE_UNUSED
Definition: xml_y.tab.cpp:363
yycheck
static const yytype_int8 yycheck[]
Definition: xml_y.tab.cpp:697
YYEMPTY
@ YYEMPTY
Definition: xml_y.tab.cpp:145
YY_IGNORE_USELESS_CAST_END
#define YY_IGNORE_USELESS_CAST_END
Definition: xml_y.tab.cpp:402
YYSYMBOL_empty_or_content
@ YYSYMBOL_empty_or_content
Definition: xml_y.tab.cpp:222
YYSYMBOL_name_opt
@ YYSYMBOL_name_opt
Definition: xml_y.tab.cpp:226
ENCODING
@ ENCODING
Definition: xml_y.tab.cpp:157
YYSYMBOL_prolog
@ YYSYMBOL_prolog
Definition: xml_y.tab.cpp:211
yytable
static const yytype_int8 yytable[]
Definition: xml_y.tab.cpp:690
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: xml_y.tab.cpp:386
yytype_uint8
unsigned char yytype_uint8
Definition: xml_y.tab.cpp:278
YYSYMBOL_attribute_seq_opt
@ YYSYMBOL_attribute_seq_opt
Definition: xml_y.tab.cpp:227
xml_parsert::parse_tree
xml_parse_treet parse_tree
Definition: xml_parser.h:22
SLASH
@ SLASH
Definition: xml_y.tab.cpp:154
yytype_int16
short yytype_int16
Definition: xml_y.tab.cpp:269
yydefact
static const yytype_int8 yydefact[]
Definition: xml_y.tab.cpp:664
YYSYMBOL_misc_seq_opt
@ YYSYMBOL_misc_seq_opt
Definition: xml_y.tab.cpp:215
yyparse
#define yyparse
Definition: xml_y.tab.cpp:68
YYSYMBOL_ENDPI
@ YYSYMBOL_ENDPI
Definition: xml_y.tab.cpp:198
yyxmllex
int yyxmllex()
The main scanner function which does all the work.
Definition: xml_lex.yy.cpp:1050
CLOSE
@ CLOSE
Definition: xml_y.tab.cpp:155
yyalloc::yyss_alloc
yy_state_t yyss_alloc
Definition: ansi_c_y.tab.cpp:1074
yy_state_t
yytype_int16 yy_state_t
Definition: ansi_c_y.tab.cpp:925
YYSYMBOL_END
@ YYSYMBOL_END
Definition: xml_y.tab.cpp:202
YYNTOKENS
#define YYNTOKENS
Definition: xml_y.tab.cpp:541
YYSYMBOL_22_2
@ YYSYMBOL_22_2
Definition: xml_y.tab.cpp:214
xml_parsert::current
xmlt & current()
Definition: xml_parser.h:26
YYSYMBOL_STARTPI
@ YYSYMBOL_STARTPI
Definition: xml_y.tab.cpp:197
YYUNDEF
@ YYUNDEF
Definition: xml_y.tab.cpp:148
yytranslate
static const yytype_int8 yytranslate[]
Definition: xml_y.tab.cpp:561
STARTPI
@ STARTPI
Definition: xml_y.tab.cpp:151
xml_parser
xml_parsert xml_parser
Definition: xml_parser.cpp:15
YYSYMBOL_content
@ YYSYMBOL_content
Definition: xml_y.tab.cpp:224
yyerror
#define yyerror
Definition: xml_y.tab.cpp:70
YYSYMBOL_33_7
@ YYSYMBOL_33_7
Definition: xml_y.tab.cpp:225
YYSTYPE
Definition: xml_y.tab.cpp:170
VALUE
@ VALUE
Definition: xml_y.tab.cpp:159
yychar
#define yychar
Definition: xml_y.tab.cpp:74
yypgoto
static const yytype_int8 yypgoto[]
Definition: xml_y.tab.cpp:674
yylex
#define yylex
Definition: xml_y.tab.cpp:69
YYSYMBOL_PI
@ YYSYMBOL_PI
Definition: xml_y.tab.cpp:217
YY_CAST
#define YY_CAST(Type, Val)
Definition: xml_y.tab.cpp:112
YY_SYMBOL_PRINT
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Definition: xml_y.tab.cpp:894
yytokentype
yytokentype
Definition: ansi_c_y.tab.h:52
DATA
@ DATA
Definition: xml_y.tab.cpp:160
YYERROR
#define YYERROR
Definition: xml_y.tab.cpp:739
YYSYMBOL_DATA
@ YYSYMBOL_DATA
Definition: xml_y.tab.cpp:206
YYACCEPT
#define YYACCEPT
Definition: xml_y.tab.cpp:737
YYABORT
#define YYABORT
Definition: xml_y.tab.cpp:738
yynerrs
#define yynerrs
Definition: xml_y.tab.cpp:72
YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: xml_y.tab.cpp:387
xmlt::name
std::string name
Definition: xml.h:37
YY_NULLPTR
#define YY_NULLPTR
Definition: xml_y.tab.cpp:124
YYSYMBOL_COMMENT
@ YYSYMBOL_COMMENT
Definition: xml_y.tab.cpp:207
yydebug
#define yydebug
Definition: xml_y.tab.cpp:71
YYSYMBOL_XMLDecl_opt
@ YYSYMBOL_XMLDecl_opt
Definition: xml_y.tab.cpp:212
free
void free(void *)
yy_state_fast_t
int yy_state_fast_t
Definition: xml_y.tab.cpp:336
yyxmllval
YYSTYPE yyxmllval
Definition: xml_y.tab.cpp:944
YYSYMBOL_STARTXMLDECL
@ YYSYMBOL_STARTXMLDECL
Definition: xml_y.tab.cpp:195
START
@ START
Definition: xml_y.tab.cpp:162
yysymbol_kind_t
yysymbol_kind_t
Definition: xml_y.tab.cpp:190
yystos
static const yytype_int8 yystos[]
Definition: xml_y.tab.cpp:706
YYSYMBOL_CLOSE
@ YYSYMBOL_CLOSE
Definition: xml_y.tab.cpp:201
YY_REDUCE_PRINT
#define YY_REDUCE_PRINT(Rule)
Definition: xml_y.tab.cpp:896
yydestruct
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Definition: xml_y.tab.cpp:926
YYSYMBOL_YYerror
@ YYSYMBOL_YYerror
Definition: xml_y.tab.cpp:193
YYSYMBOL_27_4
@ YYSYMBOL_27_4
Definition: xml_y.tab.cpp:219
YYLAST
#define YYLAST
Definition: xml_y.tab.cpp:538
YYSYMBOL_YYEOF
@ YYSYMBOL_YYEOF
Definition: xml_y.tab.cpp:192
VERSION
@ VERSION
Definition: xml_y.tab.cpp:150
yypact_value_is_default
#define yypact_value_is_default(Yyn)
Definition: xml_y.tab.cpp:642
YYFINAL
#define YYFINAL
Definition: xml_y.tab.cpp:536
YY_
#define YY_(Msgid)
Definition: xml_y.tab.cpp:346
yytype_int8
signed char yytype_int8
Definition: xml_y.tab.cpp:261
yyalloc::yyvs_alloc
unsigned yyvs_alloc
Definition: ansi_c_y.tab.cpp:1075
YYSYMBOL_VERSION
@ YYSYMBOL_VERSION
Definition: xml_y.tab.cpp:196
YYSYMBOL_document
@ YYSYMBOL_document
Definition: xml_y.tab.cpp:210
yytype_uint16
unsigned short yytype_uint16
Definition: xml_y.tab.cpp:289
yytoken_kind_t
enum yytokentype yytoken_kind_t
Definition: xml_y.tab.cpp:164
YYSYMBOL_29_5
@ YYSYMBOL_29_5
Definition: xml_y.tab.cpp:221
parsert::parse_error
void parse_error(const std::string &message, const std::string &before)
Definition: parser.cpp:30
YYSTACK_BYTES
#define YYSTACK_BYTES(N)
Definition: xml_y.tab.cpp:491
YYSYMBOL_SLASH
@ YYSYMBOL_SLASH
Definition: xml_y.tab.cpp:200
YYSYMBOL_misc
@ YYSYMBOL_misc
Definition: xml_y.tab.cpp:216
YYSYMBOL_NAME
@ YYSYMBOL_NAME
Definition: xml_y.tab.cpp:204
yy_state_t
yytype_int8 yy_state_t
Definition: xml_y.tab.cpp:333
xml_parse_treet::xml
xmlt xml
Definition: xml_parse_tree.h:18
YYSTACK_ALLOC
#define YYSTACK_ALLOC
Definition: xml_y.tab.cpp:447
xml_parsert::new_level
void new_level()
Definition: xml_parser.h:36
yylval
#define yylval
Definition: xml_y.tab.cpp:73
yytype_int8
signed char yytype_int8
Definition: ansi_c_y.tab.cpp:853
YY_ASSERT
#define YY_ASSERT(E)
Definition: xml_y.tab.cpp:406
xmlt::set_attribute
void set_attribute(const std::string &attribute, unsigned value)
Definition: xml.cpp:174
YYSYMBOL_YYEMPTY
@ YYSYMBOL_YYEMPTY
Definition: xml_y.tab.cpp:191
yyxmltext
char * yyxmltext
Definition: xml_lex.yy.cpp:816
yyxmlparse
int yyxmlparse(void)
Definition: xml_y.tab.cpp:956
YYDPRINTF
#define YYDPRINTF(Args)
Definition: xml_y.tab.cpp:893
YY_STACK_PRINT
#define YY_STACK_PRINT(Bottom, Top)
Definition: xml_y.tab.cpp:895
YYSYMBOL_21_1
@ YYSYMBOL_21_1
Definition: xml_y.tab.cpp:213
YYSYMBOL_START
@ YYSYMBOL_START
Definition: xml_y.tab.cpp:208
xml_parsert::stack
std::list< xmlt * > stack
Definition: xml_parser.h:24
yyalloc
Definition: ansi_c_y.tab.cpp:1073
YYSYMBOL_element
@ YYSYMBOL_element
Definition: xml_y.tab.cpp:220
YYSYMBOL_VALUE
@ YYSYMBOL_VALUE
Definition: xml_y.tab.cpp:205
YYSYMBOL_ENCODING
@ YYSYMBOL_ENCODING
Definition: xml_y.tab.cpp:203
YYPOPSTACK
#define YYPOPSTACK(N)
YYNSTATES
#define YYNSTATES
Definition: xml_y.tab.cpp:547
yytable_value_is_error
#define yytable_value_is_error(Yyn)
Definition: xml_y.tab.cpp:647
ENDPI
@ ENDPI
Definition: xml_y.tab.cpp:152
END
@ END
Definition: xml_y.tab.cpp:156
yypact
static const yytype_int8 yypact[]
Definition: xml_y.tab.cpp:652
YYTRANSLATE
#define YYTRANSLATE(YYX)
Definition: xml_y.tab.cpp:554
YYMAXDEPTH
#define YYMAXDEPTH
Definition: xml_y.tab.cpp:913
yydefgoto
static const yytype_int8 yydefgoto[]
Definition: xml_y.tab.cpp:681
xmlt::data
std::string data
Definition: xml.h:37
YYSTACK_FREE
#define YYSTACK_FREE
Definition: xml_y.tab.cpp:448
yyr1
static const yytype_int8 yyr1[]
Definition: xml_y.tab.cpp:716
YYINITDEPTH
#define YYINITDEPTH
Definition: xml_y.tab.cpp:902
YYPTRDIFF_T
#define YYPTRDIFF_T
Definition: xml_y.tab.cpp:305
YYSYMBOL_26_3
@ YYSYMBOL_26_3
Definition: xml_y.tab.cpp:218
xmlt::unescape
static std::string unescape(const std::string &s)
takes a string and unescapes any xml style escaped symbols
Definition: xml.cpp:213
YYSYMBOL_YYACCEPT
@ YYSYMBOL_YYACCEPT
Definition: xml_y.tab.cpp:209
xml_parser.h
NAME
@ NAME
Definition: xml_y.tab.cpp:158
yytype_int16
short yytype_int16
Definition: ansi_c_y.tab.cpp:861
yy_state_fast_t
int yy_state_fast_t
Definition: ansi_c_y.tab.cpp:928
YYSYMBOL_EQ
@ YYSYMBOL_EQ
Definition: xml_y.tab.cpp:199
yyr2
static const yytype_int8 yyr2[]
Definition: xml_y.tab.cpp:724
YYENOMEM
@ YYENOMEM
Definition: xml_y.tab.cpp:732
YY_ACCESSING_SYMBOL
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
Definition: xml_y.tab.cpp:604