1 #include "XmlParser.hpp"
2 #include <soulng/util/Unicode.hpp>
3 #include <soulng/lexer/TrivialLexer.hpp>
4 #include <soulng/parser/Range.hpp>
5
6
7
8 static const soulng::parser::Range s0[] = {{9, 9} {10, 10} {13, 13} {32, 55295} {57344, 65533} {65536, 1114111}};
9
10 static const soulng::parser::Range s1[] = {{32, 32} {9, 9} {13, 13} {10, 10}};
11
12 static const soulng::parser::Range s2[] = {{58, 58} {65, 90} {95, 95} {97, 122} {192, 214} {216, 246} {248, 767} {880, 893} {895, 8191} {8204, 8205} {8304, 8591} {11264, 12271} {12289, 55295} {63744, 64975} {65008, 65533} {65536, 983039}};
13
14 static const soulng::parser::Range s3[] = {{45, 45} {46, 46} {48, 57} {183, 183} {768, 879} {8255, 8256}};
15
16 static const int s4[] = {60, 63, 120, 109, 108};
17
18 static const int s5[] = {63, 62};
19
20 static const int s6[] = {118, 101, 114, 115, 105, 111, 110};
21
22 static const soulng::parser::Range s7[] = {{48, 57}};
23
24 static const int s8[] = {101, 110, 99, 111, 100, 105, 110, 103};
25
26 static const soulng::parser::Range s9[] = {{65, 90} {97, 122}};
27
28 static const soulng::parser::Range s10[] = {{65, 90} {97, 122} {48, 57} {46, 46} {95, 95} {45, 45}};
29
30 static const int s11[] = {115, 116, 97, 110, 100, 97, 108, 111, 110, 101};
31
32 static const int s12[] = {60, 33, 68, 79, 67, 84, 89, 80, 69};
33
34 static const int s13[] = {83, 89, 83, 84, 69, 77};
35
36 static const int s14[] = {80, 85, 66, 76, 73, 67};
37
38 static const soulng::parser::Range s15[] = {{34, 34}};
39
40 static const soulng::parser::Range s16[] = {{39, 39}};
41
42 static const soulng::parser::Range s17[] = {{32, 32} {13, 13} {10, 10}};
43
44 static const soulng::parser::Range s18[] = {{97, 122} {65, 90} {48, 57}};
45
46 static const soulng::parser::Range s19[] = {{45, 45} {39, 39} {40, 40} {41, 41} {43, 43} {44, 44} {46, 46} {47, 47} {58, 58} {61, 61} {63, 63} {59, 59} {33, 33} {42, 42} {35, 35} {64, 64} {36, 36} {95, 95} {37, 37}};
47
48 static const int s20[] = {60, 33, 69, 76, 69, 77, 69, 78, 84};
49
50 static const int s21[] = {69, 77, 80, 84, 89};
51
52 static const int s22[] = {65, 78, 89};
53
54 static const int s23[] = {35, 80, 67, 68, 65, 84, 65};
55
56 static const int s24[] = {41, 42};
57
58 static const int s25[] = {35, 80, 67, 68, 65, 84, 65};
59
60 static const int s26[] = {60, 33, 65, 84, 84, 76, 73, 83, 84};
61
62 static const int s27[] = {67, 68, 65, 84, 65};
63
64 static const int s28[] = {73, 68};
65
66 static const int s29[] = {73, 68, 82, 69, 70};
67
68 static const int s30[] = {73, 68, 82, 69, 70, 83};
69
70 static const int s31[] = {69, 78, 84, 73, 84, 89};
71
72 static const int s32[] = {69, 78, 84, 73, 84, 73, 69, 83};
73
74 static const int s33[] = {78, 77, 84, 79, 75, 69, 78};
75
76 static const int s34[] = {78, 77, 84, 79, 75, 69, 78, 83};
77
78 static const int s35[] = {78, 79, 84, 65, 84, 73, 79, 78};
79
80 static const int s36[] = {35, 82, 69, 81, 85, 73, 82, 69, 68};
81
82 static const int s37[] = {35, 73, 77, 80, 76, 73, 69, 68};
83
84 static const int s38[] = {35, 70, 73, 88, 69, 68};
85
86 static const int s39[] = {60, 33, 69, 78, 84, 73, 84, 89};
87
88 static const int s40[] = {60, 33, 69, 78, 84, 73, 84, 89};
89
90 static const soulng::parser::Range s41[] = {{37, 37} {38, 38} {34, 34}};
91
92 static const soulng::parser::Range s42[] = {{37, 37} {38, 38} {39, 39}};
93
94 static const int s43[] = {78, 68, 65, 84, 65};
95
96 static const int s44[] = {60, 33, 78, 79, 84, 65, 84, 73, 79, 78};
97
98 static const int s45[] = {80, 85, 66, 76, 73, 67};
99
100 static const int s46[] = {47, 62};
101
102 static const int s47[] = {60, 47};
103
104 static const soulng::parser::Range s48[] = {{60, 60} {38, 38}};
105
106 static const soulng::parser::Range s49[] = {{60, 60} {38, 38}};
107
108 static const int s50[] = {93, 93, 62};
109
110 static const soulng::parser::Range s51[] = {{60, 60} {38, 38}};
111
112 static const int s52[] = {60, 33, 91, 67, 68, 65, 84, 65, 91};
113
114 static const int s53[] = {93, 93, 62};
115
116 static const int s54[] = {93, 93, 62};
117
118 static const soulng::parser::Range s55[] = {{60, 60} {38, 38} {34, 34}};
119
120 static const soulng::parser::Range s56[] = {{60, 60} {38, 38} {39, 39}};
121
122 static const soulng::parser::Range s57[] = {{48, 57}};
123
124 static const soulng::parser::Range s58[] = {{48, 57} {97, 102} {65, 70}};
125
126 static const int s59[] = {38, 35};
127
128 static const int s60[] = {38, 35, 120};
129
130 static const int s61[] = {60, 33, 45, 45};
131
132 static const int s62[] = {45, 45, 62};
133
134 static const int s63[] = {60, 63};
135
136 static const int s64[] = {63, 62};
137
138 static const int s65[] = {63, 62};
139
140 static const soulng::parser::Range s66[] = {{120, 120} {88, 88}};
141
142 static const soulng::parser::Range s67[] = {{109, 109} {77, 77}};
143
144 static const soulng::parser::Range s68[] = {{108, 108} {76, 76}};
145
146 static const int s69[] = {34, 121, 101, 115, 34};
147
148 static const int s70[] = {34, 110, 111, 34};
149
150 using namespace soulng::unicode;
151 using namespace soulng::lexer;
152
153 void XmlParser::Parse(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
154 {
155 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
156
157
158
159
160
161 #endif // SOULNG_PARSER_DEBUG_SUPPORT
162 ++lexer;
163 soulng::lexer::Span span = lexer.GetSpan();
164 soulng::parser::Match match = XmlParser::Document(lexer, processor);
165 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
166
167
168
169
170
171 #endif // SOULNG_PARSER_DEBUG_SUPPORT
172 if (match.hit)
173 {
174 if (*lexer == soulng::lexer::END_TOKEN)
175 {
176 return;
177 }
178 else
179 {
180 lexer.ThrowExpectationFailure(lexer.GetSpan(), ToUtf32(soulng::lexer::GetEndTokenInfo()));
181 }
182 }
183 else
184 {
185 lexer.ThrowExpectationFailure(span, U"Document");
186 }
187 return;
188 }
189
190 soulng::parser::Match XmlParser::Document(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
191 {
192 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
193
194
195
196
197
198
199
200 #endif // SOULNG_PARSER_DEBUG_SUPPORT
201 soulng::parser::Match match(false);
202 soulng::parser::Match* parentMatch0 = &match;
203 {
204 soulng::parser::Match match(false);
205 soulng::parser::Match* parentMatch1 = &match;
206 {
207 int64_t pos = lexer.GetPos();
208 soulng::parser::Match match(true);
209 if (match.hit)
210 {
211 processor->StartDocument();
212 }
213 *parentMatch1 = match;
214 }
215 *parentMatch0 = match;
216 }
217 if (match.hit)
218 {
219 soulng::parser::Match match(false);
220 soulng::parser::Match* parentMatch2 = &match;
221 {
222 soulng::parser::Match match(false);
223 soulng::parser::Match* parentMatch3 = &match;
224 {
225 int64_t pos = lexer.GetPos();
226 soulng::parser::Match match(false);
227 soulng::parser::Match* parentMatch4 = &match;
228 {
229 soulng::parser::Match match(false);
230 soulng::parser::Match* parentMatch5 = &match;
231 {
232 soulng::parser::Match match(false);
233 soulng::parser::Match* parentMatch6 = &match;
234 {
235 soulng::parser::Match match = XmlParser::Prolog(lexer, processor);
236 *parentMatch6 = match;
237 }
238 if (match.hit)
239 {
240 soulng::parser::Match match(false);
241 soulng::parser::Match* parentMatch7 = &match;
242 {
243 soulng::parser::Match match = XmlParser::Element(lexer, processor);
244 *parentMatch7 = match;
245 }
246 *parentMatch6 = match;
247 }
248 *parentMatch5 = match;
249 }
250 if (match.hit)
251 {
252 soulng::parser::Match match(false);
253 soulng::parser::Match* parentMatch8 = &match;
254 {
255 soulng::parser::Match match(true);
256 soulng::parser::Match* parentMatch9 = &match;
257 {
258 while (true)
259 {
260 int64_t save = lexer.GetPos();
261 {
262 soulng::parser::Match match(false);
263 soulng::parser::Match* parentMatch10 = &match;
264 {
265 soulng::parser::Match match = XmlParser::Misc(lexer, processor);
266 *parentMatch10 = match;
267 }
268 if (match.hit)
269 {
270 *parentMatch9 = match;
271 }
272 else
273 {
274 lexer.SetPos(save);
275 break;
276 }
277 }
278 }
279 }
280 *parentMatch8 = match;
281 }
282 *parentMatch5 = match;
283 }
284 *parentMatch4 = match;
285 }
286 if (match.hit)
287 {
288 processor->EndDocument();
289 }
290 *parentMatch3 = match;
291 }
292 *parentMatch2 = match;
293 }
294 *parentMatch0 = match;
295 }
296 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
297
298
299
300
301
302 #endif // SOULNG_PARSER_DEBUG_SUPPORT
303 if (!match.hit)
304 {
305 match.value = nullptr;
306 }
307 return match;
308 }
309
310 soulng::parser::Match XmlParser::Char(TrivialLexer& lexer)
311 {
312 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
313
314
315
316
317
318
319
320 #endif // SOULNG_PARSER_DEBUG_SUPPORT
321 soulng::parser::Match match(false);
322 soulng::parser::Match* parentMatch0 = &match;
323 {
324 int64_t pos = lexer.GetPos();
325 soulng::parser::Match match(false);
326 soulng::parser::Match* parentMatch1 = &match;
327 {
328 soulng::parser::Match match(false);
329 for (const soulng::parser::Range& range : s0)
330 {
331 if (*lexer >= range.first && *lexer <= range.last)
332 {
333 match.hit = true;
334 ++lexer;
335 break;
336 }
337 }
338 *parentMatch1 = match;
339 }
340 if (match.hit)
341 {
342 Token token = lexer.GetToken(pos);
343 {
344 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
345
346 #endif // SOULNG_PARSER_DEBUG_SUPPORT
347 return soulng::parser::Match(true, new soulng::parser::Value<char32_t>(static_cast<char32_t>(token.id)));
348 }
349 }
350 *parentMatch0 = match;
351 }
352 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
353
354
355
356
357
358 #endif // SOULNG_PARSER_DEBUG_SUPPORT
359 if (!match.hit)
360 {
361 match.value = nullptr;
362 }
363 return match;
364 }
365
366 soulng::parser::Match XmlParser::S(TrivialLexer& lexer)
367 {
368 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
369
370
371
372
373
374
375
376 #endif // SOULNG_PARSER_DEBUG_SUPPORT
377 soulng::parser::Match match(false);
378 soulng::parser::Match* parentMatch0 = &match;
379 {
380 soulng::parser::Match match(false);
381 for (const soulng::parser::Range& range : s1)
382 {
383 if (*lexer >= range.first && *lexer <= range.last)
384 {
385 match.hit = true;
386 ++lexer;
387 break;
388 }
389 }
390 *parentMatch0 = match;
391 }
392 if (match.hit)
393 {
394 soulng::parser::Match match(true);
395 soulng::parser::Match* parentMatch1 = &match;
396 while (true)
397 {
398 int64_t save = lexer.GetPos();
399 {
400 soulng::parser::Match match(false);
401 for (const soulng::parser::Range& range : s1)
402 {
403 if (*lexer >= range.first && *lexer <= range.last)
404 {
405 match.hit = true;
406 ++lexer;
407 break;
408 }
409 }
410 if (match.hit)
411 {
412 *parentMatch1 = match;
413 }
414 else
415 {
416 lexer.SetPos(save);
417 break;
418 }
419 }
420 }
421 }
422 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
423
424
425
426
427
428 #endif // SOULNG_PARSER_DEBUG_SUPPORT
429 if (!match.hit)
430 {
431 match.value = nullptr;
432 }
433 return match;
434 }
435
436 soulng::parser::Match XmlParser::NameStartChar(TrivialLexer& lexer)
437 {
438 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
439
440
441
442
443
444
445
446 #endif // SOULNG_PARSER_DEBUG_SUPPORT
447 soulng::parser::Match match(false);
448 for (const soulng::parser::Range& range : s2)
449 {
450 if (*lexer >= range.first && *lexer <= range.last)
451 {
452 match.hit = true;
453 ++lexer;
454 break;
455 }
456 }
457 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
458
459
460
461
462
463 #endif // SOULNG_PARSER_DEBUG_SUPPORT
464 if (!match.hit)
465 {
466 match.value = nullptr;
467 }
468 return match;
469 }
470
471 soulng::parser::Match XmlParser::NameChar(TrivialLexer& lexer)
472 {
473 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
474
475
476
477
478
479
480
481 #endif // SOULNG_PARSER_DEBUG_SUPPORT
482 soulng::parser::Match match(false);
483 soulng::parser::Match* parentMatch0 = &match;
484 {
485 int64_t save = lexer.GetPos();
486 soulng::parser::Match match = XmlParser::NameStartChar(lexer);
487 *parentMatch0 = match;
488 if (!match.hit)
489 {
490 soulng::parser::Match match(false);
491 soulng::parser::Match* parentMatch1 = &match;
492 lexer.SetPos(save);
493 {
494 soulng::parser::Match match(false);
495 for (const soulng::parser::Range& range : s3)
496 {
497 if (*lexer >= range.first && *lexer <= range.last)
498 {
499 match.hit = true;
500 ++lexer;
501 break;
502 }
503 }
504 *parentMatch1 = match;
505 }
506 *parentMatch0 = match;
507 }
508 }
509 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
510
511
512
513
514
515 #endif // SOULNG_PARSER_DEBUG_SUPPORT
516 if (!match.hit)
517 {
518 match.value = nullptr;
519 }
520 return match;
521 }
522
523 soulng::parser::Match XmlParser::Name(TrivialLexer& lexer)
524 {
525 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
526
527
528
529
530
531
532
533 #endif // SOULNG_PARSER_DEBUG_SUPPORT
534 Span s = Span();
535 soulng::parser::Match match(false);
536 soulng::parser::Match* parentMatch0 = &match;
537 {
538 int64_t pos = lexer.GetPos();
539 soulng::parser::Match match(false);
540 soulng::parser::Match* parentMatch1 = &match;
541 {
542 soulng::parser::Match match(false);
543 soulng::parser::Match* parentMatch2 = &match;
544 {
545 soulng::parser::Match match(false);
546 soulng::parser::Match* parentMatch3 = &match;
547 {
548 int64_t pos = lexer.GetPos();
549 soulng::lexer::Span span = lexer.GetSpan();
550 soulng::parser::Match match = XmlParser::NameStartChar(lexer);
551 if (match.hit)
552 {
553 s = span;
554 }
555 *parentMatch3 = match;
556 }
557 *parentMatch2 = match;
558 }
559 if (match.hit)
560 {
561 soulng::parser::Match match(false);
562 soulng::parser::Match* parentMatch4 = &match;
563 {
564 soulng::parser::Match match(true);
565 soulng::parser::Match* parentMatch5 = &match;
566 {
567 while (true)
568 {
569 int64_t save = lexer.GetPos();
570 {
571 soulng::parser::Match match(false);
572 soulng::parser::Match* parentMatch6 = &match;
573 {
574 soulng::parser::Match match(false);
575 soulng::parser::Match* parentMatch7 = &match;
576 {
577 int64_t pos = lexer.GetPos();
578 soulng::lexer::Span span = lexer.GetSpan();
579 soulng::parser::Match match = XmlParser::NameChar(lexer);
580 if (match.hit)
581 {
582 s.end = span.end;
583 }
584 *parentMatch7 = match;
585 }
586 *parentMatch6 = match;
587 }
588 if (match.hit)
589 {
590 *parentMatch5 = match;
591 }
592 else
593 {
594 lexer.SetPos(save);
595 break;
596 }
597 }
598 }
599 }
600 *parentMatch4 = match;
601 }
602 *parentMatch2 = match;
603 }
604 *parentMatch1 = match;
605 }
606 if (match.hit)
607 {
608 {
609 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
610
611 #endif // SOULNG_PARSER_DEBUG_SUPPORT
612 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(lexer.GetMatch(s)));
613 }
614 }
615 *parentMatch0 = match;
616 }
617 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
618
619
620
621
622
623 #endif // SOULNG_PARSER_DEBUG_SUPPORT
624 if (!match.hit)
625 {
626 match.value = nullptr;
627 }
628 return match;
629 }
630
631 soulng::parser::Match XmlParser::Names(TrivialLexer& lexer)
632 {
633 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
634
635
636
637
638
639
640
641 #endif // SOULNG_PARSER_DEBUG_SUPPORT
642 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name1;
643 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name2;
644 soulng::parser::Match match(false);
645 soulng::parser::Match* parentMatch0 = &match;
646 {
647 soulng::parser::Match match = XmlParser::Name(lexer);
648 name1.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
649 *parentMatch0 = match;
650 }
651 if (match.hit)
652 {
653 soulng::parser::Match match(false);
654 soulng::parser::Match* parentMatch1 = &match;
655 {
656 soulng::parser::Match match(true);
657 soulng::parser::Match* parentMatch2 = &match;
658 {
659 while (true)
660 {
661 int64_t save = lexer.GetPos();
662 {
663 soulng::parser::Match match(false);
664 soulng::parser::Match* parentMatch3 = &match;
665 {
666 soulng::parser::Match match(false);
667 soulng::parser::Match* parentMatch4 = &match;
668 {
669 soulng::parser::Match match(false);
670 if (*lexer == 32)
671 {
672 ++lexer;
673 match.hit = true;
674 }
675 *parentMatch4 = match;
676 }
677 if (match.hit)
678 {
679 soulng::parser::Match match(false);
680 soulng::parser::Match* parentMatch5 = &match;
681 {
682 soulng::parser::Match match = XmlParser::Name(lexer);
683 name2.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
684 *parentMatch5 = match;
685 }
686 *parentMatch4 = match;
687 }
688 *parentMatch3 = match;
689 }
690 if (match.hit)
691 {
692 *parentMatch2 = match;
693 }
694 else
695 {
696 lexer.SetPos(save);
697 break;
698 }
699 }
700 }
701 }
702 *parentMatch1 = match;
703 }
704 *parentMatch0 = match;
705 }
706 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
707
708
709
710
711
712 #endif // SOULNG_PARSER_DEBUG_SUPPORT
713 if (!match.hit)
714 {
715 match.value = nullptr;
716 }
717 return match;
718 }
719
720 soulng::parser::Match XmlParser::Nmtoken(TrivialLexer& lexer)
721 {
722 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
723
724
725
726
727
728
729
730 #endif // SOULNG_PARSER_DEBUG_SUPPORT
731 soulng::parser::Match match(false);
732 soulng::parser::Match* parentMatch0 = &match;
733 {
734 soulng::parser::Match match = XmlParser::NameChar(lexer);
735 *parentMatch0 = match;
736 }
737 if (match.hit)
738 {
739 soulng::parser::Match match(true);
740 soulng::parser::Match* parentMatch1 = &match;
741 while (true)
742 {
743 int64_t save = lexer.GetPos();
744 {
745 soulng::parser::Match match = XmlParser::NameChar(lexer);
746 if (match.hit)
747 {
748 *parentMatch1 = match;
749 }
750 else
751 {
752 lexer.SetPos(save);
753 break;
754 }
755 }
756 }
757 }
758 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
759
760
761
762
763
764 #endif // SOULNG_PARSER_DEBUG_SUPPORT
765 if (!match.hit)
766 {
767 match.value = nullptr;
768 }
769 return match;
770 }
771
772 soulng::parser::Match XmlParser::Nmtokens(TrivialLexer& lexer)
773 {
774 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
775
776
777
778
779
780
781
782 #endif // SOULNG_PARSER_DEBUG_SUPPORT
783 soulng::parser::Match match(false);
784 soulng::parser::Match* parentMatch0 = &match;
785 {
786 soulng::parser::Match match = XmlParser::Nmtoken(lexer);
787 *parentMatch0 = match;
788 }
789 if (match.hit)
790 {
791 soulng::parser::Match match(false);
792 soulng::parser::Match* parentMatch1 = &match;
793 {
794 soulng::parser::Match match(true);
795 soulng::parser::Match* parentMatch2 = &match;
796 {
797 while (true)
798 {
799 int64_t save = lexer.GetPos();
800 {
801 soulng::parser::Match match(false);
802 soulng::parser::Match* parentMatch3 = &match;
803 {
804 soulng::parser::Match match(false);
805 soulng::parser::Match* parentMatch4 = &match;
806 {
807 soulng::parser::Match match(false);
808 if (*lexer == 32)
809 {
810 ++lexer;
811 match.hit = true;
812 }
813 *parentMatch4 = match;
814 }
815 if (match.hit)
816 {
817 soulng::parser::Match match(false);
818 soulng::parser::Match* parentMatch5 = &match;
819 {
820 soulng::parser::Match match = XmlParser::Nmtoken(lexer);
821 *parentMatch5 = match;
822 }
823 *parentMatch4 = match;
824 }
825 *parentMatch3 = match;
826 }
827 if (match.hit)
828 {
829 *parentMatch2 = match;
830 }
831 else
832 {
833 lexer.SetPos(save);
834 break;
835 }
836 }
837 }
838 }
839 *parentMatch1 = match;
840 }
841 *parentMatch0 = match;
842 }
843 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
844
845
846
847
848
849 #endif // SOULNG_PARSER_DEBUG_SUPPORT
850 if (!match.hit)
851 {
852 match.value = nullptr;
853 }
854 return match;
855 }
856
857 soulng::parser::Match XmlParser::Prolog(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
858 {
859 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
860
861
862
863
864
865
866
867 #endif // SOULNG_PARSER_DEBUG_SUPPORT
868 soulng::parser::Match match(false);
869 soulng::parser::Match* parentMatch0 = &match;
870 {
871 soulng::parser::Match match(false);
872 soulng::parser::Match* parentMatch1 = &match;
873 {
874 soulng::parser::Match match(true);
875 int64_t save = lexer.GetPos();
876 soulng::parser::Match* parentMatch2 = &match;
877 {
878 soulng::parser::Match match = XmlParser::XMLDecl(lexer, processor);
879 if (match.hit)
880 {
881 *parentMatch2 = match;
882 }
883 else
884 {
885 lexer.SetPos(save);
886 }
887 }
888 *parentMatch1 = match;
889 }
890 if (match.hit)
891 {
892 soulng::parser::Match match(false);
893 soulng::parser::Match* parentMatch3 = &match;
894 {
895 soulng::parser::Match match(true);
896 soulng::parser::Match* parentMatch4 = &match;
897 {
898 while (true)
899 {
900 int64_t save = lexer.GetPos();
901 {
902 soulng::parser::Match match = XmlParser::Misc(lexer, processor);
903 if (match.hit)
904 {
905 *parentMatch4 = match;
906 }
907 else
908 {
909 lexer.SetPos(save);
910 break;
911 }
912 }
913 }
914 }
915 *parentMatch3 = match;
916 }
917 *parentMatch1 = match;
918 }
919 *parentMatch0 = match;
920 }
921 if (match.hit)
922 {
923 soulng::parser::Match match(false);
924 soulng::parser::Match* parentMatch5 = &match;
925 {
926 soulng::parser::Match match(true);
927 int64_t save = lexer.GetPos();
928 soulng::parser::Match* parentMatch6 = &match;
929 {
930 soulng::parser::Match match(false);
931 soulng::parser::Match* parentMatch7 = &match;
932 {
933 soulng::parser::Match match(false);
934 soulng::parser::Match* parentMatch8 = &match;
935 {
936 soulng::parser::Match match = XmlParser::DocTypeDecl(lexer, processor);
937 *parentMatch8 = match;
938 }
939 if (match.hit)
940 {
941 soulng::parser::Match match(false);
942 soulng::parser::Match* parentMatch9 = &match;
943 {
944 soulng::parser::Match match(true);
945 soulng::parser::Match* parentMatch10 = &match;
946 {
947 while (true)
948 {
949 int64_t save = lexer.GetPos();
950 {
951 soulng::parser::Match match = XmlParser::Misc(lexer, processor);
952 if (match.hit)
953 {
954 *parentMatch10 = match;
955 }
956 else
957 {
958 lexer.SetPos(save);
959 break;
960 }
961 }
962 }
963 }
964 *parentMatch9 = match;
965 }
966 *parentMatch8 = match;
967 }
968 *parentMatch7 = match;
969 }
970 if (match.hit)
971 {
972 *parentMatch6 = match;
973 }
974 else
975 {
976 lexer.SetPos(save);
977 }
978 }
979 *parentMatch5 = match;
980 }
981 *parentMatch0 = match;
982 }
983 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
984
985
986
987
988
989 #endif // SOULNG_PARSER_DEBUG_SUPPORT
990 if (!match.hit)
991 {
992 match.value = nullptr;
993 }
994 return match;
995 }
996
997 soulng::parser::Match XmlParser::XMLDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
998 {
999 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1000
1001
1002
1003
1004
1005
1006
1007 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1008 soulng::parser::Match match(false);
1009 soulng::parser::Match* parentMatch0 = &match;
1010 {
1011 soulng::parser::Match match(false);
1012 soulng::parser::Match* parentMatch1 = &match;
1013 {
1014 soulng::parser::Match match(false);
1015 soulng::parser::Match* parentMatch2 = &match;
1016 {
1017 soulng::parser::Match match(false);
1018 soulng::parser::Match* parentMatch3 = &match;
1019 {
1020 soulng::parser::Match match(false);
1021 soulng::parser::Match* parentMatch4 = &match;
1022 {
1023 soulng::parser::Match match(true);
1024 for (int i : s4)
1025 {
1026 if (*lexer == i)
1027 {
1028 ++lexer;
1029 }
1030 else
1031 {
1032 match.hit = false;
1033 break;
1034 }
1035 }
1036 *parentMatch4 = match;
1037 }
1038 if (match.hit)
1039 {
1040 soulng::parser::Match match(false);
1041 soulng::parser::Match* parentMatch5 = &match;
1042 {
1043 soulng::parser::Match match = XmlParser::VersionInfo(lexer, processor);
1044 *parentMatch5 = match;
1045 }
1046 *parentMatch4 = match;
1047 }
1048 *parentMatch3 = match;
1049 }
1050 if (match.hit)
1051 {
1052 soulng::parser::Match match(false);
1053 soulng::parser::Match* parentMatch6 = &match;
1054 {
1055 soulng::parser::Match match(true);
1056 int64_t save = lexer.GetPos();
1057 soulng::parser::Match* parentMatch7 = &match;
1058 {
1059 soulng::parser::Match match = XmlParser::EncodingDecl(lexer, processor);
1060 if (match.hit)
1061 {
1062 *parentMatch7 = match;
1063 }
1064 else
1065 {
1066 lexer.SetPos(save);
1067 }
1068 }
1069 *parentMatch6 = match;
1070 }
1071 *parentMatch3 = match;
1072 }
1073 *parentMatch2 = match;
1074 }
1075 if (match.hit)
1076 {
1077 soulng::parser::Match match(false);
1078 soulng::parser::Match* parentMatch8 = &match;
1079 {
1080 soulng::parser::Match match(true);
1081 int64_t save = lexer.GetPos();
1082 soulng::parser::Match* parentMatch9 = &match;
1083 {
1084 soulng::parser::Match match = XmlParser::SDDecl(lexer, processor);
1085 if (match.hit)
1086 {
1087 *parentMatch9 = match;
1088 }
1089 else
1090 {
1091 lexer.SetPos(save);
1092 }
1093 }
1094 *parentMatch8 = match;
1095 }
1096 *parentMatch2 = match;
1097 }
1098 *parentMatch1 = match;
1099 }
1100 if (match.hit)
1101 {
1102 soulng::parser::Match match(false);
1103 soulng::parser::Match* parentMatch10 = &match;
1104 {
1105 soulng::parser::Match match(true);
1106 int64_t save = lexer.GetPos();
1107 soulng::parser::Match* parentMatch11 = &match;
1108 {
1109 soulng::parser::Match match = XmlParser::S(lexer);
1110 if (match.hit)
1111 {
1112 *parentMatch11 = match;
1113 }
1114 else
1115 {
1116 lexer.SetPos(save);
1117 }
1118 }
1119 *parentMatch10 = match;
1120 }
1121 *parentMatch1 = match;
1122 }
1123 *parentMatch0 = match;
1124 }
1125 if (match.hit)
1126 {
1127 soulng::parser::Match match(false);
1128 soulng::parser::Match* parentMatch12 = &match;
1129 {
1130 soulng::parser::Match match(true);
1131 for (int i : s5)
1132 {
1133 if (*lexer == i)
1134 {
1135 ++lexer;
1136 }
1137 else
1138 {
1139 match.hit = false;
1140 break;
1141 }
1142 }
1143 *parentMatch12 = match;
1144 }
1145 *parentMatch0 = match;
1146 }
1147 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1148
1149
1150
1151
1152
1153 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1154 if (!match.hit)
1155 {
1156 match.value = nullptr;
1157 }
1158 return match;
1159 }
1160
1161 soulng::parser::Match XmlParser::VersionInfo(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1162 {
1163 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1164
1165
1166
1167
1168
1169
1170
1171 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1172 soulng::parser::Match match(false);
1173 soulng::parser::Match* parentMatch0 = &match;
1174 {
1175 soulng::parser::Match match(false);
1176 soulng::parser::Match* parentMatch1 = &match;
1177 {
1178 soulng::parser::Match match(false);
1179 soulng::parser::Match* parentMatch2 = &match;
1180 {
1181 soulng::parser::Match match = XmlParser::S(lexer);
1182 *parentMatch2 = match;
1183 }
1184 if (match.hit)
1185 {
1186 soulng::parser::Match match(false);
1187 soulng::parser::Match* parentMatch3 = &match;
1188 {
1189 soulng::parser::Match match(true);
1190 for (int i : s6)
1191 {
1192 if (*lexer == i)
1193 {
1194 ++lexer;
1195 }
1196 else
1197 {
1198 match.hit = false;
1199 break;
1200 }
1201 }
1202 *parentMatch3 = match;
1203 }
1204 *parentMatch2 = match;
1205 }
1206 *parentMatch1 = match;
1207 }
1208 if (match.hit)
1209 {
1210 soulng::parser::Match match(false);
1211 soulng::parser::Match* parentMatch4 = &match;
1212 {
1213 soulng::parser::Match match = XmlParser::Eq(lexer);
1214 *parentMatch4 = match;
1215 }
1216 *parentMatch1 = match;
1217 }
1218 *parentMatch0 = match;
1219 }
1220 if (match.hit)
1221 {
1222 soulng::parser::Match match(false);
1223 soulng::parser::Match* parentMatch5 = &match;
1224 {
1225 soulng::parser::Match match = XmlParser::VersionNumber(lexer, processor);
1226 *parentMatch5 = match;
1227 }
1228 *parentMatch0 = match;
1229 }
1230 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1231
1232
1233
1234
1235
1236 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1237 if (!match.hit)
1238 {
1239 match.value = nullptr;
1240 }
1241 return match;
1242 }
1243
1244 soulng::parser::Match XmlParser::VersionNum(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1245 {
1246 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1247
1248
1249
1250
1251
1252
1253
1254 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1255 Span s = Span();
1256 soulng::parser::Match match(false);
1257 soulng::parser::Match* parentMatch0 = &match;
1258 {
1259 int64_t pos = lexer.GetPos();
1260 soulng::parser::Match match(false);
1261 soulng::parser::Match* parentMatch1 = &match;
1262 {
1263 soulng::parser::Match match(false);
1264 soulng::parser::Match* parentMatch2 = &match;
1265 {
1266 soulng::parser::Match match(false);
1267 soulng::parser::Match* parentMatch3 = &match;
1268 {
1269 soulng::parser::Match match(false);
1270 soulng::parser::Match* parentMatch4 = &match;
1271 {
1272 int64_t pos = lexer.GetPos();
1273 soulng::lexer::Span span = lexer.GetSpan();
1274 soulng::parser::Match match(false);
1275 if (*lexer == 49)
1276 {
1277 ++lexer;
1278 match.hit = true;
1279 }
1280 if (match.hit)
1281 {
1282 s = span;
1283 }
1284 *parentMatch4 = match;
1285 }
1286 *parentMatch3 = match;
1287 }
1288 if (match.hit)
1289 {
1290 soulng::parser::Match match(false);
1291 soulng::parser::Match* parentMatch5 = &match;
1292 {
1293 soulng::parser::Match match(false);
1294 if (*lexer == 46)
1295 {
1296 ++lexer;
1297 match.hit = true;
1298 }
1299 *parentMatch5 = match;
1300 }
1301 *parentMatch3 = match;
1302 }
1303 *parentMatch2 = match;
1304 }
1305 if (match.hit)
1306 {
1307 soulng::parser::Match match(false);
1308 soulng::parser::Match* parentMatch6 = &match;
1309 {
1310 soulng::parser::Match match(false);
1311 soulng::parser::Match* parentMatch7 = &match;
1312 {
1313 soulng::parser::Match match(false);
1314 soulng::parser::Match* parentMatch8 = &match;
1315 {
1316 soulng::parser::Match match(false);
1317 soulng::parser::Match* parentMatch9 = &match;
1318 {
1319 int64_t pos = lexer.GetPos();
1320 soulng::lexer::Span span = lexer.GetSpan();
1321 soulng::parser::Match match(false);
1322 for (const soulng::parser::Range& range : s7)
1323 {
1324 if (*lexer >= range.first && *lexer <= range.last)
1325 {
1326 match.hit = true;
1327 ++lexer;
1328 break;
1329 }
1330 }
1331 if (match.hit)
1332 {
1333 s.end = span.end;
1334 }
1335 *parentMatch9 = match;
1336 }
1337 *parentMatch8 = match;
1338 }
1339 *parentMatch7 = match;
1340 }
1341 if (match.hit)
1342 {
1343 soulng::parser::Match match(true);
1344 soulng::parser::Match* parentMatch10 = &match;
1345 while (true)
1346 {
1347 int64_t save = lexer.GetPos();
1348 {
1349 soulng::parser::Match match(false);
1350 soulng::parser::Match* parentMatch11 = &match;
1351 {
1352 soulng::parser::Match match(false);
1353 soulng::parser::Match* parentMatch12 = &match;
1354 {
1355 int64_t pos = lexer.GetPos();
1356 soulng::lexer::Span span = lexer.GetSpan();
1357 soulng::parser::Match match(false);
1358 for (const soulng::parser::Range& range : s7)
1359 {
1360 if (*lexer >= range.first && *lexer <= range.last)
1361 {
1362 match.hit = true;
1363 ++lexer;
1364 break;
1365 }
1366 }
1367 if (match.hit)
1368 {
1369 s.end = span.end;
1370 }
1371 *parentMatch12 = match;
1372 }
1373 *parentMatch11 = match;
1374 }
1375 if (match.hit)
1376 {
1377 *parentMatch10 = match;
1378 }
1379 else
1380 {
1381 lexer.SetPos(save);
1382 break;
1383 }
1384 }
1385 }
1386 }
1387 *parentMatch6 = match;
1388 }
1389 *parentMatch2 = match;
1390 }
1391 *parentMatch1 = match;
1392 }
1393 if (match.hit)
1394 {
1395 processor->Version(lexer.GetMatch(s));
1396 }
1397 *parentMatch0 = match;
1398 }
1399 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1400
1401
1402
1403
1404
1405 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1406 if (!match.hit)
1407 {
1408 match.value = nullptr;
1409 }
1410 return match;
1411 }
1412
1413 soulng::parser::Match XmlParser::VersionNumDQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1414 {
1415 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1416
1417
1418
1419
1420
1421
1422
1423 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1424 soulng::parser::Match match(false);
1425 soulng::parser::Match* parentMatch0 = &match;
1426 {
1427 soulng::parser::Match match(false);
1428 soulng::parser::Match* parentMatch1 = &match;
1429 {
1430 soulng::parser::Match match(false);
1431 if (*lexer == 34)
1432 {
1433 ++lexer;
1434 match.hit = true;
1435 }
1436 *parentMatch1 = match;
1437 }
1438 if (match.hit)
1439 {
1440 soulng::parser::Match match(false);
1441 soulng::parser::Match* parentMatch2 = &match;
1442 {
1443 soulng::parser::Match match = XmlParser::VersionNum(lexer, processor);
1444 *parentMatch2 = match;
1445 }
1446 *parentMatch1 = match;
1447 }
1448 *parentMatch0 = match;
1449 }
1450 if (match.hit)
1451 {
1452 soulng::parser::Match match(false);
1453 soulng::parser::Match* parentMatch3 = &match;
1454 {
1455 soulng::parser::Match match(false);
1456 if (*lexer == 34)
1457 {
1458 ++lexer;
1459 match.hit = true;
1460 }
1461 *parentMatch3 = match;
1462 }
1463 *parentMatch0 = match;
1464 }
1465 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1466
1467
1468
1469
1470
1471 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1472 if (!match.hit)
1473 {
1474 match.value = nullptr;
1475 }
1476 return match;
1477 }
1478
1479 soulng::parser::Match XmlParser::VersionNumSQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1480 {
1481 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1482
1483
1484
1485
1486
1487
1488
1489 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1490 soulng::parser::Match match(false);
1491 soulng::parser::Match* parentMatch0 = &match;
1492 {
1493 soulng::parser::Match match(false);
1494 soulng::parser::Match* parentMatch1 = &match;
1495 {
1496 soulng::parser::Match match(false);
1497 if (*lexer == 39)
1498 {
1499 ++lexer;
1500 match.hit = true;
1501 }
1502 *parentMatch1 = match;
1503 }
1504 if (match.hit)
1505 {
1506 soulng::parser::Match match(false);
1507 soulng::parser::Match* parentMatch2 = &match;
1508 {
1509 soulng::parser::Match match = XmlParser::VersionNum(lexer, processor);
1510 *parentMatch2 = match;
1511 }
1512 *parentMatch1 = match;
1513 }
1514 *parentMatch0 = match;
1515 }
1516 if (match.hit)
1517 {
1518 soulng::parser::Match match(false);
1519 soulng::parser::Match* parentMatch3 = &match;
1520 {
1521 soulng::parser::Match match(false);
1522 if (*lexer == 39)
1523 {
1524 ++lexer;
1525 match.hit = true;
1526 }
1527 *parentMatch3 = match;
1528 }
1529 *parentMatch0 = match;
1530 }
1531 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1532
1533
1534
1535
1536
1537 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1538 if (!match.hit)
1539 {
1540 match.value = nullptr;
1541 }
1542 return match;
1543 }
1544
1545 soulng::parser::Match XmlParser::VersionNumber(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1546 {
1547 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1548
1549
1550
1551
1552
1553
1554
1555 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1556 soulng::parser::Match match(false);
1557 soulng::parser::Match* parentMatch0 = &match;
1558 {
1559 int64_t save = lexer.GetPos();
1560 soulng::parser::Match match = XmlParser::VersionNumDQ(lexer, processor);
1561 *parentMatch0 = match;
1562 if (!match.hit)
1563 {
1564 soulng::parser::Match match(false);
1565 soulng::parser::Match* parentMatch1 = &match;
1566 lexer.SetPos(save);
1567 {
1568 soulng::parser::Match match = XmlParser::VersionNumSQ(lexer, processor);
1569 *parentMatch1 = match;
1570 }
1571 *parentMatch0 = match;
1572 }
1573 }
1574 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1575
1576
1577
1578
1579
1580 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1581 if (!match.hit)
1582 {
1583 match.value = nullptr;
1584 }
1585 return match;
1586 }
1587
1588 soulng::parser::Match XmlParser::EncodingDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1589 {
1590 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1591
1592
1593
1594
1595
1596
1597
1598 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1599 soulng::parser::Match match(false);
1600 soulng::parser::Match* parentMatch0 = &match;
1601 {
1602 soulng::parser::Match match(false);
1603 soulng::parser::Match* parentMatch1 = &match;
1604 {
1605 soulng::parser::Match match(false);
1606 soulng::parser::Match* parentMatch2 = &match;
1607 {
1608 soulng::parser::Match match = XmlParser::S(lexer);
1609 *parentMatch2 = match;
1610 }
1611 if (match.hit)
1612 {
1613 soulng::parser::Match match(false);
1614 soulng::parser::Match* parentMatch3 = &match;
1615 {
1616 soulng::parser::Match match(true);
1617 for (int i : s8)
1618 {
1619 if (*lexer == i)
1620 {
1621 ++lexer;
1622 }
1623 else
1624 {
1625 match.hit = false;
1626 break;
1627 }
1628 }
1629 *parentMatch3 = match;
1630 }
1631 *parentMatch2 = match;
1632 }
1633 *parentMatch1 = match;
1634 }
1635 if (match.hit)
1636 {
1637 soulng::parser::Match match(false);
1638 soulng::parser::Match* parentMatch4 = &match;
1639 {
1640 soulng::parser::Match match = XmlParser::Eq(lexer);
1641 *parentMatch4 = match;
1642 }
1643 *parentMatch1 = match;
1644 }
1645 *parentMatch0 = match;
1646 }
1647 if (match.hit)
1648 {
1649 soulng::parser::Match match(false);
1650 soulng::parser::Match* parentMatch5 = &match;
1651 {
1652 soulng::parser::Match match = XmlParser::EncName(lexer, processor);
1653 *parentMatch5 = match;
1654 }
1655 *parentMatch0 = match;
1656 }
1657 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1658
1659
1660
1661
1662
1663 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1664 if (!match.hit)
1665 {
1666 match.value = nullptr;
1667 }
1668 return match;
1669 }
1670
1671 soulng::parser::Match XmlParser::EncodingName(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1672 {
1673 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1674
1675
1676
1677
1678
1679
1680
1681 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1682 Span s = Span();
1683 soulng::parser::Match match(false);
1684 soulng::parser::Match* parentMatch0 = &match;
1685 {
1686 int64_t pos = lexer.GetPos();
1687 soulng::parser::Match match(false);
1688 soulng::parser::Match* parentMatch1 = &match;
1689 {
1690 soulng::parser::Match match(false);
1691 soulng::parser::Match* parentMatch2 = &match;
1692 {
1693 soulng::parser::Match match(false);
1694 soulng::parser::Match* parentMatch3 = &match;
1695 {
1696 int64_t pos = lexer.GetPos();
1697 soulng::lexer::Span span = lexer.GetSpan();
1698 soulng::parser::Match match(false);
1699 for (const soulng::parser::Range& range : s9)
1700 {
1701 if (*lexer >= range.first && *lexer <= range.last)
1702 {
1703 match.hit = true;
1704 ++lexer;
1705 break;
1706 }
1707 }
1708 if (match.hit)
1709 {
1710 s = span;
1711 }
1712 *parentMatch3 = match;
1713 }
1714 *parentMatch2 = match;
1715 }
1716 if (match.hit)
1717 {
1718 soulng::parser::Match match(false);
1719 soulng::parser::Match* parentMatch4 = &match;
1720 {
1721 soulng::parser::Match match(true);
1722 soulng::parser::Match* parentMatch5 = &match;
1723 {
1724 while (true)
1725 {
1726 int64_t save = lexer.GetPos();
1727 {
1728 soulng::parser::Match match(false);
1729 soulng::parser::Match* parentMatch6 = &match;
1730 {
1731 soulng::parser::Match match(false);
1732 soulng::parser::Match* parentMatch7 = &match;
1733 {
1734 int64_t pos = lexer.GetPos();
1735 soulng::lexer::Span span = lexer.GetSpan();
1736 soulng::parser::Match match(false);
1737 for (const soulng::parser::Range& range : s10)
1738 {
1739 if (*lexer >= range.first && *lexer <= range.last)
1740 {
1741 match.hit = true;
1742 ++lexer;
1743 break;
1744 }
1745 }
1746 if (match.hit)
1747 {
1748 s.end = span.end;
1749 }
1750 *parentMatch7 = match;
1751 }
1752 *parentMatch6 = match;
1753 }
1754 if (match.hit)
1755 {
1756 *parentMatch5 = match;
1757 }
1758 else
1759 {
1760 lexer.SetPos(save);
1761 break;
1762 }
1763 }
1764 }
1765 }
1766 *parentMatch4 = match;
1767 }
1768 *parentMatch2 = match;
1769 }
1770 *parentMatch1 = match;
1771 }
1772 if (match.hit)
1773 {
1774 processor->Encoding(lexer.GetMatch(s));
1775 }
1776 *parentMatch0 = match;
1777 }
1778 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1779
1780
1781
1782
1783
1784 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1785 if (!match.hit)
1786 {
1787 match.value = nullptr;
1788 }
1789 return match;
1790 }
1791
1792 soulng::parser::Match XmlParser::EncNameDQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1793 {
1794 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1795
1796
1797
1798
1799
1800
1801
1802 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1803 soulng::parser::Match match(false);
1804 soulng::parser::Match* parentMatch0 = &match;
1805 {
1806 soulng::parser::Match match(false);
1807 soulng::parser::Match* parentMatch1 = &match;
1808 {
1809 soulng::parser::Match match(false);
1810 if (*lexer == 34)
1811 {
1812 ++lexer;
1813 match.hit = true;
1814 }
1815 *parentMatch1 = match;
1816 }
1817 if (match.hit)
1818 {
1819 soulng::parser::Match match(false);
1820 soulng::parser::Match* parentMatch2 = &match;
1821 {
1822 soulng::parser::Match match = XmlParser::EncodingName(lexer, processor);
1823 *parentMatch2 = match;
1824 }
1825 *parentMatch1 = match;
1826 }
1827 *parentMatch0 = match;
1828 }
1829 if (match.hit)
1830 {
1831 soulng::parser::Match match(false);
1832 soulng::parser::Match* parentMatch3 = &match;
1833 {
1834 soulng::parser::Match match(false);
1835 if (*lexer == 34)
1836 {
1837 ++lexer;
1838 match.hit = true;
1839 }
1840 *parentMatch3 = match;
1841 }
1842 *parentMatch0 = match;
1843 }
1844 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1845
1846
1847
1848
1849
1850 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1851 if (!match.hit)
1852 {
1853 match.value = nullptr;
1854 }
1855 return match;
1856 }
1857
1858 soulng::parser::Match XmlParser::EncNameSQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1859 {
1860 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1861
1862
1863
1864
1865
1866
1867
1868 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1869 soulng::parser::Match match(false);
1870 soulng::parser::Match* parentMatch0 = &match;
1871 {
1872 soulng::parser::Match match(false);
1873 soulng::parser::Match* parentMatch1 = &match;
1874 {
1875 soulng::parser::Match match(false);
1876 if (*lexer == 39)
1877 {
1878 ++lexer;
1879 match.hit = true;
1880 }
1881 *parentMatch1 = match;
1882 }
1883 if (match.hit)
1884 {
1885 soulng::parser::Match match(false);
1886 soulng::parser::Match* parentMatch2 = &match;
1887 {
1888 soulng::parser::Match match = XmlParser::EncodingName(lexer, processor);
1889 *parentMatch2 = match;
1890 }
1891 *parentMatch1 = match;
1892 }
1893 *parentMatch0 = match;
1894 }
1895 if (match.hit)
1896 {
1897 soulng::parser::Match match(false);
1898 soulng::parser::Match* parentMatch3 = &match;
1899 {
1900 soulng::parser::Match match(false);
1901 if (*lexer == 39)
1902 {
1903 ++lexer;
1904 match.hit = true;
1905 }
1906 *parentMatch3 = match;
1907 }
1908 *parentMatch0 = match;
1909 }
1910 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1911
1912
1913
1914
1915
1916 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1917 if (!match.hit)
1918 {
1919 match.value = nullptr;
1920 }
1921 return match;
1922 }
1923
1924 soulng::parser::Match XmlParser::EncName(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1925 {
1926 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1927
1928
1929
1930
1931
1932
1933
1934 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1935 soulng::parser::Match match(false);
1936 soulng::parser::Match* parentMatch0 = &match;
1937 {
1938 int64_t save = lexer.GetPos();
1939 soulng::parser::Match match = XmlParser::EncNameDQ(lexer, processor);
1940 *parentMatch0 = match;
1941 if (!match.hit)
1942 {
1943 soulng::parser::Match match(false);
1944 soulng::parser::Match* parentMatch1 = &match;
1945 lexer.SetPos(save);
1946 {
1947 soulng::parser::Match match = XmlParser::EncNameSQ(lexer, processor);
1948 *parentMatch1 = match;
1949 }
1950 *parentMatch0 = match;
1951 }
1952 }
1953 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1954
1955
1956
1957
1958
1959 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1960 if (!match.hit)
1961 {
1962 match.value = nullptr;
1963 }
1964 return match;
1965 }
1966
1967 soulng::parser::Match XmlParser::SDDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
1968 {
1969 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1970
1971
1972
1973
1974
1975
1976
1977 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1978 std::unique_ptr<soulng::parser::soulng::parser::Value<bool>>yn;
1979 soulng::parser::Match match(false);
1980 soulng::parser::Match* parentMatch0 = &match;
1981 {
1982 soulng::parser::Match match(false);
1983 soulng::parser::Match* parentMatch1 = &match;
1984 {
1985 soulng::parser::Match match(false);
1986 soulng::parser::Match* parentMatch2 = &match;
1987 {
1988 soulng::parser::Match match = XmlParser::S(lexer);
1989 *parentMatch2 = match;
1990 }
1991 if (match.hit)
1992 {
1993 soulng::parser::Match match(false);
1994 soulng::parser::Match* parentMatch3 = &match;
1995 {
1996 soulng::parser::Match match(true);
1997 for (int i : s11)
1998 {
1999 if (*lexer == i)
2000 {
2001 ++lexer;
2002 }
2003 else
2004 {
2005 match.hit = false;
2006 break;
2007 }
2008 }
2009 *parentMatch3 = match;
2010 }
2011 *parentMatch2 = match;
2012 }
2013 *parentMatch1 = match;
2014 }
2015 if (match.hit)
2016 {
2017 soulng::parser::Match match(false);
2018 soulng::parser::Match* parentMatch4 = &match;
2019 {
2020 soulng::parser::Match match = XmlParser::Eq(lexer);
2021 *parentMatch4 = match;
2022 }
2023 *parentMatch1 = match;
2024 }
2025 *parentMatch0 = match;
2026 }
2027 if (match.hit)
2028 {
2029 soulng::parser::Match match(false);
2030 soulng::parser::Match* parentMatch5 = &match;
2031 {
2032 soulng::parser::Match match(false);
2033 soulng::parser::Match* parentMatch6 = &match;
2034 {
2035 int64_t pos = lexer.GetPos();
2036 soulng::parser::Match match = XmlParser::YesNo(lexer);
2037 yn.reset(static_cast<soulng::parser::soulng::parser::Value<bool>*>(match.value));
2038 if (match.hit)
2039 {
2040 processor->Standalone(yn->value);
2041 }
2042 *parentMatch6 = match;
2043 }
2044 *parentMatch5 = match;
2045 }
2046 *parentMatch0 = match;
2047 }
2048 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2049
2050
2051
2052
2053
2054 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2055 if (!match.hit)
2056 {
2057 match.value = nullptr;
2058 }
2059 return match;
2060 }
2061
2062 soulng::parser::Match XmlParser::DocTypeDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
2063 {
2064 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2065
2066
2067
2068
2069
2070
2071
2072 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2073 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>rootElementName;
2074 soulng::parser::Match match(false);
2075 soulng::parser::Match* parentMatch0 = &match;
2076 {
2077 soulng::parser::Match match(false);
2078 soulng::parser::Match* parentMatch1 = &match;
2079 {
2080 soulng::parser::Match match(false);
2081 soulng::parser::Match* parentMatch2 = &match;
2082 {
2083 soulng::parser::Match match(false);
2084 soulng::parser::Match* parentMatch3 = &match;
2085 {
2086 soulng::parser::Match match(false);
2087 soulng::parser::Match* parentMatch4 = &match;
2088 {
2089 soulng::parser::Match match(false);
2090 soulng::parser::Match* parentMatch5 = &match;
2091 {
2092 soulng::parser::Match match(true);
2093 for (int i : s12)
2094 {
2095 if (*lexer == i)
2096 {
2097 ++lexer;
2098 }
2099 else
2100 {
2101 match.hit = false;
2102 break;
2103 }
2104 }
2105 *parentMatch5 = match;
2106 }
2107 if (match.hit)
2108 {
2109 soulng::parser::Match match(false);
2110 soulng::parser::Match* parentMatch6 = &match;
2111 {
2112 soulng::parser::Match match = XmlParser::S(lexer);
2113 *parentMatch6 = match;
2114 }
2115 *parentMatch5 = match;
2116 }
2117 *parentMatch4 = match;
2118 }
2119 if (match.hit)
2120 {
2121 soulng::parser::Match match(false);
2122 soulng::parser::Match* parentMatch7 = &match;
2123 {
2124 soulng::parser::Match match = XmlParser::Name(lexer);
2125 rootElementName.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
2126 *parentMatch7 = match;
2127 }
2128 *parentMatch4 = match;
2129 }
2130 *parentMatch3 = match;
2131 }
2132 if (match.hit)
2133 {
2134 soulng::parser::Match match(false);
2135 soulng::parser::Match* parentMatch8 = &match;
2136 {
2137 soulng::parser::Match match(true);
2138 int64_t save = lexer.GetPos();
2139 soulng::parser::Match* parentMatch9 = &match;
2140 {
2141 soulng::parser::Match match(false);
2142 soulng::parser::Match* parentMatch10 = &match;
2143 {
2144 soulng::parser::Match match(false);
2145 soulng::parser::Match* parentMatch11 = &match;
2146 {
2147 soulng::parser::Match match = XmlParser::S(lexer);
2148 *parentMatch11 = match;
2149 }
2150 if (match.hit)
2151 {
2152 soulng::parser::Match match(false);
2153 soulng::parser::Match* parentMatch12 = &match;
2154 {
2155 soulng::parser::Match match = XmlParser::ExternalID(lexer);
2156 *parentMatch12 = match;
2157 }
2158 *parentMatch11 = match;
2159 }
2160 *parentMatch10 = match;
2161 }
2162 if (match.hit)
2163 {
2164 *parentMatch9 = match;
2165 }
2166 else
2167 {
2168 lexer.SetPos(save);
2169 }
2170 }
2171 *parentMatch8 = match;
2172 }
2173 *parentMatch3 = match;
2174 }
2175 *parentMatch2 = match;
2176 }
2177 if (match.hit)
2178 {
2179 soulng::parser::Match match(false);
2180 soulng::parser::Match* parentMatch13 = &match;
2181 {
2182 soulng::parser::Match match(true);
2183 int64_t save = lexer.GetPos();
2184 soulng::parser::Match* parentMatch14 = &match;
2185 {
2186 soulng::parser::Match match = XmlParser::S(lexer);
2187 if (match.hit)
2188 {
2189 *parentMatch14 = match;
2190 }
2191 else
2192 {
2193 lexer.SetPos(save);
2194 }
2195 }
2196 *parentMatch13 = match;
2197 }
2198 *parentMatch2 = match;
2199 }
2200 *parentMatch1 = match;
2201 }
2202 if (match.hit)
2203 {
2204 soulng::parser::Match match(false);
2205 soulng::parser::Match* parentMatch15 = &match;
2206 {
2207 soulng::parser::Match match(true);
2208 int64_t save = lexer.GetPos();
2209 soulng::parser::Match* parentMatch16 = &match;
2210 {
2211 soulng::parser::Match match(false);
2212 soulng::parser::Match* parentMatch17 = &match;
2213 {
2214 soulng::parser::Match match(false);
2215 soulng::parser::Match* parentMatch18 = &match;
2216 {
2217 soulng::parser::Match match(false);
2218 soulng::parser::Match* parentMatch19 = &match;
2219 {
2220 soulng::parser::Match match(false);
2221 soulng::parser::Match* parentMatch20 = &match;
2222 {
2223 soulng::parser::Match match(false);
2224 if (*lexer == 91)
2225 {
2226 ++lexer;
2227 match.hit = true;
2228 }
2229 *parentMatch20 = match;
2230 }
2231 if (match.hit)
2232 {
2233 soulng::parser::Match match(false);
2234 soulng::parser::Match* parentMatch21 = &match;
2235 {
2236 soulng::parser::Match match = XmlParser::IntSubset(lexer, processor);
2237 *parentMatch21 = match;
2238 }
2239 *parentMatch20 = match;
2240 }
2241 *parentMatch19 = match;
2242 }
2243 if (match.hit)
2244 {
2245 soulng::parser::Match match(false);
2246 soulng::parser::Match* parentMatch22 = &match;
2247 {
2248 soulng::parser::Match match(false);
2249 if (*lexer == 93)
2250 {
2251 ++lexer;
2252 match.hit = true;
2253 }
2254 *parentMatch22 = match;
2255 }
2256 *parentMatch19 = match;
2257 }
2258 *parentMatch18 = match;
2259 }
2260 if (match.hit)
2261 {
2262 soulng::parser::Match match(false);
2263 soulng::parser::Match* parentMatch23 = &match;
2264 {
2265 soulng::parser::Match match(true);
2266 int64_t save = lexer.GetPos();
2267 soulng::parser::Match* parentMatch24 = &match;
2268 {
2269 soulng::parser::Match match = XmlParser::S(lexer);
2270 if (match.hit)
2271 {
2272 *parentMatch24 = match;
2273 }
2274 else
2275 {
2276 lexer.SetPos(save);
2277 }
2278 }
2279 *parentMatch23 = match;
2280 }
2281 *parentMatch18 = match;
2282 }
2283 *parentMatch17 = match;
2284 }
2285 if (match.hit)
2286 {
2287 *parentMatch16 = match;
2288 }
2289 else
2290 {
2291 lexer.SetPos(save);
2292 }
2293 }
2294 *parentMatch15 = match;
2295 }
2296 *parentMatch1 = match;
2297 }
2298 *parentMatch0 = match;
2299 }
2300 if (match.hit)
2301 {
2302 soulng::parser::Match match(false);
2303 soulng::parser::Match* parentMatch25 = &match;
2304 {
2305 soulng::parser::Match match(false);
2306 if (*lexer == 62)
2307 {
2308 ++lexer;
2309 match.hit = true;
2310 }
2311 *parentMatch25 = match;
2312 }
2313 *parentMatch0 = match;
2314 }
2315 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2316
2317
2318
2319
2320
2321 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2322 if (!match.hit)
2323 {
2324 match.value = nullptr;
2325 }
2326 return match;
2327 }
2328
2329 soulng::parser::Match XmlParser::ExternalID(TrivialLexer& lexer)
2330 {
2331 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2332
2333
2334
2335
2336
2337
2338
2339 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2340 soulng::parser::Match match(false);
2341 soulng::parser::Match* parentMatch0 = &match;
2342 {
2343 int64_t save = lexer.GetPos();
2344 soulng::parser::Match match(false);
2345 soulng::parser::Match* parentMatch1 = &match;
2346 {
2347 soulng::parser::Match match(false);
2348 soulng::parser::Match* parentMatch2 = &match;
2349 {
2350 soulng::parser::Match match(false);
2351 soulng::parser::Match* parentMatch3 = &match;
2352 {
2353 soulng::parser::Match match(true);
2354 for (int i : s13)
2355 {
2356 if (*lexer == i)
2357 {
2358 ++lexer;
2359 }
2360 else
2361 {
2362 match.hit = false;
2363 break;
2364 }
2365 }
2366 *parentMatch3 = match;
2367 }
2368 if (match.hit)
2369 {
2370 soulng::parser::Match match(false);
2371 soulng::parser::Match* parentMatch4 = &match;
2372 {
2373 soulng::parser::Match match = XmlParser::S(lexer);
2374 *parentMatch4 = match;
2375 }
2376 *parentMatch3 = match;
2377 }
2378 *parentMatch2 = match;
2379 }
2380 if (match.hit)
2381 {
2382 soulng::parser::Match match(false);
2383 soulng::parser::Match* parentMatch5 = &match;
2384 {
2385 soulng::parser::Match match = XmlParser::SystemLiteral(lexer);
2386 *parentMatch5 = match;
2387 }
2388 *parentMatch2 = match;
2389 }
2390 *parentMatch1 = match;
2391 }
2392 *parentMatch0 = match;
2393 if (!match.hit)
2394 {
2395 soulng::parser::Match match(false);
2396 soulng::parser::Match* parentMatch6 = &match;
2397 lexer.SetPos(save);
2398 {
2399 soulng::parser::Match match(false);
2400 soulng::parser::Match* parentMatch7 = &match;
2401 {
2402 soulng::parser::Match match(false);
2403 soulng::parser::Match* parentMatch8 = &match;
2404 {
2405 soulng::parser::Match match(false);
2406 soulng::parser::Match* parentMatch9 = &match;
2407 {
2408 soulng::parser::Match match(false);
2409 soulng::parser::Match* parentMatch10 = &match;
2410 {
2411 soulng::parser::Match match(false);
2412 soulng::parser::Match* parentMatch11 = &match;
2413 {
2414 soulng::parser::Match match(true);
2415 for (int i : s14)
2416 {
2417 if (*lexer == i)
2418 {
2419 ++lexer;
2420 }
2421 else
2422 {
2423 match.hit = false;
2424 break;
2425 }
2426 }
2427 *parentMatch11 = match;
2428 }
2429 if (match.hit)
2430 {
2431 soulng::parser::Match match(false);
2432 soulng::parser::Match* parentMatch12 = &match;
2433 {
2434 soulng::parser::Match match = XmlParser::S(lexer);
2435 *parentMatch12 = match;
2436 }
2437 *parentMatch11 = match;
2438 }
2439 *parentMatch10 = match;
2440 }
2441 if (match.hit)
2442 {
2443 soulng::parser::Match match(false);
2444 soulng::parser::Match* parentMatch13 = &match;
2445 {
2446 soulng::parser::Match match = XmlParser::PubidLiteral(lexer);
2447 *parentMatch13 = match;
2448 }
2449 *parentMatch10 = match;
2450 }
2451 *parentMatch9 = match;
2452 }
2453 if (match.hit)
2454 {
2455 soulng::parser::Match match(false);
2456 soulng::parser::Match* parentMatch14 = &match;
2457 {
2458 soulng::parser::Match match = XmlParser::S(lexer);
2459 *parentMatch14 = match;
2460 }
2461 *parentMatch9 = match;
2462 }
2463 *parentMatch8 = match;
2464 }
2465 if (match.hit)
2466 {
2467 soulng::parser::Match match(false);
2468 soulng::parser::Match* parentMatch15 = &match;
2469 {
2470 soulng::parser::Match match = XmlParser::SystemLiteral(lexer);
2471 *parentMatch15 = match;
2472 }
2473 *parentMatch8 = match;
2474 }
2475 *parentMatch7 = match;
2476 }
2477 *parentMatch6 = match;
2478 }
2479 *parentMatch0 = match;
2480 }
2481 }
2482 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2483
2484
2485
2486
2487
2488 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2489 if (!match.hit)
2490 {
2491 match.value = nullptr;
2492 }
2493 return match;
2494 }
2495
2496 soulng::parser::Match XmlParser::SystemLiteral(TrivialLexer& lexer)
2497 {
2498 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2499
2500
2501
2502
2503
2504
2505
2506 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2507 soulng::parser::Match match(false);
2508 soulng::parser::Match* parentMatch0 = &match;
2509 {
2510 int64_t save = lexer.GetPos();
2511 soulng::parser::Match match(false);
2512 soulng::parser::Match* parentMatch1 = &match;
2513 {
2514 soulng::parser::Match match(false);
2515 soulng::parser::Match* parentMatch2 = &match;
2516 {
2517 soulng::parser::Match match(false);
2518 soulng::parser::Match* parentMatch3 = &match;
2519 {
2520 soulng::parser::Match match(false);
2521 if (*lexer == 34)
2522 {
2523 ++lexer;
2524 match.hit = true;
2525 }
2526 *parentMatch3 = match;
2527 }
2528 if (match.hit)
2529 {
2530 soulng::parser::Match match(false);
2531 soulng::parser::Match* parentMatch4 = &match;
2532 {
2533 soulng::parser::Match match(false);
2534 soulng::parser::Match* parentMatch5 = &match;
2535 {
2536 soulng::parser::Match match(true);
2537 soulng::parser::Match* parentMatch6 = &match;
2538 {
2539 while (true)
2540 {
2541 int64_t save = lexer.GetPos();
2542 {
2543 soulng::parser::Match match(lexer.Pos() != lexer.End());
2544 for (const soulng::parser::Range& range : s15)
2545 {
2546 if (*lexer >= range.first && *lexer <= range.last)
2547 {
2548 match.hit = false;
2549 break;
2550 }
2551 }
2552 if (match.hit)
2553 {
2554 ++lexer;
2555 }
2556 if (match.hit)
2557 {
2558 *parentMatch6 = match;
2559 }
2560 else
2561 {
2562 lexer.SetPos(save);
2563 break;
2564 }
2565 }
2566 }
2567 }
2568 *parentMatch5 = match;
2569 }
2570 *parentMatch4 = match;
2571 }
2572 *parentMatch3 = match;
2573 }
2574 *parentMatch2 = match;
2575 }
2576 if (match.hit)
2577 {
2578 soulng::parser::Match match(false);
2579 soulng::parser::Match* parentMatch7 = &match;
2580 {
2581 soulng::parser::Match match(false);
2582 if (*lexer == 34)
2583 {
2584 ++lexer;
2585 match.hit = true;
2586 }
2587 *parentMatch7 = match;
2588 }
2589 *parentMatch2 = match;
2590 }
2591 *parentMatch1 = match;
2592 }
2593 *parentMatch0 = match;
2594 if (!match.hit)
2595 {
2596 soulng::parser::Match match(false);
2597 soulng::parser::Match* parentMatch8 = &match;
2598 lexer.SetPos(save);
2599 {
2600 soulng::parser::Match match(false);
2601 soulng::parser::Match* parentMatch9 = &match;
2602 {
2603 soulng::parser::Match match(false);
2604 soulng::parser::Match* parentMatch10 = &match;
2605 {
2606 soulng::parser::Match match(false);
2607 soulng::parser::Match* parentMatch11 = &match;
2608 {
2609 soulng::parser::Match match(false);
2610 if (*lexer == 39)
2611 {
2612 ++lexer;
2613 match.hit = true;
2614 }
2615 *parentMatch11 = match;
2616 }
2617 if (match.hit)
2618 {
2619 soulng::parser::Match match(false);
2620 soulng::parser::Match* parentMatch12 = &match;
2621 {
2622 soulng::parser::Match match(false);
2623 soulng::parser::Match* parentMatch13 = &match;
2624 {
2625 soulng::parser::Match match(true);
2626 soulng::parser::Match* parentMatch14 = &match;
2627 {
2628 while (true)
2629 {
2630 int64_t save = lexer.GetPos();
2631 {
2632 soulng::parser::Match match(lexer.Pos() != lexer.End());
2633 for (const soulng::parser::Range& range : s16)
2634 {
2635 if (*lexer >= range.first && *lexer <= range.last)
2636 {
2637 match.hit = false;
2638 break;
2639 }
2640 }
2641 if (match.hit)
2642 {
2643 ++lexer;
2644 }
2645 if (match.hit)
2646 {
2647 *parentMatch14 = match;
2648 }
2649 else
2650 {
2651 lexer.SetPos(save);
2652 break;
2653 }
2654 }
2655 }
2656 }
2657 *parentMatch13 = match;
2658 }
2659 *parentMatch12 = match;
2660 }
2661 *parentMatch11 = match;
2662 }
2663 *parentMatch10 = match;
2664 }
2665 if (match.hit)
2666 {
2667 soulng::parser::Match match(false);
2668 soulng::parser::Match* parentMatch15 = &match;
2669 {
2670 soulng::parser::Match match(false);
2671 if (*lexer == 39)
2672 {
2673 ++lexer;
2674 match.hit = true;
2675 }
2676 *parentMatch15 = match;
2677 }
2678 *parentMatch10 = match;
2679 }
2680 *parentMatch9 = match;
2681 }
2682 *parentMatch8 = match;
2683 }
2684 *parentMatch0 = match;
2685 }
2686 }
2687 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2688
2689
2690
2691
2692
2693 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2694 if (!match.hit)
2695 {
2696 match.value = nullptr;
2697 }
2698 return match;
2699 }
2700
2701 soulng::parser::Match XmlParser::PubidLiteral(TrivialLexer& lexer)
2702 {
2703 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2704
2705
2706
2707
2708
2709
2710
2711 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2712 soulng::parser::Match match(false);
2713 soulng::parser::Match* parentMatch0 = &match;
2714 {
2715 int64_t save = lexer.GetPos();
2716 soulng::parser::Match match(false);
2717 soulng::parser::Match* parentMatch1 = &match;
2718 {
2719 soulng::parser::Match match(false);
2720 soulng::parser::Match* parentMatch2 = &match;
2721 {
2722 soulng::parser::Match match(false);
2723 if (*lexer == 34)
2724 {
2725 ++lexer;
2726 match.hit = true;
2727 }
2728 *parentMatch2 = match;
2729 }
2730 if (match.hit)
2731 {
2732 soulng::parser::Match match(false);
2733 soulng::parser::Match* parentMatch3 = &match;
2734 {
2735 soulng::parser::Match match(false);
2736 soulng::parser::Match* parentMatch4 = &match;
2737 {
2738 soulng::parser::Match match(true);
2739 soulng::parser::Match* parentMatch5 = &match;
2740 {
2741 while (true)
2742 {
2743 int64_t save = lexer.GetPos();
2744 {
2745 soulng::parser::Match match = XmlParser::PubidChar(lexer);
2746 if (match.hit)
2747 {
2748 *parentMatch5 = match;
2749 }
2750 else
2751 {
2752 lexer.SetPos(save);
2753 break;
2754 }
2755 }
2756 }
2757 }
2758 *parentMatch4 = match;
2759 }
2760 *parentMatch3 = match;
2761 }
2762 *parentMatch2 = match;
2763 }
2764 *parentMatch1 = match;
2765 }
2766 if (match.hit)
2767 {
2768 soulng::parser::Match match(false);
2769 soulng::parser::Match* parentMatch6 = &match;
2770 {
2771 soulng::parser::Match match(false);
2772 if (*lexer == 34)
2773 {
2774 ++lexer;
2775 match.hit = true;
2776 }
2777 *parentMatch6 = match;
2778 }
2779 *parentMatch1 = match;
2780 }
2781 *parentMatch0 = match;
2782 if (!match.hit)
2783 {
2784 soulng::parser::Match match(false);
2785 soulng::parser::Match* parentMatch7 = &match;
2786 lexer.SetPos(save);
2787 {
2788 soulng::parser::Match match(false);
2789 soulng::parser::Match* parentMatch8 = &match;
2790 {
2791 soulng::parser::Match match(false);
2792 soulng::parser::Match* parentMatch9 = &match;
2793 {
2794 soulng::parser::Match match(false);
2795 if (*lexer == 39)
2796 {
2797 ++lexer;
2798 match.hit = true;
2799 }
2800 *parentMatch9 = match;
2801 }
2802 if (match.hit)
2803 {
2804 soulng::parser::Match match(false);
2805 soulng::parser::Match* parentMatch10 = &match;
2806 {
2807 soulng::parser::Match match(false);
2808 soulng::parser::Match* parentMatch11 = &match;
2809 {
2810 soulng::parser::Match match(true);
2811 soulng::parser::Match* parentMatch12 = &match;
2812 {
2813 while (true)
2814 {
2815 int64_t save = lexer.GetPos();
2816 {
2817 soulng::parser::Match match(false);
2818 soulng::parser::Match* parentMatch13 = &match;
2819 {
2820 soulng::parser::Match match(false);
2821 soulng::parser::Match* parentMatch14 = &match;
2822 int64_t save = lexer.GetPos();
2823 {
2824 soulng::parser::Match match = XmlParser::PubidChar(lexer);
2825 *parentMatch14 = match;
2826 }
2827 if (match.hit)
2828 {
2829 soulng::parser::Match match(false);
2830 soulng::parser::Match* parentMatch15 = &match;
2831 {
2832 int64_t tmp = lexer.GetPos();
2833 lexer.SetPos(save);
2834 save = tmp;
2835 soulng::parser::Match match(false);
2836 if (*lexer == 39)
2837 {
2838 ++lexer;
2839 match.hit = true;
2840 }
2841 *parentMatch15 = match;
2842 }
2843 if (!match.hit)
2844 {
2845 lexer.SetPos(save);
2846 }
2847 *parentMatch14 = soulng::parser::Match(!match.hit, match.value);
2848 }
2849 *parentMatch13 = match;
2850 }
2851 if (match.hit)
2852 {
2853 *parentMatch12 = match;
2854 }
2855 else
2856 {
2857 lexer.SetPos(save);
2858 break;
2859 }
2860 }
2861 }
2862 }
2863 *parentMatch11 = match;
2864 }
2865 *parentMatch10 = match;
2866 }
2867 *parentMatch9 = match;
2868 }
2869 *parentMatch8 = match;
2870 }
2871 if (match.hit)
2872 {
2873 soulng::parser::Match match(false);
2874 soulng::parser::Match* parentMatch16 = &match;
2875 {
2876 soulng::parser::Match match(false);
2877 if (*lexer == 39)
2878 {
2879 ++lexer;
2880 match.hit = true;
2881 }
2882 *parentMatch16 = match;
2883 }
2884 *parentMatch8 = match;
2885 }
2886 *parentMatch7 = match;
2887 }
2888 *parentMatch0 = match;
2889 }
2890 }
2891 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2892
2893
2894
2895
2896
2897 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2898 if (!match.hit)
2899 {
2900 match.value = nullptr;
2901 }
2902 return match;
2903 }
2904
2905 soulng::parser::Match XmlParser::PubidChar(TrivialLexer& lexer)
2906 {
2907 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2908
2909
2910
2911
2912
2913
2914
2915 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2916 soulng::parser::Match match(false);
2917 soulng::parser::Match* parentMatch0 = &match;
2918 {
2919 int64_t save = lexer.GetPos();
2920 soulng::parser::Match match(false);
2921 soulng::parser::Match* parentMatch1 = &match;
2922 {
2923 int64_t save = lexer.GetPos();
2924 soulng::parser::Match match(false);
2925 for (const soulng::parser::Range& range : s17)
2926 {
2927 if (*lexer >= range.first && *lexer <= range.last)
2928 {
2929 match.hit = true;
2930 ++lexer;
2931 break;
2932 }
2933 }
2934 *parentMatch1 = match;
2935 if (!match.hit)
2936 {
2937 soulng::parser::Match match(false);
2938 soulng::parser::Match* parentMatch2 = &match;
2939 lexer.SetPos(save);
2940 {
2941 soulng::parser::Match match(false);
2942 for (const soulng::parser::Range& range : s18)
2943 {
2944 if (*lexer >= range.first && *lexer <= range.last)
2945 {
2946 match.hit = true;
2947 ++lexer;
2948 break;
2949 }
2950 }
2951 *parentMatch2 = match;
2952 }
2953 *parentMatch1 = match;
2954 }
2955 }
2956 *parentMatch0 = match;
2957 if (!match.hit)
2958 {
2959 soulng::parser::Match match(false);
2960 soulng::parser::Match* parentMatch3 = &match;
2961 lexer.SetPos(save);
2962 {
2963 soulng::parser::Match match(false);
2964 for (const soulng::parser::Range& range : s19)
2965 {
2966 if (*lexer >= range.first && *lexer <= range.last)
2967 {
2968 match.hit = true;
2969 ++lexer;
2970 break;
2971 }
2972 }
2973 *parentMatch3 = match;
2974 }
2975 *parentMatch0 = match;
2976 }
2977 }
2978 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2979
2980
2981
2982
2983
2984 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2985 if (!match.hit)
2986 {
2987 match.value = nullptr;
2988 }
2989 return match;
2990 }
2991
2992 soulng::parser::Match XmlParser::IntSubset(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
2993 {
2994 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2995
2996
2997
2998
2999
3000
3001
3002 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3003 soulng::parser::Match match(true);
3004 soulng::parser::Match* parentMatch0 = &match;
3005 {
3006 while (true)
3007 {
3008 int64_t save = lexer.GetPos();
3009 {
3010 soulng::parser::Match match(false);
3011 soulng::parser::Match* parentMatch1 = &match;
3012 {
3013 soulng::parser::Match match(false);
3014 soulng::parser::Match* parentMatch2 = &match;
3015 {
3016 int64_t save = lexer.GetPos();
3017 soulng::parser::Match match = XmlParser::MarkupDecl(lexer, processor);
3018 *parentMatch2 = match;
3019 if (!match.hit)
3020 {
3021 soulng::parser::Match match(false);
3022 soulng::parser::Match* parentMatch3 = &match;
3023 lexer.SetPos(save);
3024 {
3025 soulng::parser::Match match = XmlParser::DeclSep(lexer, processor);
3026 *parentMatch3 = match;
3027 }
3028 *parentMatch2 = match;
3029 }
3030 }
3031 *parentMatch1 = match;
3032 }
3033 if (match.hit)
3034 {
3035 *parentMatch0 = match;
3036 }
3037 else
3038 {
3039 lexer.SetPos(save);
3040 break;
3041 }
3042 }
3043 }
3044 }
3045 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3046
3047
3048
3049
3050
3051 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3052 if (!match.hit)
3053 {
3054 match.value = nullptr;
3055 }
3056 return match;
3057 }
3058
3059 soulng::parser::Match XmlParser::MarkupDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
3060 {
3061 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3062
3063
3064
3065
3066
3067
3068
3069 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3070 soulng::parser::Match match(false);
3071 soulng::parser::Match* parentMatch0 = &match;
3072 {
3073 int64_t save = lexer.GetPos();
3074 soulng::parser::Match match(false);
3075 soulng::parser::Match* parentMatch1 = &match;
3076 {
3077 int64_t save = lexer.GetPos();
3078 soulng::parser::Match match(false);
3079 soulng::parser::Match* parentMatch2 = &match;
3080 {
3081 int64_t save = lexer.GetPos();
3082 soulng::parser::Match match(false);
3083 soulng::parser::Match* parentMatch3 = &match;
3084 {
3085 int64_t save = lexer.GetPos();
3086 soulng::parser::Match match(false);
3087 soulng::parser::Match* parentMatch4 = &match;
3088 {
3089 int64_t save = lexer.GetPos();
3090 soulng::parser::Match match = XmlParser::ElementDecl(lexer, processor);
3091 *parentMatch4 = match;
3092 if (!match.hit)
3093 {
3094 soulng::parser::Match match(false);
3095 soulng::parser::Match* parentMatch5 = &match;
3096 lexer.SetPos(save);
3097 {
3098 soulng::parser::Match match = XmlParser::AttlistDecl(lexer, processor);
3099 *parentMatch5 = match;
3100 }
3101 *parentMatch4 = match;
3102 }
3103 }
3104 *parentMatch3 = match;
3105 if (!match.hit)
3106 {
3107 soulng::parser::Match match(false);
3108 soulng::parser::Match* parentMatch6 = &match;
3109 lexer.SetPos(save);
3110 {
3111 soulng::parser::Match match = XmlParser::EntityDecl(lexer, processor);
3112 *parentMatch6 = match;
3113 }
3114 *parentMatch3 = match;
3115 }
3116 }
3117 *parentMatch2 = match;
3118 if (!match.hit)
3119 {
3120 soulng::parser::Match match(false);
3121 soulng::parser::Match* parentMatch7 = &match;
3122 lexer.SetPos(save);
3123 {
3124 soulng::parser::Match match = XmlParser::NotationDecl(lexer, processor);
3125 *parentMatch7 = match;
3126 }
3127 *parentMatch2 = match;
3128 }
3129 }
3130 *parentMatch1 = match;
3131 if (!match.hit)
3132 {
3133 soulng::parser::Match match(false);
3134 soulng::parser::Match* parentMatch8 = &match;
3135 lexer.SetPos(save);
3136 {
3137 soulng::parser::Match match = XmlParser::PI(lexer, processor);
3138 *parentMatch8 = match;
3139 }
3140 *parentMatch1 = match;
3141 }
3142 }
3143 *parentMatch0 = match;
3144 if (!match.hit)
3145 {
3146 soulng::parser::Match match(false);
3147 soulng::parser::Match* parentMatch9 = &match;
3148 lexer.SetPos(save);
3149 {
3150 soulng::parser::Match match = XmlParser::Comment(lexer, processor);
3151 *parentMatch9 = match;
3152 }
3153 *parentMatch0 = match;
3154 }
3155 }
3156 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3157
3158
3159
3160
3161
3162 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3163 if (!match.hit)
3164 {
3165 match.value = nullptr;
3166 }
3167 return match;
3168 }
3169
3170 soulng::parser::Match XmlParser::DeclSep(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
3171 {
3172 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3173
3174
3175
3176
3177
3178
3179
3180 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3181 soulng::parser::Match match(false);
3182 soulng::parser::Match* parentMatch0 = &match;
3183 {
3184 int64_t save = lexer.GetPos();
3185 soulng::parser::Match match = XmlParser::PEReference(lexer, processor);
3186 *parentMatch0 = match;
3187 if (!match.hit)
3188 {
3189 soulng::parser::Match match(false);
3190 soulng::parser::Match* parentMatch1 = &match;
3191 lexer.SetPos(save);
3192 {
3193 soulng::parser::Match match = XmlParser::S(lexer);
3194 *parentMatch1 = match;
3195 }
3196 *parentMatch0 = match;
3197 }
3198 }
3199 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3200
3201
3202
3203
3204
3205 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3206 if (!match.hit)
3207 {
3208 match.value = nullptr;
3209 }
3210 return match;
3211 }
3212
3213 soulng::parser::Match XmlParser::ElementDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
3214 {
3215 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3216
3217
3218
3219
3220
3221
3222
3223 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3224 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>elementName;
3225 soulng::parser::Match match(false);
3226 soulng::parser::Match* parentMatch0 = &match;
3227 {
3228 soulng::parser::Match match(false);
3229 soulng::parser::Match* parentMatch1 = &match;
3230 {
3231 soulng::parser::Match match(false);
3232 soulng::parser::Match* parentMatch2 = &match;
3233 {
3234 soulng::parser::Match match(false);
3235 soulng::parser::Match* parentMatch3 = &match;
3236 {
3237 soulng::parser::Match match(false);
3238 soulng::parser::Match* parentMatch4 = &match;
3239 {
3240 soulng::parser::Match match(false);
3241 soulng::parser::Match* parentMatch5 = &match;
3242 {
3243 soulng::parser::Match match(true);
3244 for (int i : s20)
3245 {
3246 if (*lexer == i)
3247 {
3248 ++lexer;
3249 }
3250 else
3251 {
3252 match.hit = false;
3253 break;
3254 }
3255 }
3256 *parentMatch5 = match;
3257 }
3258 if (match.hit)
3259 {
3260 soulng::parser::Match match(false);
3261 soulng::parser::Match* parentMatch6 = &match;
3262 {
3263 soulng::parser::Match match = XmlParser::S(lexer);
3264 *parentMatch6 = match;
3265 }
3266 *parentMatch5 = match;
3267 }
3268 *parentMatch4 = match;
3269 }
3270 if (match.hit)
3271 {
3272 soulng::parser::Match match(false);
3273 soulng::parser::Match* parentMatch7 = &match;
3274 {
3275 soulng::parser::Match match = XmlParser::Name(lexer);
3276 elementName.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
3277 *parentMatch7 = match;
3278 }
3279 *parentMatch4 = match;
3280 }
3281 *parentMatch3 = match;
3282 }
3283 if (match.hit)
3284 {
3285 soulng::parser::Match match(false);
3286 soulng::parser::Match* parentMatch8 = &match;
3287 {
3288 soulng::parser::Match match = XmlParser::S(lexer);
3289 *parentMatch8 = match;
3290 }
3291 *parentMatch3 = match;
3292 }
3293 *parentMatch2 = match;
3294 }
3295 if (match.hit)
3296 {
3297 soulng::parser::Match match(false);
3298 soulng::parser::Match* parentMatch9 = &match;
3299 {
3300 soulng::parser::Match match = XmlParser::ContentSpec(lexer);
3301 *parentMatch9 = match;
3302 }
3303 *parentMatch2 = match;
3304 }
3305 *parentMatch1 = match;
3306 }
3307 if (match.hit)
3308 {
3309 soulng::parser::Match match(false);
3310 soulng::parser::Match* parentMatch10 = &match;
3311 {
3312 soulng::parser::Match match(true);
3313 int64_t save = lexer.GetPos();
3314 soulng::parser::Match* parentMatch11 = &match;
3315 {
3316 soulng::parser::Match match = XmlParser::S(lexer);
3317 if (match.hit)
3318 {
3319 *parentMatch11 = match;
3320 }
3321 else
3322 {
3323 lexer.SetPos(save);
3324 }
3325 }
3326 *parentMatch10 = match;
3327 }
3328 *parentMatch1 = match;
3329 }
3330 *parentMatch0 = match;
3331 }
3332 if (match.hit)
3333 {
3334 soulng::parser::Match match(false);
3335 soulng::parser::Match* parentMatch12 = &match;
3336 {
3337 soulng::parser::Match match(false);
3338 if (*lexer == 62)
3339 {
3340 ++lexer;
3341 match.hit = true;
3342 }
3343 *parentMatch12 = match;
3344 }
3345 *parentMatch0 = match;
3346 }
3347 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3348
3349
3350
3351
3352
3353 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3354 if (!match.hit)
3355 {
3356 match.value = nullptr;
3357 }
3358 return match;
3359 }
3360
3361 soulng::parser::Match XmlParser::ContentSpec(TrivialLexer& lexer)
3362 {
3363 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3364
3365
3366
3367
3368
3369
3370
3371 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3372 soulng::parser::Match match(false);
3373 soulng::parser::Match* parentMatch0 = &match;
3374 {
3375 int64_t save = lexer.GetPos();
3376 soulng::parser::Match match(false);
3377 soulng::parser::Match* parentMatch1 = &match;
3378 {
3379 int64_t save = lexer.GetPos();
3380 soulng::parser::Match match(false);
3381 soulng::parser::Match* parentMatch2 = &match;
3382 {
3383 int64_t save = lexer.GetPos();
3384 soulng::parser::Match match(true);
3385 for (int i : s21)
3386 {
3387 if (*lexer == i)
3388 {
3389 ++lexer;
3390 }
3391 else
3392 {
3393 match.hit = false;
3394 break;
3395 }
3396 }
3397 *parentMatch2 = match;
3398 if (!match.hit)
3399 {
3400 soulng::parser::Match match(false);
3401 soulng::parser::Match* parentMatch3 = &match;
3402 lexer.SetPos(save);
3403 {
3404 soulng::parser::Match match(true);
3405 for (int i : s22)
3406 {
3407 if (*lexer == i)
3408 {
3409 ++lexer;
3410 }
3411 else
3412 {
3413 match.hit = false;
3414 break;
3415 }
3416 }
3417 *parentMatch3 = match;
3418 }
3419 *parentMatch2 = match;
3420 }
3421 }
3422 *parentMatch1 = match;
3423 if (!match.hit)
3424 {
3425 soulng::parser::Match match(false);
3426 soulng::parser::Match* parentMatch4 = &match;
3427 lexer.SetPos(save);
3428 {
3429 soulng::parser::Match match = XmlParser::Mixed(lexer);
3430 *parentMatch4 = match;
3431 }
3432 *parentMatch1 = match;
3433 }
3434 }
3435 *parentMatch0 = match;
3436 if (!match.hit)
3437 {
3438 soulng::parser::Match match(false);
3439 soulng::parser::Match* parentMatch5 = &match;
3440 lexer.SetPos(save);
3441 {
3442 soulng::parser::Match match = XmlParser::Children(lexer);
3443 *parentMatch5 = match;
3444 }
3445 *parentMatch0 = match;
3446 }
3447 }
3448 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3449
3450
3451
3452
3453
3454 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3455 if (!match.hit)
3456 {
3457 match.value = nullptr;
3458 }
3459 return match;
3460 }
3461
3462 soulng::parser::Match XmlParser::Children(TrivialLexer& lexer)
3463 {
3464 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3465
3466
3467
3468
3469
3470
3471
3472 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3473 soulng::parser::Match match(false);
3474 soulng::parser::Match* parentMatch0 = &match;
3475 {
3476 soulng::parser::Match match(false);
3477 soulng::parser::Match* parentMatch1 = &match;
3478 {
3479 soulng::parser::Match match(false);
3480 soulng::parser::Match* parentMatch2 = &match;
3481 {
3482 int64_t save = lexer.GetPos();
3483 soulng::parser::Match match = XmlParser::Choice(lexer);
3484 *parentMatch2 = match;
3485 if (!match.hit)
3486 {
3487 soulng::parser::Match match(false);
3488 soulng::parser::Match* parentMatch3 = &match;
3489 lexer.SetPos(save);
3490 {
3491 soulng::parser::Match match = XmlParser::Seq(lexer);
3492 *parentMatch3 = match;
3493 }
3494 *parentMatch2 = match;
3495 }
3496 }
3497 *parentMatch1 = match;
3498 }
3499 *parentMatch0 = match;
3500 }
3501 if (match.hit)
3502 {
3503 soulng::parser::Match match(false);
3504 soulng::parser::Match* parentMatch4 = &match;
3505 {
3506 soulng::parser::Match match(true);
3507 int64_t save = lexer.GetPos();
3508 soulng::parser::Match* parentMatch5 = &match;
3509 {
3510 soulng::parser::Match match(false);
3511 soulng::parser::Match* parentMatch6 = &match;
3512 {
3513 soulng::parser::Match match(false);
3514 soulng::parser::Match* parentMatch7 = &match;
3515 {
3516 int64_t save = lexer.GetPos();
3517 soulng::parser::Match match(false);
3518 soulng::parser::Match* parentMatch8 = &match;
3519 {
3520 int64_t save = lexer.GetPos();
3521 soulng::parser::Match match(false);
3522 if (*lexer == 63)
3523 {
3524 ++lexer;
3525 match.hit = true;
3526 }
3527 *parentMatch8 = match;
3528 if (!match.hit)
3529 {
3530 soulng::parser::Match match(false);
3531 soulng::parser::Match* parentMatch9 = &match;
3532 lexer.SetPos(save);
3533 {
3534 soulng::parser::Match match(false);
3535 if (*lexer == 42)
3536 {
3537 ++lexer;
3538 match.hit = true;
3539 }
3540 *parentMatch9 = match;
3541 }
3542 *parentMatch8 = match;
3543 }
3544 }
3545 *parentMatch7 = match;
3546 if (!match.hit)
3547 {
3548 soulng::parser::Match match(false);
3549 soulng::parser::Match* parentMatch10 = &match;
3550 lexer.SetPos(save);
3551 {
3552 soulng::parser::Match match(false);
3553 if (*lexer == 43)
3554 {
3555 ++lexer;
3556 match.hit = true;
3557 }
3558 *parentMatch10 = match;
3559 }
3560 *parentMatch7 = match;
3561 }
3562 }
3563 *parentMatch6 = match;
3564 }
3565 if (match.hit)
3566 {
3567 *parentMatch5 = match;
3568 }
3569 else
3570 {
3571 lexer.SetPos(save);
3572 }
3573 }
3574 *parentMatch4 = match;
3575 }
3576 *parentMatch0 = match;
3577 }
3578 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3579
3580
3581
3582
3583
3584 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3585 if (!match.hit)
3586 {
3587 match.value = nullptr;
3588 }
3589 return match;
3590 }
3591
3592 soulng::parser::Match XmlParser::CP(TrivialLexer& lexer)
3593 {
3594 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3595
3596
3597
3598
3599
3600
3601
3602 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3603 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
3604 soulng::parser::Match match(false);
3605 soulng::parser::Match* parentMatch0 = &match;
3606 {
3607 soulng::parser::Match match(false);
3608 soulng::parser::Match* parentMatch1 = &match;
3609 {
3610 soulng::parser::Match match(false);
3611 soulng::parser::Match* parentMatch2 = &match;
3612 {
3613 int64_t save = lexer.GetPos();
3614 soulng::parser::Match match(false);
3615 soulng::parser::Match* parentMatch3 = &match;
3616 {
3617 int64_t save = lexer.GetPos();
3618 soulng::parser::Match match = XmlParser::Name(lexer);
3619 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
3620 *parentMatch3 = match;
3621 if (!match.hit)
3622 {
3623 soulng::parser::Match match(false);
3624 soulng::parser::Match* parentMatch4 = &match;
3625 lexer.SetPos(save);
3626 {
3627 soulng::parser::Match match = XmlParser::Choice(lexer);
3628 *parentMatch4 = match;
3629 }
3630 *parentMatch3 = match;
3631 }
3632 }
3633 *parentMatch2 = match;
3634 if (!match.hit)
3635 {
3636 soulng::parser::Match match(false);
3637 soulng::parser::Match* parentMatch5 = &match;
3638 lexer.SetPos(save);
3639 {
3640 soulng::parser::Match match = XmlParser::Seq(lexer);
3641 *parentMatch5 = match;
3642 }
3643 *parentMatch2 = match;
3644 }
3645 }
3646 *parentMatch1 = match;
3647 }
3648 *parentMatch0 = match;
3649 }
3650 if (match.hit)
3651 {
3652 soulng::parser::Match match(false);
3653 soulng::parser::Match* parentMatch6 = &match;
3654 {
3655 soulng::parser::Match match(true);
3656 int64_t save = lexer.GetPos();
3657 soulng::parser::Match* parentMatch7 = &match;
3658 {
3659 soulng::parser::Match match(false);
3660 soulng::parser::Match* parentMatch8 = &match;
3661 {
3662 soulng::parser::Match match(false);
3663 soulng::parser::Match* parentMatch9 = &match;
3664 {
3665 int64_t save = lexer.GetPos();
3666 soulng::parser::Match match(false);
3667 soulng::parser::Match* parentMatch10 = &match;
3668 {
3669 int64_t save = lexer.GetPos();
3670 soulng::parser::Match match(false);
3671 if (*lexer == 63)
3672 {
3673 ++lexer;
3674 match.hit = true;
3675 }
3676 *parentMatch10 = match;
3677 if (!match.hit)
3678 {
3679 soulng::parser::Match match(false);
3680 soulng::parser::Match* parentMatch11 = &match;
3681 lexer.SetPos(save);
3682 {
3683 soulng::parser::Match match(false);
3684 if (*lexer == 42)
3685 {
3686 ++lexer;
3687 match.hit = true;
3688 }
3689 *parentMatch11 = match;
3690 }
3691 *parentMatch10 = match;
3692 }
3693 }
3694 *parentMatch9 = match;
3695 if (!match.hit)
3696 {
3697 soulng::parser::Match match(false);
3698 soulng::parser::Match* parentMatch12 = &match;
3699 lexer.SetPos(save);
3700 {
3701 soulng::parser::Match match(false);
3702 if (*lexer == 43)
3703 {
3704 ++lexer;
3705 match.hit = true;
3706 }
3707 *parentMatch12 = match;
3708 }
3709 *parentMatch9 = match;
3710 }
3711 }
3712 *parentMatch8 = match;
3713 }
3714 if (match.hit)
3715 {
3716 *parentMatch7 = match;
3717 }
3718 else
3719 {
3720 lexer.SetPos(save);
3721 }
3722 }
3723 *parentMatch6 = match;
3724 }
3725 *parentMatch0 = match;
3726 }
3727 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3728
3729
3730
3731
3732
3733 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3734 if (!match.hit)
3735 {
3736 match.value = nullptr;
3737 }
3738 return match;
3739 }
3740
3741 soulng::parser::Match XmlParser::Choice(TrivialLexer& lexer)
3742 {
3743 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3744
3745
3746
3747
3748
3749
3750
3751 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3752 soulng::parser::Match match(false);
3753 soulng::parser::Match* parentMatch0 = &match;
3754 {
3755 soulng::parser::Match match(false);
3756 soulng::parser::Match* parentMatch1 = &match;
3757 {
3758 soulng::parser::Match match(false);
3759 soulng::parser::Match* parentMatch2 = &match;
3760 {
3761 soulng::parser::Match match(false);
3762 soulng::parser::Match* parentMatch3 = &match;
3763 {
3764 soulng::parser::Match match(false);
3765 soulng::parser::Match* parentMatch4 = &match;
3766 {
3767 soulng::parser::Match match(false);
3768 if (*lexer == 40)
3769 {
3770 ++lexer;
3771 match.hit = true;
3772 }
3773 *parentMatch4 = match;
3774 }
3775 if (match.hit)
3776 {
3777 soulng::parser::Match match(false);
3778 soulng::parser::Match* parentMatch5 = &match;
3779 {
3780 soulng::parser::Match match(true);
3781 int64_t save = lexer.GetPos();
3782 soulng::parser::Match* parentMatch6 = &match;
3783 {
3784 soulng::parser::Match match = XmlParser::S(lexer);
3785 if (match.hit)
3786 {
3787 *parentMatch6 = match;
3788 }
3789 else
3790 {
3791 lexer.SetPos(save);
3792 }
3793 }
3794 *parentMatch5 = match;
3795 }
3796 *parentMatch4 = match;
3797 }
3798 *parentMatch3 = match;
3799 }
3800 if (match.hit)
3801 {
3802 soulng::parser::Match match(false);
3803 soulng::parser::Match* parentMatch7 = &match;
3804 {
3805 soulng::parser::Match match = XmlParser::CP(lexer);
3806 *parentMatch7 = match;
3807 }
3808 *parentMatch3 = match;
3809 }
3810 *parentMatch2 = match;
3811 }
3812 if (match.hit)
3813 {
3814 soulng::parser::Match match(false);
3815 soulng::parser::Match* parentMatch8 = &match;
3816 {
3817 soulng::parser::Match match(false);
3818 soulng::parser::Match* parentMatch9 = &match;
3819 {
3820 soulng::parser::Match match(false);
3821 soulng::parser::Match* parentMatch10 = &match;
3822 {
3823 soulng::parser::Match match(false);
3824 soulng::parser::Match* parentMatch11 = &match;
3825 {
3826 soulng::parser::Match match(false);
3827 soulng::parser::Match* parentMatch12 = &match;
3828 {
3829 soulng::parser::Match match(false);
3830 soulng::parser::Match* parentMatch13 = &match;
3831 {
3832 soulng::parser::Match match(true);
3833 int64_t save = lexer.GetPos();
3834 soulng::parser::Match* parentMatch14 = &match;
3835 {
3836 soulng::parser::Match match = XmlParser::S(lexer);
3837 if (match.hit)
3838 {
3839 *parentMatch14 = match;
3840 }
3841 else
3842 {
3843 lexer.SetPos(save);
3844 }
3845 }
3846 *parentMatch13 = match;
3847 }
3848 if (match.hit)
3849 {
3850 soulng::parser::Match match(false);
3851 soulng::parser::Match* parentMatch15 = &match;
3852 {
3853 soulng::parser::Match match(false);
3854 if (*lexer == 124)
3855 {
3856 ++lexer;
3857 match.hit = true;
3858 }
3859 *parentMatch15 = match;
3860 }
3861 *parentMatch13 = match;
3862 }
3863 *parentMatch12 = match;
3864 }
3865 if (match.hit)
3866 {
3867 soulng::parser::Match match(false);
3868 soulng::parser::Match* parentMatch16 = &match;
3869 {
3870 soulng::parser::Match match(true);
3871 int64_t save = lexer.GetPos();
3872 soulng::parser::Match* parentMatch17 = &match;
3873 {
3874 soulng::parser::Match match = XmlParser::S(lexer);
3875 if (match.hit)
3876 {
3877 *parentMatch17 = match;
3878 }
3879 else
3880 {
3881 lexer.SetPos(save);
3882 }
3883 }
3884 *parentMatch16 = match;
3885 }
3886 *parentMatch12 = match;
3887 }
3888 *parentMatch11 = match;
3889 }
3890 if (match.hit)
3891 {
3892 soulng::parser::Match match(false);
3893 soulng::parser::Match* parentMatch18 = &match;
3894 {
3895 soulng::parser::Match match = XmlParser::CP(lexer);
3896 *parentMatch18 = match;
3897 }
3898 *parentMatch11 = match;
3899 }
3900 *parentMatch10 = match;
3901 }
3902 *parentMatch9 = match;
3903 }
3904 if (match.hit)
3905 {
3906 soulng::parser::Match match(true);
3907 soulng::parser::Match* parentMatch19 = &match;
3908 while (true)
3909 {
3910 int64_t save = lexer.GetPos();
3911 {
3912 soulng::parser::Match match(false);
3913 soulng::parser::Match* parentMatch20 = &match;
3914 {
3915 soulng::parser::Match match(false);
3916 soulng::parser::Match* parentMatch21 = &match;
3917 {
3918 soulng::parser::Match match(false);
3919 soulng::parser::Match* parentMatch22 = &match;
3920 {
3921 soulng::parser::Match match(false);
3922 soulng::parser::Match* parentMatch23 = &match;
3923 {
3924 soulng::parser::Match match(true);
3925 int64_t save = lexer.GetPos();
3926 soulng::parser::Match* parentMatch24 = &match;
3927 {
3928 soulng::parser::Match match = XmlParser::S(lexer);
3929 if (match.hit)
3930 {
3931 *parentMatch24 = match;
3932 }
3933 else
3934 {
3935 lexer.SetPos(save);
3936 }
3937 }
3938 *parentMatch23 = match;
3939 }
3940 if (match.hit)
3941 {
3942 soulng::parser::Match match(false);
3943 soulng::parser::Match* parentMatch25 = &match;
3944 {
3945 soulng::parser::Match match(false);
3946 if (*lexer == 124)
3947 {
3948 ++lexer;
3949 match.hit = true;
3950 }
3951 *parentMatch25 = match;
3952 }
3953 *parentMatch23 = match;
3954 }
3955 *parentMatch22 = match;
3956 }
3957 if (match.hit)
3958 {
3959 soulng::parser::Match match(false);
3960 soulng::parser::Match* parentMatch26 = &match;
3961 {
3962 soulng::parser::Match match(true);
3963 int64_t save = lexer.GetPos();
3964 soulng::parser::Match* parentMatch27 = &match;
3965 {
3966 soulng::parser::Match match = XmlParser::S(lexer);
3967 if (match.hit)
3968 {
3969 *parentMatch27 = match;
3970 }
3971 else
3972 {
3973 lexer.SetPos(save);
3974 }
3975 }
3976 *parentMatch26 = match;
3977 }
3978 *parentMatch22 = match;
3979 }
3980 *parentMatch21 = match;
3981 }
3982 if (match.hit)
3983 {
3984 soulng::parser::Match match(false);
3985 soulng::parser::Match* parentMatch28 = &match;
3986 {
3987 soulng::parser::Match match = XmlParser::CP(lexer);
3988 *parentMatch28 = match;
3989 }
3990 *parentMatch21 = match;
3991 }
3992 *parentMatch20 = match;
3993 }
3994 if (match.hit)
3995 {
3996 *parentMatch19 = match;
3997 }
3998 else
3999 {
4000 lexer.SetPos(save);
4001 break;
4002 }
4003 }
4004 }
4005 }
4006 *parentMatch8 = match;
4007 }
4008 *parentMatch2 = match;
4009 }
4010 *parentMatch1 = match;
4011 }
4012 if (match.hit)
4013 {
4014 soulng::parser::Match match(false);
4015 soulng::parser::Match* parentMatch29 = &match;
4016 {
4017 soulng::parser::Match match(true);
4018 int64_t save = lexer.GetPos();
4019 soulng::parser::Match* parentMatch30 = &match;
4020 {
4021 soulng::parser::Match match = XmlParser::S(lexer);
4022 if (match.hit)
4023 {
4024 *parentMatch30 = match;
4025 }
4026 else
4027 {
4028 lexer.SetPos(save);
4029 }
4030 }
4031 *parentMatch29 = match;
4032 }
4033 *parentMatch1 = match;
4034 }
4035 *parentMatch0 = match;
4036 }
4037 if (match.hit)
4038 {
4039 soulng::parser::Match match(false);
4040 soulng::parser::Match* parentMatch31 = &match;
4041 {
4042 soulng::parser::Match match(false);
4043 if (*lexer == 41)
4044 {
4045 ++lexer;
4046 match.hit = true;
4047 }
4048 *parentMatch31 = match;
4049 }
4050 *parentMatch0 = match;
4051 }
4052 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4053
4054
4055
4056
4057
4058 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4059 if (!match.hit)
4060 {
4061 match.value = nullptr;
4062 }
4063 return match;
4064 }
4065
4066 soulng::parser::Match XmlParser::Seq(TrivialLexer& lexer)
4067 {
4068 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4069
4070
4071
4072
4073
4074
4075
4076 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4077 soulng::parser::Match match(false);
4078 soulng::parser::Match* parentMatch0 = &match;
4079 {
4080 soulng::parser::Match match(false);
4081 soulng::parser::Match* parentMatch1 = &match;
4082 {
4083 soulng::parser::Match match(false);
4084 soulng::parser::Match* parentMatch2 = &match;
4085 {
4086 soulng::parser::Match match(false);
4087 soulng::parser::Match* parentMatch3 = &match;
4088 {
4089 soulng::parser::Match match(false);
4090 soulng::parser::Match* parentMatch4 = &match;
4091 {
4092 soulng::parser::Match match(false);
4093 if (*lexer == 40)
4094 {
4095 ++lexer;
4096 match.hit = true;
4097 }
4098 *parentMatch4 = match;
4099 }
4100 if (match.hit)
4101 {
4102 soulng::parser::Match match(false);
4103 soulng::parser::Match* parentMatch5 = &match;
4104 {
4105 soulng::parser::Match match(true);
4106 int64_t save = lexer.GetPos();
4107 soulng::parser::Match* parentMatch6 = &match;
4108 {
4109 soulng::parser::Match match = XmlParser::S(lexer);
4110 if (match.hit)
4111 {
4112 *parentMatch6 = match;
4113 }
4114 else
4115 {
4116 lexer.SetPos(save);
4117 }
4118 }
4119 *parentMatch5 = match;
4120 }
4121 *parentMatch4 = match;
4122 }
4123 *parentMatch3 = match;
4124 }
4125 if (match.hit)
4126 {
4127 soulng::parser::Match match(false);
4128 soulng::parser::Match* parentMatch7 = &match;
4129 {
4130 soulng::parser::Match match = XmlParser::CP(lexer);
4131 *parentMatch7 = match;
4132 }
4133 *parentMatch3 = match;
4134 }
4135 *parentMatch2 = match;
4136 }
4137 if (match.hit)
4138 {
4139 soulng::parser::Match match(false);
4140 soulng::parser::Match* parentMatch8 = &match;
4141 {
4142 soulng::parser::Match match(true);
4143 soulng::parser::Match* parentMatch9 = &match;
4144 {
4145 while (true)
4146 {
4147 int64_t save = lexer.GetPos();
4148 {
4149 soulng::parser::Match match(false);
4150 soulng::parser::Match* parentMatch10 = &match;
4151 {
4152 soulng::parser::Match match(false);
4153 soulng::parser::Match* parentMatch11 = &match;
4154 {
4155 soulng::parser::Match match(false);
4156 soulng::parser::Match* parentMatch12 = &match;
4157 {
4158 soulng::parser::Match match(false);
4159 soulng::parser::Match* parentMatch13 = &match;
4160 {
4161 soulng::parser::Match match(true);
4162 int64_t save = lexer.GetPos();
4163 soulng::parser::Match* parentMatch14 = &match;
4164 {
4165 soulng::parser::Match match = XmlParser::S(lexer);
4166 if (match.hit)
4167 {
4168 *parentMatch14 = match;
4169 }
4170 else
4171 {
4172 lexer.SetPos(save);
4173 }
4174 }
4175 *parentMatch13 = match;
4176 }
4177 if (match.hit)
4178 {
4179 soulng::parser::Match match(false);
4180 soulng::parser::Match* parentMatch15 = &match;
4181 {
4182 soulng::parser::Match match(false);
4183 if (*lexer == 44)
4184 {
4185 ++lexer;
4186 match.hit = true;
4187 }
4188 *parentMatch15 = match;
4189 }
4190 *parentMatch13 = match;
4191 }
4192 *parentMatch12 = match;
4193 }
4194 if (match.hit)
4195 {
4196 soulng::parser::Match match(false);
4197 soulng::parser::Match* parentMatch16 = &match;
4198 {
4199 soulng::parser::Match match(true);
4200 int64_t save = lexer.GetPos();
4201 soulng::parser::Match* parentMatch17 = &match;
4202 {
4203 soulng::parser::Match match = XmlParser::S(lexer);
4204 if (match.hit)
4205 {
4206 *parentMatch17 = match;
4207 }
4208 else
4209 {
4210 lexer.SetPos(save);
4211 }
4212 }
4213 *parentMatch16 = match;
4214 }
4215 *parentMatch12 = match;
4216 }
4217 *parentMatch11 = match;
4218 }
4219 if (match.hit)
4220 {
4221 soulng::parser::Match match(false);
4222 soulng::parser::Match* parentMatch18 = &match;
4223 {
4224 soulng::parser::Match match = XmlParser::CP(lexer);
4225 *parentMatch18 = match;
4226 }
4227 *parentMatch11 = match;
4228 }
4229 *parentMatch10 = match;
4230 }
4231 if (match.hit)
4232 {
4233 *parentMatch9 = match;
4234 }
4235 else
4236 {
4237 lexer.SetPos(save);
4238 break;
4239 }
4240 }
4241 }
4242 }
4243 *parentMatch8 = match;
4244 }
4245 *parentMatch2 = match;
4246 }
4247 *parentMatch1 = match;
4248 }
4249 if (match.hit)
4250 {
4251 soulng::parser::Match match(false);
4252 soulng::parser::Match* parentMatch19 = &match;
4253 {
4254 soulng::parser::Match match(true);
4255 int64_t save = lexer.GetPos();
4256 soulng::parser::Match* parentMatch20 = &match;
4257 {
4258 soulng::parser::Match match = XmlParser::S(lexer);
4259 if (match.hit)
4260 {
4261 *parentMatch20 = match;
4262 }
4263 else
4264 {
4265 lexer.SetPos(save);
4266 }
4267 }
4268 *parentMatch19 = match;
4269 }
4270 *parentMatch1 = match;
4271 }
4272 *parentMatch0 = match;
4273 }
4274 if (match.hit)
4275 {
4276 soulng::parser::Match match(false);
4277 soulng::parser::Match* parentMatch21 = &match;
4278 {
4279 soulng::parser::Match match(false);
4280 if (*lexer == 41)
4281 {
4282 ++lexer;
4283 match.hit = true;
4284 }
4285 *parentMatch21 = match;
4286 }
4287 *parentMatch0 = match;
4288 }
4289 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4290
4291
4292
4293
4294
4295 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4296 if (!match.hit)
4297 {
4298 match.value = nullptr;
4299 }
4300 return match;
4301 }
4302
4303 soulng::parser::Match XmlParser::Mixed(TrivialLexer& lexer)
4304 {
4305 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4306
4307
4308
4309
4310
4311
4312
4313 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4314 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
4315 soulng::parser::Match match(false);
4316 soulng::parser::Match* parentMatch0 = &match;
4317 {
4318 int64_t save = lexer.GetPos();
4319 soulng::parser::Match match(false);
4320 soulng::parser::Match* parentMatch1 = &match;
4321 {
4322 soulng::parser::Match match(false);
4323 soulng::parser::Match* parentMatch2 = &match;
4324 {
4325 soulng::parser::Match match(false);
4326 soulng::parser::Match* parentMatch3 = &match;
4327 {
4328 soulng::parser::Match match(false);
4329 soulng::parser::Match* parentMatch4 = &match;
4330 {
4331 soulng::parser::Match match(false);
4332 soulng::parser::Match* parentMatch5 = &match;
4333 {
4334 soulng::parser::Match match(false);
4335 if (*lexer == 40)
4336 {
4337 ++lexer;
4338 match.hit = true;
4339 }
4340 *parentMatch5 = match;
4341 }
4342 if (match.hit)
4343 {
4344 soulng::parser::Match match(false);
4345 soulng::parser::Match* parentMatch6 = &match;
4346 {
4347 soulng::parser::Match match(true);
4348 int64_t save = lexer.GetPos();
4349 soulng::parser::Match* parentMatch7 = &match;
4350 {
4351 soulng::parser::Match match = XmlParser::S(lexer);
4352 if (match.hit)
4353 {
4354 *parentMatch7 = match;
4355 }
4356 else
4357 {
4358 lexer.SetPos(save);
4359 }
4360 }
4361 *parentMatch6 = match;
4362 }
4363 *parentMatch5 = match;
4364 }
4365 *parentMatch4 = match;
4366 }
4367 if (match.hit)
4368 {
4369 soulng::parser::Match match(false);
4370 soulng::parser::Match* parentMatch8 = &match;
4371 {
4372 soulng::parser::Match match(true);
4373 for (int i : s23)
4374 {
4375 if (*lexer == i)
4376 {
4377 ++lexer;
4378 }
4379 else
4380 {
4381 match.hit = false;
4382 break;
4383 }
4384 }
4385 *parentMatch8 = match;
4386 }
4387 *parentMatch4 = match;
4388 }
4389 *parentMatch3 = match;
4390 }
4391 if (match.hit)
4392 {
4393 soulng::parser::Match match(false);
4394 soulng::parser::Match* parentMatch9 = &match;
4395 {
4396 soulng::parser::Match match(true);
4397 soulng::parser::Match* parentMatch10 = &match;
4398 {
4399 while (true)
4400 {
4401 int64_t save = lexer.GetPos();
4402 {
4403 soulng::parser::Match match(false);
4404 soulng::parser::Match* parentMatch11 = &match;
4405 {
4406 soulng::parser::Match match(false);
4407 soulng::parser::Match* parentMatch12 = &match;
4408 {
4409 soulng::parser::Match match(false);
4410 soulng::parser::Match* parentMatch13 = &match;
4411 {
4412 soulng::parser::Match match(false);
4413 soulng::parser::Match* parentMatch14 = &match;
4414 {
4415 soulng::parser::Match match(true);
4416 int64_t save = lexer.GetPos();
4417 soulng::parser::Match* parentMatch15 = &match;
4418 {
4419 soulng::parser::Match match = XmlParser::S(lexer);
4420 if (match.hit)
4421 {
4422 *parentMatch15 = match;
4423 }
4424 else
4425 {
4426 lexer.SetPos(save);
4427 }
4428 }
4429 *parentMatch14 = match;
4430 }
4431 if (match.hit)
4432 {
4433 soulng::parser::Match match(false);
4434 soulng::parser::Match* parentMatch16 = &match;
4435 {
4436 soulng::parser::Match match(false);
4437 if (*lexer == 124)
4438 {
4439 ++lexer;
4440 match.hit = true;
4441 }
4442 *parentMatch16 = match;
4443 }
4444 *parentMatch14 = match;
4445 }
4446 *parentMatch13 = match;
4447 }
4448 if (match.hit)
4449 {
4450 soulng::parser::Match match(false);
4451 soulng::parser::Match* parentMatch17 = &match;
4452 {
4453 soulng::parser::Match match(true);
4454 int64_t save = lexer.GetPos();
4455 soulng::parser::Match* parentMatch18 = &match;
4456 {
4457 soulng::parser::Match match = XmlParser::S(lexer);
4458 if (match.hit)
4459 {
4460 *parentMatch18 = match;
4461 }
4462 else
4463 {
4464 lexer.SetPos(save);
4465 }
4466 }
4467 *parentMatch17 = match;
4468 }
4469 *parentMatch13 = match;
4470 }
4471 *parentMatch12 = match;
4472 }
4473 if (match.hit)
4474 {
4475 soulng::parser::Match match(false);
4476 soulng::parser::Match* parentMatch19 = &match;
4477 {
4478 soulng::parser::Match match = XmlParser::Name(lexer);
4479 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4480 *parentMatch19 = match;
4481 }
4482 *parentMatch12 = match;
4483 }
4484 *parentMatch11 = match;
4485 }
4486 if (match.hit)
4487 {
4488 *parentMatch10 = match;
4489 }
4490 else
4491 {
4492 lexer.SetPos(save);
4493 break;
4494 }
4495 }
4496 }
4497 }
4498 *parentMatch9 = match;
4499 }
4500 *parentMatch3 = match;
4501 }
4502 *parentMatch2 = match;
4503 }
4504 if (match.hit)
4505 {
4506 soulng::parser::Match match(false);
4507 soulng::parser::Match* parentMatch20 = &match;
4508 {
4509 soulng::parser::Match match(true);
4510 int64_t save = lexer.GetPos();
4511 soulng::parser::Match* parentMatch21 = &match;
4512 {
4513 soulng::parser::Match match = XmlParser::S(lexer);
4514 if (match.hit)
4515 {
4516 *parentMatch21 = match;
4517 }
4518 else
4519 {
4520 lexer.SetPos(save);
4521 }
4522 }
4523 *parentMatch20 = match;
4524 }
4525 *parentMatch2 = match;
4526 }
4527 *parentMatch1 = match;
4528 }
4529 if (match.hit)
4530 {
4531 soulng::parser::Match match(false);
4532 soulng::parser::Match* parentMatch22 = &match;
4533 {
4534 soulng::parser::Match match(true);
4535 for (int i : s24)
4536 {
4537 if (*lexer == i)
4538 {
4539 ++lexer;
4540 }
4541 else
4542 {
4543 match.hit = false;
4544 break;
4545 }
4546 }
4547 *parentMatch22 = match;
4548 }
4549 *parentMatch1 = match;
4550 }
4551 *parentMatch0 = match;
4552 if (!match.hit)
4553 {
4554 soulng::parser::Match match(false);
4555 soulng::parser::Match* parentMatch23 = &match;
4556 lexer.SetPos(save);
4557 {
4558 soulng::parser::Match match(false);
4559 soulng::parser::Match* parentMatch24 = &match;
4560 {
4561 soulng::parser::Match match(false);
4562 soulng::parser::Match* parentMatch25 = &match;
4563 {
4564 soulng::parser::Match match(false);
4565 soulng::parser::Match* parentMatch26 = &match;
4566 {
4567 soulng::parser::Match match(false);
4568 soulng::parser::Match* parentMatch27 = &match;
4569 {
4570 soulng::parser::Match match(false);
4571 if (*lexer == 40)
4572 {
4573 ++lexer;
4574 match.hit = true;
4575 }
4576 *parentMatch27 = match;
4577 }
4578 if (match.hit)
4579 {
4580 soulng::parser::Match match(false);
4581 soulng::parser::Match* parentMatch28 = &match;
4582 {
4583 soulng::parser::Match match(true);
4584 int64_t save = lexer.GetPos();
4585 soulng::parser::Match* parentMatch29 = &match;
4586 {
4587 soulng::parser::Match match = XmlParser::S(lexer);
4588 if (match.hit)
4589 {
4590 *parentMatch29 = match;
4591 }
4592 else
4593 {
4594 lexer.SetPos(save);
4595 }
4596 }
4597 *parentMatch28 = match;
4598 }
4599 *parentMatch27 = match;
4600 }
4601 *parentMatch26 = match;
4602 }
4603 if (match.hit)
4604 {
4605 soulng::parser::Match match(false);
4606 soulng::parser::Match* parentMatch30 = &match;
4607 {
4608 soulng::parser::Match match(true);
4609 for (int i : s25)
4610 {
4611 if (*lexer == i)
4612 {
4613 ++lexer;
4614 }
4615 else
4616 {
4617 match.hit = false;
4618 break;
4619 }
4620 }
4621 *parentMatch30 = match;
4622 }
4623 *parentMatch26 = match;
4624 }
4625 *parentMatch25 = match;
4626 }
4627 if (match.hit)
4628 {
4629 soulng::parser::Match match(false);
4630 soulng::parser::Match* parentMatch31 = &match;
4631 {
4632 soulng::parser::Match match(true);
4633 int64_t save = lexer.GetPos();
4634 soulng::parser::Match* parentMatch32 = &match;
4635 {
4636 soulng::parser::Match match = XmlParser::S(lexer);
4637 if (match.hit)
4638 {
4639 *parentMatch32 = match;
4640 }
4641 else
4642 {
4643 lexer.SetPos(save);
4644 }
4645 }
4646 *parentMatch31 = match;
4647 }
4648 *parentMatch25 = match;
4649 }
4650 *parentMatch24 = match;
4651 }
4652 if (match.hit)
4653 {
4654 soulng::parser::Match match(false);
4655 soulng::parser::Match* parentMatch33 = &match;
4656 {
4657 soulng::parser::Match match(false);
4658 if (*lexer == 41)
4659 {
4660 ++lexer;
4661 match.hit = true;
4662 }
4663 *parentMatch33 = match;
4664 }
4665 *parentMatch24 = match;
4666 }
4667 *parentMatch23 = match;
4668 }
4669 *parentMatch0 = match;
4670 }
4671 }
4672 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4673
4674
4675
4676
4677
4678 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4679 if (!match.hit)
4680 {
4681 match.value = nullptr;
4682 }
4683 return match;
4684 }
4685
4686 soulng::parser::Match XmlParser::AttlistDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
4687 {
4688 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4689
4690
4691
4692
4693
4694
4695
4696 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4697 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
4698 soulng::parser::Match match(false);
4699 soulng::parser::Match* parentMatch0 = &match;
4700 {
4701 soulng::parser::Match match(false);
4702 soulng::parser::Match* parentMatch1 = &match;
4703 {
4704 soulng::parser::Match match(false);
4705 soulng::parser::Match* parentMatch2 = &match;
4706 {
4707 soulng::parser::Match match(false);
4708 soulng::parser::Match* parentMatch3 = &match;
4709 {
4710 soulng::parser::Match match(false);
4711 soulng::parser::Match* parentMatch4 = &match;
4712 {
4713 soulng::parser::Match match(true);
4714 for (int i : s26)
4715 {
4716 if (*lexer == i)
4717 {
4718 ++lexer;
4719 }
4720 else
4721 {
4722 match.hit = false;
4723 break;
4724 }
4725 }
4726 *parentMatch4 = match;
4727 }
4728 if (match.hit)
4729 {
4730 soulng::parser::Match match(false);
4731 soulng::parser::Match* parentMatch5 = &match;
4732 {
4733 soulng::parser::Match match = XmlParser::S(lexer);
4734 *parentMatch5 = match;
4735 }
4736 *parentMatch4 = match;
4737 }
4738 *parentMatch3 = match;
4739 }
4740 if (match.hit)
4741 {
4742 soulng::parser::Match match(false);
4743 soulng::parser::Match* parentMatch6 = &match;
4744 {
4745 soulng::parser::Match match = XmlParser::Name(lexer);
4746 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4747 *parentMatch6 = match;
4748 }
4749 *parentMatch3 = match;
4750 }
4751 *parentMatch2 = match;
4752 }
4753 if (match.hit)
4754 {
4755 soulng::parser::Match match(false);
4756 soulng::parser::Match* parentMatch7 = &match;
4757 {
4758 soulng::parser::Match match(true);
4759 soulng::parser::Match* parentMatch8 = &match;
4760 {
4761 while (true)
4762 {
4763 int64_t save = lexer.GetPos();
4764 {
4765 soulng::parser::Match match = XmlParser::AttDef(lexer, processor);
4766 if (match.hit)
4767 {
4768 *parentMatch8 = match;
4769 }
4770 else
4771 {
4772 lexer.SetPos(save);
4773 break;
4774 }
4775 }
4776 }
4777 }
4778 *parentMatch7 = match;
4779 }
4780 *parentMatch2 = match;
4781 }
4782 *parentMatch1 = match;
4783 }
4784 if (match.hit)
4785 {
4786 soulng::parser::Match match(false);
4787 soulng::parser::Match* parentMatch9 = &match;
4788 {
4789 soulng::parser::Match match(true);
4790 int64_t save = lexer.GetPos();
4791 soulng::parser::Match* parentMatch10 = &match;
4792 {
4793 soulng::parser::Match match = XmlParser::S(lexer);
4794 if (match.hit)
4795 {
4796 *parentMatch10 = match;
4797 }
4798 else
4799 {
4800 lexer.SetPos(save);
4801 }
4802 }
4803 *parentMatch9 = match;
4804 }
4805 *parentMatch1 = match;
4806 }
4807 *parentMatch0 = match;
4808 }
4809 if (match.hit)
4810 {
4811 soulng::parser::Match match(false);
4812 soulng::parser::Match* parentMatch11 = &match;
4813 {
4814 soulng::parser::Match match(false);
4815 if (*lexer == 62)
4816 {
4817 ++lexer;
4818 match.hit = true;
4819 }
4820 *parentMatch11 = match;
4821 }
4822 *parentMatch0 = match;
4823 }
4824 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4825
4826
4827
4828
4829
4830 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4831 if (!match.hit)
4832 {
4833 match.value = nullptr;
4834 }
4835 return match;
4836 }
4837
4838 soulng::parser::Match XmlParser::AttDef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
4839 {
4840 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4841
4842
4843
4844
4845
4846
4847
4848 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4849 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
4850 soulng::parser::Match match(false);
4851 soulng::parser::Match* parentMatch0 = &match;
4852 {
4853 soulng::parser::Match match(false);
4854 soulng::parser::Match* parentMatch1 = &match;
4855 {
4856 soulng::parser::Match match(false);
4857 soulng::parser::Match* parentMatch2 = &match;
4858 {
4859 soulng::parser::Match match(false);
4860 soulng::parser::Match* parentMatch3 = &match;
4861 {
4862 soulng::parser::Match match(false);
4863 soulng::parser::Match* parentMatch4 = &match;
4864 {
4865 soulng::parser::Match match = XmlParser::S(lexer);
4866 *parentMatch4 = match;
4867 }
4868 if (match.hit)
4869 {
4870 soulng::parser::Match match(false);
4871 soulng::parser::Match* parentMatch5 = &match;
4872 {
4873 soulng::parser::Match match = XmlParser::Name(lexer);
4874 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4875 *parentMatch5 = match;
4876 }
4877 *parentMatch4 = match;
4878 }
4879 *parentMatch3 = match;
4880 }
4881 if (match.hit)
4882 {
4883 soulng::parser::Match match(false);
4884 soulng::parser::Match* parentMatch6 = &match;
4885 {
4886 soulng::parser::Match match = XmlParser::S(lexer);
4887 *parentMatch6 = match;
4888 }
4889 *parentMatch3 = match;
4890 }
4891 *parentMatch2 = match;
4892 }
4893 if (match.hit)
4894 {
4895 soulng::parser::Match match(false);
4896 soulng::parser::Match* parentMatch7 = &match;
4897 {
4898 soulng::parser::Match match = XmlParser::AttType(lexer);
4899 *parentMatch7 = match;
4900 }
4901 *parentMatch2 = match;
4902 }
4903 *parentMatch1 = match;
4904 }
4905 if (match.hit)
4906 {
4907 soulng::parser::Match match(false);
4908 soulng::parser::Match* parentMatch8 = &match;
4909 {
4910 soulng::parser::Match match = XmlParser::S(lexer);
4911 *parentMatch8 = match;
4912 }
4913 *parentMatch1 = match;
4914 }
4915 *parentMatch0 = match;
4916 }
4917 if (match.hit)
4918 {
4919 soulng::parser::Match match(false);
4920 soulng::parser::Match* parentMatch9 = &match;
4921 {
4922 soulng::parser::Match match = XmlParser::DefaultDecl(lexer, processor);
4923 *parentMatch9 = match;
4924 }
4925 *parentMatch0 = match;
4926 }
4927 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4928
4929
4930
4931
4932
4933 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4934 if (!match.hit)
4935 {
4936 match.value = nullptr;
4937 }
4938 return match;
4939 }
4940
4941 soulng::parser::Match XmlParser::AttType(TrivialLexer& lexer)
4942 {
4943 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4944
4945
4946
4947
4948
4949
4950
4951 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4952 soulng::parser::Match match(false);
4953 soulng::parser::Match* parentMatch0 = &match;
4954 {
4955 int64_t save = lexer.GetPos();
4956 soulng::parser::Match match(false);
4957 soulng::parser::Match* parentMatch1 = &match;
4958 {
4959 int64_t save = lexer.GetPos();
4960 soulng::parser::Match match = XmlParser::StringType(lexer);
4961 *parentMatch1 = match;
4962 if (!match.hit)
4963 {
4964 soulng::parser::Match match(false);
4965 soulng::parser::Match* parentMatch2 = &match;
4966 lexer.SetPos(save);
4967 {
4968 soulng::parser::Match match = XmlParser::TokenizedType(lexer);
4969 *parentMatch2 = match;
4970 }
4971 *parentMatch1 = match;
4972 }
4973 }
4974 *parentMatch0 = match;
4975 if (!match.hit)
4976 {
4977 soulng::parser::Match match(false);
4978 soulng::parser::Match* parentMatch3 = &match;
4979 lexer.SetPos(save);
4980 {
4981 soulng::parser::Match match = XmlParser::EnumeratedType(lexer);
4982 *parentMatch3 = match;
4983 }
4984 *parentMatch0 = match;
4985 }
4986 }
4987 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4988
4989
4990
4991
4992
4993 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4994 if (!match.hit)
4995 {
4996 match.value = nullptr;
4997 }
4998 return match;
4999 }
5000
5001 soulng::parser::Match XmlParser::StringType(TrivialLexer& lexer)
5002 {
5003 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5004
5005
5006
5007
5008
5009
5010
5011 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5012 soulng::parser::Match match(true);
5013 for (int i : s27)
5014 {
5015 if (*lexer == i)
5016 {
5017 ++lexer;
5018 }
5019 else
5020 {
5021 match.hit = false;
5022 break;
5023 }
5024 }
5025 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5026
5027
5028
5029
5030
5031 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5032 if (!match.hit)
5033 {
5034 match.value = nullptr;
5035 }
5036 return match;
5037 }
5038
5039 soulng::parser::Match XmlParser::TokenizedType(TrivialLexer& lexer)
5040 {
5041 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5042
5043
5044
5045
5046
5047
5048
5049 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5050 soulng::parser::Match match(false);
5051 soulng::parser::Match* parentMatch0 = &match;
5052 {
5053 int64_t save = lexer.GetPos();
5054 soulng::parser::Match match(false);
5055 soulng::parser::Match* parentMatch1 = &match;
5056 {
5057 int64_t save = lexer.GetPos();
5058 soulng::parser::Match match(false);
5059 soulng::parser::Match* parentMatch2 = &match;
5060 {
5061 int64_t save = lexer.GetPos();
5062 soulng::parser::Match match(false);
5063 soulng::parser::Match* parentMatch3 = &match;
5064 {
5065 int64_t save = lexer.GetPos();
5066 soulng::parser::Match match(false);
5067 soulng::parser::Match* parentMatch4 = &match;
5068 {
5069 int64_t save = lexer.GetPos();
5070 soulng::parser::Match match(false);
5071 soulng::parser::Match* parentMatch5 = &match;
5072 {
5073 int64_t save = lexer.GetPos();
5074 soulng::parser::Match match(true);
5075 for (int i : s28)
5076 {
5077 if (*lexer == i)
5078 {
5079 ++lexer;
5080 }
5081 else
5082 {
5083 match.hit = false;
5084 break;
5085 }
5086 }
5087 *parentMatch5 = match;
5088 if (!match.hit)
5089 {
5090 soulng::parser::Match match(false);
5091 soulng::parser::Match* parentMatch6 = &match;
5092 lexer.SetPos(save);
5093 {
5094 soulng::parser::Match match(true);
5095 for (int i : s29)
5096 {
5097 if (*lexer == i)
5098 {
5099 ++lexer;
5100 }
5101 else
5102 {
5103 match.hit = false;
5104 break;
5105 }
5106 }
5107 *parentMatch6 = match;
5108 }
5109 *parentMatch5 = match;
5110 }
5111 }
5112 *parentMatch4 = match;
5113 if (!match.hit)
5114 {
5115 soulng::parser::Match match(false);
5116 soulng::parser::Match* parentMatch7 = &match;
5117 lexer.SetPos(save);
5118 {
5119 soulng::parser::Match match(true);
5120 for (int i : s30)
5121 {
5122 if (*lexer == i)
5123 {
5124 ++lexer;
5125 }
5126 else
5127 {
5128 match.hit = false;
5129 break;
5130 }
5131 }
5132 *parentMatch7 = match;
5133 }
5134 *parentMatch4 = match;
5135 }
5136 }
5137 *parentMatch3 = match;
5138 if (!match.hit)
5139 {
5140 soulng::parser::Match match(false);
5141 soulng::parser::Match* parentMatch8 = &match;
5142 lexer.SetPos(save);
5143 {
5144 soulng::parser::Match match(true);
5145 for (int i : s31)
5146 {
5147 if (*lexer == i)
5148 {
5149 ++lexer;
5150 }
5151 else
5152 {
5153 match.hit = false;
5154 break;
5155 }
5156 }
5157 *parentMatch8 = match;
5158 }
5159 *parentMatch3 = match;
5160 }
5161 }
5162 *parentMatch2 = match;
5163 if (!match.hit)
5164 {
5165 soulng::parser::Match match(false);
5166 soulng::parser::Match* parentMatch9 = &match;
5167 lexer.SetPos(save);
5168 {
5169 soulng::parser::Match match(true);
5170 for (int i : s32)
5171 {
5172 if (*lexer == i)
5173 {
5174 ++lexer;
5175 }
5176 else
5177 {
5178 match.hit = false;
5179 break;
5180 }
5181 }
5182 *parentMatch9 = match;
5183 }
5184 *parentMatch2 = match;
5185 }
5186 }
5187 *parentMatch1 = match;
5188 if (!match.hit)
5189 {
5190 soulng::parser::Match match(false);
5191 soulng::parser::Match* parentMatch10 = &match;
5192 lexer.SetPos(save);
5193 {
5194 soulng::parser::Match match(true);
5195 for (int i : s33)
5196 {
5197 if (*lexer == i)
5198 {
5199 ++lexer;
5200 }
5201 else
5202 {
5203 match.hit = false;
5204 break;
5205 }
5206 }
5207 *parentMatch10 = match;
5208 }
5209 *parentMatch1 = match;
5210 }
5211 }
5212 *parentMatch0 = match;
5213 if (!match.hit)
5214 {
5215 soulng::parser::Match match(false);
5216 soulng::parser::Match* parentMatch11 = &match;
5217 lexer.SetPos(save);
5218 {
5219 soulng::parser::Match match(true);
5220 for (int i : s34)
5221 {
5222 if (*lexer == i)
5223 {
5224 ++lexer;
5225 }
5226 else
5227 {
5228 match.hit = false;
5229 break;
5230 }
5231 }
5232 *parentMatch11 = match;
5233 }
5234 *parentMatch0 = match;
5235 }
5236 }
5237 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5238
5239
5240
5241
5242
5243 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5244 if (!match.hit)
5245 {
5246 match.value = nullptr;
5247 }
5248 return match;
5249 }
5250
5251 soulng::parser::Match XmlParser::EnumeratedType(TrivialLexer& lexer)
5252 {
5253 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5254
5255
5256
5257
5258
5259
5260
5261 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5262 soulng::parser::Match match(false);
5263 soulng::parser::Match* parentMatch0 = &match;
5264 {
5265 int64_t save = lexer.GetPos();
5266 soulng::parser::Match match = XmlParser::NotationType(lexer);
5267 *parentMatch0 = match;
5268 if (!match.hit)
5269 {
5270 soulng::parser::Match match(false);
5271 soulng::parser::Match* parentMatch1 = &match;
5272 lexer.SetPos(save);
5273 {
5274 soulng::parser::Match match = XmlParser::Enumeration(lexer);
5275 *parentMatch1 = match;
5276 }
5277 *parentMatch0 = match;
5278 }
5279 }
5280 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5281
5282
5283
5284
5285
5286 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5287 if (!match.hit)
5288 {
5289 match.value = nullptr;
5290 }
5291 return match;
5292 }
5293
5294 soulng::parser::Match XmlParser::NotationType(TrivialLexer& lexer)
5295 {
5296 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5297
5298
5299
5300
5301
5302
5303
5304 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5305 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>f;
5306 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>n;
5307 soulng::parser::Match match(false);
5308 soulng::parser::Match* parentMatch0 = &match;
5309 {
5310 soulng::parser::Match match(false);
5311 soulng::parser::Match* parentMatch1 = &match;
5312 {
5313 soulng::parser::Match match(false);
5314 soulng::parser::Match* parentMatch2 = &match;
5315 {
5316 soulng::parser::Match match(false);
5317 soulng::parser::Match* parentMatch3 = &match;
5318 {
5319 soulng::parser::Match match(false);
5320 soulng::parser::Match* parentMatch4 = &match;
5321 {
5322 soulng::parser::Match match(false);
5323 soulng::parser::Match* parentMatch5 = &match;
5324 {
5325 soulng::parser::Match match(false);
5326 soulng::parser::Match* parentMatch6 = &match;
5327 {
5328 soulng::parser::Match match(true);
5329 for (int i : s35)
5330 {
5331 if (*lexer == i)
5332 {
5333 ++lexer;
5334 }
5335 else
5336 {
5337 match.hit = false;
5338 break;
5339 }
5340 }
5341 *parentMatch6 = match;
5342 }
5343 if (match.hit)
5344 {
5345 soulng::parser::Match match(false);
5346 soulng::parser::Match* parentMatch7 = &match;
5347 {
5348 soulng::parser::Match match = XmlParser::S(lexer);
5349 *parentMatch7 = match;
5350 }
5351 *parentMatch6 = match;
5352 }
5353 *parentMatch5 = match;
5354 }
5355 if (match.hit)
5356 {
5357 soulng::parser::Match match(false);
5358 soulng::parser::Match* parentMatch8 = &match;
5359 {
5360 soulng::parser::Match match(false);
5361 if (*lexer == 40)
5362 {
5363 ++lexer;
5364 match.hit = true;
5365 }
5366 *parentMatch8 = match;
5367 }
5368 *parentMatch5 = match;
5369 }
5370 *parentMatch4 = match;
5371 }
5372 if (match.hit)
5373 {
5374 soulng::parser::Match match(false);
5375 soulng::parser::Match* parentMatch9 = &match;
5376 {
5377 soulng::parser::Match match(true);
5378 int64_t save = lexer.GetPos();
5379 soulng::parser::Match* parentMatch10 = &match;
5380 {
5381 soulng::parser::Match match = XmlParser::S(lexer);
5382 if (match.hit)
5383 {
5384 *parentMatch10 = match;
5385 }
5386 else
5387 {
5388 lexer.SetPos(save);
5389 }
5390 }
5391 *parentMatch9 = match;
5392 }
5393 *parentMatch4 = match;
5394 }
5395 *parentMatch3 = match;
5396 }
5397 if (match.hit)
5398 {
5399 soulng::parser::Match match(false);
5400 soulng::parser::Match* parentMatch11 = &match;
5401 {
5402 soulng::parser::Match match = XmlParser::Name(lexer);
5403 f.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5404 *parentMatch11 = match;
5405 }
5406 *parentMatch3 = match;
5407 }
5408 *parentMatch2 = match;
5409 }
5410 if (match.hit)
5411 {
5412 soulng::parser::Match match(false);
5413 soulng::parser::Match* parentMatch12 = &match;
5414 {
5415 soulng::parser::Match match(true);
5416 soulng::parser::Match* parentMatch13 = &match;
5417 {
5418 while (true)
5419 {
5420 int64_t save = lexer.GetPos();
5421 {
5422 soulng::parser::Match match(false);
5423 soulng::parser::Match* parentMatch14 = &match;
5424 {
5425 soulng::parser::Match match(false);
5426 soulng::parser::Match* parentMatch15 = &match;
5427 {
5428 soulng::parser::Match match(false);
5429 soulng::parser::Match* parentMatch16 = &match;
5430 {
5431 soulng::parser::Match match(false);
5432 soulng::parser::Match* parentMatch17 = &match;
5433 {
5434 soulng::parser::Match match(true);
5435 int64_t save = lexer.GetPos();
5436 soulng::parser::Match* parentMatch18 = &match;
5437 {
5438 soulng::parser::Match match = XmlParser::S(lexer);
5439 if (match.hit)
5440 {
5441 *parentMatch18 = match;
5442 }
5443 else
5444 {
5445 lexer.SetPos(save);
5446 }
5447 }
5448 *parentMatch17 = match;
5449 }
5450 if (match.hit)
5451 {
5452 soulng::parser::Match match(false);
5453 soulng::parser::Match* parentMatch19 = &match;
5454 {
5455 soulng::parser::Match match(false);
5456 if (*lexer == 124)
5457 {
5458 ++lexer;
5459 match.hit = true;
5460 }
5461 *parentMatch19 = match;
5462 }
5463 *parentMatch17 = match;
5464 }
5465 *parentMatch16 = match;
5466 }
5467 if (match.hit)
5468 {
5469 soulng::parser::Match match(false);
5470 soulng::parser::Match* parentMatch20 = &match;
5471 {
5472 soulng::parser::Match match(true);
5473 int64_t save = lexer.GetPos();
5474 soulng::parser::Match* parentMatch21 = &match;
5475 {
5476 soulng::parser::Match match = XmlParser::S(lexer);
5477 if (match.hit)
5478 {
5479 *parentMatch21 = match;
5480 }
5481 else
5482 {
5483 lexer.SetPos(save);
5484 }
5485 }
5486 *parentMatch20 = match;
5487 }
5488 *parentMatch16 = match;
5489 }
5490 *parentMatch15 = match;
5491 }
5492 if (match.hit)
5493 {
5494 soulng::parser::Match match(false);
5495 soulng::parser::Match* parentMatch22 = &match;
5496 {
5497 soulng::parser::Match match = XmlParser::Name(lexer);
5498 n.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5499 *parentMatch22 = match;
5500 }
5501 *parentMatch15 = match;
5502 }
5503 *parentMatch14 = match;
5504 }
5505 if (match.hit)
5506 {
5507 *parentMatch13 = match;
5508 }
5509 else
5510 {
5511 lexer.SetPos(save);
5512 break;
5513 }
5514 }
5515 }
5516 }
5517 *parentMatch12 = match;
5518 }
5519 *parentMatch2 = match;
5520 }
5521 *parentMatch1 = match;
5522 }
5523 if (match.hit)
5524 {
5525 soulng::parser::Match match(false);
5526 soulng::parser::Match* parentMatch23 = &match;
5527 {
5528 soulng::parser::Match match(true);
5529 int64_t save = lexer.GetPos();
5530 soulng::parser::Match* parentMatch24 = &match;
5531 {
5532 soulng::parser::Match match = XmlParser::S(lexer);
5533 if (match.hit)
5534 {
5535 *parentMatch24 = match;
5536 }
5537 else
5538 {
5539 lexer.SetPos(save);
5540 }
5541 }
5542 *parentMatch23 = match;
5543 }
5544 *parentMatch1 = match;
5545 }
5546 *parentMatch0 = match;
5547 }
5548 if (match.hit)
5549 {
5550 soulng::parser::Match match(false);
5551 soulng::parser::Match* parentMatch25 = &match;
5552 {
5553 soulng::parser::Match match(false);
5554 if (*lexer == 41)
5555 {
5556 ++lexer;
5557 match.hit = true;
5558 }
5559 *parentMatch25 = match;
5560 }
5561 *parentMatch0 = match;
5562 }
5563 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5564
5565
5566
5567
5568
5569 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5570 if (!match.hit)
5571 {
5572 match.value = nullptr;
5573 }
5574 return match;
5575 }
5576
5577 soulng::parser::Match XmlParser::Enumeration(TrivialLexer& lexer)
5578 {
5579 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5580
5581
5582
5583
5584
5585
5586
5587 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5588 soulng::parser::Match match(false);
5589 soulng::parser::Match* parentMatch0 = &match;
5590 {
5591 soulng::parser::Match match(false);
5592 soulng::parser::Match* parentMatch1 = &match;
5593 {
5594 soulng::parser::Match match(false);
5595 soulng::parser::Match* parentMatch2 = &match;
5596 {
5597 soulng::parser::Match match(false);
5598 soulng::parser::Match* parentMatch3 = &match;
5599 {
5600 soulng::parser::Match match(false);
5601 soulng::parser::Match* parentMatch4 = &match;
5602 {
5603 soulng::parser::Match match(false);
5604 if (*lexer == 40)
5605 {
5606 ++lexer;
5607 match.hit = true;
5608 }
5609 *parentMatch4 = match;
5610 }
5611 if (match.hit)
5612 {
5613 soulng::parser::Match match(false);
5614 soulng::parser::Match* parentMatch5 = &match;
5615 {
5616 soulng::parser::Match match(true);
5617 int64_t save = lexer.GetPos();
5618 soulng::parser::Match* parentMatch6 = &match;
5619 {
5620 soulng::parser::Match match = XmlParser::S(lexer);
5621 if (match.hit)
5622 {
5623 *parentMatch6 = match;
5624 }
5625 else
5626 {
5627 lexer.SetPos(save);
5628 }
5629 }
5630 *parentMatch5 = match;
5631 }
5632 *parentMatch4 = match;
5633 }
5634 *parentMatch3 = match;
5635 }
5636 if (match.hit)
5637 {
5638 soulng::parser::Match match(false);
5639 soulng::parser::Match* parentMatch7 = &match;
5640 {
5641 soulng::parser::Match match = XmlParser::Nmtoken(lexer);
5642 *parentMatch7 = match;
5643 }
5644 *parentMatch3 = match;
5645 }
5646 *parentMatch2 = match;
5647 }
5648 if (match.hit)
5649 {
5650 soulng::parser::Match match(false);
5651 soulng::parser::Match* parentMatch8 = &match;
5652 {
5653 soulng::parser::Match match(true);
5654 soulng::parser::Match* parentMatch9 = &match;
5655 {
5656 while (true)
5657 {
5658 int64_t save = lexer.GetPos();
5659 {
5660 soulng::parser::Match match(false);
5661 soulng::parser::Match* parentMatch10 = &match;
5662 {
5663 soulng::parser::Match match(false);
5664 soulng::parser::Match* parentMatch11 = &match;
5665 {
5666 soulng::parser::Match match(false);
5667 soulng::parser::Match* parentMatch12 = &match;
5668 {
5669 soulng::parser::Match match(false);
5670 soulng::parser::Match* parentMatch13 = &match;
5671 {
5672 soulng::parser::Match match(true);
5673 int64_t save = lexer.GetPos();
5674 soulng::parser::Match* parentMatch14 = &match;
5675 {
5676 soulng::parser::Match match = XmlParser::S(lexer);
5677 if (match.hit)
5678 {
5679 *parentMatch14 = match;
5680 }
5681 else
5682 {
5683 lexer.SetPos(save);
5684 }
5685 }
5686 *parentMatch13 = match;
5687 }
5688 if (match.hit)
5689 {
5690 soulng::parser::Match match(false);
5691 soulng::parser::Match* parentMatch15 = &match;
5692 {
5693 soulng::parser::Match match(false);
5694 if (*lexer == 124)
5695 {
5696 ++lexer;
5697 match.hit = true;
5698 }
5699 *parentMatch15 = match;
5700 }
5701 *parentMatch13 = match;
5702 }
5703 *parentMatch12 = match;
5704 }
5705 if (match.hit)
5706 {
5707 soulng::parser::Match match(false);
5708 soulng::parser::Match* parentMatch16 = &match;
5709 {
5710 soulng::parser::Match match(true);
5711 int64_t save = lexer.GetPos();
5712 soulng::parser::Match* parentMatch17 = &match;
5713 {
5714 soulng::parser::Match match = XmlParser::S(lexer);
5715 if (match.hit)
5716 {
5717 *parentMatch17 = match;
5718 }
5719 else
5720 {
5721 lexer.SetPos(save);
5722 }
5723 }
5724 *parentMatch16 = match;
5725 }
5726 *parentMatch12 = match;
5727 }
5728 *parentMatch11 = match;
5729 }
5730 if (match.hit)
5731 {
5732 soulng::parser::Match match(false);
5733 soulng::parser::Match* parentMatch18 = &match;
5734 {
5735 soulng::parser::Match match = XmlParser::Nmtoken(lexer);
5736 *parentMatch18 = match;
5737 }
5738 *parentMatch11 = match;
5739 }
5740 *parentMatch10 = match;
5741 }
5742 if (match.hit)
5743 {
5744 *parentMatch9 = match;
5745 }
5746 else
5747 {
5748 lexer.SetPos(save);
5749 break;
5750 }
5751 }
5752 }
5753 }
5754 *parentMatch8 = match;
5755 }
5756 *parentMatch2 = match;
5757 }
5758 *parentMatch1 = match;
5759 }
5760 if (match.hit)
5761 {
5762 soulng::parser::Match match(false);
5763 soulng::parser::Match* parentMatch19 = &match;
5764 {
5765 soulng::parser::Match match(true);
5766 int64_t save = lexer.GetPos();
5767 soulng::parser::Match* parentMatch20 = &match;
5768 {
5769 soulng::parser::Match match = XmlParser::S(lexer);
5770 if (match.hit)
5771 {
5772 *parentMatch20 = match;
5773 }
5774 else
5775 {
5776 lexer.SetPos(save);
5777 }
5778 }
5779 *parentMatch19 = match;
5780 }
5781 *parentMatch1 = match;
5782 }
5783 *parentMatch0 = match;
5784 }
5785 if (match.hit)
5786 {
5787 soulng::parser::Match match(false);
5788 soulng::parser::Match* parentMatch21 = &match;
5789 {
5790 soulng::parser::Match match(false);
5791 if (*lexer == 41)
5792 {
5793 ++lexer;
5794 match.hit = true;
5795 }
5796 *parentMatch21 = match;
5797 }
5798 *parentMatch0 = match;
5799 }
5800 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5801
5802
5803
5804
5805
5806 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5807 if (!match.hit)
5808 {
5809 match.value = nullptr;
5810 }
5811 return match;
5812 }
5813
5814 soulng::parser::Match XmlParser::DefaultDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
5815 {
5816 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5817
5818
5819
5820
5821
5822
5823
5824 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5825 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>attVAlue;
5826 soulng::parser::Match match(false);
5827 soulng::parser::Match* parentMatch0 = &match;
5828 {
5829 int64_t save = lexer.GetPos();
5830 soulng::parser::Match match(false);
5831 soulng::parser::Match* parentMatch1 = &match;
5832 {
5833 int64_t save = lexer.GetPos();
5834 soulng::parser::Match match(true);
5835 for (int i : s36)
5836 {
5837 if (*lexer == i)
5838 {
5839 ++lexer;
5840 }
5841 else
5842 {
5843 match.hit = false;
5844 break;
5845 }
5846 }
5847 *parentMatch1 = match;
5848 if (!match.hit)
5849 {
5850 soulng::parser::Match match(false);
5851 soulng::parser::Match* parentMatch2 = &match;
5852 lexer.SetPos(save);
5853 {
5854 soulng::parser::Match match(true);
5855 for (int i : s37)
5856 {
5857 if (*lexer == i)
5858 {
5859 ++lexer;
5860 }
5861 else
5862 {
5863 match.hit = false;
5864 break;
5865 }
5866 }
5867 *parentMatch2 = match;
5868 }
5869 *parentMatch1 = match;
5870 }
5871 }
5872 *parentMatch0 = match;
5873 if (!match.hit)
5874 {
5875 soulng::parser::Match match(false);
5876 soulng::parser::Match* parentMatch3 = &match;
5877 lexer.SetPos(save);
5878 {
5879 soulng::parser::Match match(false);
5880 soulng::parser::Match* parentMatch4 = &match;
5881 {
5882 soulng::parser::Match match(false);
5883 soulng::parser::Match* parentMatch5 = &match;
5884 {
5885 soulng::parser::Match match(true);
5886 int64_t save = lexer.GetPos();
5887 soulng::parser::Match* parentMatch6 = &match;
5888 {
5889 soulng::parser::Match match(false);
5890 soulng::parser::Match* parentMatch7 = &match;
5891 {
5892 soulng::parser::Match match(false);
5893 soulng::parser::Match* parentMatch8 = &match;
5894 {
5895 soulng::parser::Match match(true);
5896 for (int i : s38)
5897 {
5898 if (*lexer == i)
5899 {
5900 ++lexer;
5901 }
5902 else
5903 {
5904 match.hit = false;
5905 break;
5906 }
5907 }
5908 *parentMatch8 = match;
5909 }
5910 if (match.hit)
5911 {
5912 soulng::parser::Match match(false);
5913 soulng::parser::Match* parentMatch9 = &match;
5914 {
5915 soulng::parser::Match match = XmlParser::S(lexer);
5916 *parentMatch9 = match;
5917 }
5918 *parentMatch8 = match;
5919 }
5920 *parentMatch7 = match;
5921 }
5922 if (match.hit)
5923 {
5924 *parentMatch6 = match;
5925 }
5926 else
5927 {
5928 lexer.SetPos(save);
5929 }
5930 }
5931 *parentMatch5 = match;
5932 }
5933 if (match.hit)
5934 {
5935 soulng::parser::Match match(false);
5936 soulng::parser::Match* parentMatch10 = &match;
5937 {
5938 soulng::parser::Match match = XmlParser::AttValue(lexer, processor);
5939 attVAlue.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5940 *parentMatch10 = match;
5941 }
5942 *parentMatch5 = match;
5943 }
5944 *parentMatch4 = match;
5945 }
5946 *parentMatch3 = match;
5947 }
5948 *parentMatch0 = match;
5949 }
5950 }
5951 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5952
5953
5954
5955
5956
5957 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5958 if (!match.hit)
5959 {
5960 match.value = nullptr;
5961 }
5962 return match;
5963 }
5964
5965 soulng::parser::Match XmlParser::EntityDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
5966 {
5967 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5968
5969
5970
5971
5972
5973
5974
5975 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5976 soulng::parser::Match match(false);
5977 soulng::parser::Match* parentMatch0 = &match;
5978 {
5979 int64_t save = lexer.GetPos();
5980 soulng::parser::Match match = XmlParser::GEDecl(lexer, processor);
5981 *parentMatch0 = match;
5982 if (!match.hit)
5983 {
5984 soulng::parser::Match match(false);
5985 soulng::parser::Match* parentMatch1 = &match;
5986 lexer.SetPos(save);
5987 {
5988 soulng::parser::Match match = XmlParser::PEDecl(lexer, processor);
5989 *parentMatch1 = match;
5990 }
5991 *parentMatch0 = match;
5992 }
5993 }
5994 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5995
5996
5997
5998
5999
6000 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6001 if (!match.hit)
6002 {
6003 match.value = nullptr;
6004 }
6005 return match;
6006 }
6007
6008 soulng::parser::Match XmlParser::GEDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6009 {
6010 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6011
6012
6013
6014
6015
6016
6017
6018 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6019 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>entityName;
6020 soulng::parser::Match match(false);
6021 soulng::parser::Match* parentMatch0 = &match;
6022 {
6023 soulng::parser::Match match(false);
6024 soulng::parser::Match* parentMatch1 = &match;
6025 {
6026 soulng::parser::Match match(false);
6027 soulng::parser::Match* parentMatch2 = &match;
6028 {
6029 soulng::parser::Match match(false);
6030 soulng::parser::Match* parentMatch3 = &match;
6031 {
6032 soulng::parser::Match match(false);
6033 soulng::parser::Match* parentMatch4 = &match;
6034 {
6035 soulng::parser::Match match(false);
6036 soulng::parser::Match* parentMatch5 = &match;
6037 {
6038 soulng::parser::Match match(true);
6039 for (int i : s39)
6040 {
6041 if (*lexer == i)
6042 {
6043 ++lexer;
6044 }
6045 else
6046 {
6047 match.hit = false;
6048 break;
6049 }
6050 }
6051 *parentMatch5 = match;
6052 }
6053 if (match.hit)
6054 {
6055 soulng::parser::Match match(false);
6056 soulng::parser::Match* parentMatch6 = &match;
6057 {
6058 soulng::parser::Match match = XmlParser::S(lexer);
6059 *parentMatch6 = match;
6060 }
6061 *parentMatch5 = match;
6062 }
6063 *parentMatch4 = match;
6064 }
6065 if (match.hit)
6066 {
6067 soulng::parser::Match match(false);
6068 soulng::parser::Match* parentMatch7 = &match;
6069 {
6070 soulng::parser::Match match = XmlParser::Name(lexer);
6071 entityName.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
6072 *parentMatch7 = match;
6073 }
6074 *parentMatch4 = match;
6075 }
6076 *parentMatch3 = match;
6077 }
6078 if (match.hit)
6079 {
6080 soulng::parser::Match match(false);
6081 soulng::parser::Match* parentMatch8 = &match;
6082 {
6083 soulng::parser::Match match = XmlParser::S(lexer);
6084 *parentMatch8 = match;
6085 }
6086 *parentMatch3 = match;
6087 }
6088 *parentMatch2 = match;
6089 }
6090 if (match.hit)
6091 {
6092 soulng::parser::Match match(false);
6093 soulng::parser::Match* parentMatch9 = &match;
6094 {
6095 soulng::parser::Match match = XmlParser::EntityDef(lexer, processor);
6096 *parentMatch9 = match;
6097 }
6098 *parentMatch2 = match;
6099 }
6100 *parentMatch1 = match;
6101 }
6102 if (match.hit)
6103 {
6104 soulng::parser::Match match(false);
6105 soulng::parser::Match* parentMatch10 = &match;
6106 {
6107 soulng::parser::Match match(true);
6108 int64_t save = lexer.GetPos();
6109 soulng::parser::Match* parentMatch11 = &match;
6110 {
6111 soulng::parser::Match match = XmlParser::S(lexer);
6112 if (match.hit)
6113 {
6114 *parentMatch11 = match;
6115 }
6116 else
6117 {
6118 lexer.SetPos(save);
6119 }
6120 }
6121 *parentMatch10 = match;
6122 }
6123 *parentMatch1 = match;
6124 }
6125 *parentMatch0 = match;
6126 }
6127 if (match.hit)
6128 {
6129 soulng::parser::Match match(false);
6130 soulng::parser::Match* parentMatch12 = &match;
6131 {
6132 soulng::parser::Match match(false);
6133 if (*lexer == 62)
6134 {
6135 ++lexer;
6136 match.hit = true;
6137 }
6138 *parentMatch12 = match;
6139 }
6140 *parentMatch0 = match;
6141 }
6142 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6143
6144
6145
6146
6147
6148 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6149 if (!match.hit)
6150 {
6151 match.value = nullptr;
6152 }
6153 return match;
6154 }
6155
6156 soulng::parser::Match XmlParser::PEDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6157 {
6158 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6159
6160
6161
6162
6163
6164
6165
6166 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6167 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>peName;
6168 soulng::parser::Match match(false);
6169 soulng::parser::Match* parentMatch0 = &match;
6170 {
6171 soulng::parser::Match match(false);
6172 soulng::parser::Match* parentMatch1 = &match;
6173 {
6174 soulng::parser::Match match(false);
6175 soulng::parser::Match* parentMatch2 = &match;
6176 {
6177 soulng::parser::Match match(false);
6178 soulng::parser::Match* parentMatch3 = &match;
6179 {
6180 soulng::parser::Match match(false);
6181 soulng::parser::Match* parentMatch4 = &match;
6182 {
6183 soulng::parser::Match match(false);
6184 soulng::parser::Match* parentMatch5 = &match;
6185 {
6186 soulng::parser::Match match(false);
6187 soulng::parser::Match* parentMatch6 = &match;
6188 {
6189 soulng::parser::Match match(false);
6190 soulng::parser::Match* parentMatch7 = &match;
6191 {
6192 soulng::parser::Match match(true);
6193 for (int i : s40)
6194 {
6195 if (*lexer == i)
6196 {
6197 ++lexer;
6198 }
6199 else
6200 {
6201 match.hit = false;
6202 break;
6203 }
6204 }
6205 *parentMatch7 = match;
6206 }
6207 if (match.hit)
6208 {
6209 soulng::parser::Match match(false);
6210 soulng::parser::Match* parentMatch8 = &match;
6211 {
6212 soulng::parser::Match match = XmlParser::S(lexer);
6213 *parentMatch8 = match;
6214 }
6215 *parentMatch7 = match;
6216 }
6217 *parentMatch6 = match;
6218 }
6219 if (match.hit)
6220 {
6221 soulng::parser::Match match(false);
6222 soulng::parser::Match* parentMatch9 = &match;
6223 {
6224 soulng::parser::Match match(false);
6225 if (*lexer == 37)
6226 {
6227 ++lexer;
6228 match.hit = true;
6229 }
6230 *parentMatch9 = match;
6231 }
6232 *parentMatch6 = match;
6233 }
6234 *parentMatch5 = match;
6235 }
6236 if (match.hit)
6237 {
6238 soulng::parser::Match match(false);
6239 soulng::parser::Match* parentMatch10 = &match;
6240 {
6241 soulng::parser::Match match = XmlParser::S(lexer);
6242 *parentMatch10 = match;
6243 }
6244 *parentMatch5 = match;
6245 }
6246 *parentMatch4 = match;
6247 }
6248 if (match.hit)
6249 {
6250 soulng::parser::Match match(false);
6251 soulng::parser::Match* parentMatch11 = &match;
6252 {
6253 soulng::parser::Match match = XmlParser::Name(lexer);
6254 peName.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
6255 *parentMatch11 = match;
6256 }
6257 *parentMatch4 = match;
6258 }
6259 *parentMatch3 = match;
6260 }
6261 if (match.hit)
6262 {
6263 soulng::parser::Match match(false);
6264 soulng::parser::Match* parentMatch12 = &match;
6265 {
6266 soulng::parser::Match match = XmlParser::S(lexer);
6267 *parentMatch12 = match;
6268 }
6269 *parentMatch3 = match;
6270 }
6271 *parentMatch2 = match;
6272 }
6273 if (match.hit)
6274 {
6275 soulng::parser::Match match(false);
6276 soulng::parser::Match* parentMatch13 = &match;
6277 {
6278 soulng::parser::Match match = XmlParser::PEDef(lexer, processor);
6279 *parentMatch13 = match;
6280 }
6281 *parentMatch2 = match;
6282 }
6283 *parentMatch1 = match;
6284 }
6285 if (match.hit)
6286 {
6287 soulng::parser::Match match(false);
6288 soulng::parser::Match* parentMatch14 = &match;
6289 {
6290 soulng::parser::Match match(true);
6291 int64_t save = lexer.GetPos();
6292 soulng::parser::Match* parentMatch15 = &match;
6293 {
6294 soulng::parser::Match match = XmlParser::S(lexer);
6295 if (match.hit)
6296 {
6297 *parentMatch15 = match;
6298 }
6299 else
6300 {
6301 lexer.SetPos(save);
6302 }
6303 }
6304 *parentMatch14 = match;
6305 }
6306 *parentMatch1 = match;
6307 }
6308 *parentMatch0 = match;
6309 }
6310 if (match.hit)
6311 {
6312 soulng::parser::Match match(false);
6313 soulng::parser::Match* parentMatch16 = &match;
6314 {
6315 soulng::parser::Match match(false);
6316 if (*lexer == 62)
6317 {
6318 ++lexer;
6319 match.hit = true;
6320 }
6321 *parentMatch16 = match;
6322 }
6323 *parentMatch0 = match;
6324 }
6325 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6326
6327
6328
6329
6330
6331 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6332 if (!match.hit)
6333 {
6334 match.value = nullptr;
6335 }
6336 return match;
6337 }
6338
6339 soulng::parser::Match XmlParser::EntityDef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6340 {
6341 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6342
6343
6344
6345
6346
6347
6348
6349 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6350 soulng::parser::Match match(false);
6351 soulng::parser::Match* parentMatch0 = &match;
6352 {
6353 int64_t save = lexer.GetPos();
6354 soulng::parser::Match match = XmlParser::EntityValue(lexer, processor);
6355 *parentMatch0 = match;
6356 if (!match.hit)
6357 {
6358 soulng::parser::Match match(false);
6359 soulng::parser::Match* parentMatch1 = &match;
6360 lexer.SetPos(save);
6361 {
6362 soulng::parser::Match match(false);
6363 soulng::parser::Match* parentMatch2 = &match;
6364 {
6365 soulng::parser::Match match(false);
6366 soulng::parser::Match* parentMatch3 = &match;
6367 {
6368 soulng::parser::Match match = XmlParser::ExternalID(lexer);
6369 *parentMatch3 = match;
6370 }
6371 if (match.hit)
6372 {
6373 soulng::parser::Match match(false);
6374 soulng::parser::Match* parentMatch4 = &match;
6375 {
6376 soulng::parser::Match match(true);
6377 int64_t save = lexer.GetPos();
6378 soulng::parser::Match* parentMatch5 = &match;
6379 {
6380 soulng::parser::Match match = XmlParser::NDataDecl(lexer);
6381 if (match.hit)
6382 {
6383 *parentMatch5 = match;
6384 }
6385 else
6386 {
6387 lexer.SetPos(save);
6388 }
6389 }
6390 *parentMatch4 = match;
6391 }
6392 *parentMatch3 = match;
6393 }
6394 *parentMatch2 = match;
6395 }
6396 *parentMatch1 = match;
6397 }
6398 *parentMatch0 = match;
6399 }
6400 }
6401 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6402
6403
6404
6405
6406
6407 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6408 if (!match.hit)
6409 {
6410 match.value = nullptr;
6411 }
6412 return match;
6413 }
6414
6415 soulng::parser::Match XmlParser::PEDef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6416 {
6417 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6418
6419
6420
6421
6422
6423
6424
6425 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6426 soulng::parser::Match match(false);
6427 soulng::parser::Match* parentMatch0 = &match;
6428 {
6429 int64_t save = lexer.GetPos();
6430 soulng::parser::Match match = XmlParser::EntityValue(lexer, processor);
6431 *parentMatch0 = match;
6432 if (!match.hit)
6433 {
6434 soulng::parser::Match match(false);
6435 soulng::parser::Match* parentMatch1 = &match;
6436 lexer.SetPos(save);
6437 {
6438 soulng::parser::Match match = XmlParser::ExternalID(lexer);
6439 *parentMatch1 = match;
6440 }
6441 *parentMatch0 = match;
6442 }
6443 }
6444 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6445
6446
6447
6448
6449
6450 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6451 if (!match.hit)
6452 {
6453 match.value = nullptr;
6454 }
6455 return match;
6456 }
6457
6458 soulng::parser::Match XmlParser::EntityValue(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6459 {
6460 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6461
6462
6463
6464
6465
6466
6467
6468 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6469 soulng::parser::Match match(false);
6470 soulng::parser::Match* parentMatch0 = &match;
6471 {
6472 int64_t save = lexer.GetPos();
6473 soulng::parser::Match match(false);
6474 soulng::parser::Match* parentMatch1 = &match;
6475 {
6476 soulng::parser::Match match(false);
6477 soulng::parser::Match* parentMatch2 = &match;
6478 {
6479 soulng::parser::Match match(false);
6480 if (*lexer == 34)
6481 {
6482 ++lexer;
6483 match.hit = true;
6484 }
6485 *parentMatch2 = match;
6486 }
6487 if (match.hit)
6488 {
6489 soulng::parser::Match match(false);
6490 soulng::parser::Match* parentMatch3 = &match;
6491 {
6492 soulng::parser::Match match(true);
6493 soulng::parser::Match* parentMatch4 = &match;
6494 {
6495 while (true)
6496 {
6497 int64_t save = lexer.GetPos();
6498 {
6499 soulng::parser::Match match(false);
6500 soulng::parser::Match* parentMatch5 = &match;
6501 {
6502 soulng::parser::Match match(false);
6503 soulng::parser::Match* parentMatch6 = &match;
6504 {
6505 int64_t save = lexer.GetPos();
6506 soulng::parser::Match match(false);
6507 soulng::parser::Match* parentMatch7 = &match;
6508 {
6509 int64_t save = lexer.GetPos();
6510 soulng::parser::Match match(lexer.Pos() != lexer.End());
6511 for (const soulng::parser::Range& range : s41)
6512 {
6513 if (*lexer >= range.first && *lexer <= range.last)
6514 {
6515 match.hit = false;
6516 break;
6517 }
6518 }
6519 if (match.hit)
6520 {
6521 ++lexer;
6522 }
6523 *parentMatch7 = match;
6524 if (!match.hit)
6525 {
6526 soulng::parser::Match match(false);
6527 soulng::parser::Match* parentMatch8 = &match;
6528 lexer.SetPos(save);
6529 {
6530 soulng::parser::Match match = XmlParser::PEReference(lexer, processor);
6531 *parentMatch8 = match;
6532 }
6533 *parentMatch7 = match;
6534 }
6535 }
6536 *parentMatch6 = match;
6537 if (!match.hit)
6538 {
6539 soulng::parser::Match match(false);
6540 soulng::parser::Match* parentMatch9 = &match;
6541 lexer.SetPos(save);
6542 {
6543 soulng::parser::Match match = XmlParser::Reference(lexer, processor);
6544 *parentMatch9 = match;
6545 }
6546 *parentMatch6 = match;
6547 }
6548 }
6549 *parentMatch5 = match;
6550 }
6551 if (match.hit)
6552 {
6553 *parentMatch4 = match;
6554 }
6555 else
6556 {
6557 lexer.SetPos(save);
6558 break;
6559 }
6560 }
6561 }
6562 }
6563 *parentMatch3 = match;
6564 }
6565 *parentMatch2 = match;
6566 }
6567 *parentMatch1 = match;
6568 }
6569 if (match.hit)
6570 {
6571 soulng::parser::Match match(false);
6572 soulng::parser::Match* parentMatch10 = &match;
6573 {
6574 soulng::parser::Match match(false);
6575 if (*lexer == 34)
6576 {
6577 ++lexer;
6578 match.hit = true;
6579 }
6580 *parentMatch10 = match;
6581 }
6582 *parentMatch1 = match;
6583 }
6584 *parentMatch0 = match;
6585 if (!match.hit)
6586 {
6587 soulng::parser::Match match(false);
6588 soulng::parser::Match* parentMatch11 = &match;
6589 lexer.SetPos(save);
6590 {
6591 soulng::parser::Match match(false);
6592 soulng::parser::Match* parentMatch12 = &match;
6593 {
6594 soulng::parser::Match match(false);
6595 soulng::parser::Match* parentMatch13 = &match;
6596 {
6597 soulng::parser::Match match(false);
6598 if (*lexer == 39)
6599 {
6600 ++lexer;
6601 match.hit = true;
6602 }
6603 *parentMatch13 = match;
6604 }
6605 if (match.hit)
6606 {
6607 soulng::parser::Match match(false);
6608 soulng::parser::Match* parentMatch14 = &match;
6609 {
6610 soulng::parser::Match match(true);
6611 soulng::parser::Match* parentMatch15 = &match;
6612 {
6613 while (true)
6614 {
6615 int64_t save = lexer.GetPos();
6616 {
6617 soulng::parser::Match match(false);
6618 soulng::parser::Match* parentMatch16 = &match;
6619 {
6620 soulng::parser::Match match(false);
6621 soulng::parser::Match* parentMatch17 = &match;
6622 {
6623 int64_t save = lexer.GetPos();
6624 soulng::parser::Match match(false);
6625 soulng::parser::Match* parentMatch18 = &match;
6626 {
6627 int64_t save = lexer.GetPos();
6628 soulng::parser::Match match(lexer.Pos() != lexer.End());
6629 for (const soulng::parser::Range& range : s42)
6630 {
6631 if (*lexer >= range.first && *lexer <= range.last)
6632 {
6633 match.hit = false;
6634 break;
6635 }
6636 }
6637 if (match.hit)
6638 {
6639 ++lexer;
6640 }
6641 *parentMatch18 = match;
6642 if (!match.hit)
6643 {
6644 soulng::parser::Match match(false);
6645 soulng::parser::Match* parentMatch19 = &match;
6646 lexer.SetPos(save);
6647 {
6648 soulng::parser::Match match = XmlParser::PEReference(lexer, processor);
6649 *parentMatch19 = match;
6650 }
6651 *parentMatch18 = match;
6652 }
6653 }
6654 *parentMatch17 = match;
6655 if (!match.hit)
6656 {
6657 soulng::parser::Match match(false);
6658 soulng::parser::Match* parentMatch20 = &match;
6659 lexer.SetPos(save);
6660 {
6661 soulng::parser::Match match = XmlParser::Reference(lexer, processor);
6662 *parentMatch20 = match;
6663 }
6664 *parentMatch17 = match;
6665 }
6666 }
6667 *parentMatch16 = match;
6668 }
6669 if (match.hit)
6670 {
6671 *parentMatch15 = match;
6672 }
6673 else
6674 {
6675 lexer.SetPos(save);
6676 break;
6677 }
6678 }
6679 }
6680 }
6681 *parentMatch14 = match;
6682 }
6683 *parentMatch13 = match;
6684 }
6685 *parentMatch12 = match;
6686 }
6687 if (match.hit)
6688 {
6689 soulng::parser::Match match(false);
6690 soulng::parser::Match* parentMatch21 = &match;
6691 {
6692 soulng::parser::Match match(false);
6693 if (*lexer == 39)
6694 {
6695 ++lexer;
6696 match.hit = true;
6697 }
6698 *parentMatch21 = match;
6699 }
6700 *parentMatch12 = match;
6701 }
6702 *parentMatch11 = match;
6703 }
6704 *parentMatch0 = match;
6705 }
6706 }
6707 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6708
6709
6710
6711
6712
6713 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6714 if (!match.hit)
6715 {
6716 match.value = nullptr;
6717 }
6718 return match;
6719 }
6720
6721 soulng::parser::Match XmlParser::NDataDecl(TrivialLexer& lexer)
6722 {
6723 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6724
6725
6726
6727
6728
6729
6730
6731 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6732 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
6733 soulng::parser::Match match(false);
6734 soulng::parser::Match* parentMatch0 = &match;
6735 {
6736 soulng::parser::Match match(false);
6737 soulng::parser::Match* parentMatch1 = &match;
6738 {
6739 soulng::parser::Match match(false);
6740 soulng::parser::Match* parentMatch2 = &match;
6741 {
6742 soulng::parser::Match match = XmlParser::S(lexer);
6743 *parentMatch2 = match;
6744 }
6745 if (match.hit)
6746 {
6747 soulng::parser::Match match(false);
6748 soulng::parser::Match* parentMatch3 = &match;
6749 {
6750 soulng::parser::Match match(true);
6751 for (int i : s43)
6752 {
6753 if (*lexer == i)
6754 {
6755 ++lexer;
6756 }
6757 else
6758 {
6759 match.hit = false;
6760 break;
6761 }
6762 }
6763 *parentMatch3 = match;
6764 }
6765 *parentMatch2 = match;
6766 }
6767 *parentMatch1 = match;
6768 }
6769 if (match.hit)
6770 {
6771 soulng::parser::Match match(false);
6772 soulng::parser::Match* parentMatch4 = &match;
6773 {
6774 soulng::parser::Match match = XmlParser::S(lexer);
6775 *parentMatch4 = match;
6776 }
6777 *parentMatch1 = match;
6778 }
6779 *parentMatch0 = match;
6780 }
6781 if (match.hit)
6782 {
6783 soulng::parser::Match match(false);
6784 soulng::parser::Match* parentMatch5 = &match;
6785 {
6786 soulng::parser::Match match = XmlParser::Name(lexer);
6787 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
6788 *parentMatch5 = match;
6789 }
6790 *parentMatch0 = match;
6791 }
6792 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6793
6794
6795
6796
6797
6798 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6799 if (!match.hit)
6800 {
6801 match.value = nullptr;
6802 }
6803 return match;
6804 }
6805
6806 soulng::parser::Match XmlParser::PEReference(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6807 {
6808 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6809
6810
6811
6812
6813
6814
6815
6816 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6817 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
6818 soulng::parser::Match match(false);
6819 soulng::parser::Match* parentMatch0 = &match;
6820 {
6821 soulng::parser::Match match(false);
6822 soulng::parser::Match* parentMatch1 = &match;
6823 {
6824 soulng::parser::Match match(false);
6825 if (*lexer == 37)
6826 {
6827 ++lexer;
6828 match.hit = true;
6829 }
6830 *parentMatch1 = match;
6831 }
6832 if (match.hit)
6833 {
6834 soulng::parser::Match match(false);
6835 soulng::parser::Match* parentMatch2 = &match;
6836 {
6837 soulng::parser::Match match = XmlParser::Name(lexer);
6838 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
6839 *parentMatch2 = match;
6840 }
6841 *parentMatch1 = match;
6842 }
6843 *parentMatch0 = match;
6844 }
6845 if (match.hit)
6846 {
6847 soulng::parser::Match match(false);
6848 soulng::parser::Match* parentMatch3 = &match;
6849 {
6850 soulng::parser::Match match(false);
6851 if (*lexer == 59)
6852 {
6853 ++lexer;
6854 match.hit = true;
6855 }
6856 *parentMatch3 = match;
6857 }
6858 *parentMatch0 = match;
6859 }
6860 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6861
6862
6863
6864
6865
6866 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6867 if (!match.hit)
6868 {
6869 match.value = nullptr;
6870 }
6871 return match;
6872 }
6873
6874 soulng::parser::Match XmlParser::NotationDecl(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
6875 {
6876 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6877
6878
6879
6880
6881
6882
6883
6884 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6885 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
6886 soulng::parser::Match match(false);
6887 soulng::parser::Match* parentMatch0 = &match;
6888 {
6889 soulng::parser::Match match(false);
6890 soulng::parser::Match* parentMatch1 = &match;
6891 {
6892 soulng::parser::Match match(false);
6893 soulng::parser::Match* parentMatch2 = &match;
6894 {
6895 soulng::parser::Match match(false);
6896 soulng::parser::Match* parentMatch3 = &match;
6897 {
6898 soulng::parser::Match match(false);
6899 soulng::parser::Match* parentMatch4 = &match;
6900 {
6901 soulng::parser::Match match(false);
6902 soulng::parser::Match* parentMatch5 = &match;
6903 {
6904 soulng::parser::Match match(true);
6905 for (int i : s44)
6906 {
6907 if (*lexer == i)
6908 {
6909 ++lexer;
6910 }
6911 else
6912 {
6913 match.hit = false;
6914 break;
6915 }
6916 }
6917 *parentMatch5 = match;
6918 }
6919 if (match.hit)
6920 {
6921 soulng::parser::Match match(false);
6922 soulng::parser::Match* parentMatch6 = &match;
6923 {
6924 soulng::parser::Match match = XmlParser::S(lexer);
6925 *parentMatch6 = match;
6926 }
6927 *parentMatch5 = match;
6928 }
6929 *parentMatch4 = match;
6930 }
6931 if (match.hit)
6932 {
6933 soulng::parser::Match match(false);
6934 soulng::parser::Match* parentMatch7 = &match;
6935 {
6936 soulng::parser::Match match = XmlParser::Name(lexer);
6937 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
6938 *parentMatch7 = match;
6939 }
6940 *parentMatch4 = match;
6941 }
6942 *parentMatch3 = match;
6943 }
6944 if (match.hit)
6945 {
6946 soulng::parser::Match match(false);
6947 soulng::parser::Match* parentMatch8 = &match;
6948 {
6949 soulng::parser::Match match = XmlParser::S(lexer);
6950 *parentMatch8 = match;
6951 }
6952 *parentMatch3 = match;
6953 }
6954 *parentMatch2 = match;
6955 }
6956 if (match.hit)
6957 {
6958 soulng::parser::Match match(false);
6959 soulng::parser::Match* parentMatch9 = &match;
6960 {
6961 soulng::parser::Match match(false);
6962 soulng::parser::Match* parentMatch10 = &match;
6963 {
6964 soulng::parser::Match match(false);
6965 soulng::parser::Match* parentMatch11 = &match;
6966 {
6967 int64_t save = lexer.GetPos();
6968 soulng::parser::Match match = XmlParser::ExternalID(lexer);
6969 *parentMatch11 = match;
6970 if (!match.hit)
6971 {
6972 soulng::parser::Match match(false);
6973 soulng::parser::Match* parentMatch12 = &match;
6974 lexer.SetPos(save);
6975 {
6976 soulng::parser::Match match = XmlParser::PublicID(lexer);
6977 *parentMatch12 = match;
6978 }
6979 *parentMatch11 = match;
6980 }
6981 }
6982 *parentMatch10 = match;
6983 }
6984 *parentMatch9 = match;
6985 }
6986 *parentMatch2 = match;
6987 }
6988 *parentMatch1 = match;
6989 }
6990 if (match.hit)
6991 {
6992 soulng::parser::Match match(false);
6993 soulng::parser::Match* parentMatch13 = &match;
6994 {
6995 soulng::parser::Match match(true);
6996 int64_t save = lexer.GetPos();
6997 soulng::parser::Match* parentMatch14 = &match;
6998 {
6999 soulng::parser::Match match = XmlParser::S(lexer);
7000 if (match.hit)
7001 {
7002 *parentMatch14 = match;
7003 }
7004 else
7005 {
7006 lexer.SetPos(save);
7007 }
7008 }
7009 *parentMatch13 = match;
7010 }
7011 *parentMatch1 = match;
7012 }
7013 *parentMatch0 = match;
7014 }
7015 if (match.hit)
7016 {
7017 soulng::parser::Match match(false);
7018 soulng::parser::Match* parentMatch15 = &match;
7019 {
7020 soulng::parser::Match match(false);
7021 if (*lexer == 62)
7022 {
7023 ++lexer;
7024 match.hit = true;
7025 }
7026 *parentMatch15 = match;
7027 }
7028 *parentMatch0 = match;
7029 }
7030 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7031
7032
7033
7034
7035
7036 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7037 if (!match.hit)
7038 {
7039 match.value = nullptr;
7040 }
7041 return match;
7042 }
7043
7044 soulng::parser::Match XmlParser::PublicID(TrivialLexer& lexer)
7045 {
7046 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7047
7048
7049
7050
7051
7052
7053
7054 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7055 soulng::parser::Match match(false);
7056 soulng::parser::Match* parentMatch0 = &match;
7057 {
7058 soulng::parser::Match match(false);
7059 soulng::parser::Match* parentMatch1 = &match;
7060 {
7061 soulng::parser::Match match(true);
7062 for (int i : s45)
7063 {
7064 if (*lexer == i)
7065 {
7066 ++lexer;
7067 }
7068 else
7069 {
7070 match.hit = false;
7071 break;
7072 }
7073 }
7074 *parentMatch1 = match;
7075 }
7076 if (match.hit)
7077 {
7078 soulng::parser::Match match(false);
7079 soulng::parser::Match* parentMatch2 = &match;
7080 {
7081 soulng::parser::Match match = XmlParser::S(lexer);
7082 *parentMatch2 = match;
7083 }
7084 *parentMatch1 = match;
7085 }
7086 *parentMatch0 = match;
7087 }
7088 if (match.hit)
7089 {
7090 soulng::parser::Match match(false);
7091 soulng::parser::Match* parentMatch3 = &match;
7092 {
7093 soulng::parser::Match match = XmlParser::PubidLiteral(lexer);
7094 *parentMatch3 = match;
7095 }
7096 *parentMatch0 = match;
7097 }
7098 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7099
7100
7101
7102
7103
7104 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7105 if (!match.hit)
7106 {
7107 match.value = nullptr;
7108 }
7109 return match;
7110 }
7111
7112 soulng::parser::Match XmlParser::Element(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
7113 {
7114 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7115
7116
7117
7118
7119
7120
7121
7122 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7123 std::u32string tagName = std::u32string();
7124 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
7125 soulng::parser::Match match(false);
7126 soulng::parser::Match* parentMatch0 = &match;
7127 {
7128 soulng::parser::Match match(false);
7129 soulng::parser::Match* parentMatch1 = &match;
7130 {
7131 soulng::parser::Match match(false);
7132 soulng::parser::Match* parentMatch2 = &match;
7133 {
7134 soulng::parser::Match match(false);
7135 soulng::parser::Match* parentMatch3 = &match;
7136 {
7137 soulng::parser::Match match(false);
7138 if (*lexer == 60)
7139 {
7140 ++lexer;
7141 match.hit = true;
7142 }
7143 *parentMatch3 = match;
7144 }
7145 if (match.hit)
7146 {
7147 soulng::parser::Match match(false);
7148 soulng::parser::Match* parentMatch4 = &match;
7149 {
7150 soulng::parser::Match match(false);
7151 soulng::parser::Match* parentMatch5 = &match;
7152 {
7153 int64_t pos = lexer.GetPos();
7154 soulng::parser::Match match = XmlParser::Name(lexer);
7155 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
7156 if (match.hit)
7157 {
7158 tagName = name->value;
7159 processor->BeginStartTag(tagName);
7160 }
7161 *parentMatch5 = match;
7162 }
7163 *parentMatch4 = match;
7164 }
7165 *parentMatch3 = match;
7166 }
7167 *parentMatch2 = match;
7168 }
7169 if (match.hit)
7170 {
7171 soulng::parser::Match match(false);
7172 soulng::parser::Match* parentMatch6 = &match;
7173 {
7174 soulng::parser::Match match(true);
7175 soulng::parser::Match* parentMatch7 = &match;
7176 {
7177 while (true)
7178 {
7179 int64_t save = lexer.GetPos();
7180 {
7181 soulng::parser::Match match(false);
7182 soulng::parser::Match* parentMatch8 = &match;
7183 {
7184 soulng::parser::Match match(false);
7185 soulng::parser::Match* parentMatch9 = &match;
7186 {
7187 soulng::parser::Match match = XmlParser::S(lexer);
7188 *parentMatch9 = match;
7189 }
7190 if (match.hit)
7191 {
7192 soulng::parser::Match match(false);
7193 soulng::parser::Match* parentMatch10 = &match;
7194 {
7195 soulng::parser::Match match = XmlParser::Attribute(lexer, processor);
7196 *parentMatch10 = match;
7197 }
7198 *parentMatch9 = match;
7199 }
7200 *parentMatch8 = match;
7201 }
7202 if (match.hit)
7203 {
7204 *parentMatch7 = match;
7205 }
7206 else
7207 {
7208 lexer.SetPos(save);
7209 break;
7210 }
7211 }
7212 }
7213 }
7214 *parentMatch6 = match;
7215 }
7216 *parentMatch2 = match;
7217 }
7218 *parentMatch1 = match;
7219 }
7220 if (match.hit)
7221 {
7222 soulng::parser::Match match(false);
7223 soulng::parser::Match* parentMatch11 = &match;
7224 {
7225 soulng::parser::Match match(true);
7226 int64_t save = lexer.GetPos();
7227 soulng::parser::Match* parentMatch12 = &match;
7228 {
7229 soulng::parser::Match match = XmlParser::S(lexer);
7230 if (match.hit)
7231 {
7232 *parentMatch12 = match;
7233 }
7234 else
7235 {
7236 lexer.SetPos(save);
7237 }
7238 }
7239 *parentMatch11 = match;
7240 }
7241 *parentMatch1 = match;
7242 }
7243 *parentMatch0 = match;
7244 }
7245 if (match.hit)
7246 {
7247 soulng::parser::Match match(false);
7248 soulng::parser::Match* parentMatch13 = &match;
7249 {
7250 soulng::parser::Match match(false);
7251 soulng::parser::Match* parentMatch14 = &match;
7252 {
7253 soulng::parser::Match match(false);
7254 soulng::parser::Match* parentMatch15 = &match;
7255 {
7256 int64_t save = lexer.GetPos();
7257 soulng::parser::Match match(false);
7258 soulng::parser::Match* parentMatch16 = &match;
7259 {
7260 int64_t pos = lexer.GetPos();
7261 soulng::lexer::Span span = lexer.GetSpan();
7262 soulng::parser::Match match(true);
7263 for (int i : s46)
7264 {
7265 if (*lexer == i)
7266 {
7267 ++lexer;
7268 }
7269 else
7270 {
7271 match.hit = false;
7272 break;
7273 }
7274 }
7275 if (match.hit)
7276 {
7277 processor->EndStartTag(span, lexer.FileName());
7278 processor->EndTag(tagName, span, lexer.FileName());
7279 }
7280 *parentMatch16 = match;
7281 }
7282 *parentMatch15 = match;
7283 if (!match.hit)
7284 {
7285 soulng::parser::Match match(false);
7286 soulng::parser::Match* parentMatch17 = &match;
7287 lexer.SetPos(save);
7288 {
7289 soulng::parser::Match match(false);
7290 soulng::parser::Match* parentMatch18 = &match;
7291 {
7292 soulng::parser::Match match(false);
7293 soulng::parser::Match* parentMatch19 = &match;
7294 {
7295 soulng::parser::Match match(false);
7296 soulng::parser::Match* parentMatch20 = &match;
7297 {
7298 int64_t pos = lexer.GetPos();
7299 soulng::lexer::Span span = lexer.GetSpan();
7300 soulng::parser::Match match(false);
7301 if (*lexer == 62)
7302 {
7303 ++lexer;
7304 match.hit = true;
7305 }
7306 if (match.hit)
7307 {
7308 processor->EndStartTag(span, lexer.FileName());
7309 }
7310 *parentMatch20 = match;
7311 }
7312 *parentMatch19 = match;
7313 }
7314 if (match.hit)
7315 {
7316 soulng::parser::Match match(false);
7317 soulng::parser::Match* parentMatch21 = &match;
7318 {
7319 soulng::parser::Match match = XmlParser::Content(lexer, processor);
7320 *parentMatch21 = match;
7321 }
7322 *parentMatch19 = match;
7323 }
7324 *parentMatch18 = match;
7325 }
7326 if (match.hit)
7327 {
7328 soulng::parser::Match match(false);
7329 soulng::parser::Match* parentMatch22 = &match;
7330 {
7331 soulng::parser::Match match = XmlParser::ETag(lexer, processor);
7332 *parentMatch22 = match;
7333 }
7334 *parentMatch18 = match;
7335 }
7336 *parentMatch17 = match;
7337 }
7338 *parentMatch15 = match;
7339 }
7340 }
7341 *parentMatch14 = match;
7342 }
7343 *parentMatch13 = match;
7344 }
7345 *parentMatch0 = match;
7346 }
7347 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7348
7349
7350
7351
7352
7353 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7354 if (!match.hit)
7355 {
7356 match.value = nullptr;
7357 }
7358 return match;
7359 }
7360
7361 soulng::parser::Match XmlParser::ETag(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
7362 {
7363 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7364
7365
7366
7367
7368
7369
7370
7371 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7372 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
7373 soulng::parser::Match match(false);
7374 soulng::parser::Match* parentMatch0 = &match;
7375 {
7376 soulng::parser::Match match(false);
7377 soulng::parser::Match* parentMatch1 = &match;
7378 {
7379 soulng::parser::Match match(false);
7380 soulng::parser::Match* parentMatch2 = &match;
7381 {
7382 soulng::parser::Match match(true);
7383 for (int i : s47)
7384 {
7385 if (*lexer == i)
7386 {
7387 ++lexer;
7388 }
7389 else
7390 {
7391 match.hit = false;
7392 break;
7393 }
7394 }
7395 *parentMatch2 = match;
7396 }
7397 if (match.hit)
7398 {
7399 soulng::parser::Match match(false);
7400 soulng::parser::Match* parentMatch3 = &match;
7401 {
7402 soulng::parser::Match match(false);
7403 soulng::parser::Match* parentMatch4 = &match;
7404 {
7405 int64_t pos = lexer.GetPos();
7406 soulng::lexer::Span span = lexer.GetSpan();
7407 soulng::parser::Match match = XmlParser::Name(lexer);
7408 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
7409 if (match.hit)
7410 {
7411 processor->EndTag(name->value, span, lexer.FileName());
7412 }
7413 *parentMatch4 = match;
7414 }
7415 *parentMatch3 = match;
7416 }
7417 *parentMatch2 = match;
7418 }
7419 *parentMatch1 = match;
7420 }
7421 if (match.hit)
7422 {
7423 soulng::parser::Match match(false);
7424 soulng::parser::Match* parentMatch5 = &match;
7425 {
7426 soulng::parser::Match match(true);
7427 int64_t save = lexer.GetPos();
7428 soulng::parser::Match* parentMatch6 = &match;
7429 {
7430 soulng::parser::Match match = XmlParser::S(lexer);
7431 if (match.hit)
7432 {
7433 *parentMatch6 = match;
7434 }
7435 else
7436 {
7437 lexer.SetPos(save);
7438 }
7439 }
7440 *parentMatch5 = match;
7441 }
7442 *parentMatch1 = match;
7443 }
7444 *parentMatch0 = match;
7445 }
7446 if (match.hit)
7447 {
7448 soulng::parser::Match match(false);
7449 soulng::parser::Match* parentMatch7 = &match;
7450 {
7451 soulng::parser::Match match(false);
7452 if (*lexer == 62)
7453 {
7454 ++lexer;
7455 match.hit = true;
7456 }
7457 *parentMatch7 = match;
7458 }
7459 *parentMatch0 = match;
7460 }
7461 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7462
7463
7464
7465
7466
7467 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7468 if (!match.hit)
7469 {
7470 match.value = nullptr;
7471 }
7472 return match;
7473 }
7474
7475 soulng::parser::Match XmlParser::Content(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
7476 {
7477 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7478
7479
7480
7481
7482
7483
7484
7485 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7486 soulng::parser::Match match(false);
7487 soulng::parser::Match* parentMatch0 = &match;
7488 {
7489 soulng::parser::Match match(true);
7490 int64_t save = lexer.GetPos();
7491 soulng::parser::Match* parentMatch1 = &match;
7492 {
7493 soulng::parser::Match match = XmlParser::CharData(lexer, processor);
7494 if (match.hit)
7495 {
7496 *parentMatch1 = match;
7497 }
7498 else
7499 {
7500 lexer.SetPos(save);
7501 }
7502 }
7503 *parentMatch0 = match;
7504 }
7505 if (match.hit)
7506 {
7507 soulng::parser::Match match(false);
7508 soulng::parser::Match* parentMatch2 = &match;
7509 {
7510 soulng::parser::Match match(true);
7511 soulng::parser::Match* parentMatch3 = &match;
7512 {
7513 while (true)
7514 {
7515 int64_t save = lexer.GetPos();
7516 {
7517 soulng::parser::Match match(false);
7518 soulng::parser::Match* parentMatch4 = &match;
7519 {
7520 soulng::parser::Match match(false);
7521 soulng::parser::Match* parentMatch5 = &match;
7522 {
7523 soulng::parser::Match match(false);
7524 soulng::parser::Match* parentMatch6 = &match;
7525 {
7526 soulng::parser::Match match(false);
7527 soulng::parser::Match* parentMatch7 = &match;
7528 {
7529 int64_t save = lexer.GetPos();
7530 soulng::parser::Match match(false);
7531 soulng::parser::Match* parentMatch8 = &match;
7532 {
7533 int64_t save = lexer.GetPos();
7534 soulng::parser::Match match(false);
7535 soulng::parser::Match* parentMatch9 = &match;
7536 {
7537 int64_t save = lexer.GetPos();
7538 soulng::parser::Match match(false);
7539 soulng::parser::Match* parentMatch10 = &match;
7540 {
7541 int64_t save = lexer.GetPos();
7542 soulng::parser::Match match = XmlParser::Element(lexer, processor);
7543 *parentMatch10 = match;
7544 if (!match.hit)
7545 {
7546 soulng::parser::Match match(false);
7547 soulng::parser::Match* parentMatch11 = &match;
7548 lexer.SetPos(save);
7549 {
7550 soulng::parser::Match match = XmlParser::Reference(lexer, processor);
7551 *parentMatch11 = match;
7552 }
7553 *parentMatch10 = match;
7554 }
7555 }
7556 *parentMatch9 = match;
7557 if (!match.hit)
7558 {
7559 soulng::parser::Match match(false);
7560 soulng::parser::Match* parentMatch12 = &match;
7561 lexer.SetPos(save);
7562 {
7563 soulng::parser::Match match = XmlParser::CDSect(lexer, processor);
7564 *parentMatch12 = match;
7565 }
7566 *parentMatch9 = match;
7567 }
7568 }
7569 *parentMatch8 = match;
7570 if (!match.hit)
7571 {
7572 soulng::parser::Match match(false);
7573 soulng::parser::Match* parentMatch13 = &match;
7574 lexer.SetPos(save);
7575 {
7576 soulng::parser::Match match = XmlParser::PI(lexer, processor);
7577 *parentMatch13 = match;
7578 }
7579 *parentMatch8 = match;
7580 }
7581 }
7582 *parentMatch7 = match;
7583 if (!match.hit)
7584 {
7585 soulng::parser::Match match(false);
7586 soulng::parser::Match* parentMatch14 = &match;
7587 lexer.SetPos(save);
7588 {
7589 soulng::parser::Match match = XmlParser::Comment(lexer, processor);
7590 *parentMatch14 = match;
7591 }
7592 *parentMatch7 = match;
7593 }
7594 }
7595 *parentMatch6 = match;
7596 }
7597 *parentMatch5 = match;
7598 }
7599 if (match.hit)
7600 {
7601 soulng::parser::Match match(false);
7602 soulng::parser::Match* parentMatch15 = &match;
7603 {
7604 soulng::parser::Match match(true);
7605 int64_t save = lexer.GetPos();
7606 soulng::parser::Match* parentMatch16 = &match;
7607 {
7608 soulng::parser::Match match = XmlParser::CharData(lexer, processor);
7609 if (match.hit)
7610 {
7611 *parentMatch16 = match;
7612 }
7613 else
7614 {
7615 lexer.SetPos(save);
7616 }
7617 }
7618 *parentMatch15 = match;
7619 }
7620 *parentMatch5 = match;
7621 }
7622 *parentMatch4 = match;
7623 }
7624 if (match.hit)
7625 {
7626 *parentMatch3 = match;
7627 }
7628 else
7629 {
7630 lexer.SetPos(save);
7631 break;
7632 }
7633 }
7634 }
7635 }
7636 *parentMatch2 = match;
7637 }
7638 *parentMatch0 = match;
7639 }
7640 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7641
7642
7643
7644
7645
7646 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7647 if (!match.hit)
7648 {
7649 match.value = nullptr;
7650 }
7651 return match;
7652 }
7653
7654 soulng::parser::Match XmlParser::CharDataChar(TrivialLexer& lexer)
7655 {
7656 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7657
7658
7659
7660
7661
7662
7663
7664 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7665 soulng::parser::Match match(false);
7666 soulng::parser::Match* parentMatch0 = &match;
7667 {
7668 int64_t pos = lexer.GetPos();
7669 soulng::parser::Match match(lexer.Pos() != lexer.End());
7670 for (const soulng::parser::Range& range : s48)
7671 {
7672 if (*lexer >= range.first && *lexer <= range.last)
7673 {
7674 match.hit = false;
7675 break;
7676 }
7677 }
7678 if (match.hit)
7679 {
7680 ++lexer;
7681 }
7682 if (match.hit)
7683 {
7684 Token token = lexer.GetToken(pos);
7685 {
7686 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7687
7688 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7689 return soulng::parser::Match(true, new soulng::parser::Value<char32_t>(static_cast<char32_t>(token.id)));
7690 }
7691 }
7692 *parentMatch0 = match;
7693 }
7694 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7695
7696
7697
7698
7699
7700 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7701 if (!match.hit)
7702 {
7703 match.value = nullptr;
7704 }
7705 return match;
7706 }
7707
7708 soulng::parser::Match XmlParser::CharData(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
7709 {
7710 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7711
7712
7713
7714
7715
7716
7717
7718 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7719 std::u32string s = std::u32string();
7720 std::unique_ptr<soulng::parser::soulng::parser::Value<char32_t>>chr;
7721 soulng::parser::Match match(false);
7722 soulng::parser::Match* parentMatch0 = &match;
7723 {
7724 int64_t pos = lexer.GetPos();
7725 soulng::parser::Match match(false);
7726 soulng::parser::Match* parentMatch1 = &match;
7727 {
7728 soulng::parser::Match match(false);
7729 soulng::parser::Match* parentMatch2 = &match;
7730 int64_t save = lexer.GetPos();
7731 {
7732 soulng::parser::Match match(true);
7733 soulng::parser::Match* parentMatch3 = &match;
7734 {
7735 while (true)
7736 {
7737 int64_t save = lexer.GetPos();
7738 {
7739 soulng::parser::Match match(false);
7740 soulng::parser::Match* parentMatch4 = &match;
7741 {
7742 soulng::parser::Match match(false);
7743 soulng::parser::Match* parentMatch5 = &match;
7744 {
7745 int64_t pos = lexer.GetPos();
7746 soulng::parser::Match match = XmlParser::CharDataChar(lexer);
7747 chr.reset(static_cast<soulng::parser::soulng::parser::Value<char32_t>*>(match.value));
7748 if (match.hit)
7749 {
7750 s.append(1, chr->value);
7751 }
7752 *parentMatch5 = match;
7753 }
7754 *parentMatch4 = match;
7755 }
7756 if (match.hit)
7757 {
7758 *parentMatch3 = match;
7759 }
7760 else
7761 {
7762 lexer.SetPos(save);
7763 break;
7764 }
7765 }
7766 }
7767 }
7768 *parentMatch2 = match;
7769 }
7770 if (match.hit)
7771 {
7772 soulng::parser::Match match(false);
7773 soulng::parser::Match* parentMatch6 = &match;
7774 {
7775 int64_t tmp = lexer.GetPos();
7776 lexer.SetPos(save);
7777 save = tmp;
7778 soulng::parser::Match match(false);
7779 soulng::parser::Match* parentMatch7 = &match;
7780 {
7781 soulng::parser::Match match(false);
7782 soulng::parser::Match* parentMatch8 = &match;
7783 {
7784 soulng::parser::Match match(false);
7785 soulng::parser::Match* parentMatch9 = &match;
7786 {
7787 soulng::parser::Match match(true);
7788 soulng::parser::Match* parentMatch10 = &match;
7789 {
7790 while (true)
7791 {
7792 int64_t save = lexer.GetPos();
7793 {
7794 soulng::parser::Match match(lexer.Pos() != lexer.End());
7795 for (const soulng::parser::Range& range : s49)
7796 {
7797 if (*lexer >= range.first && *lexer <= range.last)
7798 {
7799 match.hit = false;
7800 break;
7801 }
7802 }
7803 if (match.hit)
7804 {
7805 ++lexer;
7806 }
7807 if (match.hit)
7808 {
7809 *parentMatch10 = match;
7810 }
7811 else
7812 {
7813 lexer.SetPos(save);
7814 break;
7815 }
7816 }
7817 }
7818 }
7819 *parentMatch9 = match;
7820 }
7821 if (match.hit)
7822 {
7823 soulng::parser::Match match(false);
7824 soulng::parser::Match* parentMatch11 = &match;
7825 {
7826 soulng::parser::Match match(true);
7827 for (int i : s50)
7828 {
7829 if (*lexer == i)
7830 {
7831 ++lexer;
7832 }
7833 else
7834 {
7835 match.hit = false;
7836 break;
7837 }
7838 }
7839 *parentMatch11 = match;
7840 }
7841 *parentMatch9 = match;
7842 }
7843 *parentMatch8 = match;
7844 }
7845 if (match.hit)
7846 {
7847 soulng::parser::Match match(false);
7848 soulng::parser::Match* parentMatch12 = &match;
7849 {
7850 soulng::parser::Match match(true);
7851 soulng::parser::Match* parentMatch13 = &match;
7852 {
7853 while (true)
7854 {
7855 int64_t save = lexer.GetPos();
7856 {
7857 soulng::parser::Match match(lexer.Pos() != lexer.End());
7858 for (const soulng::parser::Range& range : s51)
7859 {
7860 if (*lexer >= range.first && *lexer <= range.last)
7861 {
7862 match.hit = false;
7863 break;
7864 }
7865 }
7866 if (match.hit)
7867 {
7868 ++lexer;
7869 }
7870 if (match.hit)
7871 {
7872 *parentMatch13 = match;
7873 }
7874 else
7875 {
7876 lexer.SetPos(save);
7877 break;
7878 }
7879 }
7880 }
7881 }
7882 *parentMatch12 = match;
7883 }
7884 *parentMatch8 = match;
7885 }
7886 *parentMatch7 = match;
7887 }
7888 *parentMatch6 = match;
7889 }
7890 if (!match.hit)
7891 {
7892 lexer.SetPos(save);
7893 }
7894 *parentMatch2 = soulng::parser::Match(!match.hit, match.value);
7895 }
7896 *parentMatch1 = match;
7897 }
7898 if (match.hit)
7899 {
7900 processor->Text(s);
7901 }
7902 *parentMatch0 = match;
7903 }
7904 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7905
7906
7907
7908
7909
7910 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7911 if (!match.hit)
7912 {
7913 match.value = nullptr;
7914 }
7915 return match;
7916 }
7917
7918 soulng::parser::Match XmlParser::CDSect(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
7919 {
7920 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7921
7922
7923
7924
7925
7926
7927
7928 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7929 std::u32string s = std::u32string();
7930 std::unique_ptr<soulng::parser::soulng::parser::Value<char32_t>>chr;
7931 soulng::parser::Match match(false);
7932 soulng::parser::Match* parentMatch0 = &match;
7933 {
7934 int64_t pos = lexer.GetPos();
7935 soulng::parser::Match match(false);
7936 soulng::parser::Match* parentMatch1 = &match;
7937 {
7938 soulng::parser::Match match(false);
7939 soulng::parser::Match* parentMatch2 = &match;
7940 {
7941 soulng::parser::Match match(false);
7942 soulng::parser::Match* parentMatch3 = &match;
7943 {
7944 soulng::parser::Match match(true);
7945 for (int i : s52)
7946 {
7947 if (*lexer == i)
7948 {
7949 ++lexer;
7950 }
7951 else
7952 {
7953 match.hit = false;
7954 break;
7955 }
7956 }
7957 *parentMatch3 = match;
7958 }
7959 if (match.hit)
7960 {
7961 soulng::parser::Match match(false);
7962 soulng::parser::Match* parentMatch4 = &match;
7963 {
7964 soulng::parser::Match match(true);
7965 soulng::parser::Match* parentMatch5 = &match;
7966 {
7967 while (true)
7968 {
7969 int64_t save = lexer.GetPos();
7970 {
7971 soulng::parser::Match match(false);
7972 soulng::parser::Match* parentMatch6 = &match;
7973 {
7974 soulng::parser::Match match(false);
7975 soulng::parser::Match* parentMatch7 = &match;
7976 {
7977 int64_t pos = lexer.GetPos();
7978 soulng::parser::Match match(false);
7979 soulng::parser::Match* parentMatch8 = &match;
7980 {
7981 soulng::parser::Match match(false);
7982 soulng::parser::Match* parentMatch9 = &match;
7983 int64_t save = lexer.GetPos();
7984 {
7985 soulng::parser::Match match = XmlParser::Char(lexer);
7986 chr.reset(static_cast<soulng::parser::soulng::parser::Value<char32_t>*>(match.value));
7987 *parentMatch9 = match;
7988 }
7989 if (match.hit)
7990 {
7991 soulng::parser::Match match(false);
7992 soulng::parser::Match* parentMatch10 = &match;
7993 {
7994 int64_t tmp = lexer.GetPos();
7995 lexer.SetPos(save);
7996 save = tmp;
7997 soulng::parser::Match match(true);
7998 for (int i : s53)
7999 {
8000 if (*lexer == i)
8001 {
8002 ++lexer;
8003 }
8004 else
8005 {
8006 match.hit = false;
8007 break;
8008 }
8009 }
8010 *parentMatch10 = match;
8011 }
8012 if (!match.hit)
8013 {
8014 lexer.SetPos(save);
8015 }
8016 *parentMatch9 = soulng::parser::Match(!match.hit, match.value);
8017 }
8018 *parentMatch8 = match;
8019 }
8020 if (match.hit)
8021 {
8022 s.append(1, chr->value);
8023 }
8024 *parentMatch7 = match;
8025 }
8026 *parentMatch6 = match;
8027 }
8028 if (match.hit)
8029 {
8030 *parentMatch5 = match;
8031 }
8032 else
8033 {
8034 lexer.SetPos(save);
8035 break;
8036 }
8037 }
8038 }
8039 }
8040 *parentMatch4 = match;
8041 }
8042 *parentMatch3 = match;
8043 }
8044 *parentMatch2 = match;
8045 }
8046 if (match.hit)
8047 {
8048 soulng::parser::Match match(false);
8049 soulng::parser::Match* parentMatch11 = &match;
8050 {
8051 soulng::parser::Match match(true);
8052 for (int i : s54)
8053 {
8054 if (*lexer == i)
8055 {
8056 ++lexer;
8057 }
8058 else
8059 {
8060 match.hit = false;
8061 break;
8062 }
8063 }
8064 *parentMatch11 = match;
8065 }
8066 *parentMatch2 = match;
8067 }
8068 *parentMatch1 = match;
8069 }
8070 if (match.hit)
8071 {
8072 processor->CDataSection(s);
8073 }
8074 *parentMatch0 = match;
8075 }
8076 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8077
8078
8079
8080
8081
8082 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8083 if (!match.hit)
8084 {
8085 match.value = nullptr;
8086 }
8087 return match;
8088 }
8089
8090 soulng::parser::Match XmlParser::Attribute(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
8091 {
8092 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8093
8094
8095
8096
8097
8098
8099
8100 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8101 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>attName;
8102 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>attValue;
8103 soulng::parser::Match match(false);
8104 soulng::parser::Match* parentMatch0 = &match;
8105 {
8106 soulng::parser::Match match(false);
8107 soulng::parser::Match* parentMatch1 = &match;
8108 {
8109 soulng::parser::Match match = XmlParser::Name(lexer);
8110 attName.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
8111 *parentMatch1 = match;
8112 }
8113 if (match.hit)
8114 {
8115 soulng::parser::Match match(false);
8116 soulng::parser::Match* parentMatch2 = &match;
8117 {
8118 soulng::parser::Match match = XmlParser::Eq(lexer);
8119 *parentMatch2 = match;
8120 }
8121 *parentMatch1 = match;
8122 }
8123 *parentMatch0 = match;
8124 }
8125 if (match.hit)
8126 {
8127 soulng::parser::Match match(false);
8128 soulng::parser::Match* parentMatch3 = &match;
8129 {
8130 soulng::parser::Match match(false);
8131 soulng::parser::Match* parentMatch4 = &match;
8132 {
8133 int64_t pos = lexer.GetPos();
8134 soulng::lexer::Span span = lexer.GetSpan();
8135 soulng::parser::Match match = XmlParser::AttValue(lexer, processor);
8136 attValue.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
8137 if (match.hit)
8138 {
8139 processor->AddAttribute(attName->value, attValue->value, span, lexer.FileName());
8140 }
8141 *parentMatch4 = match;
8142 }
8143 *parentMatch3 = match;
8144 }
8145 *parentMatch0 = match;
8146 }
8147 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8148
8149
8150
8151
8152
8153 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8154 if (!match.hit)
8155 {
8156 match.value = nullptr;
8157 }
8158 return match;
8159 }
8160
8161 soulng::parser::Match XmlParser::AttValueDQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
8162 {
8163 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8164
8165
8166
8167
8168
8169
8170
8171 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8172 soulng::parser::Match match(false);
8173 soulng::parser::Match* parentMatch0 = &match;
8174 {
8175 soulng::parser::Match match(false);
8176 soulng::parser::Match* parentMatch1 = &match;
8177 {
8178 soulng::parser::Match match(false);
8179 soulng::parser::Match* parentMatch2 = &match;
8180 {
8181 int64_t pos = lexer.GetPos();
8182 soulng::parser::Match match(false);
8183 if (*lexer == 34)
8184 {
8185 ++lexer;
8186 match.hit = true;
8187 }
8188 if (match.hit)
8189 {
8190 processor->BeginAttributeValue();
8191 }
8192 *parentMatch2 = match;
8193 }
8194 *parentMatch1 = match;
8195 }
8196 if (match.hit)
8197 {
8198 soulng::parser::Match match(false);
8199 soulng::parser::Match* parentMatch3 = &match;
8200 {
8201 soulng::parser::Match match(true);
8202 soulng::parser::Match* parentMatch4 = &match;
8203 {
8204 while (true)
8205 {
8206 int64_t save = lexer.GetPos();
8207 {
8208 soulng::parser::Match match(false);
8209 soulng::parser::Match* parentMatch5 = &match;
8210 {
8211 soulng::parser::Match match(false);
8212 soulng::parser::Match* parentMatch6 = &match;
8213 {
8214 int64_t save = lexer.GetPos();
8215 soulng::parser::Match match(false);
8216 soulng::parser::Match* parentMatch7 = &match;
8217 {
8218 int64_t pos = lexer.GetPos();
8219 soulng::lexer::Span span = lexer.GetSpan();
8220 soulng::parser::Match match(lexer.Pos() != lexer.End());
8221 for (const soulng::parser::Range& range : s55)
8222 {
8223 if (*lexer >= range.first && *lexer <= range.last)
8224 {
8225 match.hit = false;
8226 break;
8227 }
8228 }
8229 if (match.hit)
8230 {
8231 ++lexer;
8232 }
8233 if (match.hit)
8234 {
8235 processor->AttValue().append(lexer.GetMatch(span));
8236 }
8237 *parentMatch7 = match;
8238 }
8239 *parentMatch6 = match;
8240 if (!match.hit)
8241 {
8242 soulng::parser::Match match(false);
8243 soulng::parser::Match* parentMatch8 = &match;
8244 lexer.SetPos(save);
8245 {
8246 soulng::parser::Match match = XmlParser::Reference(lexer, processor);
8247 *parentMatch8 = match;
8248 }
8249 *parentMatch6 = match;
8250 }
8251 }
8252 *parentMatch5 = match;
8253 }
8254 if (match.hit)
8255 {
8256 *parentMatch4 = match;
8257 }
8258 else
8259 {
8260 lexer.SetPos(save);
8261 break;
8262 }
8263 }
8264 }
8265 }
8266 *parentMatch3 = match;
8267 }
8268 *parentMatch1 = match;
8269 }
8270 *parentMatch0 = match;
8271 }
8272 if (match.hit)
8273 {
8274 soulng::parser::Match match(false);
8275 soulng::parser::Match* parentMatch9 = &match;
8276 {
8277 soulng::parser::Match match(false);
8278 soulng::parser::Match* parentMatch10 = &match;
8279 {
8280 int64_t pos = lexer.GetPos();
8281 soulng::parser::Match match(false);
8282 if (*lexer == 34)
8283 {
8284 ++lexer;
8285 match.hit = true;
8286 }
8287 if (match.hit)
8288 {
8289 std::u32string value = processor->AttValue();
8290 processor->EndAttributeValue();
8291 {
8292 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8293
8294 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8295 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(value));
8296 }
8297 }
8298 *parentMatch10 = match;
8299 }
8300 *parentMatch9 = match;
8301 }
8302 *parentMatch0 = match;
8303 }
8304 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8305
8306
8307
8308
8309
8310 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8311 if (!match.hit)
8312 {
8313 match.value = nullptr;
8314 }
8315 return match;
8316 }
8317
8318 soulng::parser::Match XmlParser::AttValueSQ(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
8319 {
8320 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8321
8322
8323
8324
8325
8326
8327
8328 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8329 soulng::parser::Match match(false);
8330 soulng::parser::Match* parentMatch0 = &match;
8331 {
8332 soulng::parser::Match match(false);
8333 soulng::parser::Match* parentMatch1 = &match;
8334 {
8335 soulng::parser::Match match(false);
8336 soulng::parser::Match* parentMatch2 = &match;
8337 {
8338 int64_t pos = lexer.GetPos();
8339 soulng::parser::Match match(false);
8340 if (*lexer == 39)
8341 {
8342 ++lexer;
8343 match.hit = true;
8344 }
8345 if (match.hit)
8346 {
8347 processor->BeginAttributeValue();
8348 }
8349 *parentMatch2 = match;
8350 }
8351 *parentMatch1 = match;
8352 }
8353 if (match.hit)
8354 {
8355 soulng::parser::Match match(false);
8356 soulng::parser::Match* parentMatch3 = &match;
8357 {
8358 soulng::parser::Match match(true);
8359 soulng::parser::Match* parentMatch4 = &match;
8360 {
8361 while (true)
8362 {
8363 int64_t save = lexer.GetPos();
8364 {
8365 soulng::parser::Match match(false);
8366 soulng::parser::Match* parentMatch5 = &match;
8367 {
8368 soulng::parser::Match match(false);
8369 soulng::parser::Match* parentMatch6 = &match;
8370 {
8371 int64_t save = lexer.GetPos();
8372 soulng::parser::Match match(false);
8373 soulng::parser::Match* parentMatch7 = &match;
8374 {
8375 int64_t pos = lexer.GetPos();
8376 soulng::lexer::Span span = lexer.GetSpan();
8377 soulng::parser::Match match(lexer.Pos() != lexer.End());
8378 for (const soulng::parser::Range& range : s56)
8379 {
8380 if (*lexer >= range.first && *lexer <= range.last)
8381 {
8382 match.hit = false;
8383 break;
8384 }
8385 }
8386 if (match.hit)
8387 {
8388 ++lexer;
8389 }
8390 if (match.hit)
8391 {
8392 processor->AttValue().append(lexer.GetMatch(span));
8393 }
8394 *parentMatch7 = match;
8395 }
8396 *parentMatch6 = match;
8397 if (!match.hit)
8398 {
8399 soulng::parser::Match match(false);
8400 soulng::parser::Match* parentMatch8 = &match;
8401 lexer.SetPos(save);
8402 {
8403 soulng::parser::Match match = XmlParser::Reference(lexer, processor);
8404 *parentMatch8 = match;
8405 }
8406 *parentMatch6 = match;
8407 }
8408 }
8409 *parentMatch5 = match;
8410 }
8411 if (match.hit)
8412 {
8413 *parentMatch4 = match;
8414 }
8415 else
8416 {
8417 lexer.SetPos(save);
8418 break;
8419 }
8420 }
8421 }
8422 }
8423 *parentMatch3 = match;
8424 }
8425 *parentMatch1 = match;
8426 }
8427 *parentMatch0 = match;
8428 }
8429 if (match.hit)
8430 {
8431 soulng::parser::Match match(false);
8432 soulng::parser::Match* parentMatch9 = &match;
8433 {
8434 soulng::parser::Match match(false);
8435 soulng::parser::Match* parentMatch10 = &match;
8436 {
8437 int64_t pos = lexer.GetPos();
8438 soulng::parser::Match match(false);
8439 if (*lexer == 39)
8440 {
8441 ++lexer;
8442 match.hit = true;
8443 }
8444 if (match.hit)
8445 {
8446 std::u32string value = processor->AttValue();
8447 processor->EndAttributeValue();
8448 {
8449 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8450
8451 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8452 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(value));
8453 }
8454 }
8455 *parentMatch10 = match;
8456 }
8457 *parentMatch9 = match;
8458 }
8459 *parentMatch0 = match;
8460 }
8461 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8462
8463
8464
8465
8466
8467 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8468 if (!match.hit)
8469 {
8470 match.value = nullptr;
8471 }
8472 return match;
8473 }
8474
8475 soulng::parser::Match XmlParser::AttValue(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
8476 {
8477 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8478
8479
8480
8481
8482
8483
8484
8485 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8486 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>attValueDQ;
8487 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>attValueSQ;
8488 soulng::parser::Match match(false);
8489 soulng::parser::Match* parentMatch0 = &match;
8490 {
8491 int64_t save = lexer.GetPos();
8492 soulng::parser::Match match(false);
8493 soulng::parser::Match* parentMatch1 = &match;
8494 {
8495 int64_t pos = lexer.GetPos();
8496 soulng::parser::Match match = XmlParser::AttValueDQ(lexer, processor);
8497 attValueDQ.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
8498 if (match.hit)
8499 {
8500 {
8501 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8502
8503 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8504 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(attValueDQ->value));
8505 }
8506 }
8507 *parentMatch1 = match;
8508 }
8509 *parentMatch0 = match;
8510 if (!match.hit)
8511 {
8512 soulng::parser::Match match(false);
8513 soulng::parser::Match* parentMatch2 = &match;
8514 lexer.SetPos(save);
8515 {
8516 soulng::parser::Match match(false);
8517 soulng::parser::Match* parentMatch3 = &match;
8518 {
8519 int64_t pos = lexer.GetPos();
8520 soulng::parser::Match match = XmlParser::AttValueSQ(lexer, processor);
8521 attValueSQ.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
8522 if (match.hit)
8523 {
8524 {
8525 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8526
8527 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8528 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(attValueSQ->value));
8529 }
8530 }
8531 *parentMatch3 = match;
8532 }
8533 *parentMatch2 = match;
8534 }
8535 *parentMatch0 = match;
8536 }
8537 }
8538 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8539
8540
8541
8542
8543
8544 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8545 if (!match.hit)
8546 {
8547 match.value = nullptr;
8548 }
8549 return match;
8550 }
8551
8552 soulng::parser::Match XmlParser::EntityRef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
8553 {
8554 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8555
8556
8557
8558
8559
8560
8561
8562 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8563 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
8564 soulng::parser::Match match(false);
8565 soulng::parser::Match* parentMatch0 = &match;
8566 {
8567 int64_t pos = lexer.GetPos();
8568 soulng::lexer::Span span = lexer.GetSpan();
8569 soulng::parser::Match match(false);
8570 soulng::parser::Match* parentMatch1 = &match;
8571 {
8572 soulng::parser::Match match(false);
8573 soulng::parser::Match* parentMatch2 = &match;
8574 {
8575 soulng::parser::Match match(false);
8576 soulng::parser::Match* parentMatch3 = &match;
8577 {
8578 soulng::parser::Match match(false);
8579 if (*lexer == 38)
8580 {
8581 ++lexer;
8582 match.hit = true;
8583 }
8584 *parentMatch3 = match;
8585 }
8586 if (match.hit)
8587 {
8588 soulng::parser::Match match(false);
8589 soulng::parser::Match* parentMatch4 = &match;
8590 {
8591 soulng::parser::Match match = XmlParser::Name(lexer);
8592 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
8593 *parentMatch4 = match;
8594 }
8595 *parentMatch3 = match;
8596 }
8597 *parentMatch2 = match;
8598 }
8599 if (match.hit)
8600 {
8601 soulng::parser::Match match(false);
8602 soulng::parser::Match* parentMatch5 = &match;
8603 {
8604 soulng::parser::Match match(false);
8605 if (*lexer == 59)
8606 {
8607 ++lexer;
8608 match.hit = true;
8609 }
8610 *parentMatch5 = match;
8611 }
8612 *parentMatch2 = match;
8613 }
8614 *parentMatch1 = match;
8615 }
8616 if (match.hit)
8617 {
8618 processor->EntityRef(name->value, span, lexer.FileName());
8619 }
8620 *parentMatch0 = match;
8621 }
8622 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8623
8624
8625
8626
8627
8628 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8629 if (!match.hit)
8630 {
8631 match.value = nullptr;
8632 }
8633 return match;
8634 }
8635
8636 soulng::parser::Match XmlParser::DecCodePoint(TrivialLexer& lexer)
8637 {
8638 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8639
8640
8641
8642
8643
8644
8645
8646 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8647 uint32_t val = uint32_t();
8648 soulng::parser::Match match(false);
8649 soulng::parser::Match* parentMatch0 = &match;
8650 {
8651 int64_t pos = lexer.GetPos();
8652 soulng::parser::Match match(false);
8653 soulng::parser::Match* parentMatch1 = &match;
8654 {
8655 soulng::parser::Match match(false);
8656 soulng::parser::Match* parentMatch2 = &match;
8657 {
8658 soulng::parser::Match match(false);
8659 soulng::parser::Match* parentMatch3 = &match;
8660 {
8661 soulng::parser::Match match(false);
8662 soulng::parser::Match* parentMatch4 = &match;
8663 {
8664 int64_t pos = lexer.GetPos();
8665 soulng::parser::Match match(false);
8666 for (const soulng::parser::Range& range : s57)
8667 {
8668 if (*lexer >= range.first && *lexer <= range.last)
8669 {
8670 match.hit = true;
8671 ++lexer;
8672 break;
8673 }
8674 }
8675 if (match.hit)
8676 {
8677 Token token = lexer.GetToken(pos);
8678 val = 10 * val + token.id - '0';
8679 }
8680 *parentMatch4 = match;
8681 }
8682 *parentMatch3 = match;
8683 }
8684 *parentMatch2 = match;
8685 }
8686 if (match.hit)
8687 {
8688 soulng::parser::Match match(true);
8689 soulng::parser::Match* parentMatch5 = &match;
8690 while (true)
8691 {
8692 int64_t save = lexer.GetPos();
8693 {
8694 soulng::parser::Match match(false);
8695 soulng::parser::Match* parentMatch6 = &match;
8696 {
8697 soulng::parser::Match match(false);
8698 soulng::parser::Match* parentMatch7 = &match;
8699 {
8700 int64_t pos = lexer.GetPos();
8701 soulng::parser::Match match(false);
8702 for (const soulng::parser::Range& range : s57)
8703 {
8704 if (*lexer >= range.first && *lexer <= range.last)
8705 {
8706 match.hit = true;
8707 ++lexer;
8708 break;
8709 }
8710 }
8711 if (match.hit)
8712 {
8713 Token token = lexer.GetToken(pos);
8714 val = 10 * val + token.id - '0';
8715 }
8716 *parentMatch7 = match;
8717 }
8718 *parentMatch6 = match;
8719 }
8720 if (match.hit)
8721 {
8722 *parentMatch5 = match;
8723 }
8724 else
8725 {
8726 lexer.SetPos(save);
8727 break;
8728 }
8729 }
8730 }
8731 }
8732 *parentMatch1 = match;
8733 }
8734 if (match.hit)
8735 {
8736 {
8737 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8738
8739 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8740 return soulng::parser::Match(true, new soulng::parser::Value<uint32_t>(val));
8741 }
8742 }
8743 *parentMatch0 = match;
8744 }
8745 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8746
8747
8748
8749
8750
8751 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8752 if (!match.hit)
8753 {
8754 match.value = nullptr;
8755 }
8756 return match;
8757 }
8758
8759 soulng::parser::Match XmlParser::HexCodePoint(TrivialLexer& lexer)
8760 {
8761 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8762
8763
8764
8765
8766
8767
8768
8769 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8770 uint32_t val = uint32_t();
8771 soulng::parser::Match match(false);
8772 soulng::parser::Match* parentMatch0 = &match;
8773 {
8774 int64_t pos = lexer.GetPos();
8775 soulng::parser::Match match(false);
8776 soulng::parser::Match* parentMatch1 = &match;
8777 {
8778 soulng::parser::Match match(false);
8779 soulng::parser::Match* parentMatch2 = &match;
8780 {
8781 soulng::parser::Match match(false);
8782 soulng::parser::Match* parentMatch3 = &match;
8783 {
8784 soulng::parser::Match match(false);
8785 soulng::parser::Match* parentMatch4 = &match;
8786 {
8787 int64_t pos = lexer.GetPos();
8788 soulng::parser::Match match(false);
8789 for (const soulng::parser::Range& range : s58)
8790 {
8791 if (*lexer >= range.first && *lexer <= range.last)
8792 {
8793 match.hit = true;
8794 ++lexer;
8795 break;
8796 }
8797 }
8798 if (match.hit)
8799 {
8800 Token token = lexer.GetToken(pos);
8801 if (token.id >= '0' && token.id <= '9') val = 16 * val + token.id - '0';
8802 else if (token.id >= 'a' && token.id <= 'f') val = 16 * val + 10 + token.id - 'a';
8803 else if (token.id >= 'A' && token.id <= 'F') val = 16 * val + 10 + token.id - 'A';
8804 }
8805 *parentMatch4 = match;
8806 }
8807 *parentMatch3 = match;
8808 }
8809 *parentMatch2 = match;
8810 }
8811 if (match.hit)
8812 {
8813 soulng::parser::Match match(true);
8814 soulng::parser::Match* parentMatch5 = &match;
8815 while (true)
8816 {
8817 int64_t save = lexer.GetPos();
8818 {
8819 soulng::parser::Match match(false);
8820 soulng::parser::Match* parentMatch6 = &match;
8821 {
8822 soulng::parser::Match match(false);
8823 soulng::parser::Match* parentMatch7 = &match;
8824 {
8825 int64_t pos = lexer.GetPos();
8826 soulng::parser::Match match(false);
8827 for (const soulng::parser::Range& range : s58)
8828 {
8829 if (*lexer >= range.first && *lexer <= range.last)
8830 {
8831 match.hit = true;
8832 ++lexer;
8833 break;
8834 }
8835 }
8836 if (match.hit)
8837 {
8838 Token token = lexer.GetToken(pos);
8839 if (token.id >= '0' && token.id <= '9') val = 16 * val + token.id - '0';
8840 else if (token.id >= 'a' && token.id <= 'f') val = 16 * val + 10 + token.id - 'a';
8841 else if (token.id >= 'A' && token.id <= 'F') val = 16 * val + 10 + token.id - 'A';
8842 }
8843 *parentMatch7 = match;
8844 }
8845 *parentMatch6 = match;
8846 }
8847 if (match.hit)
8848 {
8849 *parentMatch5 = match;
8850 }
8851 else
8852 {
8853 lexer.SetPos(save);
8854 break;
8855 }
8856 }
8857 }
8858 }
8859 *parentMatch1 = match;
8860 }
8861 if (match.hit)
8862 {
8863 {
8864 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8865
8866 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8867 return soulng::parser::Match(true, new soulng::parser::Value<uint32_t>(val));
8868 }
8869 }
8870 *parentMatch0 = match;
8871 }
8872 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8873
8874
8875
8876
8877
8878 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8879 if (!match.hit)
8880 {
8881 match.value = nullptr;
8882 }
8883 return match;
8884 }
8885
8886 soulng::parser::Match XmlParser::CharRef(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
8887 {
8888 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
8889
8890
8891
8892
8893
8894
8895
8896 #endif // SOULNG_PARSER_DEBUG_SUPPORT
8897 std::unique_ptr<soulng::parser::soulng::parser::Value<uint32_t>>decCodePoint;
8898 std::unique_ptr<soulng::parser::soulng::parser::Value<uint32_t>>hexCodePoint;
8899 soulng::parser::Match match(false);
8900 soulng::parser::Match* parentMatch0 = &match;
8901 {
8902 int64_t save = lexer.GetPos();
8903 soulng::parser::Match match(false);
8904 soulng::parser::Match* parentMatch1 = &match;
8905 {
8906 int64_t pos = lexer.GetPos();
8907 soulng::parser::Match match(false);
8908 soulng::parser::Match* parentMatch2 = &match;
8909 {
8910 soulng::parser::Match match(false);
8911 soulng::parser::Match* parentMatch3 = &match;
8912 {
8913 soulng::parser::Match match(false);
8914 soulng::parser::Match* parentMatch4 = &match;
8915 {
8916 soulng::parser::Match match(true);
8917 for (int i : s59)
8918 {
8919 if (*lexer == i)
8920 {
8921 ++lexer;
8922 }
8923 else
8924 {
8925 match.hit = false;
8926 break;
8927 }
8928 }
8929 *parentMatch4 = match;
8930 }
8931 if (match.hit)
8932 {
8933 soulng::parser::Match match(false);
8934 soulng::parser::Match* parentMatch5 = &match;
8935 {
8936 soulng::parser::Match match = XmlParser::DecCodePoint(lexer);
8937 decCodePoint.reset(static_cast<soulng::parser::soulng::parser::Value<uint32_t>*>(match.value));
8938 *parentMatch5 = match;
8939 }
8940 *parentMatch4 = match;
8941 }
8942 *parentMatch3 = match;
8943 }
8944 if (match.hit)
8945 {
8946 soulng::parser::Match match(false);
8947 soulng::parser::Match* parentMatch6 = &match;
8948 {
8949 soulng::parser::Match match(false);
8950 if (*lexer == 59)
8951 {
8952 ++lexer;
8953 match.hit = true;
8954 }
8955 *parentMatch6 = match;
8956 }
8957 *parentMatch3 = match;
8958 }
8959 *parentMatch2 = match;
8960 }
8961 if (match.hit)
8962 {
8963 processor->Text(std::u32string(1, static_cast<char32_t>(decCodePoint->value)));
8964 }
8965 *parentMatch1 = match;
8966 }
8967 *parentMatch0 = match;
8968 if (!match.hit)
8969 {
8970 soulng::parser::Match match(false);
8971 soulng::parser::Match* parentMatch7 = &match;
8972 lexer.SetPos(save);
8973 {
8974 soulng::parser::Match match(false);
8975 soulng::parser::Match* parentMatch8 = &match;
8976 {
8977 int64_t pos = lexer.GetPos();
8978 soulng::parser::Match match(false);
8979 soulng::parser::Match* parentMatch9 = &match;
8980 {
8981 soulng::parser::Match match(false);
8982 soulng::parser::Match* parentMatch10 = &match;
8983 {
8984 soulng::parser::Match match(false);
8985 soulng::parser::Match* parentMatch11 = &match;
8986 {
8987 soulng::parser::Match match(true);
8988 for (int i : s60)
8989 {
8990 if (*lexer == i)
8991 {
8992 ++lexer;
8993 }
8994 else
8995 {
8996 match.hit = false;
8997 break;
8998 }
8999 }
9000 *parentMatch11 = match;
9001 }
9002 if (match.hit)
9003 {
9004 soulng::parser::Match match(false);
9005 soulng::parser::Match* parentMatch12 = &match;
9006 {
9007 soulng::parser::Match match = XmlParser::HexCodePoint(lexer);
9008 hexCodePoint.reset(static_cast<soulng::parser::soulng::parser::Value<uint32_t>*>(match.value));
9009 *parentMatch12 = match;
9010 }
9011 *parentMatch11 = match;
9012 }
9013 *parentMatch10 = match;
9014 }
9015 if (match.hit)
9016 {
9017 soulng::parser::Match match(false);
9018 soulng::parser::Match* parentMatch13 = &match;
9019 {
9020 soulng::parser::Match match(false);
9021 if (*lexer == 59)
9022 {
9023 ++lexer;
9024 match.hit = true;
9025 }
9026 *parentMatch13 = match;
9027 }
9028 *parentMatch10 = match;
9029 }
9030 *parentMatch9 = match;
9031 }
9032 if (match.hit)
9033 {
9034 processor->Text(std::u32string(1, static_cast<char32_t>(hexCodePoint->value)));
9035 }
9036 *parentMatch8 = match;
9037 }
9038 *parentMatch7 = match;
9039 }
9040 *parentMatch0 = match;
9041 }
9042 }
9043 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9044
9045
9046
9047
9048
9049 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9050 if (!match.hit)
9051 {
9052 match.value = nullptr;
9053 }
9054 return match;
9055 }
9056
9057 soulng::parser::Match XmlParser::Reference(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
9058 {
9059 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9060
9061
9062
9063
9064
9065
9066
9067 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9068 soulng::parser::Match match(false);
9069 soulng::parser::Match* parentMatch0 = &match;
9070 {
9071 int64_t save = lexer.GetPos();
9072 soulng::parser::Match match = XmlParser::EntityRef(lexer, processor);
9073 *parentMatch0 = match;
9074 if (!match.hit)
9075 {
9076 soulng::parser::Match match(false);
9077 soulng::parser::Match* parentMatch1 = &match;
9078 lexer.SetPos(save);
9079 {
9080 soulng::parser::Match match = XmlParser::CharRef(lexer, processor);
9081 *parentMatch1 = match;
9082 }
9083 *parentMatch0 = match;
9084 }
9085 }
9086 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9087
9088
9089
9090
9091
9092 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9093 if (!match.hit)
9094 {
9095 match.value = nullptr;
9096 }
9097 return match;
9098 }
9099
9100 soulng::parser::Match XmlParser::Misc(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
9101 {
9102 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9103
9104
9105
9106
9107
9108
9109
9110 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9111 soulng::parser::Match match(false);
9112 soulng::parser::Match* parentMatch0 = &match;
9113 {
9114 int64_t save = lexer.GetPos();
9115 soulng::parser::Match match(false);
9116 soulng::parser::Match* parentMatch1 = &match;
9117 {
9118 int64_t save = lexer.GetPos();
9119 soulng::parser::Match match = XmlParser::Comment(lexer, processor);
9120 *parentMatch1 = match;
9121 if (!match.hit)
9122 {
9123 soulng::parser::Match match(false);
9124 soulng::parser::Match* parentMatch2 = &match;
9125 lexer.SetPos(save);
9126 {
9127 soulng::parser::Match match = XmlParser::PI(lexer, processor);
9128 *parentMatch2 = match;
9129 }
9130 *parentMatch1 = match;
9131 }
9132 }
9133 *parentMatch0 = match;
9134 if (!match.hit)
9135 {
9136 soulng::parser::Match match(false);
9137 soulng::parser::Match* parentMatch3 = &match;
9138 lexer.SetPos(save);
9139 {
9140 soulng::parser::Match match = XmlParser::S(lexer);
9141 *parentMatch3 = match;
9142 }
9143 *parentMatch0 = match;
9144 }
9145 }
9146 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9147
9148
9149
9150
9151
9152 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9153 if (!match.hit)
9154 {
9155 match.value = nullptr;
9156 }
9157 return match;
9158 }
9159
9160 soulng::parser::Match XmlParser::Comment(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
9161 {
9162 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9163
9164
9165
9166
9167
9168
9169
9170 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9171 std::u32string s = std::u32string();
9172 std::unique_ptr<soulng::parser::soulng::parser::Value<char32_t>>chr;
9173 soulng::parser::Match match(false);
9174 soulng::parser::Match* parentMatch0 = &match;
9175 {
9176 int64_t pos = lexer.GetPos();
9177 soulng::parser::Match match(false);
9178 soulng::parser::Match* parentMatch1 = &match;
9179 {
9180 soulng::parser::Match match(false);
9181 soulng::parser::Match* parentMatch2 = &match;
9182 {
9183 soulng::parser::Match match(false);
9184 soulng::parser::Match* parentMatch3 = &match;
9185 {
9186 soulng::parser::Match match(true);
9187 for (int i : s61)
9188 {
9189 if (*lexer == i)
9190 {
9191 ++lexer;
9192 }
9193 else
9194 {
9195 match.hit = false;
9196 break;
9197 }
9198 }
9199 *parentMatch3 = match;
9200 }
9201 if (match.hit)
9202 {
9203 soulng::parser::Match match(false);
9204 soulng::parser::Match* parentMatch4 = &match;
9205 {
9206 soulng::parser::Match match(true);
9207 soulng::parser::Match* parentMatch5 = &match;
9208 {
9209 while (true)
9210 {
9211 int64_t save = lexer.GetPos();
9212 {
9213 soulng::parser::Match match(false);
9214 soulng::parser::Match* parentMatch6 = &match;
9215 {
9216 soulng::parser::Match match(false);
9217 soulng::parser::Match* parentMatch7 = &match;
9218 {
9219 int64_t save = lexer.GetPos();
9220 soulng::parser::Match match(false);
9221 soulng::parser::Match* parentMatch8 = &match;
9222 {
9223 int64_t pos = lexer.GetPos();
9224 soulng::parser::Match match(false);
9225 soulng::parser::Match* parentMatch9 = &match;
9226 {
9227 soulng::parser::Match match(false);
9228 soulng::parser::Match* parentMatch10 = &match;
9229 int64_t save = lexer.GetPos();
9230 {
9231 soulng::parser::Match match = XmlParser::Char(lexer);
9232 chr.reset(static_cast<soulng::parser::soulng::parser::Value<char32_t>*>(match.value));
9233 *parentMatch10 = match;
9234 }
9235 if (match.hit)
9236 {
9237 soulng::parser::Match match(false);
9238 soulng::parser::Match* parentMatch11 = &match;
9239 {
9240 int64_t tmp = lexer.GetPos();
9241 lexer.SetPos(save);
9242 save = tmp;
9243 soulng::parser::Match match(false);
9244 if (*lexer == 45)
9245 {
9246 ++lexer;
9247 match.hit = true;
9248 }
9249 *parentMatch11 = match;
9250 }
9251 if (!match.hit)
9252 {
9253 lexer.SetPos(save);
9254 }
9255 *parentMatch10 = soulng::parser::Match(!match.hit, match.value);
9256 }
9257 *parentMatch9 = match;
9258 }
9259 if (match.hit)
9260 {
9261 s.append(1, chr->value);
9262 }
9263 *parentMatch8 = match;
9264 }
9265 *parentMatch7 = match;
9266 if (!match.hit)
9267 {
9268 soulng::parser::Match match(false);
9269 soulng::parser::Match* parentMatch12 = &match;
9270 lexer.SetPos(save);
9271 {
9272 soulng::parser::Match match(false);
9273 soulng::parser::Match* parentMatch13 = &match;
9274 {
9275 soulng::parser::Match match(false);
9276 if (*lexer == 45)
9277 {
9278 ++lexer;
9279 match.hit = true;
9280 }
9281 *parentMatch13 = match;
9282 }
9283 if (match.hit)
9284 {
9285 soulng::parser::Match match(false);
9286 soulng::parser::Match* parentMatch14 = &match;
9287 {
9288 soulng::parser::Match match(false);
9289 soulng::parser::Match* parentMatch15 = &match;
9290 {
9291 int64_t pos = lexer.GetPos();
9292 soulng::parser::Match match(false);
9293 soulng::parser::Match* parentMatch16 = &match;
9294 {
9295 soulng::parser::Match match(false);
9296 soulng::parser::Match* parentMatch17 = &match;
9297 int64_t save = lexer.GetPos();
9298 {
9299 soulng::parser::Match match = XmlParser::Char(lexer);
9300 chr.reset(static_cast<soulng::parser::soulng::parser::Value<char32_t>*>(match.value));
9301 *parentMatch17 = match;
9302 }
9303 if (match.hit)
9304 {
9305 soulng::parser::Match match(false);
9306 soulng::parser::Match* parentMatch18 = &match;
9307 {
9308 int64_t tmp = lexer.GetPos();
9309 lexer.SetPos(save);
9310 save = tmp;
9311 soulng::parser::Match match(false);
9312 if (*lexer == 45)
9313 {
9314 ++lexer;
9315 match.hit = true;
9316 }
9317 *parentMatch18 = match;
9318 }
9319 if (!match.hit)
9320 {
9321 lexer.SetPos(save);
9322 }
9323 *parentMatch17 = soulng::parser::Match(!match.hit, match.value);
9324 }
9325 *parentMatch16 = match;
9326 }
9327 if (match.hit)
9328 {
9329 s.append(1, '-').append(1, chr->value);
9330 }
9331 *parentMatch15 = match;
9332 }
9333 *parentMatch14 = match;
9334 }
9335 *parentMatch13 = match;
9336 }
9337 *parentMatch12 = match;
9338 }
9339 *parentMatch7 = match;
9340 }
9341 }
9342 *parentMatch6 = match;
9343 }
9344 if (match.hit)
9345 {
9346 *parentMatch5 = match;
9347 }
9348 else
9349 {
9350 lexer.SetPos(save);
9351 break;
9352 }
9353 }
9354 }
9355 }
9356 *parentMatch4 = match;
9357 }
9358 *parentMatch3 = match;
9359 }
9360 *parentMatch2 = match;
9361 }
9362 if (match.hit)
9363 {
9364 soulng::parser::Match match(false);
9365 soulng::parser::Match* parentMatch19 = &match;
9366 {
9367 soulng::parser::Match match(true);
9368 for (int i : s62)
9369 {
9370 if (*lexer == i)
9371 {
9372 ++lexer;
9373 }
9374 else
9375 {
9376 match.hit = false;
9377 break;
9378 }
9379 }
9380 *parentMatch19 = match;
9381 }
9382 *parentMatch2 = match;
9383 }
9384 *parentMatch1 = match;
9385 }
9386 if (match.hit)
9387 {
9388 processor->Comment(s);
9389 }
9390 *parentMatch0 = match;
9391 }
9392 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9393
9394
9395
9396
9397
9398 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9399 if (!match.hit)
9400 {
9401 match.value = nullptr;
9402 }
9403 return match;
9404 }
9405
9406 soulng::parser::Match XmlParser::PI(TrivialLexer& lexer, sngxml::xml::XmlProcessor* processor)
9407 {
9408 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9409
9410
9411
9412
9413
9414
9415
9416 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9417 std::u32string data = std::u32string();
9418 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>target;
9419 std::unique_ptr<soulng::parser::soulng::parser::Value<char32_t>>chr;
9420 soulng::parser::Match match(false);
9421 soulng::parser::Match* parentMatch0 = &match;
9422 {
9423 int64_t pos = lexer.GetPos();
9424 soulng::parser::Match match(false);
9425 soulng::parser::Match* parentMatch1 = &match;
9426 {
9427 soulng::parser::Match match(false);
9428 soulng::parser::Match* parentMatch2 = &match;
9429 {
9430 soulng::parser::Match match(false);
9431 soulng::parser::Match* parentMatch3 = &match;
9432 {
9433 soulng::parser::Match match(false);
9434 soulng::parser::Match* parentMatch4 = &match;
9435 {
9436 soulng::parser::Match match(false);
9437 soulng::parser::Match* parentMatch5 = &match;
9438 {
9439 soulng::parser::Match match(true);
9440 for (int i : s63)
9441 {
9442 if (*lexer == i)
9443 {
9444 ++lexer;
9445 }
9446 else
9447 {
9448 match.hit = false;
9449 break;
9450 }
9451 }
9452 *parentMatch5 = match;
9453 }
9454 if (match.hit)
9455 {
9456 soulng::parser::Match match(false);
9457 soulng::parser::Match* parentMatch6 = &match;
9458 {
9459 soulng::parser::Match match = XmlParser::PITarget(lexer);
9460 target.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
9461 *parentMatch6 = match;
9462 }
9463 *parentMatch5 = match;
9464 }
9465 *parentMatch4 = match;
9466 }
9467 if (match.hit)
9468 {
9469 soulng::parser::Match match(false);
9470 soulng::parser::Match* parentMatch7 = &match;
9471 {
9472 soulng::parser::Match match = XmlParser::S(lexer);
9473 *parentMatch7 = match;
9474 }
9475 *parentMatch4 = match;
9476 }
9477 *parentMatch3 = match;
9478 }
9479 if (match.hit)
9480 {
9481 soulng::parser::Match match(false);
9482 soulng::parser::Match* parentMatch8 = &match;
9483 {
9484 soulng::parser::Match match(true);
9485 soulng::parser::Match* parentMatch9 = &match;
9486 {
9487 while (true)
9488 {
9489 int64_t save = lexer.GetPos();
9490 {
9491 soulng::parser::Match match(false);
9492 soulng::parser::Match* parentMatch10 = &match;
9493 {
9494 soulng::parser::Match match(false);
9495 soulng::parser::Match* parentMatch11 = &match;
9496 {
9497 int64_t pos = lexer.GetPos();
9498 soulng::parser::Match match(false);
9499 soulng::parser::Match* parentMatch12 = &match;
9500 {
9501 soulng::parser::Match match(false);
9502 soulng::parser::Match* parentMatch13 = &match;
9503 int64_t save = lexer.GetPos();
9504 {
9505 soulng::parser::Match match = XmlParser::Char(lexer);
9506 chr.reset(static_cast<soulng::parser::soulng::parser::Value<char32_t>*>(match.value));
9507 *parentMatch13 = match;
9508 }
9509 if (match.hit)
9510 {
9511 soulng::parser::Match match(false);
9512 soulng::parser::Match* parentMatch14 = &match;
9513 {
9514 int64_t tmp = lexer.GetPos();
9515 lexer.SetPos(save);
9516 save = tmp;
9517 soulng::parser::Match match(true);
9518 for (int i : s64)
9519 {
9520 if (*lexer == i)
9521 {
9522 ++lexer;
9523 }
9524 else
9525 {
9526 match.hit = false;
9527 break;
9528 }
9529 }
9530 *parentMatch14 = match;
9531 }
9532 if (!match.hit)
9533 {
9534 lexer.SetPos(save);
9535 }
9536 *parentMatch13 = soulng::parser::Match(!match.hit, match.value);
9537 }
9538 *parentMatch12 = match;
9539 }
9540 if (match.hit)
9541 {
9542 data.append(1, chr->value);
9543 }
9544 *parentMatch11 = match;
9545 }
9546 *parentMatch10 = match;
9547 }
9548 if (match.hit)
9549 {
9550 *parentMatch9 = match;
9551 }
9552 else
9553 {
9554 lexer.SetPos(save);
9555 break;
9556 }
9557 }
9558 }
9559 }
9560 *parentMatch8 = match;
9561 }
9562 *parentMatch3 = match;
9563 }
9564 *parentMatch2 = match;
9565 }
9566 if (match.hit)
9567 {
9568 soulng::parser::Match match(false);
9569 soulng::parser::Match* parentMatch15 = &match;
9570 {
9571 soulng::parser::Match match(true);
9572 for (int i : s65)
9573 {
9574 if (*lexer == i)
9575 {
9576 ++lexer;
9577 }
9578 else
9579 {
9580 match.hit = false;
9581 break;
9582 }
9583 }
9584 *parentMatch15 = match;
9585 }
9586 *parentMatch2 = match;
9587 }
9588 *parentMatch1 = match;
9589 }
9590 if (match.hit)
9591 {
9592 processor->PI(target->value, data);
9593 }
9594 *parentMatch0 = match;
9595 }
9596 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9597
9598
9599
9600
9601
9602 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9603 if (!match.hit)
9604 {
9605 match.value = nullptr;
9606 }
9607 return match;
9608 }
9609
9610 soulng::parser::Match XmlParser::PITarget(TrivialLexer& lexer)
9611 {
9612 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9613
9614
9615
9616
9617
9618
9619
9620 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9621 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>name;
9622 soulng::parser::Match match(false);
9623 soulng::parser::Match* parentMatch0 = &match;
9624 {
9625 int64_t pos = lexer.GetPos();
9626 soulng::parser::Match match(false);
9627 soulng::parser::Match* parentMatch1 = &match;
9628 {
9629 soulng::parser::Match match(false);
9630 soulng::parser::Match* parentMatch2 = &match;
9631 int64_t save = lexer.GetPos();
9632 {
9633 soulng::parser::Match match = XmlParser::Name(lexer);
9634 name.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
9635 *parentMatch2 = match;
9636 }
9637 if (match.hit)
9638 {
9639 soulng::parser::Match match(false);
9640 soulng::parser::Match* parentMatch3 = &match;
9641 {
9642 int64_t tmp = lexer.GetPos();
9643 lexer.SetPos(save);
9644 save = tmp;
9645 soulng::parser::Match match = XmlParser::Xml(lexer);
9646 *parentMatch3 = match;
9647 }
9648 if (!match.hit)
9649 {
9650 lexer.SetPos(save);
9651 }
9652 *parentMatch2 = soulng::parser::Match(!match.hit, match.value);
9653 }
9654 *parentMatch1 = match;
9655 }
9656 if (match.hit)
9657 {
9658 {
9659 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9660
9661 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9662 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(name->value));
9663 }
9664 }
9665 *parentMatch0 = match;
9666 }
9667 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9668
9669
9670
9671
9672
9673 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9674 if (!match.hit)
9675 {
9676 match.value = nullptr;
9677 }
9678 return match;
9679 }
9680
9681 soulng::parser::Match XmlParser::Xml(TrivialLexer& lexer)
9682 {
9683 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9684
9685
9686
9687
9688
9689
9690
9691 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9692 soulng::parser::Match match(false);
9693 soulng::parser::Match* parentMatch0 = &match;
9694 {
9695 soulng::parser::Match match(false);
9696 soulng::parser::Match* parentMatch1 = &match;
9697 {
9698 soulng::parser::Match match(false);
9699 for (const soulng::parser::Range& range : s66)
9700 {
9701 if (*lexer >= range.first && *lexer <= range.last)
9702 {
9703 match.hit = true;
9704 ++lexer;
9705 break;
9706 }
9707 }
9708 *parentMatch1 = match;
9709 }
9710 if (match.hit)
9711 {
9712 soulng::parser::Match match(false);
9713 soulng::parser::Match* parentMatch2 = &match;
9714 {
9715 soulng::parser::Match match(false);
9716 for (const soulng::parser::Range& range : s67)
9717 {
9718 if (*lexer >= range.first && *lexer <= range.last)
9719 {
9720 match.hit = true;
9721 ++lexer;
9722 break;
9723 }
9724 }
9725 *parentMatch2 = match;
9726 }
9727 *parentMatch1 = match;
9728 }
9729 *parentMatch0 = match;
9730 }
9731 if (match.hit)
9732 {
9733 soulng::parser::Match match(false);
9734 soulng::parser::Match* parentMatch3 = &match;
9735 {
9736 soulng::parser::Match match(false);
9737 for (const soulng::parser::Range& range : s68)
9738 {
9739 if (*lexer >= range.first && *lexer <= range.last)
9740 {
9741 match.hit = true;
9742 ++lexer;
9743 break;
9744 }
9745 }
9746 *parentMatch3 = match;
9747 }
9748 *parentMatch0 = match;
9749 }
9750 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9751
9752
9753
9754
9755
9756 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9757 if (!match.hit)
9758 {
9759 match.value = nullptr;
9760 }
9761 return match;
9762 }
9763
9764 soulng::parser::Match XmlParser::Eq(TrivialLexer& lexer)
9765 {
9766 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9767
9768
9769
9770
9771
9772
9773
9774 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9775 soulng::parser::Match match(false);
9776 soulng::parser::Match* parentMatch0 = &match;
9777 {
9778 soulng::parser::Match match(false);
9779 soulng::parser::Match* parentMatch1 = &match;
9780 {
9781 soulng::parser::Match match(true);
9782 int64_t save = lexer.GetPos();
9783 soulng::parser::Match* parentMatch2 = &match;
9784 {
9785 soulng::parser::Match match = XmlParser::S(lexer);
9786 if (match.hit)
9787 {
9788 *parentMatch2 = match;
9789 }
9790 else
9791 {
9792 lexer.SetPos(save);
9793 }
9794 }
9795 *parentMatch1 = match;
9796 }
9797 if (match.hit)
9798 {
9799 soulng::parser::Match match(false);
9800 soulng::parser::Match* parentMatch3 = &match;
9801 {
9802 soulng::parser::Match match(false);
9803 if (*lexer == 61)
9804 {
9805 ++lexer;
9806 match.hit = true;
9807 }
9808 *parentMatch3 = match;
9809 }
9810 *parentMatch1 = match;
9811 }
9812 *parentMatch0 = match;
9813 }
9814 if (match.hit)
9815 {
9816 soulng::parser::Match match(false);
9817 soulng::parser::Match* parentMatch4 = &match;
9818 {
9819 soulng::parser::Match match(true);
9820 int64_t save = lexer.GetPos();
9821 soulng::parser::Match* parentMatch5 = &match;
9822 {
9823 soulng::parser::Match match = XmlParser::S(lexer);
9824 if (match.hit)
9825 {
9826 *parentMatch5 = match;
9827 }
9828 else
9829 {
9830 lexer.SetPos(save);
9831 }
9832 }
9833 *parentMatch4 = match;
9834 }
9835 *parentMatch0 = match;
9836 }
9837 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9838
9839
9840
9841
9842
9843 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9844 if (!match.hit)
9845 {
9846 match.value = nullptr;
9847 }
9848 return match;
9849 }
9850
9851 soulng::parser::Match XmlParser::YesNo(TrivialLexer& lexer)
9852 {
9853 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9854
9855
9856
9857
9858
9859
9860
9861 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9862 soulng::parser::Match match(false);
9863 soulng::parser::Match* parentMatch0 = &match;
9864 {
9865 int64_t save = lexer.GetPos();
9866 soulng::parser::Match match(false);
9867 soulng::parser::Match* parentMatch1 = &match;
9868 {
9869 int64_t pos = lexer.GetPos();
9870 soulng::parser::Match match(true);
9871 for (int i : s69)
9872 {
9873 if (*lexer == i)
9874 {
9875 ++lexer;
9876 }
9877 else
9878 {
9879 match.hit = false;
9880 break;
9881 }
9882 }
9883 if (match.hit)
9884 {
9885 {
9886 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9887
9888 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9889 return soulng::parser::Match(true, new soulng::parser::Value<bool>(true));
9890 }
9891 }
9892 *parentMatch1 = match;
9893 }
9894 *parentMatch0 = match;
9895 if (!match.hit)
9896 {
9897 soulng::parser::Match match(false);
9898 soulng::parser::Match* parentMatch2 = &match;
9899 lexer.SetPos(save);
9900 {
9901 soulng::parser::Match match(false);
9902 soulng::parser::Match* parentMatch3 = &match;
9903 {
9904 int64_t pos = lexer.GetPos();
9905 soulng::parser::Match match(true);
9906 for (int i : s70)
9907 {
9908 if (*lexer == i)
9909 {
9910 ++lexer;
9911 }
9912 else
9913 {
9914 match.hit = false;
9915 break;
9916 }
9917 }
9918 if (match.hit)
9919 {
9920 {
9921 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9922
9923 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9924 return soulng::parser::Match(true, new soulng::parser::Value<bool>(false));
9925 }
9926 }
9927 *parentMatch3 = match;
9928 }
9929 *parentMatch2 = match;
9930 }
9931 *parentMatch0 = match;
9932 }
9933 }
9934 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
9935
9936
9937
9938
9939
9940 #endif // SOULNG_PARSER_DEBUG_SUPPORT
9941 if (!match.hit)
9942 {
9943 match.value = nullptr;
9944 }
9945 return match;
9946 }