/* A Bison parser, made from parsutil.y by GNU Bison version 1.27 */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse xml_yyparse #define yylex xml_yylex #define yyerror xml_yyerror #define yylval xml_yylval #define yychar xml_yychar #define yydebug xml_yydebug #define yynerrs xml_yynerrs #define ELEMENT 257 #define ETAG 258 #define EMPTY_ELEMENT_END_DELIM 259 #define CURRENT 260 #define CONREF 261 #define ELEMENT_OR_ETAG_END_DELIM 262 #define BAD_ENTITY_REF 263 #define XMLSTART_DELIM 264 #define VERSION 265 #define ENCODING 266 #define STANDALONE 267 #define EQUALS 268 #define XML_DECL_END_DELIM 269 #define PI_TARGET 270 #define PIDATA 271 #define COMMENT_DELIM 272 #define COMMDATA 273 #define CDATA 274 #define DOCTYPEDECL 275 #define DIGIT_INITIAL_NAME 276 #define BEGIN_DTD_DELIM 277 #define ELEMENTDECL_DELIM 278 #define ATTLISTDECL_DELIM 279 #define PARAMETER_ENTITY_DECL_DELIM 280 #define ENTITYDECL_DELIM 281 #define NOTATIONDECL_DELIM 282 #define BAD_DECL 283 #define END_DTD_DELIM 284 #define LEFTPAREND 285 #define RIGHTPAREND 286 #define VSLASH 287 #define QUESTIONMARK 288 #define STAR 289 #define PLUS 290 #define MINUS 291 #define COMMA 292 #define AMPERSAND 293 #define FIXED 294 #define PCDATA 295 #define REQUIRED 296 #define IMPLIED 297 #define PUBLIC 298 #define SYSTEM 299 #define EMPTY 300 #define ANY 301 #define RCDATA 302 #define CDATA_ 303 #define ID 304 #define IDREF 305 #define ENTITY 306 #define DEFAULT 307 #define NMTOKEN_ 308 #define IDREFS 309 #define NAMES 310 #define NUMBERS 311 #define NUTOKENS 312 #define ENTITIES 313 #define NMTOKENS 314 #define NOTATION 315 #define SDATA 316 #define NDATA 317 #define QUOTEDSTRING 318 #define NAME 319 #define NMTOKEN 320 #define CHAR_DATA 321 #define BAD_CHAR 322 #define WHITESPACE 323 #define DECL_END 324 #define END_FILE 325 #line 1 "parsutil.y" /* ***************************************************************************** * * $RCSfile: parsutil.y,v $ * $Date: 1999/09/27 20:36:10 $ * $Source: /home/richard/Xml/RCS/parsutil.y,v $ * $Revision: 1.217 $ * $Author: richard $ * ***************************************************************************** * * Copyright 1998, 1999 Brown University and Richard Goerwitz * ***************************************************************************** * * Parsing, validating routines for xml_file structs (initializers and * destructors for these are in fileutil.c). * * NOTE WELL: For proper viewing, set your editor so that it shows * you at least 120 columns of fixed-width text. Otherwise the YACC * action code will wrap, and become very hard to read. * ***************************************************************************** * * I. Overview * * This file contains specifications for a parser that processes and * validates XML text. Its sole entry point is parse_xml_file(), * which takes an xml_file structure as its argument. xml_file * structures may have child xml_file structures, which are used * for external entities and are pushed on and off the flex input * stream stack as needed (see below). * * In brief, the steps the processor goes through are as follows: * * 1) finds and checks the XML declaration (if one is present) * * 2) find the doctype declaration, and then process * a) the internal DTD subset * b) the external DTD subset * * 3) while doing 2a and 2b, the processor also resolves external * entity decls and parses the files they point to; it also * parses entity replacement text for syntax errors * * 4) finally, the parser processes the actual XML file content, * making sure that elements and attributes encountered are * declared, and that they have values and orderings allowed by * the DTD (if required attributes are missing, these are also * flagged) * * 5) idref attributes are checked for corresponding ids * * Note that the parser does not need to worry about character * encoding variations. All I/O is done via the lexer, which uses * get_xml_char() (in fileutil.c; it can autodetect UTF-8, 16 and * UCS-4, both big and little endian). Everything is converted to * my_wchar_t internally, and output (e.g., in the case of error * messages) as UTF-8. * * All information about the file being scanned is contained in the * currently active xml_file structure (pointed to by the global var, * this_file). * * Note that all xml_file structures (which are created every time a * PUBLIC/SYSTEM identifier gets resolved) are registered for garbage * collection by hanging them off the parent xml_file structure. In * the case of the external DTD, this "hanging" is done by a call to * add_xml_file(). This particular routine actually merges the data * structures for the two xml_file structs, and marks the one for the * external DTD as xf->child == yes. Other subordinate xml_file * structs are marked for garbage collection without being so merged * via add_xml_file_nomerge(). This latter routine sets their child * field to "maybe" (i.e., xf->child == maybe). It is used, e.g., on * external entities. * * I mention all of this because whether an xml_file's status as a * child is yes, no, or maybe tells us whether we should be doing * full validation or not. In both the parent xml_file struct and * the external DTD, full validation is on, except when we are * scanning entity replacement text. For other subordinate xml_file * structs it is off (i.e., if we are just doing a quick syntax check * on an external entity). * * On the question of how the parser tells the lexer to switch from * the main document, to the external DTD an/or to whatever external * entity files are defined, see the section on "Use of Stacks", * below. * ***************************************************************************** * * II. Use of Stacks * * The parser defined here makes considerable use of stacks that are, * under error conditions, likely to wander out of sync with the main * parser stack. For example, to facilitate one-pass checking of * content models (i.e., checking of content models while the parse * tree is being built), check_node_against_dfa(), which lives in * nfadfa.c, keeps its own internal stack of DFAs, which are * synchronized with the main parser by calling it with one of two * final arguments, INITIALIZE_DFA_WALK (which pushes a new DFA for * the current STag) or FINISH_DFA_WALK (which pops the DFA off the * DFA stack. Note that check_node_against_dfa() is only called for * elements with "children" content models. * * Another area in which stacks are used is when stream-switching * occurs. This happens a) when the parser sees an external DTD * subset, b) when it sees an entity definition, or c) when the lexer * is replacing an entity reference with its replacement text. The * stream-switch is achieved by calls to stream-pushing routines, * which in cases (a) and (b) happen within the parser, but in case * (c) happens in the lexer. These stream-pushing routines are: * * push_xml_file() # called from parser * push_entity_text() # called from parser * push_xml_string() # called from lexer * * The first routine above is called whenever the parser wants to * check an external entity for well-formedness, e.g., in the case * of DTD directives like and in * the case of the external DTD subset. The same rule that calls * push_xml_file() must then also call pop_xml_file(). See below. * * The second routine above, push_entity_text() is called whenever * the parser wants to check the literal text of an internal entity * for well-formedness. It simply maps whatever entities need to be * mapped (e.g., char entitites), pushes the mapped text onto the * lexer stack, then runs the mapped text through a non-validating * check. The same rule that pushed the entity text then pops it off * the scan stack by calling pop_xml_file(), as with push_xml_file() * above. * * In cases where the lexer is manipulating its own stack, via * push_xml_string(), the <> pattern is where the call to * pop_xml_file() gets executed. Note that, once entity replacement * text has been pushed, error messages that come up are still * attached to the parent xml_file structure, so that line numbers in * any emitted warnings or errors refer to the parent file, and not * to the source (internal or external) of the entity in question's * replacement text. * ***************************************************************************** * * III. Processing This File * * Note that this file should be processed with the -p xml_yy option, * so that global variables take on names unlikely to bother people * who link xmlparse routines to programs that already use GNU Bison * for other purposes. * ***************************************************************************** */ #include "parsutil.h" #include "dtdutil.h" #include "errabort.h" #include "grammutil.h" #include "hashutil.h" #include "namespace.h" #include "parstree.h" #include "xtrautil.h" #define YYERROR_VERBOSE #ifndef XML_NODEBUG # define YYDEBUG 1 #endif #ifdef YYDEBUG extern int xml_yydebug; #else int xml_yydebug = 0; #endif int xml_yywrap (void); int xml_yylex (void); int xml_yyerror (char *); int seen_doctype_decl = 0; int expecting_cpseq_or_choice = 0; int in_document_content = 0; static struct xml_file *this_file; struct default_decl { enum default_types type; my_wchar_t *string; }; struct xml_element_list { size_t len; xml_element **elements; }; static struct malloc_block_list *add_default_attvals (struct xml_file *, my_wchar_t *, struct malloc_block_list *); static void check_for_duplicate_atts (struct xml_file *, struct xml_node *); static int check_for_requireds (struct xml_file *, my_wchar_t *, struct malloc_block_list *); static int check_builtin (struct xml_file *, my_wchar_t *, my_wchar_t *); static int check_gt_and_lt (my_wchar_t *); static int check_notations (struct xml_file *); static int clobber_dummy_elements (struct xml_file *); static int check_uperefs (struct xml_file *); static int find_dangling_elements (struct xml_file *, my_wchar_t *); static int add_symbols_in_cmnode (xml_file *, struct cmnode *, struct rg_htable *, struct rg_htable *); static void add_ancestor_links_to_elements (xml_file *); static size_t add_ancestor_links_to_element (xml_file *xf, xml_element *, struct rg_htable *); static xml_element *add_ancestor_link_to_element (xml_file *, xml_element *, xml_element *); static size_t add_parent_links_to_elements (xml_file *); static int add_symbols_in_cmnode_to_parents_table (xml_file *, cmnode *, xml_element *, struct rg_htable *); static xml_element *add_parent_to_parents_table (xml_file *, my_wchar_t *, xml_element *, struct rg_htable *); static int check_case (struct xml_file *, my_wchar_t *, enum yesno); #define YY_INPUT(buf, result, max_size) \ { \ int c = '*', n; \ if (! this_file->file || feof (this_file->file)) \ result = 0; \ else { \ for (n = 0; n < max_size && (c = this_file->get_xml_char (this_file)) != EOF && c != '\n'; ++n) \ buf[n] = c; \ if (c == '\n') \ buf[n++] = c; \ if (c == EOF && ferror (this_file->file)) \ YY_FATAL_ERROR ("input in flex scanner failed"); \ result = n; \ } \ } #line 232 "parsutil.y" typedef union { my_wchar_t *wstr; struct xml_file *xf; struct rg_htable *ht; struct malloc_block_list *mbl; struct default_decl *dd; struct xml_attribute *xa; struct xml_node *xn; struct cmnode *cmn; struct name_val *nv; int i; } YYSTYPE; #line 274 "parsutil.y" YYSTYPE yylval; #include "lexutil.c" #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 423 #define YYFLAG -32768 #define YYNTBASE 72 #define YYTRANSLATE(x) ((unsigned)(x) <= 325 ? yytranslate[x] : 138) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 3, 7, 14, 22, 23, 24, 29, 32, 35, 39, 43, 44, 48, 51, 54, 56, 58, 61, 65, 68, 72, 76, 80, 81, 85, 88, 91, 94, 96, 99, 102, 104, 109, 113, 117, 121, 125, 129, 133, 137, 142, 143, 152, 158, 163, 166, 169, 173, 175, 178, 181, 185, 188, 191, 195, 198, 200, 203, 206, 208, 212, 213, 216, 219, 220, 222, 224, 226, 228, 230, 232, 234, 236, 240, 245, 251, 257, 262, 267, 273, 278, 283, 288, 294, 302, 310, 315, 321, 329, 333, 339, 346, 352, 357, 361, 365, 367, 370, 373, 376, 378, 382, 386, 390, 394, 398, 402, 406, 408, 411, 414, 417, 420, 422, 424, 426, 428, 433, 438, 441, 442, 445, 449, 452, 456, 460, 464, 468, 472, 476, 480, 484, 488, 492, 496, 500, 505, 509, 513, 517, 519, 523, 527, 531, 533, 535, 538, 540, 542, 545, 548, 550, 553, 555, 557, 560, 564, 569, 575, 580, 581, 589, 594, 598, 603, 609, 614, 615, 624, 625, 633, 634, 643, 644, 653, 654, 662, 667, 673, 679, 682, 688, 693, 698, 702, 705, 708, 711, 714, 717, 719, 721, 723, 727, 731, 735, 740, 745, 746, 749, 753, 758, 762, 765, 769, 772, 777, 781, 783, 785, 787, 791, 794, 797, 800, 803, 806, 810, 813, 814, 817, 820, 823, 825, 827, 829, 831, 833, 835, 837, 839, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 865, 867, 869, 871, 873, 875, 877, 880, 883, 886 }; static const short yyrhs[] = { 75, 1, 0, 75, 1, 134, 0, 75, 73, 73, 125, 74, 137, 0, 75, 73, 73, 125, 74, 137, 1, 0, 0, 0, 76, 137, 83, 137, 0, 76, 137, 0, 10, 1, 0, 10, 1, 15, 0, 10, 77, 15, 0, 0, 80, 81, 82, 0, 80, 81, 0, 80, 82, 0, 80, 0, 81, 0, 81, 80, 0, 81, 80, 82, 0, 10, 1, 0, 10, 1, 15, 0, 10, 79, 1, 0, 10, 79, 15, 0, 0, 80, 81, 82, 0, 80, 82, 0, 80, 81, 0, 80, 1, 0, 80, 0, 81, 1, 0, 81, 82, 0, 81, 0, 1, 136, 14, 64, 0, 11, 14, 1, 0, 11, 14, 64, 0, 12, 14, 1, 0, 12, 14, 64, 0, 13, 14, 1, 0, 13, 14, 64, 0, 21, 1, 70, 0, 21, 136, 1, 70, 0, 0, 21, 136, 85, 90, 70, 84, 88, 71, 0, 21, 136, 86, 90, 70, 0, 21, 136, 90, 70, 0, 86, 87, 0, 86, 64, 0, 86, 124, 1, 0, 87, 0, 44, 1, 0, 44, 64, 0, 44, 124, 1, 0, 45, 1, 0, 45, 64, 0, 45, 124, 1, 0, 78, 91, 0, 91, 0, 89, 1, 0, 78, 133, 0, 133, 0, 23, 91, 30, 0, 0, 91, 1, 0, 91, 92, 0, 0, 93, 0, 103, 0, 111, 0, 113, 0, 120, 0, 121, 0, 122, 0, 123, 0, 24, 1, 70, 0, 24, 94, 1, 70, 0, 24, 136, 49, 1, 70, 0, 24, 136, 48, 1, 70, 0, 24, 66, 1, 70, 0, 24, 136, 1, 70, 0, 24, 136, 31, 32, 70, 0, 24, 136, 46, 70, 0, 24, 136, 47, 70, 0, 24, 136, 95, 70, 0, 24, 136, 95, 1, 70, 0, 24, 136, 95, 36, 31, 1, 70, 0, 24, 136, 95, 37, 31, 1, 70, 0, 24, 136, 97, 70, 0, 24, 136, 97, 1, 70, 0, 24, 136, 97, 37, 31, 1, 70, 0, 31, 96, 32, 0, 31, 41, 33, 1, 32, 0, 31, 41, 33, 96, 32, 35, 0, 31, 41, 33, 96, 32, 0, 31, 41, 32, 35, 0, 31, 41, 32, 0, 96, 33, 136, 0, 136, 0, 98, 34, 0, 98, 35, 0, 98, 36, 0, 98, 0, 135, 1, 32, 0, 135, 99, 32, 0, 135, 100, 32, 0, 99, 33, 101, 0, 101, 33, 101, 0, 101, 39, 101, 0, 100, 38, 101, 0, 101, 0, 102, 34, 0, 102, 35, 0, 102, 36, 0, 102, 1, 0, 102, 0, 98, 0, 136, 0, 41, 0, 25, 94, 1, 70, 0, 25, 136, 104, 70, 0, 104, 105, 0, 0, 105, 1, 0, 66, 1, 110, 0, 136, 1, 0, 136, 1, 110, 0, 136, 56, 110, 0, 136, 57, 110, 0, 136, 58, 110, 0, 136, 49, 110, 0, 136, 50, 110, 0, 136, 51, 110, 0, 136, 55, 110, 0, 136, 52, 110, 0, 136, 59, 110, 0, 136, 54, 110, 0, 136, 60, 110, 0, 136, 61, 106, 110, 0, 136, 108, 110, 0, 31, 107, 32, 0, 107, 33, 124, 0, 124, 0, 31, 109, 32, 0, 109, 33, 124, 0, 109, 38, 124, 0, 124, 0, 124, 0, 124, 64, 0, 7, 0, 6, 0, 40, 124, 0, 42, 64, 0, 42, 0, 43, 64, 0, 43, 0, 64, 0, 40, 64, 0, 26, 1, 70, 0, 26, 66, 1, 70, 0, 26, 136, 64, 1, 70, 0, 26, 136, 64, 70, 0, 0, 26, 136, 85, 70, 112, 88, 71, 0, 26, 136, 86, 70, 0, 27, 1, 70, 0, 27, 53, 1, 70, 0, 27, 53, 85, 1, 70, 0, 27, 66, 1, 70, 0, 0, 27, 136, 64, 1, 70, 114, 133, 71, 0, 0, 27, 136, 64, 70, 115, 133, 71, 0, 0, 27, 136, 62, 64, 70, 116, 133, 71, 0, 0, 27, 136, 49, 64, 70, 117, 133, 71, 0, 0, 27, 136, 85, 70, 118, 89, 71, 0, 27, 136, 86, 70, 0, 27, 136, 85, 119, 70, 0, 27, 136, 86, 119, 70, 0, 63, 136, 0, 28, 136, 86, 64, 70, 0, 28, 136, 87, 70, 0, 28, 136, 86, 70, 0, 29, 1, 70, 0, 29, 70, 0, 18, 1, 0, 18, 19, 0, 16, 1, 0, 16, 17, 0, 136, 0, 66, 0, 126, 0, 128, 133, 1, 0, 128, 133, 129, 0, 132, 127, 5, 0, 127, 131, 14, 64, 0, 127, 131, 14, 124, 0, 0, 132, 1, 0, 132, 127, 1, 0, 132, 127, 1, 8, 0, 132, 127, 8, 0, 130, 1, 0, 130, 136, 1, 0, 130, 8, 0, 130, 136, 1, 8, 0, 130, 1, 8, 0, 4, 0, 136, 0, 3, 0, 133, 1, 129, 0, 133, 125, 0, 133, 134, 0, 133, 20, 0, 133, 122, 0, 133, 123, 0, 133, 1, 78, 0, 133, 9, 0, 0, 134, 68, 0, 134, 67, 0, 134, 69, 0, 68, 0, 67, 0, 69, 0, 31, 0, 65, 0, 44, 0, 45, 0, 46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 56, 0, 57, 0, 58, 0, 51, 0, 52, 0, 54, 0, 55, 0, 59, 0, 60, 0, 61, 0, 63, 0, 62, 0, 11, 0, 12, 0, 13, 0, 137, 69, 0, 137, 122, 0, 137, 123, 0, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 281, 289, 292, 324, 355, 358, 362, 363, 366, 371, 375, 376, 378, 379, 380, 381, 382, 383, 384, 387, 394, 399, 407, 408, 410, 413, 416, 417, 418, 419, 420, 423, 426, 427, 431, 444, 449, 453, 457, 475, 479, 483, 507, 530, 550, 571, 595, 616, 639, 653, 658, 663, 671, 676, 681, 690, 691, 693, 696, 697, 700, 701, 703, 710, 711, 714, 715, 716, 717, 718, 719, 720, 724, 730, 737, 755, 764, 773, 783, 788, 796, 803, 810, 831, 852, 874, 896, 909, 923, 940, 942, 955, 976, 1000, 1012, 1024, 1043, 1053, 1058, 1063, 1068, 1072, 1073, 1076, 1081, 1090, 1099, 1114, 1123, 1127, 1132, 1137, 1142, 1147, 1151, 1154, 1157, 1166, 1184, 1206, 1214, 1216, 1224, 1241, 1250, 1262, 1279, 1296, 1313, 1325, 1341, 1353, 1365, 1377, 1389, 1401, 1413, 1444, 1476, 1481, 1493, 1504, 1509, 1517, 1530, 1538, 1560, 1580, 1593, 1606, 1620, 1632, 1641, 1653, 1662, 1681, 1703, 1709, 1717, 1736, 1767, 1792, 1846, 1851, 1856, 1860, 1865, 1873, 1901, 1907, 1952, 1958, 1986, 1992, 2020, 2026, 2058, 2067, 2071, 2092, 2097, 2102, 2126, 2137, 2159, 2160, 2163, 2172, 2182, 2189, 2200, 2201, 2205, 2221, 2268, 2359, 2443, 2493, 2514, 2516, 2564, 2619, 2675, 2752, 2765, 2779, 2787, 2796, 2810, 2814, 2818, 2823, 2827, 2840, 2855, 2866, 2876, 2886, 2894, 2895, 2898, 2926, 2946, 2966, 2977, 2978, 2981, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3008, 3009, 3010, 3016 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","ELEMENT", "ETAG","EMPTY_ELEMENT_END_DELIM","CURRENT","CONREF","ELEMENT_OR_ETAG_END_DELIM", "BAD_ENTITY_REF","XMLSTART_DELIM","VERSION","ENCODING","STANDALONE","EQUALS", "XML_DECL_END_DELIM","PI_TARGET","PIDATA","COMMENT_DELIM","COMMDATA","CDATA", "DOCTYPEDECL","DIGIT_INITIAL_NAME","BEGIN_DTD_DELIM","ELEMENTDECL_DELIM","ATTLISTDECL_DELIM", "PARAMETER_ENTITY_DECL_DELIM","ENTITYDECL_DELIM","NOTATIONDECL_DELIM","BAD_DECL", "END_DTD_DELIM","LEFTPAREND","RIGHTPAREND","VSLASH","QUESTIONMARK","STAR","PLUS", "MINUS","COMMA","AMPERSAND","FIXED","PCDATA","REQUIRED","IMPLIED","PUBLIC","SYSTEM", "EMPTY","ANY","RCDATA","CDATA_","ID","IDREF","ENTITY","DEFAULT","NMTOKEN_","IDREFS", "NAMES","NUMBERS","NUTOKENS","ENTITIES","NMTOKENS","NOTATION","SDATA","NDATA", "QUOTEDSTRING","NAME","NMTOKEN","CHAR_DATA","BAD_CHAR","WHITESPACE","DECL_END", "END_FILE","Document","NullElement","NotInContent","Prolog","XMLDecl","XMLDeclInfo", "TextDecl","TextDeclInfo","VersionInfo","EncodingDecl","SDDecl","DoctypeDecl", "@1","ExternalID","PubID","SysID","ExternalSubset","ExternalContent","InternalSubset", "MarkupOrPERefs","MarkupDecl","ElementDecl","NameGroup","Mixed","NameAlternatives", "Children","ChoiceOrSeq","CpChoice","CpSequence","Cp","ChoiceOrNameOrSeq","AttlistDecl", "AttDefs","AttDef","NotationType","NoteNameAlternatives","Enumeration","NmtokenAlternatives", "DefaultDecl","PEntityDecl","@2","EntityDecl","@3","@4","@5","@6","@7","NDataDecl", "NotationDecl","BadDecl","Comment","Pi","NameOrNmtoken","Element","EmptyElemTag", "Attributes","STag","ETag","EQName","AQName","QName","Content","CharData","LeftParend", "Name","Misc", NULL }; #endif static const short yyr1[] = { 0, 72, 72, 72, 72, 73, 74, 75, 75, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 81, 81, 82, 82, 83, 83, 84, 83, 83, 83, 85, 85, 85, 85, 86, 86, 86, 87, 87, 87, 88, 88, 89, 89, 89, 90, 90, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 95, 95, 95, 95, 95, 96, 96, 97, 97, 97, 97, 98, 98, 98, 99, 99, 99, 100, 100, 101, 101, 101, 101, 101, 102, 102, 102, 103, 103, 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 107, 107, 108, 109, 109, 109, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 112, 111, 111, 113, 113, 113, 113, 114, 113, 115, 113, 116, 113, 117, 113, 118, 113, 113, 113, 113, 119, 120, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 125, 126, 127, 127, 127, 128, 128, 128, 128, 129, 129, 129, 129, 129, 130, 131, 132, 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, 134, 134, 134, 134, 134, 135, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 137, 137, 137, 137 }; static const short yyr2[] = { 0, 2, 3, 6, 7, 0, 0, 4, 2, 2, 3, 3, 0, 3, 2, 2, 1, 1, 2, 3, 2, 3, 3, 3, 0, 3, 2, 2, 2, 1, 2, 2, 1, 4, 3, 3, 3, 3, 3, 3, 3, 4, 0, 8, 5, 4, 2, 2, 3, 1, 2, 2, 3, 2, 2, 3, 2, 1, 2, 2, 1, 3, 0, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 5, 4, 4, 5, 4, 4, 4, 5, 7, 7, 4, 5, 7, 3, 5, 6, 5, 4, 3, 3, 1, 2, 2, 2, 1, 3, 3, 3, 3, 3, 3, 3, 1, 2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 2, 0, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 1, 3, 3, 3, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 3, 4, 5, 4, 0, 7, 4, 3, 4, 5, 4, 0, 8, 0, 7, 0, 8, 0, 8, 0, 7, 4, 5, 5, 2, 5, 4, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 3, 3, 3, 4, 4, 0, 2, 3, 4, 3, 2, 3, 2, 4, 3, 1, 1, 1, 3, 2, 2, 2, 2, 2, 3, 2, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0 }; static const short yydefact[] = { 12, 0, 0, 254, 9, 0, 0, 0, 16, 0, 1, 5, 8, 248, 249, 250, 10, 229, 230, 231, 232, 233, 234, 235, 239, 240, 241, 242, 236, 237, 238, 243, 244, 245, 247, 246, 228, 0, 0, 0, 11, 0, 14, 15, 0, 18, 225, 224, 226, 2, 0, 0, 0, 0, 251, 254, 252, 253, 0, 34, 35, 36, 37, 0, 13, 19, 222, 221, 223, 211, 6, 193, 220, 0, 189, 190, 187, 188, 0, 0, 7, 33, 38, 39, 254, 0, 200, 0, 40, 0, 65, 0, 0, 62, 62, 49, 0, 0, 24, 209, 219, 215, 216, 217, 213, 195, 0, 214, 201, 196, 203, 0, 210, 41, 0, 50, 51, 192, 0, 191, 53, 54, 0, 0, 0, 47, 46, 0, 0, 45, 4, 0, 218, 212, 204, 206, 0, 202, 0, 63, 0, 0, 0, 0, 0, 0, 61, 64, 66, 67, 68, 69, 70, 71, 72, 73, 52, 55, 42, 44, 48, 20, 0, 0, 0, 208, 205, 197, 198, 0, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 24, 21, 22, 23, 28, 27, 26, 30, 31, 207, 74, 0, 97, 0, 0, 0, 227, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 157, 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 65, 0, 0, 25, 90, 0, 78, 75, 79, 0, 0, 81, 82, 0, 0, 0, 0, 0, 83, 0, 0, 87, 98, 99, 100, 0, 227, 117, 115, 0, 0, 109, 0, 116, 118, 0, 119, 0, 0, 158, 0, 160, 161, 163, 165, 0, 167, 0, 0, 0, 170, 0, 176, 0, 246, 178, 0, 0, 184, 183, 0, 43, 96, 80, 95, 0, 77, 76, 84, 0, 0, 88, 0, 102, 103, 0, 104, 0, 0, 0, 113, 110, 111, 112, 0, 122, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 24, 166, 174, 172, 168, 220, 181, 24, 179, 180, 182, 94, 0, 0, 0, 0, 0, 105, 108, 106, 107, 149, 148, 0, 152, 154, 155, 123, 146, 125, 0, 145, 129, 130, 131, 133, 135, 132, 126, 127, 128, 134, 136, 0, 0, 138, 0, 220, 220, 220, 0, 220, 0, 0, 91, 93, 85, 86, 89, 156, 150, 151, 153, 147, 142, 0, 0, 0, 141, 137, 162, 0, 0, 0, 24, 171, 0, 58, 177, 92, 143, 144, 139, 0, 175, 173, 169, 140, 0, 0, 0 }; static const short yydefgoto[] = { 421, 11, 84, 2, 3, 7, 132, 162, 8, 9, 43, 55, 186, 93, 94, 95, 232, 385, 96, 233, 147, 148, 172, 207, 197, 208, 259, 260, 261, 262, 263, 149, 212, 268, 377, 400, 331, 363, 360, 150, 333, 151, 382, 338, 381, 380, 340, 284, 152, 153, 102, 103, 361, 104, 71, 87, 72, 133, 106, 111, 73, 85, 107, 210, 119, 12 }; static const short yypact[] = { 80, 227, 74,-32768, 1241, 83, 87, 106, 167, 198, 211, -32768, 93,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768, 111, 16, 17,-32768, 124, 127,-32768, 1373, 127,-32768,-32768,-32768, 230, 148, 61, 25, 755,-32768,-32768,-32768,-32768, 92,-32768,-32768, -32768,-32768, 19,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, 544,-32768,-32768,-32768,-32768, 73, 23, 100, -32768,-32768,-32768,-32768, 300,-32768, 607,-32768, 94,-32768, 346, 369, 154, 1005,-32768, 112, 58, 11,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 692, 230, 179,-32768,-32768, 176,-32768,-32768, 359,-32768,-32768,-32768, 191,-32768,-32768, -32768, 196, 138, 369,-32768,-32768, 142, 221,-32768,-32768, 262,-32768,-32768, 226,-32768, 240,-32768, 1028,-32768, 435, 1296, 521, 458, 1373, 18,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1318, 70, 140, 122,-32768, 237,-32768,-32768, 205, 1373, 249, 286, 184, 290,-32768, 232, 310, 5, 245, 21, 316, 162, 192, 254,-32768, 309,-32768,-32768,-32768,-32768, 127,-32768,-32768,-32768,-32768,-32768, 234,-32768, 256, 266, 282, 71, 295, 296, 355, 370, 24, 26, 287, 670, 302, 949,-32768, 303, 22, 304, 893,-32768, 306, 377, 1084, 352, 315, 335, 29, 79, 920, 9, 367,-32768, -32768, 368, 13,-32768,-32768, 1373,-32768,-32768,-32768, 371, 273,-32768,-32768, 372, 373, 374, 407, 409,-32768, 375, 418,-32768,-32768,-32768,-32768, 419,-32768,-32768,-32768, 318, 197, 238, 609,-32768,-32768, 449,-32768, 283, 859,-32768, 382,-32768,-32768,-32768,-32768, 383,-32768, 384, 385, 386, -32768, 1373,-32768, 387, 1373,-32768, 388, 390,-32768,-32768, 27,-32768,-32768,-32768, 426, 777,-32768,-32768,-32768, 461, 462,-32768, 463,-32768,-32768, 1219,-32768, 1219, 1219, 1219, -32768,-32768,-32768,-32768, 837,-32768, 837, 1163, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 434, 837,-32768, 309,-32768,-32768,-32768,-32768,-32768,-32768, 309, -32768,-32768,-32768,-32768, 436, 322, 397, 402, 403,-32768, -32768,-32768,-32768,-32768,-32768, 1107, 410, 411,-32768,-32768, 412,-32768, 125,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 1163, 837,-32768, 406,-32768, -32768,-32768, 99,-32768, 15, 104,-32768, 443,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 1163, 1163, 329, -32768,-32768,-32768, 175, 180, 185, 272,-32768, 201,-32768, -32768,-32768,-32768,-32768,-32768, 1163,-32768,-32768,-32768,-32768, 488, 499,-32768 }; static const short yypgoto[] = {-32768, 514,-32768,-32768,-32768,-32768, -179,-32768, 3, -3, -32, -32768,-32768, -146, 110, -88, 193,-32768, 270, -81,-32768, -32768, 389,-32768, 231,-32768, 356,-32768,-32768, -51,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 307,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768, 301,-32768,-32768, -10, -8, -91, 481,-32768,-32768,-32768, 450,-32768,-32768,-32768, -120, 526,-32768, 4, -20 }; #define YYLAST 1438 static const short yytable[] = { 118, 122, 56, 128, 57, 42, 126, 231, 37, 114, 64, -194, 45, 65, 139, 99, 410, 59, 61, 184, 82, 131, 219, 271, 89, 246, 76, 250, 139, 51, 280, 52, 216, 122, 220, 80, 226, 140, 141, 142, 143, 144, 145, 51, 77, 52, 90, 168, 37, 91, 92, 140, 141, 142, 143, 144, 145, 79, -3, 130, 247, 248, 74, 251, 97, 91, 92, 91, 92, 215, 56, 188, 57, 288, 51, 10, 52, -5, 75, 289, 60, 62, -194, 83, -57, 189, 411, 56, 185, 57, 1, 112, 272, -62, 249, 229, 252, 38, -56, 281, 407, 39, 69, 240, 154, 407, 155, 69, 100, 51, 136, 52, 241, 100, 53, 51, 51, 52, 52, 101, 51, 40, 52, 193, 101, 58, 128, 54, 164, 126, 128, 192, 194, 126, 163, 41, 128, -32, 63, 126, 41, 190, 282, 88, 173, 175, 178, 182, 183, 283, 291, 69, 6, 41, 231, -29, 81, 397, 398, 234, 191, 384, 54, 399, 113, 37, 46, 47, 48, 54, 408, 46, 47, 48, 198, -60, 407, 90, 69, 6, 41, 407, 129, 69, 100, 201, 407, 137, 69, 100, 138, 51, 156, 52, 100, 101, 51, 157, 52, 44, 101, 51, 407, 52, 69, 101, 91, 92, 158, 5, 100, 223, 159, -17, 264, 202, 269, 51, 383, 52, 386, 101, 160, 154, 224, 155, 225, 364, 4, 307, 203, 204, 205, 206, 165, 308, 91, 92, 5, 6, 293, 166, 46, 47, 48, 195, 417, 46, 47, 48, 199, 418, 46, 47, 48, 350, 419, 351, 352, 353, 404, 405, 406, 161, 409, 393, 235, 236, 46, 47, 48, 309, -59, 5, 6, 196, 99, 310, 46, 47, 48, 154, 131, 155, 316, 401, 339, 200, 217, 339, 221, 211, 227, 228, -120, -120, -120, 66, 67, 68, 198, 98, 213, 69, 99, 295, 296, 413, 414, 100, 264, 214, 264, 264, 264, 218, 51, 222, 52, 131, 101, 253, 254, 255, 230, 420, 237, -120, -120, -120, -120, -120, -120, -120, -120, -120, 238, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 115, -120, -120, 305, 306, 239, -120, 388, 236, 244, 13, 14, 15, 139, 415, 416, 123, 127, 242, 243, 46, 47, 48, 120, 245, 265, 270, 273, 51, 275, 52, 276, 278, 13, 14, 15, 140, 141, 142, 143, 144, 145, 146, 17, 18, 19, 20, 21, 22, 23, 24, 25, 279, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 116, 36, 117, 17, 18, 19, 20, 21, 22, 23, 24, 25, 277, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 121, 36, 117, 169, 290, 300, 292, 301, 294, 297, 298, 299, 302, 13, 14, 15, 303, 315, 304, 332, 334, 335, 336, 337, 341, 342, 179, 343, 344, 347, 348, 349, 376, 170, 389, 387, 13, 14, 15, 390, 391, 394, 395, 396, 403, 412, 17, 18, 19, 20, 21, 22, 23, 24, 25, 422, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 423, 36, 171, 17, 18, 19, 20, 21, 22, 23, 24, 25, 180, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 176, 36, 181, 50, 379, 346, 287, 209, 174, 70, 13, 14, 15, 105, 49, 0, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, -199, 0, 0, -199, 0, 0, -199, -199, -199, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 177, -199, -199, -199, -199, -199, -199, -199, -199, -199, 0, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 108, -199, 311, 0, 109, 0, 0, 110, 0, 0, 13, 14, 15, 0, 0, 0, 362, 0, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 0, 378, 0, 0, -114, -114, 312, 313, 314, 0, -114, -114, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 256, 36, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 402, 0, 0, 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, 0, 135, 257, 0, 13, 14, 15, 0, 0, 0, 0, 0, 258, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 78, 36, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 354, 355, 0, 0, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 0, 357, 358, 17, 18, 19, 20, 21, 22, 23, 24, 25, 318, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 359, 36, 117, 13, 14, 15, 0, 319, 320, 321, 322, 0, 323, 324, 325, 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, 0, 17, 124, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 125, 36, 117, 13, 14, 15, 274, 17, 124, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 285, 125, 36, 117, 0, 0, 0, 286, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 266, 13, 14, 15, 267, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 17, 124, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 125, 36, 117, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 167, 36, 117, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 17, 124, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 125, 36, 117, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 392, 36, 117, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 117, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, 0, 13, 14, 15, 0, 16, 0, 0, 0, 258, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 0, 13, 14, 15, 0, 187, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 36 }; static const short yycheck[] = { 91, 92, 12, 94, 12, 8, 94, 186, 4, 90, 42, 0, 9, 45, 1, 4, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 16, 1, 18, 178, 124, 180, 55, 182, 24, 25, 26, 27, 28, 29, 16, 19, 18, 23, 138, 44, 44, 45, 24, 25, 26, 27, 28, 29, 53, 0, 1, 36, 37, 1, 37, 84, 44, 45, 44, 45, 64, 80, 1, 80, 64, 16, 1, 18, 3, 17, 70, 64, 64, 71, 64, 71, 15, 71, 97, 70, 97, 10, 87, 70, 70, 70, 183, 70, 14, 71, 70, 1, 14, 3, 32, 114, 1, 114, 3, 9, 16, 106, 18, 41, 9, 21, 16, 16, 18, 18, 20, 16, 15, 18, 1, 20, 14, 217, 69, 131, 217, 221, 163, 164, 221, 131, 13, 227, 15, 14, 227, 13, 1, 63, 70, 140, 141, 142, 143, 144, 70, 231, 3, 12, 13, 333, 15, 64, 32, 33, 191, 163, 340, 69, 38, 70, 161, 67, 68, 69, 69, 71, 67, 68, 69, 170, 71, 1, 23, 3, 12, 13, 1, 70, 3, 9, 1, 1, 8, 3, 9, 14, 16, 1, 18, 9, 20, 16, 1, 18, 1, 20, 16, 1, 18, 3, 20, 44, 45, 70, 11, 9, 49, 70, 15, 210, 31, 212, 16, 338, 18, 340, 20, 1, 233, 62, 233, 64, 318, 1, 32, 46, 47, 48, 49, 8, 38, 44, 45, 11, 12, 236, 1, 67, 68, 69, 8, 71, 67, 68, 69, 1, 71, 67, 68, 69, 306, 71, 308, 309, 310, 380, 381, 382, 1, 384, 356, 32, 33, 67, 68, 69, 33, 71, 11, 12, 70, 4, 39, 67, 68, 69, 291, 10, 291, 1, 376, 282, 1, 178, 285, 180, 1, 182, 183, 11, 12, 13, 67, 68, 69, 296, 1, 70, 3, 4, 32, 33, 398, 399, 9, 306, 1, 308, 309, 310, 70, 16, 1, 18, 10, 20, 34, 35, 36, 70, 416, 70, 44, 45, 46, 47, 48, 49, 50, 51, 52, 70, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, 65, 66, 32, 33, 70, 70, 32, 33, 1, 11, 12, 13, 1, 32, 33, 93, 94, 70, 70, 67, 68, 69, 1, 1, 70, 70, 70, 16, 70, 18, 1, 64, 11, 12, 13, 24, 25, 26, 27, 28, 29, 30, 44, 45, 46, 47, 48, 49, 50, 51, 52, 64, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 44, 45, 46, 47, 48, 49, 50, 51, 52, 70, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 1, 70, 31, 71, 31, 70, 70, 70, 70, 70, 11, 12, 13, 31, 1, 32, 70, 70, 70, 70, 70, 70, 70, 1, 70, 35, 1, 1, 1, 31, 31, 70, 32, 11, 12, 13, 70, 70, 64, 64, 64, 71, 35, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 65, 66, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, 65, 66, 11, 333, 296, 227, 173, 141, 50, 11, 12, 13, 85, 10, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 5, -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 66, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, 65, 1, -1, 5, -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, 317, -1, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, -1, 331, -1, -1, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, 65, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, 377, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 8, 31, -1, 11, 12, 13, -1, -1, -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, 65, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 6, 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 31, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 11, 12, 13, -1, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 11, 12, 13, 70, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, 70, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 66, 11, 12, 13, 70, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 66, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, 11, 12, 13, -1, 15, -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 31, -1, 11, 12, 13, -1, 15, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 65 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/share/bison.simple" /* This file comes from bison-1.27. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 216 "/usr/local/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ #ifdef YYPARSE_PARAM int yyparse (void *); #else int yyparse (void); #endif #endif int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; int yyfree_stacks = 0; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) xwrap (errdebug (5, "Starting parse\n")); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) xwrap (errdebug (5, "Stack size increased to %d\n", yystacksize)); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) xwrap (errdebug (5, "Entering state %d\n", yystate)); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) xwrap (errdebug (5, "Reading a token: ")); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) xwrap (errdebug (5, "Now at end of input.\n")); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { xwrap (errdebug (5, "Next token is %d (%s", yychar, yytname[yychar1])); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif xwrap (errdebug (5, ")\n")); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) xwrap (errdebug (5, "Shifting token %d (%s), ", yychar, yytname[yychar1])); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; xwrap (errdebug (5, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn])); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) xwrap (errdebug (5, "%s ", yytname[yyrhs[i]])); xwrap (errdebug (5, " -> %s\n", yytname[yyr1[yyn]])); } #endif switch (yyn) { case 1: #line 281 "parsutil.y" { my_wchar_t *wp; wp = utf_8_to_utf_16 ("(EOF)"); if (validating (this_file) && yyvsp[-1].wstr == NULL) /* oops; missing DOCTYPE decl */ add_xml_error (this_file, 402, wp); /* general parsing failure */ add_xml_error (this_file, 300, wp); ; break;} case 2: #line 289 "parsutil.y" { add_xml_error (this_file, 1104, yyvsp[0].wstr); free (yyvsp[0].wstr); ; break;} case 3: #line 292 "parsutil.y" { my_wchar_t *wp; /* * NullElement is just there to make sure * a NULL pointer is on the stack before * Element. NotInContent is there only to * set in_document_content to zero */ if (validating (this_file)) { wp = yyvsp[-2].xn ? yyvsp[-2].xn->name : NULL; if (yyvsp[-5].wstr == NULL) { /* oops; missing DOCTYPE decl */ add_xml_error (this_file, 402, wp); } else { if (yyvsp[-2].xn != NULL) { /* DTD name must match top element */ if (yyvsp[-2].xn->name == NULL || uni_strcmp (yyvsp[-5].wstr, yyvsp[-2].xn->name)) { add_xml_error (this_file, 401, wp); free_xml_node (yyvsp[-2].xn); } else { /* clear DFA stack */ check_node_against_dfa (this_file, NULL, NULL, CLOBBER_STACK); /* install finished parse tree */ this_file->parstree = yyvsp[-2].xn; } } } } ; break;} case 4: #line 324 "parsutil.y" { /* shouldn't have anything after Misc */ my_wchar_t *wp; if (validating (this_file)) { wp = yyvsp[-3].xn ? yyvsp[-3].xn->name : NULL; if (yyvsp[-6].wstr == NULL) { /* oops; missing DOCTYPE decl */ add_xml_error (this_file, 402, wp); } else { if (yyvsp[-3].xn != NULL) { /* DTD name must match top element */ if ((yyvsp[-3].xn->name == NULL) || (uni_strcmp (yyvsp[-6].wstr, yyvsp[-3].xn->name))) { add_xml_error (this_file, 401, wp); free_xml_node (yyvsp[-3].xn); } else { /* clear DFA stack */ check_node_against_dfa (this_file, NULL, NULL, CLOBBER_STACK); /* install finished parse tree */ this_file->parstree = yyvsp[-3].xn; } } } } /* shouldn't have anything after Misc */ wp = utf_8_to_utf_16 ("(EOF)"); add_xml_error (this_file, 302, wp); ; break;} case 5: #line 355 "parsutil.y" { /* my only use is to push a NULL pointer */ yyval.xn = NULL; ; break;} case 6: #line 358 "parsutil.y" { /* finished with document content */ in_document_content = 0; ; break;} case 7: #line 362 "parsutil.y" { yyval.wstr = yyvsp[-1].wstr; ; break;} case 8: #line 363 "parsutil.y" { yyval.wstr = NULL; ; break;} case 9: #line 366 "parsutil.y" { /* line numbers may now be off */ add_xml_error (this_file, 321, NULL); add_xml_error (this_file, 351, yyvsp[-1].wstr); yy_pop_state (); ; break;} case 10: #line 371 "parsutil.y" { /* bogus PI (XML decl is a kind of PI) */ add_xml_error (this_file, 351, yyvsp[-2].wstr); ; break;} case 11: #line 375 "parsutil.y" {; break;} case 13: #line 378 "parsutil.y" {; break;} case 14: #line 379 "parsutil.y" {; break;} case 15: #line 380 "parsutil.y" {; break;} case 16: #line 381 "parsutil.y" {; break;} case 17: #line 382 "parsutil.y" { add_xml_error (this_file, 359, yyvsp[0].wstr); ; break;} case 18: #line 383 "parsutil.y" { add_xml_error (this_file, 358, yyvsp[-1].wstr); ; break;} case 19: #line 384 "parsutil.y" { add_xml_error (this_file, 358, yyvsp[-2].wstr); ; break;} case 20: #line 387 "parsutil.y" { /* line numbers may now be off */ add_xml_error (this_file, 321, NULL); /* bogus PI (XML decl is a kind of PI) */ add_xml_error (this_file, 351, yyvsp[-1].wstr); yy_pop_state (); yyval.i = 0; ; break;} case 21: #line 394 "parsutil.y" { /* bogus PI (XML decl is a kind of PI) */ add_xml_error (this_file, 351, yyvsp[-2].wstr); yyval.i = 0; ; break;} case 22: #line 399 "parsutil.y" { /* line numbers may now be off */ add_xml_error (this_file, 321, NULL); /* probably an unterminated TextDecl */ add_xml_error (this_file, 364, yyvsp[-2].wstr); yy_pop_state (); yyval.i = 0; ; break;} case 23: #line 407 "parsutil.y" { yyval.i = 1; ; break;} case 24: #line 408 "parsutil.y" { yyval.i = 2; ; break;} case 25: #line 410 "parsutil.y" { /* standalone not allowed in text decl */ add_unique_error (this_file, 353, NULL); ; break;} case 26: #line 413 "parsutil.y" { /* standalone not allowed in text decl */ add_xml_error (this_file, 352, NULL); ; break;} case 27: #line 416 "parsutil.y" {; break;} case 28: #line 417 "parsutil.y" { add_xml_error (this_file, 370, NULL); ; break;} case 29: #line 418 "parsutil.y" { add_xml_error (this_file, 352, NULL); ; break;} case 30: #line 419 "parsutil.y" { add_xml_error (this_file, 370, NULL); ; break;} case 31: #line 420 "parsutil.y" { /* standalone not allowed in text decl */ add_unique_error (this_file, 353, NULL); ; break;} case 32: #line 423 "parsutil.y" {; break;} case 33: #line 426 "parsutil.y" { add_xml_error (this_file, 366, yyvsp[-2].wstr); ; break;} case 34: #line 427 "parsutil.y" { my_wchar_t *wp; wp = utf_8_to_utf_16 ("= ..."); add_xml_error (this_file, 360, wp); ; break;} case 35: #line 431 "parsutil.y" { char *cp; float f; my_wchar_t *p; for (p = yyvsp[0].wstr; *p != 0; p++) if (! isalnum (*p) && ! uni_utf_any (p, "_.:-")) /* invalid XML version name/num */ add_xml_error (this_file, 360, yyvsp[0].wstr); cp = strdup (utf_16_to_utf_8 (yyvsp[0].wstr)); if ((sscanf (cp, "%f", &f) <= 0) || (f > 1)) /* can't handle XML versions > 1 */ add_xml_error (this_file, 360, yyvsp[0].wstr); free (cp); ; break;} case 36: #line 444 "parsutil.y" { my_wchar_t *wp; wp = utf_8_to_utf_16 ("="); add_xml_error (this_file, 350, wp); yyval.wstr = yyvsp[-2].wstr; ; break;} case 37: #line 449 "parsutil.y" { if (yyvsp[0].wstr) set_encoding (this_file, yyvsp[0].wstr); yyval.wstr = yyvsp[-2].wstr; ; break;} case 38: #line 453 "parsutil.y" { my_wchar_t *wp; wp = utf_8_to_utf_16 ("="); add_xml_error (this_file, 362, wp); ; break;} case 39: #line 457 "parsutil.y" { /* if we're in a child xml_file struct */ if (this_file->child != no) { /* can't have standalone in TextDecl */ add_xml_error (this_file, 353, NULL); } else { if (uni_utf_strcmp (yyvsp[0].wstr, "yes") == 0) this_file->standalone = yes; else if (uni_utf_strcmp (yyvsp[0].wstr, "no") == 0) this_file->standalone = no; else /* must be "yes" or "no" */ add_xml_error (this_file, 362, yyvsp[0].wstr); } ; break;} case 40: #line 475 "parsutil.y" { add_xml_error (this_file, 400, NULL); seen_doctype_decl = 1; yyval.wstr = NULL; ; break;} case 41: #line 479 "parsutil.y" { add_xml_error (this_file, 400, yyvsp[-2].wstr); seen_doctype_decl = 1; yyval.wstr = NULL; ; break;} case 42: #line 483 "parsutil.y" { struct xml_file *xf; seen_doctype_decl = 1; if (this_file->standalone == yes) add_xml_warning (this_file, 406, NULL); if ((xf = yyvsp[-2].xf)) { /* merge ext tables with internal */ if (! add_xml_file (this_file, xf)) { /* ext entity refers to a parent */ free_xml_file (xf); xf = NULL; } } if (! xf || ! validating (this_file)) if ((xf = create_xml_file ("/dev/null"))) add_xml_file (this_file, xf); if (xf) /* push_xml_file (in lexutil.l) pushes * a new object onto the lexer's scan * stack; this lets us switch to a new * input stream */ push_xml_file (xf, DTD); ; break;} case 43: #line 507 "parsutil.y" { /* pop_xml_file switches to old stream */ pop_xml_file (); if (! yyvsp[-1].i) /* $7 returns false if parse failed */ add_xml_error (this_file, 774, yyvsp[-6].wstr); else if (validating (this_file)) { /* Undeclared NOTATIONs in attlists? */ check_notations (this_file); /* Get rid of undeclared dummy elems */ clobber_dummy_elements (this_file); /* Undeclared NOTATIONs in uperefs? */ check_uperefs (this_file); /* elements in cont models declared? */ check_content_models (this_file); /* check for unused elements */ find_dangling_elements (this_file, yyvsp[-6].wstr); /* add links back to ancestor elements; not used */ /* add_ancestor_links_to_elements (this_file); */ } /* sic; $2 refers to Name above */ yyval.wstr = yyvsp[-6].wstr; ; break;} case 44: #line 530 "parsutil.y" { seen_doctype_decl = 1; /* Unlike SGML, XML needs a SysID here */ add_xml_error (this_file, 420, NULL); if (validating (this_file)) { /* Undeclared NOTATIONs in attlists? */ check_notations (this_file); /* Get rid of undeclared dummy elems */ clobber_dummy_elements (this_file); /* Undeclared NOTATIONs in uperefs? */ check_uperefs (this_file); /* elements in cont models declared? */ check_content_models (this_file); /* check for unused elements */ find_dangling_elements (this_file, yyvsp[-3].wstr); /* add links back to ancestor elements; not used */ /* add_ancestor_links_to_elements (this_file); */ yyval.wstr = yyvsp[-3].wstr; } ; break;} case 45: #line 550 "parsutil.y" { seen_doctype_decl = 1; /* this must match top xml_node name */ if (validating (this_file)) { /* Undeclared NOTATIONs in attlists? */ check_notations (this_file); /* Get rid of undeclared dummy elems */ clobber_dummy_elements (this_file); /* Undeclared NOTATIONs in uperefs? */ check_uperefs (this_file); /* elements in cont models declared? */ check_content_models (this_file); /* check for unused elements */ find_dangling_elements (this_file, yyvsp[-2].wstr); /* add links back to ancestor elements; not used */ /* add_ancestor_links_to_elements (this_file); */ yyval.wstr = yyvsp[-2].wstr; } ; break;} case 46: #line 571 "parsutil.y" { my_wchar_t *wp; struct xml_file *xf; wp = utf_8_to_utf_16 ("SYSTEM"); add_xml_warning (this_file, 304, wp); if (! validating (this_file)) yyval.xf = NULL; else { if (yyvsp[-1].wstr == NULL) /* error msg already generated */ yyval.xf = NULL; else { xf = resolve_pub_or_sysid (this_file, yyvsp[-1].wstr, NULL); if (xf == NULL) { uni_map_whitespace_to_space (yyvsp[-1].wstr); uni_map_spaces_to_space (yyvsp[-1].wstr); add_xml_warning (this_file, 562, yyvsp[-1].wstr); xf = resolve_pub_or_sysid (this_file, NULL, yyvsp[0].wstr); if (xf == NULL) add_xml_error (this_file, 563, yyvsp[0].wstr); } yyval.xf = xf; } } ; break;} case 47: #line 595 "parsutil.y" { struct xml_file *xf; if (! validating (this_file)) yyval.xf = NULL; else { if (yyvsp[-1].wstr == NULL) /* error msg already generated */ yyval.xf = NULL; else { xf = resolve_pub_or_sysid (this_file, yyvsp[-1].wstr, NULL); if (xf == NULL) { uni_map_whitespace_to_space (yyvsp[-1].wstr); uni_map_spaces_to_space (yyvsp[-1].wstr); add_xml_warning (this_file, 562, yyvsp[-1].wstr); xf = resolve_pub_or_sysid (this_file, NULL, yyvsp[0].wstr); if (xf == NULL) add_xml_error (this_file, 563, yyvsp[0].wstr); } yyval.xf = xf; } } ; break;} case 48: #line 616 "parsutil.y" { struct xml_file *xf; if (! validating (this_file)) yyval.xf = NULL; else { if (yyvsp[-2].wstr == NULL) /* error msg already generated */ yyval.xf = NULL; else { if (yyvsp[-1].wstr) add_xml_error (this_file, 551, yyvsp[-1].wstr); xf = resolve_pub_or_sysid (this_file, yyvsp[-2].wstr, NULL); if (xf == NULL) { uni_map_whitespace_to_space (yyvsp[-2].wstr); uni_map_spaces_to_space (yyvsp[-2].wstr); add_xml_warning (this_file, 562, yyvsp[-2].wstr); xf = resolve_pub_or_sysid (this_file, NULL, yyvsp[-1].wstr); if (xf == NULL) add_xml_error (this_file, 563, yyvsp[-1].wstr); } yyval.xf = xf; } } ; break;} case 49: #line 639 "parsutil.y" { if (! validating (this_file)) yyval.xf = NULL; else { if (yyvsp[0].wstr == NULL) yyval.xf = NULL; else { yyval.xf = resolve_pub_or_sysid (this_file, NULL, yyvsp[0].wstr); if (yyval.xf == NULL) add_xml_error (this_file, 563, yyvsp[0].wstr); } } ; break;} case 50: #line 653 "parsutil.y" { my_wchar_t *wp; wp = utf_8_to_utf_16 ("PUBLIC"); add_xml_error (this_file, 567, wp); yyval.wstr = NULL; ; break;} case 51: #line 658 "parsutil.y" { yyval.wstr = NULL; check_case (this_file, yyvsp[-1].wstr, no); if (yyvsp[0].wstr && validating (this_file)) yyval.wstr = yyvsp[0].wstr; ; break;} case 52: #line 663 "parsutil.y" { yyval.wstr = NULL; check_case (this_file, yyvsp[-2].wstr, no); if (yyvsp[-1].wstr && validating (this_file)) { add_xml_error (this_file, 551, yyvsp[-1].wstr); yyval.wstr = yyvsp[-1].wstr; } ; break;} case 53: #line 671 "parsutil.y" { my_wchar_t *msg; msg = utf_8_to_utf_16 ("(unspecified)"); add_xml_error (this_file, 568, msg); yyval.wstr = NULL; ; break;} case 54: #line 676 "parsutil.y" { yyval.wstr = NULL; check_case (this_file, yyvsp[-1].wstr, no); if (yyvsp[0].wstr && validating (this_file)) yyval.wstr = yyvsp[0].wstr; ; break;} case 55: #line 681 "parsutil.y" { yyval.wstr = NULL; check_case (this_file, yyvsp[-2].wstr, no); if (yyvsp[-1].wstr && validating (this_file)) { add_xml_error (this_file, 550, yyvsp[-1].wstr); yyval.wstr = yyvsp[-1].wstr; } ; break;} case 56: #line 690 "parsutil.y" { yyval.i = (yyvsp[-1].i && yyvsp[0].i) ? 1 : 0; ; break;} case 57: #line 691 "parsutil.y" { yyval.i = yyvsp[0].i ? 1 : 0; ; break;} case 58: #line 693 "parsutil.y" { /* 0 means failure */ yyval.i = 0; ; break;} case 59: #line 696 "parsutil.y" { yyval.i = yyvsp[-1].i ? 1 : 0; ; break;} case 60: #line 697 "parsutil.y" { yyval.i = 1; ; break;} case 61: #line 700 "parsutil.y" {; break;} case 63: #line 703 "parsutil.y" { /* More trouble than it's worth */ /* my_wchar_t *msg; * msg = utf_8_to_utf_16 ("(unspecified)"); * add_xml_error (this_file, 463, msg); */ yyval.i = 0; ; break;} case 64: #line 710 "parsutil.y" { yyval.i = yyvsp[-1].i ? 1 : 0; ; break;} case 65: #line 711 "parsutil.y" { yyval.i = 1; ; break;} case 66: #line 714 "parsutil.y" {; break;} case 67: #line 715 "parsutil.y" {; break;} case 68: #line 716 "parsutil.y" {; break;} case 69: #line 717 "parsutil.y" {; break;} case 70: #line 718 "parsutil.y" {; break;} case 71: #line 719 "parsutil.y" {; break;} case 72: #line 720 "parsutil.y" { if (validating (this_file) && yyvsp[0].xn) /* not needed in markup section */ free_xml_node (yyvsp[0].xn); ; break;} case 73: #line 724 "parsutil.y" { if (validating (this_file) && yyvsp[0].xn) /* not needed in markup section */ free_xml_node (yyvsp[0].xn); ; break;} case 74: #line 730 "parsutil.y" { my_wchar_t *wp; /* turn off check on balanced PE parends */ expecting_cpseq_or_choice = 0; wp = utf_8_to_utf_16 ("(Name token)"); add_xml_error (this_file, 651, wp); ; break;} case 75: #line 737 "parsutil.y" { my_wchar_t *wp; if (validating (this_file)) { if (! yyvsp[-2].mbl) { wp = utf_8_to_utf_16 ("blocks[i],yyvsp[0].wstr)) /* oops; list already has name */ break; if (i < get_block_len (yyvsp[-2].mbl)) { /* oops; list already has this name */ add_xml_error (this_file, 670, yyvsp[0].wstr); yyval.mbl = yyvsp[-2].mbl; } else { /* accumulate list of alternatives */ len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (yyvsp[-2].mbl, yyvsp[0].wstr, len); } } ; break;} case 97: #line 1043 "parsutil.y" { if (validating (this_file)) { /* add Name to block array */ size_t len; len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (NULL, yyvsp[0].wstr, len); } ; break;} case 98: #line 1053 "parsutil.y" { if (yyvsp[-1].cmn == NULL) yyval.cmn = NULL; else if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-1].cmn, NULL, qmark); ; break;} case 99: #line 1058 "parsutil.y" { if (yyvsp[-1].cmn == NULL) yyval.cmn = NULL; else if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-1].cmn, NULL, star); ; break;} case 100: #line 1063 "parsutil.y" { if (yyvsp[-1].cmn == NULL) yyval.cmn = NULL; else if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-1].cmn, NULL, plus); ; break;} case 101: #line 1068 "parsutil.y" { if (validating (this_file)) yyval.cmn = yyvsp[0].cmn; ; break;} case 102: #line 1072 "parsutil.y" { yyval.cmn = NULL; ; break;} case 103: #line 1073 "parsutil.y" { if (validating (this_file)) yyval.cmn = yyvsp[-1].cmn; ; break;} case 104: #line 1076 "parsutil.y" { if (validating (this_file)) yyval.cmn = yyvsp[-1].cmn; ; break;} case 105: #line 1081 "parsutil.y" { if ((yyvsp[-2].cmn == NULL) || (yyvsp[0].cmn == NULL)) { if (yyvsp[0].cmn) free_cmnode (yyvsp[0].cmn); if (yyvsp[-2].cmn) free_cmnode (yyvsp[-2].cmn); yyval.cmn = NULL; } else { if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-2].cmn, yyvsp[0].cmn, slash); } ; break;} case 106: #line 1090 "parsutil.y" { if ((yyvsp[-2].cmn == NULL) || (yyvsp[0].cmn == NULL)) { if (yyvsp[0].cmn) free_cmnode (yyvsp[0].cmn); if (yyvsp[-2].cmn) free_cmnode (yyvsp[-2].cmn); yyval.cmn = NULL; } else { if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-2].cmn, yyvsp[0].cmn, slash); } ; break;} case 107: #line 1099 "parsutil.y" { my_wchar_t *tmp; if ((yyvsp[-2].cmn == NULL) || (yyvsp[0].cmn == NULL)) { if (yyvsp[0].cmn) free_cmnode (yyvsp[0].cmn); if (yyvsp[-2].cmn) free_cmnode (yyvsp[-2].cmn); yyval.cmn = NULL; } else { /* unlike SGML, & is illegal in XML */ tmp = utf_8_to_utf_16 ("&"); add_xml_error (this_file, 669, tmp); if (validating (this_file)) /* treat the '&' like a slash */ yyval.cmn = create_cmnode (yyvsp[-2].cmn, yyvsp[0].cmn, slash); } ; break;} case 108: #line 1114 "parsutil.y" { if ((yyvsp[-2].cmn == NULL) || (yyvsp[0].cmn == NULL)) { if (yyvsp[0].cmn) free_cmnode (yyvsp[0].cmn); if (yyvsp[-2].cmn) free_cmnode (yyvsp[-2].cmn); yyval.cmn = NULL; } else { if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-2].cmn, yyvsp[0].cmn, comma); } ; break;} case 109: #line 1123 "parsutil.y" { if (validating (this_file)) yyval.cmn = yyvsp[0].cmn; ; break;} case 110: #line 1127 "parsutil.y" { if (yyvsp[-1].cmn == NULL) yyval.cmn = NULL; else if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-1].cmn, NULL, qmark); ; break;} case 111: #line 1132 "parsutil.y" { if (yyvsp[-1].cmn == NULL) yyval.cmn = NULL; else if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-1].cmn, NULL, star); ; break;} case 112: #line 1137 "parsutil.y" { if (yyvsp[-1].cmn == NULL) yyval.cmn = NULL; else if (validating (this_file)) yyval.cmn = create_cmnode (yyvsp[-1].cmn, NULL, plus); ; break;} case 113: #line 1142 "parsutil.y" { /* catch (a, b | c) (best: (a, (b | c)) */ add_xml_error (this_file, 676, NULL); if (validating (this_file)) yyval.cmn = yyvsp[-1].cmn; ; break;} case 114: #line 1147 "parsutil.y" { if (validating (this_file)) yyval.cmn = yyvsp[0].cmn; ; break;} case 115: #line 1151 "parsutil.y" { if (validating (this_file)) yyval.cmn = yyvsp[0].cmn; ; break;} case 116: #line 1154 "parsutil.y" { if (validating (this_file)) yyval.cmn = create_cmleaf (yyvsp[0].wstr); ; break;} case 117: #line 1157 "parsutil.y" { my_wchar_t *wp; wp = utf_8_to_utf_16 ("#PCDATA"); add_xml_error (this_file, 675, wp); wp = uni_add_string (wp); if (validating (this_file)) yyval.cmn = create_cmleaf (wp); ; break;} case 118: #line 1166 "parsutil.y" { my_wchar_t *wp; if (validating (this_file)) { if (! yyvsp[-2].mbl) { wp = utf_8_to_utf_16 ("attlistlen > 0) add_xml_warning (this_file, 652, yyvsp[-2].wstr); while ((xa = pop_block (yyvsp[-1].mbl))) if (! add_attribute (this_file, yyvsp[-2].wstr, xa)) free_xml_attribute (xa); /* if xe was NULL, it's not now */ xe = expand_element (this_file, yyvsp[-2].wstr); /* see XML 1.0 standard, 3.3.1 */ check_dup_enum_vals (this_file, xe); free (yyvsp[-1].mbl); } } ; break;} case 120: #line 1206 "parsutil.y" { if (validating (this_file)) { if (yyvsp[0].xa == NULL) yyval.mbl = yyvsp[-1].mbl; else /* save AttDef in AttDefs list */ yyval.mbl = push_block (yyvsp[-1].mbl, yyvsp[0].xa, 0); } ; break;} case 121: #line 1214 "parsutil.y" { yyval.mbl = NULL; ; break;} case 122: #line 1216 "parsutil.y" { my_wchar_t *msg; if (validating (this_file)) { msg = utf_8_to_utf_16 ("(?)"); add_xml_error (this_file, 610, msg); } yyclearin; yyval.xa = yyvsp[-1].xa; ; break;} case 123: #line 1224 "parsutil.y" { /* oops; illegal attribute name */ if (uni_isdigit (yyvsp[-2].wstr[0])) { /* digit-initial attribute name */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 1353, yyvsp[-2].wstr); if (yychar == NAME) this_file->lineno++; } /* general invalid attribute name */ add_xml_error (this_file, 611, yyvsp[-2].wstr); if (validating (this_file)) { if (yyvsp[0].dd) { if (yyvsp[0].dd->string) free (yyvsp[0].dd->string); free (yyvsp[0].dd); } } yyval.xa = NULL; ; break;} case 124: #line 1241 "parsutil.y" { /* general AttDef failure; this rule * will cause a lot of shift/reduce * conflicts to show up */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 660, yyvsp[-1].wstr); if (yychar == NAME) this_file->lineno++; yyval.xa = NULL; ; break;} case 125: #line 1250 "parsutil.y" { /* oops; no AttType; skip this one */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 660, yyvsp[-2].wstr); if (yychar == NAME) this_file->lineno++; if (validating (this_file)) { if (yyvsp[0].dd) { if (yyvsp[0].dd->string) free (yyvsp[0].dd->string); free (yyvsp[0].dd); } } yyval.xa = NULL; ; break;} case 126: #line 1262 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { /* NAME and NAMES not allowed in XML */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 602, yyvsp[-1].wstr); if (yychar == NAME) this_file->lineno++; /* treat as CDATA */ yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, cdata, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 127: #line 1279 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { /* NUMBER/NUMBERS disallowed in XML */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 602, yyvsp[-1].wstr); if (yychar == NAME) this_file->lineno++; /* treat as CDATA */ yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, cdata, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 128: #line 1296 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { /* no NUTOKEN/NUTOKENS in XML */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 602, yyvsp[-1].wstr); if (yychar == NAME) this_file->lineno++; /* treat as CDATA */ yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, cdata, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 129: #line 1313 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, cdata, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 130: #line 1325 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { /* ID att - required or implied */ if (yyvsp[0].dd->type == defaulted || yyvsp[0].dd->type == fixed) add_xml_error (this_file, 586, yyvsp[-2].wstr); yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, id, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 131: #line 1341 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, idref, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 132: #line 1353 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, idrefs, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 133: #line 1365 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, entity, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 134: #line 1377 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, entities, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 135: #line 1389 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, nmtoken, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 136: #line 1401 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, nmtokens, 0, NULL, yyvsp[0].dd->type, yyvsp[0].dd->string); free (yyvsp[0].dd); } } ; break;} case 137: #line 1413 "parsutil.y" { my_wchar_t *wp, **strings; check_case (this_file, yyvsp[-2].wstr, yes); if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { if (yyvsp[-1].mbl == NULL) { if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 702, yyvsp[-3].wstr); if (yychar == NAME) this_file->lineno++; } strings = (my_wchar_t **)get_blocks (yyvsp[-1].mbl); yyval.xa = create_xml_attribute (this_file, yyvsp[-3].wstr, notation, get_block_len (yyvsp[-1].mbl), strings, yyvsp[0].dd->type, yyvsp[0].dd->string); } if (yyvsp[-1].mbl) { if (yyval.xa == NULL) { /* if problems, free notnames */ while ((wp = pop_block (yyvsp[-1].mbl))) if (wp) free (wp); if (yyvsp[0].dd && yyvsp[0].dd->string) free (yyvsp[0].dd->string); } free (yyvsp[-1].mbl); } if (yyvsp[0].dd) free (yyvsp[0].dd); } ; break;} case 138: #line 1444 "parsutil.y" { my_wchar_t *wp, **strings; if (validating (this_file)) { if (! yyvsp[0].dd) yyval.xa = NULL; else { if (yyvsp[-1].mbl == NULL) { /* empty enumeration */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 585, yyvsp[-2].wstr); if (yychar == NAME) this_file->lineno++; } strings = (my_wchar_t **)get_blocks (yyvsp[-1].mbl); yyval.xa = create_xml_attribute (this_file, yyvsp[-2].wstr, enumeration, get_block_len (yyvsp[-1].mbl), strings, yyvsp[0].dd->type, yyvsp[0].dd->string); } if (yyvsp[-1].mbl) { if (yyval.xa == NULL) { /* if problems, free enum'd vals */ while ((wp = pop_block (yyvsp[-1].mbl))) if (wp) free (wp); if (yyvsp[0].dd && yyvsp[0].dd->string) free (yyvsp[0].dd->string); } free (yyvsp[-1].mbl); } if (yyvsp[0].dd) free (yyvsp[0].dd); } ; break;} case 139: #line 1476 "parsutil.y" { if (validating (this_file)) /* pass malloc_block_list on up */ yyval.mbl = yyvsp[-1].mbl; ; break;} case 140: #line 1481 "parsutil.y" { size_t len; if (validating (this_file)) { if (! expand_notname (this_file, yyvsp[0].wstr)) /* not a declared notation name */ add_xml_warning (this_file, 810, yyvsp[0].wstr); /* add alternative to list */ len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (yyvsp[-2].mbl, yyvsp[0].wstr, len); } ; break;} case 141: #line 1493 "parsutil.y" { size_t len; if (validating (this_file)) { if (! expand_notname (this_file, yyvsp[0].wstr)) /* not a declared notation name */ add_xml_warning (this_file, 810, yyvsp[0].wstr); len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (NULL, yyvsp[0].wstr, len); } ; break;} case 142: #line 1504 "parsutil.y" { if (validating (this_file)) /* pass malloc_block_list on up */ yyval.mbl = yyvsp[-1].mbl; ; break;} case 143: #line 1509 "parsutil.y" { size_t len; if (validating (this_file)) { len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (yyvsp[-2].mbl, yyvsp[0].wstr, len); } ; break;} case 144: #line 1517 "parsutil.y" { my_wchar_t *tmp; size_t len; /* legal in SMGL, illegal in XML */ tmp = uni_strdup(utf_8_to_utf_16("\",\"")); add_xml_error (this_file, 603, tmp); free (tmp); if (validating (this_file)) { len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (yyvsp[-2].mbl, yyvsp[0].wstr, len); } ; break;} case 145: #line 1530 "parsutil.y" { size_t len; if (validating (this_file)) { len = uni_strlen (yyvsp[0].wstr) + 1; len *= sizeof (my_wchar_t); yyval.mbl = push_block (NULL, yyvsp[0].wstr, len); } ; break;} case 146: #line 1538 "parsutil.y" { struct default_decl *d; /* change this && change QUOTEDSTRING rule */ if (YYRECOVERING ()) YYERROR; else { /* oops; forgot to quote default */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 600, yyvsp[0].wstr); if (uni_utf_strcasecmp (yyvsp[0].wstr, "REQUIRED") == 0) add_xml_error (this_file, 511, yyvsp[0].wstr); if (uni_utf_strcasecmp (yyvsp[0].wstr, "IMPLIED") == 0) add_xml_error (this_file, 511, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; if (validating (this_file)) { d = malloc (sizeof (struct default_decl)); /* whitespace gets normalized later on */ d->string = uni_strdup (yyvsp[0].wstr); d->type = defaulted; yyval.dd = d; } } ; break;} case 147: #line 1560 "parsutil.y" { int errnum; struct default_decl *d; /* change this && change QUOTEDSTRING rule */ if (YYRECOVERING ()) YYERROR; else { if (yychar == NAME) this_file->lineno--; errnum = uni_utf_strcasecmp (yyvsp[-1].wstr, "FIXED") ? 612 : 511; add_xml_error (this_file, errnum, yyvsp[-1].wstr); if (yychar == NAME) this_file->lineno++; if (validating (this_file)) { d = malloc (sizeof (struct default_decl)); /* whitespace gets normalized later on */ d->string = uni_strdup (yyvsp[0].wstr); d->type = defaulted; yyval.dd = d; } } ; break;} case 148: #line 1580 "parsutil.y" { struct default_decl *d; /* #CONREF isn't allowed in XML */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 601, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; if (validating (this_file)) { /* treat it as #IMPLIED */ d = malloc (sizeof (struct default_decl)); d->type = implied; d->string = NULL; yyval.dd = d; } ; break;} case 149: #line 1593 "parsutil.y" { struct default_decl *d; /* #CURRENT isn't allowed in XML */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 601, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; if (validating (this_file)) { /* treat it as #IMPLIED */ d = malloc (sizeof (struct default_decl)); d->type = implied; d->string = NULL; yyval.dd = d; } ; break;} case 150: #line 1606 "parsutil.y" { struct default_decl *d; /* oops; forgot to quote default */ if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 600, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { d = malloc (sizeof (struct default_decl)); /* whitespace gets normalized later on */ d->string = uni_strdup (yyvsp[0].wstr); d->type = fixed; yyval.dd = d; } ; break;} case 151: #line 1620 "parsutil.y" { struct default_decl *d; if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 590, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { d = malloc (sizeof (struct default_decl)); d->type = required; d->string = NULL; yyval.dd = d; } ; break;} case 152: #line 1632 "parsutil.y" { struct default_decl *d; check_case (this_file, yyvsp[0].wstr, yes); if (validating (this_file)) { d = malloc (sizeof(struct default_decl)); d->type = required; d->string = NULL; yyval.dd = d; } ; break;} case 153: #line 1641 "parsutil.y" { struct default_decl *d; if (yychar == NAME) this_file->lineno--; add_xml_error (this_file, 590, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { d = malloc (sizeof(struct default_decl)); d->type = implied; d->string = NULL; yyval.dd = d; } ; break;} case 154: #line 1653 "parsutil.y" { struct default_decl *d; check_case (this_file, yyvsp[0].wstr, yes); if (validating (this_file)) { d = malloc (sizeof(struct default_decl)); d->type = implied; d->string = NULL; yyval.dd = d; } ; break;} case 155: #line 1662 "parsutil.y" { struct default_decl *d; /* change this && change NameOrNmtoken rule */ if (validating (this_file)) { if (in_external_dtd_subset (this_file) && this_file->standalone == yes) { /* ext att default in standalone doc */ if (yychar == NAME) this_file->lineno--; add_xml_warning (this_file, 592, yyvsp[0].wstr); if (yychar == NAME) this_file->lineno++; } if (uni_strchr (yyvsp[0].wstr, '<')) add_xml_error (this_file, 1230, yyvsp[0].wstr); d = malloc (sizeof (struct default_decl)); /* whitespace gets normalized later on */ d->string = uni_strdup (yyvsp[0].wstr); d->type = defaulted; yyval.dd = d; } ; break;} case 156: #line 1681 "parsutil.y" { /* change this rule, change the one above */ struct default_decl *d; check_case (this_file, yyvsp[-1].wstr, yes); if (validating (this_file)) { if (in_external_dtd_subset (this_file) && this_file->standalone == yes) { /* ext att default in standalone doc */ if (yychar == NAME) this_file->lineno--; add_xml_warning (this_file, 592, yyvsp[-1].wstr); if (yychar == NAME) this_file->lineno++; } if (uni_strchr (yyvsp[0].wstr, '<')) add_xml_error (this_file, 1230, yyvsp[0].wstr); d = malloc (sizeof (struct default_decl)); /* whitespace gets normalized later on */ d->string = uni_strdup (yyvsp[0].wstr); d->type = fixed; yyval.dd = d; } ; break;} case 157: #line 1703 "parsutil.y" { my_wchar_t *wp; /* catch-all error production */ wp = utf_8_to_utf_16 ("standalone == yes) add_xml_warning (this_file, 803, yyvsp[-2].wstr); ; break;} case 162: #line 1792 "parsutil.y" { char *msg; int i, len; my_wchar_t *wp; struct xml_file *xf; /* save this_file; switch to old stream */ xf = this_file; if (what_are_we_scanning () == file) pop_xml_file (); if (! validating (this_file)) { if (! yyvsp[-1].i) /* if $6 is false, sub-parse failed */ add_xml_error (this_file, 771, yyvsp[-5].wstr); } else { /* add to parameter_entity_names tbl */ wp = add_ext_peref (this_file, yyvsp[-5].wstr, xf, UNRESOLVABLES_OKAY | MAP_PARAMETER_ENTITIES | MAP_CHAR_ENTITIES); /* check for balanced <, > delims */ if (wp && (i = check_gt_and_lt (wp))) { len = strlen (xf->filename); msg = malloc (len + 32 + 1); sprintf (msg, "%s, line %d", xf->filename, i); add_xml_error (this_file, 771, utf_8_to_utf_16 (msg)); free (msg); } } /* sic; $2 refers to Name above */ xwrap (errdebug (5, "Done ext ent.\n")); /* * ExternalSubset was only a preliminary * scan, so take out most error messages */ remove_all_errors_and_warnings_except (yyvsp[-4].xf, 330, 331, 332, 333, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 381, 382, 383, 384, 385, 386, 410, 411, 460, 461, 465, 466, 501, 502, 503, 505, 510, 511, 550, 567, 568, 569, 586, 590, 591, 600, 603, 653, 654, 655, 658, 659, 673, 675, 678, 681, 682, 684, 685, 745, 756, 757, 758, 781, 820, 821, 822, 830, 850, 851, 852, 900, 901, 902, 903, 1002, 1004, 1014, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1112, 1300, 1301, 1310, 1311, 1312, 1315, 1350, 1380, 1381, 1382, /* don't forget the zero -> */ 0); ; break;} case 163: #line 1846 "parsutil.y" { /* Unlike SGML, XML needs a SysID here */ add_xml_error (this_file, 820, yyvsp[-2].wstr); ; break;} case 164: #line 1851 "parsutil.y" { my_wchar_t *wp; /* catch-all error production */ wp = utf_8_to_utf_16 ("standalone == yes && in_external_dtd_subset (this_file)) add_xml_warning (this_file, 753, yyvsp[-3].wstr); ; break;} case 169: #line 1901 "parsutil.y" { /* pop_xml_file switches to old stream */ if (what_are_we_scanning () == entity_replacement_text) pop_xml_file (); xwrap (errdebug (7, "Entity text OK.\n")); ; break;} case 170: #line 1907 "parsutil.y" { my_wchar_t *expan; if (yyvsp[-1].wstr && validating (this_file)) { /* If built-in, declared correctly? */ check_builtin (this_file, yyvsp[-2].wstr, yyvsp[-1].wstr); /* Can't have internal PErefs */ if (! in_external_dtd_subset (this_file)) if (uni_strchr (yyvsp[-1].wstr, '%')) add_xml_error (this_file, 842, yyvsp[-1].wstr); /* map_entities calls malloc */ expan = map_entities (this_file, yyvsp[-1].wstr, FLAG_BYPASSED_AMPERSANDS | MAP_PARAMETER_ENTITIES | MAP_CHAR_ENTITIES, 0); /* add to entity_names table */ add_eref (this_file, yyvsp[-2].wstr, expan); push_entity_text (this_file, expan, 0); free (expan); } else { /* If we get to here, QUOTEDSTRING is * NULL or we aren't validating because * we're in an external entity, etc. */ if (! validating (this_file)) { /* Builtin redefined in an external entity? */ if (is_builtin (yyvsp[-2].wstr)) add_xml_warning (this_file, 756, yyvsp[-2].wstr); else if (yyvsp[-1].wstr) { if (uni_utf_strncmp (yyvsp[-2].wstr, "per", 3) == 0 && uni_utf_strcmp (yyvsp[-1].wstr, "%") == 0) add_xml_warning (this_file, 757, yyvsp[-2].wstr); else if (yyvsp[-1].wstr[0] == '%' && yyvsp[-1].wstr[1] == 0) add_xml_warning (this_file, 758, yyvsp[-2].wstr); } } expan = utf_8_to_utf_16 (""); push_entity_text (this_file, expan, 0); } if (this_file->standalone == yes && in_external_dtd_subset (this_file)) add_xml_warning (this_file, 753, yyvsp[-2].wstr); ; break;} case 171: #line 1952 "parsutil.y" { /* pop_xml_file switches to old stream */ if (what_are_we_scanning () == entity_replacement_text) pop_xml_file (); xwrap (errdebug (7, "Entity text OK.\n")); ; break;} case 172: #line 1958 "parsutil.y" { my_wchar_t *expan; /* SDATA doesn't exist in XML */ add_xml_error (this_file, 821, yyvsp[-3].wstr); if (yyvsp[-1].wstr && validating (this_file)) { /* If built-in, declared correctly? */ check_builtin (this_file, yyvsp[-3].wstr, yyvsp[-1].wstr); /* Can't have internal PErefs */ if (! in_external_dtd_subset (this_file)) if (uni_strchr (yyvsp[-2].wstr, '%')) add_xml_error (this_file, 842, yyvsp[-2].wstr); /* map_entities calls malloc */ expan = map_entities (this_file, yyvsp[-1].wstr, MAP_PARAMETER_ENTITIES | MAP_CHAR_ENTITIES, 0); /* add to entity_names table */ add_eref (this_file, yyvsp[-3].wstr, expan); push_entity_text (this_file, expan, 0); free (expan); } else { expan = utf_8_to_utf_16 (""); push_entity_text (this_file, expan, 0); } if (this_file->standalone == yes && in_external_dtd_subset (this_file)) add_xml_warning (this_file, 753, yyvsp[-3].wstr); ; break;} case 173: #line 1986 "parsutil.y" { /* pop_xml_file switches to old stream */ if (what_are_we_scanning () == entity_replacement_text) pop_xml_file (); xwrap (errdebug (7, "Entity text OK.\n")); ; break;} case 174: #line 1992 "parsutil.y" { my_wchar_t *expan; /* CDATA entities aren't allowed in XML */ add_xml_error (this_file, 821, yyvsp[-3].wstr); if (yyvsp[-1].wstr && validating (this_file)) { /* If built-in, declared correctly? */ check_builtin (this_file, yyvsp[-3].wstr, yyvsp[-1].wstr); /* Can't have internal PErefs */ if (! in_external_dtd_subset (this_file)) if (uni_strchr (yyvsp[-2].wstr, '%')) add_xml_error (this_file, 842, yyvsp[-2].wstr); /* map_entities calls malloc */ expan = map_entities (this_file, yyvsp[-1].wstr, MAP_PARAMETER_ENTITIES | MAP_CHAR_ENTITIES, 0); /* add to entity_names table */ add_eref (this_file, yyvsp[-3].wstr, expan); push_entity_text (this_file, expan, 0); free (expan); } else { expan = utf_8_to_utf_16 (""); push_entity_text (this_file, expan, 0); } if (this_file->standalone == yes && in_external_dtd_subset (this_file)) add_xml_warning (this_file, 753, yyvsp[-3].wstr); ; break;} case 175: #line 2020 "parsutil.y" { /* pop_xml_file switches to old stream */ if (what_are_we_scanning () == entity_replacement_text) pop_xml_file (); xwrap (errdebug (7, "Entity text OK.\n")); ; break;} case 176: #line 2026 "parsutil.y" { struct xml_file *xf; if (! validating (this_file)) { if (yyvsp[-1].xf) free_xml_file (yyvsp[-1].xf); xf = NULL; } else { if ((xf = yyvsp[-1].xf)) { if (add_xml_file_nomerge (this_file, xf) && validating (this_file)) { add_ext_eref (this_file, yyvsp[-2].wstr, xf, MAP_PARAMETER_ENTITIES | MAP_CHAR_ENTITIES); } else { /* we aren't using it; free it */ free_xml_file (xf); xf = NULL; } } } if (! xf) if ((xf = create_xml_file ("/dev/null"))) add_xml_file_nomerge (this_file, xf); if (xf) { /* see below, pop_xml_file() */ push_xml_file (xf, INITIAL); yyvsp[-1].xf = xf; } /* external ent in standalone file */ if (this_file->standalone == yes) add_xml_warning (this_file, 803, yyvsp[-2].wstr); ; break;} case 177: #line 2058 "parsutil.y" { /* pop_xml_file switches to old stream */ if (what_are_we_scanning () == file) pop_xml_file (); if (! yyvsp[-1].i) /* $6 returns false if parse failed */ add_xml_error (this_file, 305, yyvsp[-5].wstr); /* sic; $2 refers to Name above */ xwrap (errdebug (7, "Done ext entity.\n")); ; break;} case 178: #line 2067 "parsutil.y" { /* Unlike SGML, XML needs a SysID here */ add_xml_error (this_file, 820, yyvsp[-2].wstr); ; break;} case 179: #line 2071 "parsutil.y" { char *p; my_wchar_t *sysid; if (validating (this_file)) { if (is_builtin (yyvsp[-3].wstr)) add_xml_error (this_file, 754, yyvsp[-3].wstr); if (yyvsp[-1].wstr) { p = yyvsp[-2].xf ? yyvsp[-2].xf->filename : "(unresolvable URI)"; sysid = utf_8_to_utf_16 (p); /* add to unparsed entity table */ add_uperef (this_file, yyvsp[-3].wstr, yyvsp[-1].wstr, sysid); } if (this_file->standalone == yes && in_external_dtd_subset (this_file)) /* external ent in standalone file */ add_xml_warning (this_file, 753, yyvsp[-3].wstr); } if (yyvsp[-2].xf) /* don't need the external ID file struct */ free_xml_file (yyvsp[-2].xf); ; break;} case 180: #line 2092 "parsutil.y" { /* Unlike SGML, XML needs a SysID here */ add_xml_error (this_file, 820, yyvsp[-3].wstr); ; break;} case 181: #line 2097 "parsutil.y" { check_case (this_file, yyvsp[-1].wstr, no); if (validating (this_file)) yyval.wstr = yyvsp[0].wstr; ; break;} case 182: #line 2102 "parsutil.y" { my_wchar_t *sysid; /* this variable is set in the lexer */ if (validating (this_file)) { if (yyvsp[-2].wstr == NULL) /* error msg already generated */ add_notname (this_file, yyvsp[-3].wstr, yyvsp[-1].wstr); else { /* try to convert pubid to sysid, and * save it; if this fails, use sysid */ sysid = resolve_pubid_as_uri ( this_file, yyvsp[-2].wstr); if (sysid != NULL) add_notname (this_file, yyvsp[-3].wstr, sysid); else { uni_map_whitespace_to_space (yyvsp[-2].wstr); uni_map_spaces_to_space (yyvsp[-2].wstr); add_xml_warning (this_file, 562, yyvsp[-2].wstr); add_notname (this_file, yyvsp[-3].wstr, yyvsp[-1].wstr); } } } ; break;} case 183: #line 2126 "parsutil.y" { /* this variable is set in the lexer */ if (validating (this_file)) { if (yyvsp[-1].wstr == NULL) add_xml_error (this_file, 563, NULL); else { /* add sysid to table literally */ add_notname (this_file, yyvsp[-2].wstr, yyvsp[-1].wstr); } } ; break;} case 184: #line 2137 "parsutil.y" { my_wchar_t *sysid; /* this variable is set in the lexer */ if (validating (this_file)) { if (yyvsp[-1].wstr == NULL) add_xml_error (this_file, 562, NULL); else { /* convert pubid to sysid and add it */ sysid = resolve_pubid_as_uri ( this_file, yyvsp[-1].wstr); if (sysid != NULL) add_notname (this_file, yyvsp[-2].wstr, sysid); else { uni_map_whitespace_to_space (yyvsp[-1].wstr); uni_map_spaces_to_space (yyvsp[-1].wstr); add_xml_warning (this_file, 562, yyvsp[-1].wstr); add_notname (this_file, yyvsp[-2].wstr, yyvsp[-1].wstr); } } } ; break;} case 185: #line 2159 "parsutil.y" { add_xml_error (this_file, 500, yyvsp[-2].wstr); ; break;} case 186: #line 2160 "parsutil.y" { add_xml_error (this_file, 500, yyvsp[-1].wstr); ; break;} case 187: #line 2163 "parsutil.y" { my_wchar_t *tmp; /* line numbers may now be off */ add_xml_error (this_file, 321, NULL); /* generally bogus comment */ tmp = utf_8_to_utf_16 ("