1 #include "ParserExpressionParser.hpp"
2 #include <soulng/util/Unicode.hpp>
3 #include <soulng/util/TextUtils.hpp>
4 #include <sng2html/sng2html/ParserDeclaratorParser.hpp>
5 #include <sng2html/sng2html/ParserDeclarationParser.hpp>
6 #include <sng2html/sng2html/ParserLiteralParser.hpp>
7 #include <sng2html/sng2html/ParserIdentifierParser.hpp>
8 #include <sng2html/sng2html/ParserFileLexer.hpp>
9 #include <sng2html/sng2html/ParserFileTokens.hpp>
10
11
12
13 using namespace soulng::unicode;
14 using namespace soulng::lexer;
15 using namespace ParserFileTokens;
16
17 soulng::parser::Match ParserExpressionParser::CppExpression(ParserFileLexer& lexer)
18 {
19 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
20
21
22
23
24
25
26
27 #endif // SOULNG_PARSER_DEBUG_SUPPORT
28 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
29 std::unique_ptr<soulng::cppcode::CppObject> left;
30 std::unique_ptr<soulng::cppcode::CppObject> right;
31 soulng::parser::Match match(false);
32 soulng::parser::Match* parentMatch0 = &match;
33 {
34 int64_t pos = lexer.GetPos();
35 soulng::parser::Match match(false);
36 soulng::parser::Match* parentMatch1 = &match;
37 {
38 soulng::parser::Match match(false);
39 soulng::parser::Match* parentMatch2 = &match;
40 {
41 soulng::parser::Match match(false);
42 soulng::parser::Match* parentMatch3 = &match;
43 {
44 int64_t pos = lexer.GetPos();
45 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
46 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
47 if (match.hit)
48 {
49 expr.reset(left.release());
50 }
51 *parentMatch3 = match;
52 }
53 *parentMatch2 = match;
54 }
55 if (match.hit)
56 {
57 soulng::parser::Match match(false);
58 soulng::parser::Match* parentMatch4 = &match;
59 {
60 soulng::parser::Match match(true);
61 soulng::parser::Match* parentMatch5 = &match;
62 {
63 while (true)
64 {
65 int64_t save = lexer.GetPos();
66 {
67 soulng::parser::Match match(false);
68 soulng::parser::Match* parentMatch6 = &match;
69 {
70 soulng::parser::Match match(false);
71 soulng::parser::Match* parentMatch7 = &match;
72 {
73 soulng::parser::Match match(false);
74 if (*lexer == COMMA)
75 {
76 ++lexer;
77 match.hit = true;
78 }
79 *parentMatch7 = match;
80 }
81 if (match.hit)
82 {
83 soulng::parser::Match match(false);
84 soulng::parser::Match* parentMatch8 = &match;
85 {
86 soulng::parser::Match match(false);
87 soulng::parser::Match* parentMatch9 = &match;
88 {
89 int64_t pos = lexer.GetPos();
90 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
91 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
92 if (match.hit)
93 {
94 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), soulng::cppcode::Operator::comma, right.release()));
95 }
96 *parentMatch9 = match;
97 }
98 *parentMatch8 = match;
99 }
100 *parentMatch7 = match;
101 }
102 *parentMatch6 = match;
103 }
104 if (match.hit)
105 {
106 *parentMatch5 = match;
107 }
108 else
109 {
110 lexer.SetPos(save);
111 break;
112 }
113 }
114 }
115 }
116 *parentMatch4 = match;
117 }
118 *parentMatch2 = match;
119 }
120 *parentMatch1 = match;
121 }
122 if (match.hit)
123 {
124 {
125 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
126
127 #endif // SOULNG_PARSER_DEBUG_SUPPORT
128 return soulng::parser::Match(true, expr.release());
129 }
130 }
131 *parentMatch0 = match;
132 }
133 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
134
135
136
137
138
139 #endif // SOULNG_PARSER_DEBUG_SUPPORT
140 if (!match.hit)
141 {
142 match.value = nullptr;
143 }
144 return match;
145 }
146
147 soulng::parser::Match ParserExpressionParser::ConstantExpression(ParserFileLexer& lexer)
148 {
149 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
150
151
152
153
154
155
156
157 #endif // SOULNG_PARSER_DEBUG_SUPPORT
158 std::unique_ptr<soulng::cppcode::CppObject> expr;
159 soulng::parser::Match match(false);
160 soulng::parser::Match* parentMatch0 = &match;
161 {
162 int64_t pos = lexer.GetPos();
163 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
164 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
165 if (match.hit)
166 {
167 {
168 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
169
170 #endif // SOULNG_PARSER_DEBUG_SUPPORT
171 return soulng::parser::Match(true, expr.release());
172 }
173 }
174 *parentMatch0 = match;
175 }
176 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
177
178
179
180
181
182 #endif // SOULNG_PARSER_DEBUG_SUPPORT
183 if (!match.hit)
184 {
185 match.value = nullptr;
186 }
187 return match;
188 }
189
190 soulng::parser::Match ParserExpressionParser::AssignmentExpression(ParserFileLexer& lexer)
191 {
192 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
193
194
195
196
197
198
199
200 #endif // SOULNG_PARSER_DEBUG_SUPPORT
201 std::unique_ptr<soulng::cppcode::CppObject> left;
202 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
203 std::unique_ptr<soulng::cppcode::CppObject> right;
204 std::unique_ptr<soulng::cppcode::CppObject> conditionalExpr;
205 std::unique_ptr<soulng::cppcode::CppObject> throwExpr;
206 soulng::parser::Match match(false);
207 soulng::parser::Match* parentMatch0 = &match;
208 {
209 int64_t save = lexer.GetPos();
210 soulng::parser::Match match(false);
211 soulng::parser::Match* parentMatch1 = &match;
212 {
213 int64_t save = lexer.GetPos();
214 soulng::parser::Match match(false);
215 soulng::parser::Match* parentMatch2 = &match;
216 {
217 soulng::parser::Match match(false);
218 soulng::parser::Match* parentMatch3 = &match;
219 {
220 soulng::parser::Match match = ParserExpressionParser::LogicalOrExpression(lexer);
221 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
222 *parentMatch3 = match;
223 }
224 if (match.hit)
225 {
226 soulng::parser::Match match(false);
227 soulng::parser::Match* parentMatch4 = &match;
228 {
229 soulng::parser::Match match = ParserExpressionParser::AssignmentOp(lexer);
230 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
231 *parentMatch4 = match;
232 }
233 *parentMatch3 = match;
234 }
235 *parentMatch2 = match;
236 }
237 if (match.hit)
238 {
239 soulng::parser::Match match(false);
240 soulng::parser::Match* parentMatch5 = &match;
241 {
242 soulng::parser::Match match(false);
243 soulng::parser::Match* parentMatch6 = &match;
244 {
245 int64_t pos = lexer.GetPos();
246 soulng::parser::Match match(true);
247 soulng::parser::Match* parentMatch7 = &match;
248 {
249 soulng::lexer::Span span = lexer.GetSpan();
250 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
251 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
252 if (match.hit)
253 {
254 *parentMatch7 = match;
255 }
256 else
257 {
258 lexer.ThrowExpectationFailure(span, U"assignment expression");
259 }
260 }
261 if (match.hit)
262 {
263 {
264 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
265
266 #endif // SOULNG_PARSER_DEBUG_SUPPORT
267 return soulng::parser::Match(true, new soulng::cppcode::BinaryOpExpr(left.release(), op->value, right.release()));
268 }
269 }
270 *parentMatch6 = match;
271 }
272 *parentMatch5 = match;
273 }
274 *parentMatch2 = match;
275 }
276 *parentMatch1 = match;
277 if (!match.hit)
278 {
279 soulng::parser::Match match(false);
280 soulng::parser::Match* parentMatch8 = &match;
281 lexer.SetPos(save);
282 {
283 soulng::parser::Match match(false);
284 soulng::parser::Match* parentMatch9 = &match;
285 {
286 int64_t pos = lexer.GetPos();
287 soulng::parser::Match match = ParserExpressionParser::ConditionalExpression(lexer);
288 conditionalExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
289 if (match.hit)
290 {
291 {
292 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
293
294 #endif // SOULNG_PARSER_DEBUG_SUPPORT
295 return soulng::parser::Match(true, conditionalExpr.release());
296 }
297 }
298 *parentMatch9 = match;
299 }
300 *parentMatch8 = match;
301 }
302 *parentMatch1 = match;
303 }
304 }
305 *parentMatch0 = match;
306 if (!match.hit)
307 {
308 soulng::parser::Match match(false);
309 soulng::parser::Match* parentMatch10 = &match;
310 lexer.SetPos(save);
311 {
312 soulng::parser::Match match(false);
313 soulng::parser::Match* parentMatch11 = &match;
314 {
315 int64_t pos = lexer.GetPos();
316 soulng::parser::Match match = ParserExpressionParser::ThrowExpression(lexer);
317 throwExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
318 if (match.hit)
319 {
320 {
321 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
322
323 #endif // SOULNG_PARSER_DEBUG_SUPPORT
324 return soulng::parser::Match(true, throwExpr.release());
325 }
326 }
327 *parentMatch11 = match;
328 }
329 *parentMatch10 = match;
330 }
331 *parentMatch0 = match;
332 }
333 }
334 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
335
336
337
338
339
340 #endif // SOULNG_PARSER_DEBUG_SUPPORT
341 if (!match.hit)
342 {
343 match.value = nullptr;
344 }
345 return match;
346 }
347
348 soulng::parser::Match ParserExpressionParser::AssignmentOp(ParserFileLexer& lexer)
349 {
350 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
351
352
353
354
355
356
357
358 #endif // SOULNG_PARSER_DEBUG_SUPPORT
359 soulng::parser::Match match(false);
360 int64_t pos = lexer.GetPos();
361 soulng::lexer::Span span = lexer.GetSpan();
362 switch (*lexer)
363 {
364 case ASSIGN:
365 {
366 ++lexer;
367 {
368 {
369 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
370
371 #endif // SOULNG_PARSER_DEBUG_SUPPORT
372 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::assign));
373 }
374 }
375 break;
376 }
377 case MULASSIGN:
378 {
379 ++lexer;
380 {
381 {
382 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
383
384 #endif // SOULNG_PARSER_DEBUG_SUPPORT
385 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::mulAssign));
386 }
387 }
388 break;
389 }
390 case DIVASSIGN:
391 {
392 ++lexer;
393 {
394 {
395 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
396
397 #endif // SOULNG_PARSER_DEBUG_SUPPORT
398 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::divAssign));
399 }
400 }
401 break;
402 }
403 case REMASSIGN:
404 {
405 ++lexer;
406 {
407 {
408 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
409
410 #endif // SOULNG_PARSER_DEBUG_SUPPORT
411 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::remAssign));
412 }
413 }
414 break;
415 }
416 case PLUSASSIGN:
417 {
418 ++lexer;
419 {
420 {
421 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
422
423 #endif // SOULNG_PARSER_DEBUG_SUPPORT
424 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::plusAssign));
425 }
426 }
427 break;
428 }
429 case MINUSASSIGN:
430 {
431 ++lexer;
432 {
433 {
434 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
435
436 #endif // SOULNG_PARSER_DEBUG_SUPPORT
437 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::minusAssign));
438 }
439 }
440 break;
441 }
442 case SHIFTLEFTASSIGN:
443 {
444 ++lexer;
445 {
446 {
447 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
448
449 #endif // SOULNG_PARSER_DEBUG_SUPPORT
450 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::shiftLeftAssign));
451 }
452 }
453 break;
454 }
455 case SHIFTRIGHTASSIGN:
456 {
457 ++lexer;
458 {
459 {
460 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
461
462 #endif // SOULNG_PARSER_DEBUG_SUPPORT
463 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::shiftRightAssign));
464 }
465 }
466 break;
467 }
468 case ANDASSIGN:
469 {
470 ++lexer;
471 {
472 {
473 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
474
475 #endif // SOULNG_PARSER_DEBUG_SUPPORT
476 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::andAssign));
477 }
478 }
479 break;
480 }
481 case XORASSIGN:
482 {
483 ++lexer;
484 {
485 {
486 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
487
488 #endif // SOULNG_PARSER_DEBUG_SUPPORT
489 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::xorAssign));
490 }
491 }
492 break;
493 }
494 case ORASSIGN:
495 {
496 ++lexer;
497 {
498 {
499 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
500
501 #endif // SOULNG_PARSER_DEBUG_SUPPORT
502 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::orAssign));
503 }
504 }
505 break;
506 }
507 }
508 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
509
510
511
512
513
514 #endif // SOULNG_PARSER_DEBUG_SUPPORT
515 if (!match.hit)
516 {
517 match.value = nullptr;
518 }
519 return match;
520 }
521
522 soulng::parser::Match ParserExpressionParser::ConditionalExpression(ParserFileLexer& lexer)
523 {
524 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
525
526
527
528
529
530
531
532 #endif // SOULNG_PARSER_DEBUG_SUPPORT
533 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
534 std::unique_ptr<soulng::cppcode::CppObject> left;
535 std::unique_ptr<soulng::cppcode::CppObject> ifExpr;
536 std::unique_ptr<soulng::cppcode::CppObject> thenExpr;
537 soulng::parser::Match match(false);
538 soulng::parser::Match* parentMatch0 = &match;
539 {
540 int64_t pos = lexer.GetPos();
541 soulng::parser::Match match(false);
542 soulng::parser::Match* parentMatch1 = &match;
543 {
544 soulng::parser::Match match(false);
545 soulng::parser::Match* parentMatch2 = &match;
546 {
547 soulng::parser::Match match(false);
548 soulng::parser::Match* parentMatch3 = &match;
549 {
550 int64_t pos = lexer.GetPos();
551 soulng::parser::Match match = ParserExpressionParser::LogicalOrExpression(lexer);
552 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
553 if (match.hit)
554 {
555 expr.reset(left.release());
556 }
557 *parentMatch3 = match;
558 }
559 *parentMatch2 = match;
560 }
561 if (match.hit)
562 {
563 soulng::parser::Match match(false);
564 soulng::parser::Match* parentMatch4 = &match;
565 {
566 soulng::parser::Match match(true);
567 int64_t save = lexer.GetPos();
568 soulng::parser::Match* parentMatch5 = &match;
569 {
570 soulng::parser::Match match(false);
571 soulng::parser::Match* parentMatch6 = &match;
572 {
573 soulng::parser::Match match(false);
574 soulng::parser::Match* parentMatch7 = &match;
575 {
576 soulng::parser::Match match(false);
577 soulng::parser::Match* parentMatch8 = &match;
578 {
579 soulng::parser::Match match(false);
580 soulng::parser::Match* parentMatch9 = &match;
581 {
582 soulng::parser::Match match(false);
583 if (*lexer == QUEST)
584 {
585 ++lexer;
586 match.hit = true;
587 }
588 *parentMatch9 = match;
589 }
590 if (match.hit)
591 {
592 soulng::parser::Match match(false);
593 soulng::parser::Match* parentMatch10 = &match;
594 {
595 soulng::parser::Match match(true);
596 soulng::parser::Match* parentMatch11 = &match;
597 {
598 soulng::lexer::Span span = lexer.GetSpan();
599 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
600 ifExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
601 if (match.hit)
602 {
603 *parentMatch11 = match;
604 }
605 else
606 {
607 lexer.ThrowExpectationFailure(span, U"C++ expression");
608 }
609 }
610 *parentMatch10 = match;
611 }
612 *parentMatch9 = match;
613 }
614 *parentMatch8 = match;
615 }
616 if (match.hit)
617 {
618 soulng::parser::Match match(false);
619 soulng::parser::Match* parentMatch12 = &match;
620 {
621 soulng::parser::Match match(false);
622 if (*lexer == COLON)
623 {
624 ++lexer;
625 match.hit = true;
626 }
627 *parentMatch12 = match;
628 }
629 *parentMatch8 = match;
630 }
631 *parentMatch7 = match;
632 }
633 if (match.hit)
634 {
635 soulng::parser::Match match(false);
636 soulng::parser::Match* parentMatch13 = &match;
637 {
638 soulng::parser::Match match(false);
639 soulng::parser::Match* parentMatch14 = &match;
640 {
641 int64_t pos = lexer.GetPos();
642 soulng::parser::Match match(true);
643 soulng::parser::Match* parentMatch15 = &match;
644 {
645 soulng::lexer::Span span = lexer.GetSpan();
646 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
647 thenExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
648 if (match.hit)
649 {
650 *parentMatch15 = match;
651 }
652 else
653 {
654 lexer.ThrowExpectationFailure(span, U"assignment expression");
655 }
656 }
657 if (match.hit)
658 {
659 expr.reset(new soulng::cppcode::ConditionalExpr(expr.release(), ifExpr.release(), thenExpr.release()));
660 }
661 *parentMatch14 = match;
662 }
663 *parentMatch13 = match;
664 }
665 *parentMatch7 = match;
666 }
667 *parentMatch6 = match;
668 }
669 if (match.hit)
670 {
671 *parentMatch5 = match;
672 }
673 else
674 {
675 lexer.SetPos(save);
676 }
677 }
678 *parentMatch4 = match;
679 }
680 *parentMatch2 = match;
681 }
682 *parentMatch1 = match;
683 }
684 if (match.hit)
685 {
686 {
687 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
688
689 #endif // SOULNG_PARSER_DEBUG_SUPPORT
690 return soulng::parser::Match(true, expr.release());
691 }
692 }
693 *parentMatch0 = match;
694 }
695 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
696
697
698
699
700
701 #endif // SOULNG_PARSER_DEBUG_SUPPORT
702 if (!match.hit)
703 {
704 match.value = nullptr;
705 }
706 return match;
707 }
708
709 soulng::parser::Match ParserExpressionParser::ThrowExpression(ParserFileLexer& lexer)
710 {
711 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
712
713
714
715
716
717
718
719 #endif // SOULNG_PARSER_DEBUG_SUPPORT
720 std::unique_ptr<soulng::cppcode::CppObject> exception;
721 soulng::parser::Match match(false);
722 soulng::parser::Match* parentMatch0 = &match;
723 {
724 int64_t pos = lexer.GetPos();
725 soulng::parser::Match match(false);
726 soulng::parser::Match* parentMatch1 = &match;
727 {
728 soulng::parser::Match match(false);
729 soulng::parser::Match* parentMatch2 = &match;
730 {
731 soulng::parser::Match match(false);
732 if (*lexer == THROW)
733 {
734 ++lexer;
735 match.hit = true;
736 }
737 *parentMatch2 = match;
738 }
739 if (match.hit)
740 {
741 soulng::parser::Match match(false);
742 soulng::parser::Match* parentMatch3 = &match;
743 {
744 soulng::parser::Match match(true);
745 int64_t save = lexer.GetPos();
746 soulng::parser::Match* parentMatch4 = &match;
747 {
748 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
749 exception.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
750 if (match.hit)
751 {
752 *parentMatch4 = match;
753 }
754 else
755 {
756 lexer.SetPos(save);
757 }
758 }
759 *parentMatch3 = match;
760 }
761 *parentMatch2 = match;
762 }
763 *parentMatch1 = match;
764 }
765 if (match.hit)
766 {
767 {
768 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
769
770 #endif // SOULNG_PARSER_DEBUG_SUPPORT
771 return soulng::parser::Match(true, new soulng::cppcode::ThrowExpr(exception.release()));
772 }
773 }
774 *parentMatch0 = match;
775 }
776 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
777
778
779
780
781
782 #endif // SOULNG_PARSER_DEBUG_SUPPORT
783 if (!match.hit)
784 {
785 match.value = nullptr;
786 }
787 return match;
788 }
789
790 soulng::parser::Match ParserExpressionParser::LogicalOrExpression(ParserFileLexer& lexer)
791 {
792 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
793
794
795
796
797
798
799
800 #endif // SOULNG_PARSER_DEBUG_SUPPORT
801 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
802 std::unique_ptr<soulng::cppcode::CppObject> left;
803 std::unique_ptr<soulng::cppcode::CppObject> right;
804 soulng::parser::Match match(false);
805 soulng::parser::Match* parentMatch0 = &match;
806 {
807 int64_t pos = lexer.GetPos();
808 soulng::parser::Match match(false);
809 soulng::parser::Match* parentMatch1 = &match;
810 {
811 soulng::parser::Match match(false);
812 soulng::parser::Match* parentMatch2 = &match;
813 {
814 soulng::parser::Match match(false);
815 soulng::parser::Match* parentMatch3 = &match;
816 {
817 int64_t pos = lexer.GetPos();
818 soulng::parser::Match match = ParserExpressionParser::LogicalAndExpression(lexer);
819 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
820 if (match.hit)
821 {
822 expr.reset(left.release());
823 }
824 *parentMatch3 = match;
825 }
826 *parentMatch2 = match;
827 }
828 if (match.hit)
829 {
830 soulng::parser::Match match(false);
831 soulng::parser::Match* parentMatch4 = &match;
832 {
833 soulng::parser::Match match(true);
834 soulng::parser::Match* parentMatch5 = &match;
835 {
836 while (true)
837 {
838 int64_t save = lexer.GetPos();
839 {
840 soulng::parser::Match match(false);
841 soulng::parser::Match* parentMatch6 = &match;
842 {
843 soulng::parser::Match match(false);
844 soulng::parser::Match* parentMatch7 = &match;
845 {
846 soulng::parser::Match match(false);
847 if (*lexer == DISJUNCTION)
848 {
849 ++lexer;
850 match.hit = true;
851 }
852 *parentMatch7 = match;
853 }
854 if (match.hit)
855 {
856 soulng::parser::Match match(false);
857 soulng::parser::Match* parentMatch8 = &match;
858 {
859 soulng::parser::Match match(false);
860 soulng::parser::Match* parentMatch9 = &match;
861 {
862 int64_t pos = lexer.GetPos();
863 soulng::parser::Match match(true);
864 soulng::parser::Match* parentMatch10 = &match;
865 {
866 soulng::lexer::Span span = lexer.GetSpan();
867 soulng::parser::Match match = ParserExpressionParser::LogicalAndExpression(lexer);
868 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
869 if (match.hit)
870 {
871 *parentMatch10 = match;
872 }
873 else
874 {
875 lexer.ThrowExpectationFailure(span, U"logical AND-expression");
876 }
877 }
878 if (match.hit)
879 {
880 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), soulng::cppcode::Operator::or_, right.release()));
881 }
882 *parentMatch9 = match;
883 }
884 *parentMatch8 = match;
885 }
886 *parentMatch7 = match;
887 }
888 *parentMatch6 = match;
889 }
890 if (match.hit)
891 {
892 *parentMatch5 = match;
893 }
894 else
895 {
896 lexer.SetPos(save);
897 break;
898 }
899 }
900 }
901 }
902 *parentMatch4 = match;
903 }
904 *parentMatch2 = match;
905 }
906 *parentMatch1 = match;
907 }
908 if (match.hit)
909 {
910 {
911 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
912
913 #endif // SOULNG_PARSER_DEBUG_SUPPORT
914 return soulng::parser::Match(true, expr.release());
915 }
916 }
917 *parentMatch0 = match;
918 }
919 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
920
921
922
923
924
925 #endif // SOULNG_PARSER_DEBUG_SUPPORT
926 if (!match.hit)
927 {
928 match.value = nullptr;
929 }
930 return match;
931 }
932
933 soulng::parser::Match ParserExpressionParser::LogicalAndExpression(ParserFileLexer& lexer)
934 {
935 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
936
937
938
939
940
941
942
943 #endif // SOULNG_PARSER_DEBUG_SUPPORT
944 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
945 std::unique_ptr<soulng::cppcode::CppObject> left;
946 std::unique_ptr<soulng::cppcode::CppObject> right;
947 soulng::parser::Match match(false);
948 soulng::parser::Match* parentMatch0 = &match;
949 {
950 int64_t pos = lexer.GetPos();
951 soulng::parser::Match match(false);
952 soulng::parser::Match* parentMatch1 = &match;
953 {
954 soulng::parser::Match match(false);
955 soulng::parser::Match* parentMatch2 = &match;
956 {
957 soulng::parser::Match match(false);
958 soulng::parser::Match* parentMatch3 = &match;
959 {
960 int64_t pos = lexer.GetPos();
961 soulng::parser::Match match = ParserExpressionParser::InclusiveOrExpression(lexer);
962 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
963 if (match.hit)
964 {
965 expr.reset(left.release());
966 }
967 *parentMatch3 = match;
968 }
969 *parentMatch2 = match;
970 }
971 if (match.hit)
972 {
973 soulng::parser::Match match(false);
974 soulng::parser::Match* parentMatch4 = &match;
975 {
976 soulng::parser::Match match(true);
977 soulng::parser::Match* parentMatch5 = &match;
978 {
979 while (true)
980 {
981 int64_t save = lexer.GetPos();
982 {
983 soulng::parser::Match match(false);
984 soulng::parser::Match* parentMatch6 = &match;
985 {
986 soulng::parser::Match match(false);
987 soulng::parser::Match* parentMatch7 = &match;
988 {
989 soulng::parser::Match match(false);
990 if (*lexer == AMPAMP)
991 {
992 ++lexer;
993 match.hit = true;
994 }
995 *parentMatch7 = match;
996 }
997 if (match.hit)
998 {
999 soulng::parser::Match match(false);
1000 soulng::parser::Match* parentMatch8 = &match;
1001 {
1002 soulng::parser::Match match(false);
1003 soulng::parser::Match* parentMatch9 = &match;
1004 {
1005 int64_t pos = lexer.GetPos();
1006 soulng::parser::Match match(true);
1007 soulng::parser::Match* parentMatch10 = &match;
1008 {
1009 soulng::lexer::Span span = lexer.GetSpan();
1010 soulng::parser::Match match = ParserExpressionParser::InclusiveOrExpression(lexer);
1011 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1012 if (match.hit)
1013 {
1014 *parentMatch10 = match;
1015 }
1016 else
1017 {
1018 lexer.ThrowExpectationFailure(span, U"inclusive OR-expression");
1019 }
1020 }
1021 if (match.hit)
1022 {
1023 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), soulng::cppcode::Operator::and_, right.release()));
1024 }
1025 *parentMatch9 = match;
1026 }
1027 *parentMatch8 = match;
1028 }
1029 *parentMatch7 = match;
1030 }
1031 *parentMatch6 = match;
1032 }
1033 if (match.hit)
1034 {
1035 *parentMatch5 = match;
1036 }
1037 else
1038 {
1039 lexer.SetPos(save);
1040 break;
1041 }
1042 }
1043 }
1044 }
1045 *parentMatch4 = match;
1046 }
1047 *parentMatch2 = match;
1048 }
1049 *parentMatch1 = match;
1050 }
1051 if (match.hit)
1052 {
1053 {
1054 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1055
1056 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1057 return soulng::parser::Match(true, expr.release());
1058 }
1059 }
1060 *parentMatch0 = match;
1061 }
1062 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1063
1064
1065
1066
1067
1068 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1069 if (!match.hit)
1070 {
1071 match.value = nullptr;
1072 }
1073 return match;
1074 }
1075
1076 soulng::parser::Match ParserExpressionParser::InclusiveOrExpression(ParserFileLexer& lexer)
1077 {
1078 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1079
1080
1081
1082
1083
1084
1085
1086 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1087 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
1088 std::unique_ptr<soulng::cppcode::CppObject> left;
1089 std::unique_ptr<soulng::cppcode::CppObject> right;
1090 soulng::parser::Match match(false);
1091 soulng::parser::Match* parentMatch0 = &match;
1092 {
1093 int64_t pos = lexer.GetPos();
1094 soulng::parser::Match match(false);
1095 soulng::parser::Match* parentMatch1 = &match;
1096 {
1097 soulng::parser::Match match(false);
1098 soulng::parser::Match* parentMatch2 = &match;
1099 {
1100 soulng::parser::Match match(false);
1101 soulng::parser::Match* parentMatch3 = &match;
1102 {
1103 int64_t pos = lexer.GetPos();
1104 soulng::parser::Match match = ParserExpressionParser::ExclusiveOrExpression(lexer);
1105 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1106 if (match.hit)
1107 {
1108 expr.reset(left.release());
1109 }
1110 *parentMatch3 = match;
1111 }
1112 *parentMatch2 = match;
1113 }
1114 if (match.hit)
1115 {
1116 soulng::parser::Match match(false);
1117 soulng::parser::Match* parentMatch4 = &match;
1118 {
1119 soulng::parser::Match match(true);
1120 soulng::parser::Match* parentMatch5 = &match;
1121 {
1122 while (true)
1123 {
1124 int64_t save = lexer.GetPos();
1125 {
1126 soulng::parser::Match match(false);
1127 soulng::parser::Match* parentMatch6 = &match;
1128 {
1129 soulng::parser::Match match(false);
1130 soulng::parser::Match* parentMatch7 = &match;
1131 {
1132 soulng::parser::Match match(false);
1133 if (*lexer == BITOR)
1134 {
1135 ++lexer;
1136 match.hit = true;
1137 }
1138 *parentMatch7 = match;
1139 }
1140 if (match.hit)
1141 {
1142 soulng::parser::Match match(false);
1143 soulng::parser::Match* parentMatch8 = &match;
1144 {
1145 soulng::parser::Match match(false);
1146 soulng::parser::Match* parentMatch9 = &match;
1147 {
1148 int64_t pos = lexer.GetPos();
1149 soulng::parser::Match match(true);
1150 soulng::parser::Match* parentMatch10 = &match;
1151 {
1152 soulng::lexer::Span span = lexer.GetSpan();
1153 soulng::parser::Match match = ParserExpressionParser::ExclusiveOrExpression(lexer);
1154 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1155 if (match.hit)
1156 {
1157 *parentMatch10 = match;
1158 }
1159 else
1160 {
1161 lexer.ThrowExpectationFailure(span, U"exclusive OR-expression");
1162 }
1163 }
1164 if (match.hit)
1165 {
1166 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), soulng::cppcode::Operator::bitor_, right.release()));
1167 }
1168 *parentMatch9 = match;
1169 }
1170 *parentMatch8 = match;
1171 }
1172 *parentMatch7 = match;
1173 }
1174 *parentMatch6 = match;
1175 }
1176 if (match.hit)
1177 {
1178 *parentMatch5 = match;
1179 }
1180 else
1181 {
1182 lexer.SetPos(save);
1183 break;
1184 }
1185 }
1186 }
1187 }
1188 *parentMatch4 = match;
1189 }
1190 *parentMatch2 = match;
1191 }
1192 *parentMatch1 = match;
1193 }
1194 if (match.hit)
1195 {
1196 {
1197 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1198
1199 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1200 return soulng::parser::Match(true, expr.release());
1201 }
1202 }
1203 *parentMatch0 = match;
1204 }
1205 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1206
1207
1208
1209
1210
1211 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1212 if (!match.hit)
1213 {
1214 match.value = nullptr;
1215 }
1216 return match;
1217 }
1218
1219 soulng::parser::Match ParserExpressionParser::ExclusiveOrExpression(ParserFileLexer& lexer)
1220 {
1221 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1222
1223
1224
1225
1226
1227
1228
1229 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1230 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
1231 std::unique_ptr<soulng::cppcode::CppObject> left;
1232 std::unique_ptr<soulng::cppcode::CppObject> right;
1233 soulng::parser::Match match(false);
1234 soulng::parser::Match* parentMatch0 = &match;
1235 {
1236 int64_t pos = lexer.GetPos();
1237 soulng::parser::Match match(false);
1238 soulng::parser::Match* parentMatch1 = &match;
1239 {
1240 soulng::parser::Match match(false);
1241 soulng::parser::Match* parentMatch2 = &match;
1242 {
1243 soulng::parser::Match match(false);
1244 soulng::parser::Match* parentMatch3 = &match;
1245 {
1246 int64_t pos = lexer.GetPos();
1247 soulng::parser::Match match = ParserExpressionParser::AndExpression(lexer);
1248 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1249 if (match.hit)
1250 {
1251 expr.reset(left.release());
1252 }
1253 *parentMatch3 = match;
1254 }
1255 *parentMatch2 = match;
1256 }
1257 if (match.hit)
1258 {
1259 soulng::parser::Match match(false);
1260 soulng::parser::Match* parentMatch4 = &match;
1261 {
1262 soulng::parser::Match match(true);
1263 soulng::parser::Match* parentMatch5 = &match;
1264 {
1265 while (true)
1266 {
1267 int64_t save = lexer.GetPos();
1268 {
1269 soulng::parser::Match match(false);
1270 soulng::parser::Match* parentMatch6 = &match;
1271 {
1272 soulng::parser::Match match(false);
1273 soulng::parser::Match* parentMatch7 = &match;
1274 {
1275 soulng::parser::Match match(false);
1276 if (*lexer == BITXOR)
1277 {
1278 ++lexer;
1279 match.hit = true;
1280 }
1281 *parentMatch7 = match;
1282 }
1283 if (match.hit)
1284 {
1285 soulng::parser::Match match(false);
1286 soulng::parser::Match* parentMatch8 = &match;
1287 {
1288 soulng::parser::Match match(false);
1289 soulng::parser::Match* parentMatch9 = &match;
1290 {
1291 int64_t pos = lexer.GetPos();
1292 soulng::parser::Match match(true);
1293 soulng::parser::Match* parentMatch10 = &match;
1294 {
1295 soulng::lexer::Span span = lexer.GetSpan();
1296 soulng::parser::Match match = ParserExpressionParser::AndExpression(lexer);
1297 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1298 if (match.hit)
1299 {
1300 *parentMatch10 = match;
1301 }
1302 else
1303 {
1304 lexer.ThrowExpectationFailure(span, U"AND-expression");
1305 }
1306 }
1307 if (match.hit)
1308 {
1309 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), soulng::cppcode::Operator::bitxor, right.release()));
1310 }
1311 *parentMatch9 = match;
1312 }
1313 *parentMatch8 = match;
1314 }
1315 *parentMatch7 = match;
1316 }
1317 *parentMatch6 = match;
1318 }
1319 if (match.hit)
1320 {
1321 *parentMatch5 = match;
1322 }
1323 else
1324 {
1325 lexer.SetPos(save);
1326 break;
1327 }
1328 }
1329 }
1330 }
1331 *parentMatch4 = match;
1332 }
1333 *parentMatch2 = match;
1334 }
1335 *parentMatch1 = match;
1336 }
1337 if (match.hit)
1338 {
1339 {
1340 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1341
1342 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1343 return soulng::parser::Match(true, expr.release());
1344 }
1345 }
1346 *parentMatch0 = match;
1347 }
1348 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1349
1350
1351
1352
1353
1354 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1355 if (!match.hit)
1356 {
1357 match.value = nullptr;
1358 }
1359 return match;
1360 }
1361
1362 soulng::parser::Match ParserExpressionParser::AndExpression(ParserFileLexer& lexer)
1363 {
1364 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1365
1366
1367
1368
1369
1370
1371
1372 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1373 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
1374 std::unique_ptr<soulng::cppcode::CppObject> left;
1375 std::unique_ptr<soulng::cppcode::CppObject> right;
1376 soulng::parser::Match match(false);
1377 soulng::parser::Match* parentMatch0 = &match;
1378 {
1379 int64_t pos = lexer.GetPos();
1380 soulng::parser::Match match(false);
1381 soulng::parser::Match* parentMatch1 = &match;
1382 {
1383 soulng::parser::Match match(false);
1384 soulng::parser::Match* parentMatch2 = &match;
1385 {
1386 soulng::parser::Match match(false);
1387 soulng::parser::Match* parentMatch3 = &match;
1388 {
1389 int64_t pos = lexer.GetPos();
1390 soulng::parser::Match match = ParserExpressionParser::EqualityExpression(lexer);
1391 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1392 if (match.hit)
1393 {
1394 expr.reset(left.release());
1395 }
1396 *parentMatch3 = match;
1397 }
1398 *parentMatch2 = match;
1399 }
1400 if (match.hit)
1401 {
1402 soulng::parser::Match match(false);
1403 soulng::parser::Match* parentMatch4 = &match;
1404 {
1405 soulng::parser::Match match(true);
1406 soulng::parser::Match* parentMatch5 = &match;
1407 {
1408 while (true)
1409 {
1410 int64_t save = lexer.GetPos();
1411 {
1412 soulng::parser::Match match(false);
1413 soulng::parser::Match* parentMatch6 = &match;
1414 {
1415 soulng::parser::Match match(false);
1416 soulng::parser::Match* parentMatch7 = &match;
1417 {
1418 soulng::parser::Match match(false);
1419 if (*lexer == AMP)
1420 {
1421 ++lexer;
1422 match.hit = true;
1423 }
1424 *parentMatch7 = match;
1425 }
1426 if (match.hit)
1427 {
1428 soulng::parser::Match match(false);
1429 soulng::parser::Match* parentMatch8 = &match;
1430 {
1431 soulng::parser::Match match(false);
1432 soulng::parser::Match* parentMatch9 = &match;
1433 {
1434 int64_t pos = lexer.GetPos();
1435 soulng::parser::Match match(true);
1436 soulng::parser::Match* parentMatch10 = &match;
1437 {
1438 soulng::lexer::Span span = lexer.GetSpan();
1439 soulng::parser::Match match = ParserExpressionParser::EqualityExpression(lexer);
1440 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1441 if (match.hit)
1442 {
1443 *parentMatch10 = match;
1444 }
1445 else
1446 {
1447 lexer.ThrowExpectationFailure(span, U"equality expression");
1448 }
1449 }
1450 if (match.hit)
1451 {
1452 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), soulng::cppcode::Operator::bitand_, right.release()));
1453 }
1454 *parentMatch9 = match;
1455 }
1456 *parentMatch8 = match;
1457 }
1458 *parentMatch7 = match;
1459 }
1460 *parentMatch6 = match;
1461 }
1462 if (match.hit)
1463 {
1464 *parentMatch5 = match;
1465 }
1466 else
1467 {
1468 lexer.SetPos(save);
1469 break;
1470 }
1471 }
1472 }
1473 }
1474 *parentMatch4 = match;
1475 }
1476 *parentMatch2 = match;
1477 }
1478 *parentMatch1 = match;
1479 }
1480 if (match.hit)
1481 {
1482 {
1483 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1484
1485 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1486 return soulng::parser::Match(true, expr.release());
1487 }
1488 }
1489 *parentMatch0 = match;
1490 }
1491 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1492
1493
1494
1495
1496
1497 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1498 if (!match.hit)
1499 {
1500 match.value = nullptr;
1501 }
1502 return match;
1503 }
1504
1505 soulng::parser::Match ParserExpressionParser::EqualityExpression(ParserFileLexer& lexer)
1506 {
1507 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1508
1509
1510
1511
1512
1513
1514
1515 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1516 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
1517 std::unique_ptr<soulng::cppcode::CppObject> left;
1518 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
1519 std::unique_ptr<soulng::cppcode::CppObject> right;
1520 soulng::parser::Match match(false);
1521 soulng::parser::Match* parentMatch0 = &match;
1522 {
1523 int64_t pos = lexer.GetPos();
1524 soulng::parser::Match match(false);
1525 soulng::parser::Match* parentMatch1 = &match;
1526 {
1527 soulng::parser::Match match(false);
1528 soulng::parser::Match* parentMatch2 = &match;
1529 {
1530 soulng::parser::Match match(false);
1531 soulng::parser::Match* parentMatch3 = &match;
1532 {
1533 int64_t pos = lexer.GetPos();
1534 soulng::parser::Match match = ParserExpressionParser::RelationalExpression(lexer);
1535 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1536 if (match.hit)
1537 {
1538 expr.reset(left.release());
1539 }
1540 *parentMatch3 = match;
1541 }
1542 *parentMatch2 = match;
1543 }
1544 if (match.hit)
1545 {
1546 soulng::parser::Match match(false);
1547 soulng::parser::Match* parentMatch4 = &match;
1548 {
1549 soulng::parser::Match match(true);
1550 soulng::parser::Match* parentMatch5 = &match;
1551 {
1552 while (true)
1553 {
1554 int64_t save = lexer.GetPos();
1555 {
1556 soulng::parser::Match match(false);
1557 soulng::parser::Match* parentMatch6 = &match;
1558 {
1559 soulng::parser::Match match(false);
1560 soulng::parser::Match* parentMatch7 = &match;
1561 {
1562 soulng::parser::Match match = ParserExpressionParser::EqOp(lexer);
1563 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
1564 *parentMatch7 = match;
1565 }
1566 if (match.hit)
1567 {
1568 soulng::parser::Match match(false);
1569 soulng::parser::Match* parentMatch8 = &match;
1570 {
1571 soulng::parser::Match match(false);
1572 soulng::parser::Match* parentMatch9 = &match;
1573 {
1574 int64_t pos = lexer.GetPos();
1575 soulng::parser::Match match(true);
1576 soulng::parser::Match* parentMatch10 = &match;
1577 {
1578 soulng::lexer::Span span = lexer.GetSpan();
1579 soulng::parser::Match match = ParserExpressionParser::RelationalExpression(lexer);
1580 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1581 if (match.hit)
1582 {
1583 *parentMatch10 = match;
1584 }
1585 else
1586 {
1587 lexer.ThrowExpectationFailure(span, U"relational expression");
1588 }
1589 }
1590 if (match.hit)
1591 {
1592 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), op->value, right.release()));
1593 }
1594 *parentMatch9 = match;
1595 }
1596 *parentMatch8 = match;
1597 }
1598 *parentMatch7 = match;
1599 }
1600 *parentMatch6 = match;
1601 }
1602 if (match.hit)
1603 {
1604 *parentMatch5 = match;
1605 }
1606 else
1607 {
1608 lexer.SetPos(save);
1609 break;
1610 }
1611 }
1612 }
1613 }
1614 *parentMatch4 = match;
1615 }
1616 *parentMatch2 = match;
1617 }
1618 *parentMatch1 = match;
1619 }
1620 if (match.hit)
1621 {
1622 {
1623 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1624
1625 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1626 return soulng::parser::Match(true, expr.release());
1627 }
1628 }
1629 *parentMatch0 = match;
1630 }
1631 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1632
1633
1634
1635
1636
1637 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1638 if (!match.hit)
1639 {
1640 match.value = nullptr;
1641 }
1642 return match;
1643 }
1644
1645 soulng::parser::Match ParserExpressionParser::EqOp(ParserFileLexer& lexer)
1646 {
1647 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1648
1649
1650
1651
1652
1653
1654
1655 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1656 soulng::parser::Match match(false);
1657 int64_t pos = lexer.GetPos();
1658 soulng::lexer::Span span = lexer.GetSpan();
1659 switch (*lexer)
1660 {
1661 case EQ:
1662 {
1663 ++lexer;
1664 {
1665 {
1666 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1667
1668 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1669 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::eq));
1670 }
1671 }
1672 break;
1673 }
1674 case NEQ:
1675 {
1676 ++lexer;
1677 {
1678 {
1679 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1680
1681 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1682 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::notEq));
1683 }
1684 }
1685 break;
1686 }
1687 }
1688 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1689
1690
1691
1692
1693
1694 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1695 if (!match.hit)
1696 {
1697 match.value = nullptr;
1698 }
1699 return match;
1700 }
1701
1702 soulng::parser::Match ParserExpressionParser::RelationalExpression(ParserFileLexer& lexer)
1703 {
1704 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1705
1706
1707
1708
1709
1710
1711
1712 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1713 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
1714 std::unique_ptr<soulng::cppcode::CppObject> left;
1715 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
1716 std::unique_ptr<soulng::cppcode::CppObject> right;
1717 soulng::parser::Match match(false);
1718 soulng::parser::Match* parentMatch0 = &match;
1719 {
1720 int64_t pos = lexer.GetPos();
1721 soulng::parser::Match match(false);
1722 soulng::parser::Match* parentMatch1 = &match;
1723 {
1724 soulng::parser::Match match(false);
1725 soulng::parser::Match* parentMatch2 = &match;
1726 {
1727 soulng::parser::Match match(false);
1728 soulng::parser::Match* parentMatch3 = &match;
1729 {
1730 int64_t pos = lexer.GetPos();
1731 soulng::parser::Match match = ParserExpressionParser::ShiftExpression(lexer);
1732 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1733 if (match.hit)
1734 {
1735 expr.reset(left.release());
1736 }
1737 *parentMatch3 = match;
1738 }
1739 *parentMatch2 = match;
1740 }
1741 if (match.hit)
1742 {
1743 soulng::parser::Match match(false);
1744 soulng::parser::Match* parentMatch4 = &match;
1745 {
1746 soulng::parser::Match match(true);
1747 soulng::parser::Match* parentMatch5 = &match;
1748 {
1749 while (true)
1750 {
1751 int64_t save = lexer.GetPos();
1752 {
1753 soulng::parser::Match match(false);
1754 soulng::parser::Match* parentMatch6 = &match;
1755 {
1756 soulng::parser::Match match(false);
1757 soulng::parser::Match* parentMatch7 = &match;
1758 {
1759 soulng::parser::Match match = ParserExpressionParser::RelOp(lexer);
1760 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
1761 *parentMatch7 = match;
1762 }
1763 if (match.hit)
1764 {
1765 soulng::parser::Match match(false);
1766 soulng::parser::Match* parentMatch8 = &match;
1767 {
1768 soulng::parser::Match match(false);
1769 soulng::parser::Match* parentMatch9 = &match;
1770 {
1771 int64_t pos = lexer.GetPos();
1772 soulng::parser::Match match(true);
1773 soulng::parser::Match* parentMatch10 = &match;
1774 {
1775 soulng::lexer::Span span = lexer.GetSpan();
1776 soulng::parser::Match match = ParserExpressionParser::ShiftExpression(lexer);
1777 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1778 if (match.hit)
1779 {
1780 *parentMatch10 = match;
1781 }
1782 else
1783 {
1784 lexer.ThrowExpectationFailure(span, U"shift expression");
1785 }
1786 }
1787 if (match.hit)
1788 {
1789 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), op->value, right.release()));
1790 }
1791 *parentMatch9 = match;
1792 }
1793 *parentMatch8 = match;
1794 }
1795 *parentMatch7 = match;
1796 }
1797 *parentMatch6 = match;
1798 }
1799 if (match.hit)
1800 {
1801 *parentMatch5 = match;
1802 }
1803 else
1804 {
1805 lexer.SetPos(save);
1806 break;
1807 }
1808 }
1809 }
1810 }
1811 *parentMatch4 = match;
1812 }
1813 *parentMatch2 = match;
1814 }
1815 *parentMatch1 = match;
1816 }
1817 if (match.hit)
1818 {
1819 {
1820 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1821
1822 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1823 return soulng::parser::Match(true, expr.release());
1824 }
1825 }
1826 *parentMatch0 = match;
1827 }
1828 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1829
1830
1831
1832
1833
1834 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1835 if (!match.hit)
1836 {
1837 match.value = nullptr;
1838 }
1839 return match;
1840 }
1841
1842 soulng::parser::Match ParserExpressionParser::RelOp(ParserFileLexer& lexer)
1843 {
1844 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1845
1846
1847
1848
1849
1850
1851
1852 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1853 soulng::parser::Match match(false);
1854 int64_t pos = lexer.GetPos();
1855 soulng::lexer::Span span = lexer.GetSpan();
1856 switch (*lexer)
1857 {
1858 case LANGLE:
1859 {
1860 ++lexer;
1861 {
1862 {
1863 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1864
1865 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1866 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::less));
1867 }
1868 }
1869 break;
1870 }
1871 case RANGLE:
1872 {
1873 ++lexer;
1874 {
1875 {
1876 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1877
1878 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1879 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::greater));
1880 }
1881 }
1882 break;
1883 }
1884 case LEQ:
1885 {
1886 ++lexer;
1887 {
1888 {
1889 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1890
1891 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1892 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::lessOrEq));
1893 }
1894 }
1895 break;
1896 }
1897 case GEQ:
1898 {
1899 ++lexer;
1900 {
1901 {
1902 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1903
1904 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1905 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::greaterOrEq));
1906 }
1907 }
1908 break;
1909 }
1910 }
1911 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1912
1913
1914
1915
1916
1917 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1918 if (!match.hit)
1919 {
1920 match.value = nullptr;
1921 }
1922 return match;
1923 }
1924
1925 soulng::parser::Match ParserExpressionParser::ShiftExpression(ParserFileLexer& lexer)
1926 {
1927 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1928
1929
1930
1931
1932
1933
1934
1935 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1936 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
1937 std::unique_ptr<soulng::cppcode::CppObject> left;
1938 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
1939 std::unique_ptr<soulng::cppcode::CppObject> right;
1940 soulng::parser::Match match(false);
1941 soulng::parser::Match* parentMatch0 = &match;
1942 {
1943 int64_t pos = lexer.GetPos();
1944 soulng::parser::Match match(false);
1945 soulng::parser::Match* parentMatch1 = &match;
1946 {
1947 soulng::parser::Match match(false);
1948 soulng::parser::Match* parentMatch2 = &match;
1949 {
1950 soulng::parser::Match match(false);
1951 soulng::parser::Match* parentMatch3 = &match;
1952 {
1953 int64_t pos = lexer.GetPos();
1954 soulng::parser::Match match = ParserExpressionParser::AdditiveExpression(lexer);
1955 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1956 if (match.hit)
1957 {
1958 expr.reset(left.release());
1959 }
1960 *parentMatch3 = match;
1961 }
1962 *parentMatch2 = match;
1963 }
1964 if (match.hit)
1965 {
1966 soulng::parser::Match match(false);
1967 soulng::parser::Match* parentMatch4 = &match;
1968 {
1969 soulng::parser::Match match(true);
1970 soulng::parser::Match* parentMatch5 = &match;
1971 {
1972 while (true)
1973 {
1974 int64_t save = lexer.GetPos();
1975 {
1976 soulng::parser::Match match(false);
1977 soulng::parser::Match* parentMatch6 = &match;
1978 {
1979 soulng::parser::Match match(false);
1980 soulng::parser::Match* parentMatch7 = &match;
1981 {
1982 soulng::parser::Match match = ParserExpressionParser::ShiftOp(lexer);
1983 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
1984 *parentMatch7 = match;
1985 }
1986 if (match.hit)
1987 {
1988 soulng::parser::Match match(false);
1989 soulng::parser::Match* parentMatch8 = &match;
1990 {
1991 soulng::parser::Match match(false);
1992 soulng::parser::Match* parentMatch9 = &match;
1993 {
1994 int64_t pos = lexer.GetPos();
1995 soulng::parser::Match match(true);
1996 soulng::parser::Match* parentMatch10 = &match;
1997 {
1998 soulng::lexer::Span span = lexer.GetSpan();
1999 soulng::parser::Match match = ParserExpressionParser::AdditiveExpression(lexer);
2000 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2001 if (match.hit)
2002 {
2003 *parentMatch10 = match;
2004 }
2005 else
2006 {
2007 lexer.ThrowExpectationFailure(span, U"additive expression");
2008 }
2009 }
2010 if (match.hit)
2011 {
2012 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), op->value, right.release()));
2013 }
2014 *parentMatch9 = match;
2015 }
2016 *parentMatch8 = match;
2017 }
2018 *parentMatch7 = match;
2019 }
2020 *parentMatch6 = match;
2021 }
2022 if (match.hit)
2023 {
2024 *parentMatch5 = match;
2025 }
2026 else
2027 {
2028 lexer.SetPos(save);
2029 break;
2030 }
2031 }
2032 }
2033 }
2034 *parentMatch4 = match;
2035 }
2036 *parentMatch2 = match;
2037 }
2038 *parentMatch1 = match;
2039 }
2040 if (match.hit)
2041 {
2042 {
2043 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2044
2045 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2046 return soulng::parser::Match(true, expr.release());
2047 }
2048 }
2049 *parentMatch0 = match;
2050 }
2051 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2052
2053
2054
2055
2056
2057 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2058 if (!match.hit)
2059 {
2060 match.value = nullptr;
2061 }
2062 return match;
2063 }
2064
2065 soulng::parser::Match ParserExpressionParser::ShiftOp(ParserFileLexer& lexer)
2066 {
2067 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2068
2069
2070
2071
2072
2073
2074
2075 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2076 soulng::parser::Match match(false);
2077 int64_t pos = lexer.GetPos();
2078 soulng::lexer::Span span = lexer.GetSpan();
2079 switch (*lexer)
2080 {
2081 case SHIFTLEFT:
2082 {
2083 ++lexer;
2084 {
2085 {
2086 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2087
2088 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2089 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::shiftLeft));
2090 }
2091 }
2092 break;
2093 }
2094 case SHIFTRIGHT:
2095 {
2096 ++lexer;
2097 {
2098 {
2099 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2100
2101 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2102 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::shiftRight));
2103 }
2104 }
2105 break;
2106 }
2107 }
2108 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2109
2110
2111
2112
2113
2114 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2115 if (!match.hit)
2116 {
2117 match.value = nullptr;
2118 }
2119 return match;
2120 }
2121
2122 soulng::parser::Match ParserExpressionParser::AdditiveExpression(ParserFileLexer& lexer)
2123 {
2124 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2125
2126
2127
2128
2129
2130
2131
2132 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2133 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
2134 std::unique_ptr<soulng::cppcode::CppObject> left;
2135 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
2136 std::unique_ptr<soulng::cppcode::CppObject> right;
2137 soulng::parser::Match match(false);
2138 soulng::parser::Match* parentMatch0 = &match;
2139 {
2140 int64_t pos = lexer.GetPos();
2141 soulng::parser::Match match(false);
2142 soulng::parser::Match* parentMatch1 = &match;
2143 {
2144 soulng::parser::Match match(false);
2145 soulng::parser::Match* parentMatch2 = &match;
2146 {
2147 soulng::parser::Match match(false);
2148 soulng::parser::Match* parentMatch3 = &match;
2149 {
2150 int64_t pos = lexer.GetPos();
2151 soulng::parser::Match match = ParserExpressionParser::MultiplicativeExpression(lexer);
2152 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2153 if (match.hit)
2154 {
2155 expr.reset(left.release());
2156 }
2157 *parentMatch3 = match;
2158 }
2159 *parentMatch2 = match;
2160 }
2161 if (match.hit)
2162 {
2163 soulng::parser::Match match(false);
2164 soulng::parser::Match* parentMatch4 = &match;
2165 {
2166 soulng::parser::Match match(true);
2167 soulng::parser::Match* parentMatch5 = &match;
2168 {
2169 while (true)
2170 {
2171 int64_t save = lexer.GetPos();
2172 {
2173 soulng::parser::Match match(false);
2174 soulng::parser::Match* parentMatch6 = &match;
2175 {
2176 soulng::parser::Match match(false);
2177 soulng::parser::Match* parentMatch7 = &match;
2178 {
2179 soulng::parser::Match match = ParserExpressionParser::AddOp(lexer);
2180 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
2181 *parentMatch7 = match;
2182 }
2183 if (match.hit)
2184 {
2185 soulng::parser::Match match(false);
2186 soulng::parser::Match* parentMatch8 = &match;
2187 {
2188 soulng::parser::Match match(false);
2189 soulng::parser::Match* parentMatch9 = &match;
2190 {
2191 int64_t pos = lexer.GetPos();
2192 soulng::parser::Match match(true);
2193 soulng::parser::Match* parentMatch10 = &match;
2194 {
2195 soulng::lexer::Span span = lexer.GetSpan();
2196 soulng::parser::Match match = ParserExpressionParser::MultiplicativeExpression(lexer);
2197 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2198 if (match.hit)
2199 {
2200 *parentMatch10 = match;
2201 }
2202 else
2203 {
2204 lexer.ThrowExpectationFailure(span, U"multiplicative expression");
2205 }
2206 }
2207 if (match.hit)
2208 {
2209 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), op->value, right.release()));
2210 }
2211 *parentMatch9 = match;
2212 }
2213 *parentMatch8 = match;
2214 }
2215 *parentMatch7 = match;
2216 }
2217 *parentMatch6 = match;
2218 }
2219 if (match.hit)
2220 {
2221 *parentMatch5 = match;
2222 }
2223 else
2224 {
2225 lexer.SetPos(save);
2226 break;
2227 }
2228 }
2229 }
2230 }
2231 *parentMatch4 = match;
2232 }
2233 *parentMatch2 = match;
2234 }
2235 *parentMatch1 = match;
2236 }
2237 if (match.hit)
2238 {
2239 {
2240 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2241
2242 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2243 return soulng::parser::Match(true, expr.release());
2244 }
2245 }
2246 *parentMatch0 = match;
2247 }
2248 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2249
2250
2251
2252
2253
2254 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2255 if (!match.hit)
2256 {
2257 match.value = nullptr;
2258 }
2259 return match;
2260 }
2261
2262 soulng::parser::Match ParserExpressionParser::AddOp(ParserFileLexer& lexer)
2263 {
2264 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2265
2266
2267
2268
2269
2270
2271
2272 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2273 soulng::parser::Match match(false);
2274 int64_t pos = lexer.GetPos();
2275 soulng::lexer::Span span = lexer.GetSpan();
2276 switch (*lexer)
2277 {
2278 case PLUS:
2279 {
2280 ++lexer;
2281 {
2282 {
2283 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2284
2285 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2286 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::plus));
2287 }
2288 }
2289 break;
2290 }
2291 case MINUS:
2292 {
2293 ++lexer;
2294 {
2295 {
2296 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2297
2298 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2299 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::minus));
2300 }
2301 }
2302 break;
2303 }
2304 }
2305 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2306
2307
2308
2309
2310
2311 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2312 if (!match.hit)
2313 {
2314 match.value = nullptr;
2315 }
2316 return match;
2317 }
2318
2319 soulng::parser::Match ParserExpressionParser::MultiplicativeExpression(ParserFileLexer& lexer)
2320 {
2321 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2322
2323
2324
2325
2326
2327
2328
2329 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2330 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
2331 std::unique_ptr<soulng::cppcode::CppObject> left;
2332 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
2333 std::unique_ptr<soulng::cppcode::CppObject> right;
2334 soulng::parser::Match match(false);
2335 soulng::parser::Match* parentMatch0 = &match;
2336 {
2337 int64_t pos = lexer.GetPos();
2338 soulng::parser::Match match(false);
2339 soulng::parser::Match* parentMatch1 = &match;
2340 {
2341 soulng::parser::Match match(false);
2342 soulng::parser::Match* parentMatch2 = &match;
2343 {
2344 soulng::parser::Match match(false);
2345 soulng::parser::Match* parentMatch3 = &match;
2346 {
2347 int64_t pos = lexer.GetPos();
2348 soulng::parser::Match match = ParserExpressionParser::PmExpression(lexer);
2349 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2350 if (match.hit)
2351 {
2352 expr.reset(left.release());
2353 }
2354 *parentMatch3 = match;
2355 }
2356 *parentMatch2 = match;
2357 }
2358 if (match.hit)
2359 {
2360 soulng::parser::Match match(false);
2361 soulng::parser::Match* parentMatch4 = &match;
2362 {
2363 soulng::parser::Match match(true);
2364 soulng::parser::Match* parentMatch5 = &match;
2365 {
2366 while (true)
2367 {
2368 int64_t save = lexer.GetPos();
2369 {
2370 soulng::parser::Match match(false);
2371 soulng::parser::Match* parentMatch6 = &match;
2372 {
2373 soulng::parser::Match match(false);
2374 soulng::parser::Match* parentMatch7 = &match;
2375 {
2376 soulng::parser::Match match = ParserExpressionParser::MulOp(lexer);
2377 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
2378 *parentMatch7 = match;
2379 }
2380 if (match.hit)
2381 {
2382 soulng::parser::Match match(false);
2383 soulng::parser::Match* parentMatch8 = &match;
2384 {
2385 soulng::parser::Match match(false);
2386 soulng::parser::Match* parentMatch9 = &match;
2387 {
2388 int64_t pos = lexer.GetPos();
2389 soulng::parser::Match match(true);
2390 soulng::parser::Match* parentMatch10 = &match;
2391 {
2392 soulng::lexer::Span span = lexer.GetSpan();
2393 soulng::parser::Match match = ParserExpressionParser::PmExpression(lexer);
2394 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2395 if (match.hit)
2396 {
2397 *parentMatch10 = match;
2398 }
2399 else
2400 {
2401 lexer.ThrowExpectationFailure(span, U"pointer-to-member expression");
2402 }
2403 }
2404 if (match.hit)
2405 {
2406 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), op->value, right.release()));
2407 }
2408 *parentMatch9 = match;
2409 }
2410 *parentMatch8 = match;
2411 }
2412 *parentMatch7 = match;
2413 }
2414 *parentMatch6 = match;
2415 }
2416 if (match.hit)
2417 {
2418 *parentMatch5 = match;
2419 }
2420 else
2421 {
2422 lexer.SetPos(save);
2423 break;
2424 }
2425 }
2426 }
2427 }
2428 *parentMatch4 = match;
2429 }
2430 *parentMatch2 = match;
2431 }
2432 *parentMatch1 = match;
2433 }
2434 if (match.hit)
2435 {
2436 {
2437 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2438
2439 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2440 return soulng::parser::Match(true, expr.release());
2441 }
2442 }
2443 *parentMatch0 = match;
2444 }
2445 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2446
2447
2448
2449
2450
2451 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2452 if (!match.hit)
2453 {
2454 match.value = nullptr;
2455 }
2456 return match;
2457 }
2458
2459 soulng::parser::Match ParserExpressionParser::MulOp(ParserFileLexer& lexer)
2460 {
2461 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2462
2463
2464
2465
2466
2467
2468
2469 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2470 soulng::parser::Match match(false);
2471 int64_t pos = lexer.GetPos();
2472 soulng::lexer::Span span = lexer.GetSpan();
2473 switch (*lexer)
2474 {
2475 case STAR:
2476 {
2477 ++lexer;
2478 {
2479 {
2480 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2481
2482 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2483 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::mul));
2484 }
2485 }
2486 break;
2487 }
2488 case DIV:
2489 {
2490 ++lexer;
2491 {
2492 {
2493 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2494
2495 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2496 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::div));
2497 }
2498 }
2499 break;
2500 }
2501 case REM:
2502 {
2503 ++lexer;
2504 {
2505 {
2506 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2507
2508 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2509 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::rem));
2510 }
2511 }
2512 break;
2513 }
2514 }
2515 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2516
2517
2518
2519
2520
2521 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2522 if (!match.hit)
2523 {
2524 match.value = nullptr;
2525 }
2526 return match;
2527 }
2528
2529 soulng::parser::Match ParserExpressionParser::PmExpression(ParserFileLexer& lexer)
2530 {
2531 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2532
2533
2534
2535
2536
2537
2538
2539 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2540 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
2541 std::unique_ptr<soulng::cppcode::CppObject> left;
2542 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
2543 std::unique_ptr<soulng::cppcode::CppObject> right;
2544 soulng::parser::Match match(false);
2545 soulng::parser::Match* parentMatch0 = &match;
2546 {
2547 int64_t pos = lexer.GetPos();
2548 soulng::parser::Match match(false);
2549 soulng::parser::Match* parentMatch1 = &match;
2550 {
2551 soulng::parser::Match match(false);
2552 soulng::parser::Match* parentMatch2 = &match;
2553 {
2554 soulng::parser::Match match(false);
2555 soulng::parser::Match* parentMatch3 = &match;
2556 {
2557 int64_t pos = lexer.GetPos();
2558 soulng::parser::Match match = ParserExpressionParser::CastExpression(lexer);
2559 left.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2560 if (match.hit)
2561 {
2562 expr.reset(left.release());
2563 }
2564 *parentMatch3 = match;
2565 }
2566 *parentMatch2 = match;
2567 }
2568 if (match.hit)
2569 {
2570 soulng::parser::Match match(false);
2571 soulng::parser::Match* parentMatch4 = &match;
2572 {
2573 soulng::parser::Match match(true);
2574 soulng::parser::Match* parentMatch5 = &match;
2575 {
2576 while (true)
2577 {
2578 int64_t save = lexer.GetPos();
2579 {
2580 soulng::parser::Match match(false);
2581 soulng::parser::Match* parentMatch6 = &match;
2582 {
2583 soulng::parser::Match match(false);
2584 soulng::parser::Match* parentMatch7 = &match;
2585 {
2586 soulng::parser::Match match = ParserExpressionParser::PmOp(lexer);
2587 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
2588 *parentMatch7 = match;
2589 }
2590 if (match.hit)
2591 {
2592 soulng::parser::Match match(false);
2593 soulng::parser::Match* parentMatch8 = &match;
2594 {
2595 soulng::parser::Match match(false);
2596 soulng::parser::Match* parentMatch9 = &match;
2597 {
2598 int64_t pos = lexer.GetPos();
2599 soulng::parser::Match match(true);
2600 soulng::parser::Match* parentMatch10 = &match;
2601 {
2602 soulng::lexer::Span span = lexer.GetSpan();
2603 soulng::parser::Match match = ParserExpressionParser::CastExpression(lexer);
2604 right.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2605 if (match.hit)
2606 {
2607 *parentMatch10 = match;
2608 }
2609 else
2610 {
2611 lexer.ThrowExpectationFailure(span, U"cast-expression");
2612 }
2613 }
2614 if (match.hit)
2615 {
2616 expr.reset(new soulng::cppcode::BinaryOpExpr(expr.release(), op->value, right.release()));
2617 }
2618 *parentMatch9 = match;
2619 }
2620 *parentMatch8 = match;
2621 }
2622 *parentMatch7 = match;
2623 }
2624 *parentMatch6 = match;
2625 }
2626 if (match.hit)
2627 {
2628 *parentMatch5 = match;
2629 }
2630 else
2631 {
2632 lexer.SetPos(save);
2633 break;
2634 }
2635 }
2636 }
2637 }
2638 *parentMatch4 = match;
2639 }
2640 *parentMatch2 = match;
2641 }
2642 *parentMatch1 = match;
2643 }
2644 if (match.hit)
2645 {
2646 {
2647 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2648
2649 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2650 return soulng::parser::Match(true, expr.release());
2651 }
2652 }
2653 *parentMatch0 = match;
2654 }
2655 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2656
2657
2658
2659
2660
2661 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2662 if (!match.hit)
2663 {
2664 match.value = nullptr;
2665 }
2666 return match;
2667 }
2668
2669 soulng::parser::Match ParserExpressionParser::PmOp(ParserFileLexer& lexer)
2670 {
2671 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2672
2673
2674
2675
2676
2677
2678
2679 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2680 soulng::parser::Match match(false);
2681 int64_t pos = lexer.GetPos();
2682 soulng::lexer::Span span = lexer.GetSpan();
2683 switch (*lexer)
2684 {
2685 case DOTSTAR:
2686 {
2687 ++lexer;
2688 {
2689 {
2690 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2691
2692 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2693 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::dotStar));
2694 }
2695 }
2696 break;
2697 }
2698 case ARROWSTAR:
2699 {
2700 ++lexer;
2701 {
2702 {
2703 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2704
2705 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2706 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::arrowStar));
2707 }
2708 }
2709 break;
2710 }
2711 }
2712 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2713
2714
2715
2716
2717
2718 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2719 if (!match.hit)
2720 {
2721 match.value = nullptr;
2722 }
2723 return match;
2724 }
2725
2726 soulng::parser::Match ParserExpressionParser::CastExpression(ParserFileLexer& lexer)
2727 {
2728 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2729
2730
2731
2732
2733
2734
2735
2736 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2737 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
2738 std::unique_ptr<soulng::cppcode::TypeId> typeId;
2739 std::unique_ptr<soulng::cppcode::CppObject> castExpr;
2740 std::unique_ptr<soulng::cppcode::CppObject> unaryExpr;
2741 soulng::parser::Match match(false);
2742 soulng::parser::Match* parentMatch0 = &match;
2743 {
2744 int64_t pos = lexer.GetPos();
2745 soulng::parser::Match match(false);
2746 soulng::parser::Match* parentMatch1 = &match;
2747 {
2748 soulng::parser::Match match(false);
2749 soulng::parser::Match* parentMatch2 = &match;
2750 {
2751 int64_t save = lexer.GetPos();
2752 soulng::parser::Match match(false);
2753 soulng::parser::Match* parentMatch3 = &match;
2754 {
2755 soulng::parser::Match match(false);
2756 soulng::parser::Match* parentMatch4 = &match;
2757 {
2758 soulng::parser::Match match(false);
2759 soulng::parser::Match* parentMatch5 = &match;
2760 {
2761 soulng::parser::Match match(false);
2762 if (*lexer == LPAREN)
2763 {
2764 ++lexer;
2765 match.hit = true;
2766 }
2767 *parentMatch5 = match;
2768 }
2769 if (match.hit)
2770 {
2771 soulng::parser::Match match(false);
2772 soulng::parser::Match* parentMatch6 = &match;
2773 {
2774 soulng::parser::Match match = ParserDeclaratorParser::TypeId(lexer);
2775 typeId.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
2776 *parentMatch6 = match;
2777 }
2778 *parentMatch5 = match;
2779 }
2780 *parentMatch4 = match;
2781 }
2782 if (match.hit)
2783 {
2784 soulng::parser::Match match(false);
2785 soulng::parser::Match* parentMatch7 = &match;
2786 {
2787 soulng::parser::Match match(false);
2788 if (*lexer == RPAREN)
2789 {
2790 ++lexer;
2791 match.hit = true;
2792 }
2793 *parentMatch7 = match;
2794 }
2795 *parentMatch4 = match;
2796 }
2797 *parentMatch3 = match;
2798 }
2799 if (match.hit)
2800 {
2801 soulng::parser::Match match(false);
2802 soulng::parser::Match* parentMatch8 = &match;
2803 {
2804 soulng::parser::Match match(false);
2805 soulng::parser::Match* parentMatch9 = &match;
2806 {
2807 int64_t pos = lexer.GetPos();
2808 soulng::parser::Match match = ParserExpressionParser::CastExpression(lexer);
2809 castExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2810 if (match.hit)
2811 {
2812 expr.reset(new soulng::cppcode::CastExpr(typeId.release(), castExpr.release()));
2813 }
2814 *parentMatch9 = match;
2815 }
2816 *parentMatch8 = match;
2817 }
2818 *parentMatch3 = match;
2819 }
2820 *parentMatch2 = match;
2821 if (!match.hit)
2822 {
2823 soulng::parser::Match match(false);
2824 soulng::parser::Match* parentMatch10 = &match;
2825 lexer.SetPos(save);
2826 {
2827 soulng::parser::Match match(false);
2828 soulng::parser::Match* parentMatch11 = &match;
2829 {
2830 int64_t pos = lexer.GetPos();
2831 soulng::parser::Match match = ParserExpressionParser::UnaryExpression(lexer);
2832 unaryExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2833 if (match.hit)
2834 {
2835 expr.reset(unaryExpr.release());
2836 }
2837 *parentMatch11 = match;
2838 }
2839 *parentMatch10 = match;
2840 }
2841 *parentMatch2 = match;
2842 }
2843 }
2844 *parentMatch1 = match;
2845 }
2846 if (match.hit)
2847 {
2848 {
2849 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2850
2851 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2852 return soulng::parser::Match(true, expr.release());
2853 }
2854 }
2855 *parentMatch0 = match;
2856 }
2857 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2858
2859
2860
2861
2862
2863 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2864 if (!match.hit)
2865 {
2866 match.value = nullptr;
2867 }
2868 return match;
2869 }
2870
2871 soulng::parser::Match ParserExpressionParser::UnaryExpression(ParserFileLexer& lexer)
2872 {
2873 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2874
2875
2876
2877
2878
2879
2880
2881 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2882 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
2883 std::unique_ptr<soulng::cppcode::CppObject> postfixExpr;
2884 std::unique_ptr<soulng::cppcode::CppObject> postCastExpr;
2885 std::unique_ptr<soulng::cppcode::CppObject> u1;
2886 std::unique_ptr<soulng::cppcode::CppObject> u2;
2887 std::unique_ptr<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>>op;
2888 std::unique_ptr<soulng::cppcode::CppObject> castExpr;
2889 std::unique_ptr<soulng::cppcode::TypeId> typeId;
2890 std::unique_ptr<soulng::cppcode::CppObject> u3;
2891 std::unique_ptr<soulng::cppcode::CppObject> newExpr;
2892 std::unique_ptr<soulng::cppcode::CppObject> deleteExpr;
2893 soulng::parser::Match match(false);
2894 soulng::parser::Match* parentMatch0 = &match;
2895 {
2896 int64_t pos = lexer.GetPos();
2897 soulng::parser::Match match(false);
2898 soulng::parser::Match* parentMatch1 = &match;
2899 {
2900 soulng::parser::Match match(false);
2901 soulng::parser::Match* parentMatch2 = &match;
2902 {
2903 int64_t save = lexer.GetPos();
2904 soulng::parser::Match match(false);
2905 soulng::parser::Match* parentMatch3 = &match;
2906 {
2907 int64_t save = lexer.GetPos();
2908 soulng::parser::Match match(false);
2909 soulng::parser::Match* parentMatch4 = &match;
2910 {
2911 int64_t save = lexer.GetPos();
2912 soulng::parser::Match match(false);
2913 soulng::parser::Match* parentMatch5 = &match;
2914 {
2915 int64_t save = lexer.GetPos();
2916 soulng::parser::Match match(false);
2917 soulng::parser::Match* parentMatch6 = &match;
2918 {
2919 int64_t save = lexer.GetPos();
2920 soulng::parser::Match match(false);
2921 soulng::parser::Match* parentMatch7 = &match;
2922 {
2923 int64_t save = lexer.GetPos();
2924 soulng::parser::Match match(false);
2925 soulng::parser::Match* parentMatch8 = &match;
2926 {
2927 int64_t save = lexer.GetPos();
2928 soulng::parser::Match match(false);
2929 soulng::parser::Match* parentMatch9 = &match;
2930 {
2931 int64_t save = lexer.GetPos();
2932 soulng::parser::Match match(false);
2933 soulng::parser::Match* parentMatch10 = &match;
2934 {
2935 int64_t pos = lexer.GetPos();
2936 soulng::parser::Match match = ParserExpressionParser::PostfixExpression(lexer);
2937 postfixExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2938 if (match.hit)
2939 {
2940 expr.reset(postfixExpr.release());
2941 }
2942 *parentMatch10 = match;
2943 }
2944 *parentMatch9 = match;
2945 if (!match.hit)
2946 {
2947 soulng::parser::Match match(false);
2948 soulng::parser::Match* parentMatch11 = &match;
2949 lexer.SetPos(save);
2950 {
2951 soulng::parser::Match match(false);
2952 soulng::parser::Match* parentMatch12 = &match;
2953 {
2954 int64_t pos = lexer.GetPos();
2955 soulng::parser::Match match = ParserExpressionParser::PostCastExpression(lexer);
2956 postCastExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2957 if (match.hit)
2958 {
2959 expr.reset(postCastExpr.release());
2960 }
2961 *parentMatch12 = match;
2962 }
2963 *parentMatch11 = match;
2964 }
2965 *parentMatch9 = match;
2966 }
2967 }
2968 *parentMatch8 = match;
2969 if (!match.hit)
2970 {
2971 soulng::parser::Match match(false);
2972 soulng::parser::Match* parentMatch13 = &match;
2973 lexer.SetPos(save);
2974 {
2975 soulng::parser::Match match(false);
2976 soulng::parser::Match* parentMatch14 = &match;
2977 {
2978 soulng::parser::Match match(false);
2979 if (*lexer == PLUSPLUS)
2980 {
2981 ++lexer;
2982 match.hit = true;
2983 }
2984 *parentMatch14 = match;
2985 }
2986 if (match.hit)
2987 {
2988 soulng::parser::Match match(false);
2989 soulng::parser::Match* parentMatch15 = &match;
2990 {
2991 soulng::parser::Match match(false);
2992 soulng::parser::Match* parentMatch16 = &match;
2993 {
2994 int64_t pos = lexer.GetPos();
2995 soulng::parser::Match match(true);
2996 soulng::parser::Match* parentMatch17 = &match;
2997 {
2998 soulng::lexer::Span span = lexer.GetSpan();
2999 soulng::parser::Match match = ParserExpressionParser::UnaryExpression(lexer);
3000 u1.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3001 if (match.hit)
3002 {
3003 *parentMatch17 = match;
3004 }
3005 else
3006 {
3007 lexer.ThrowExpectationFailure(span, U"unary expression");
3008 }
3009 }
3010 if (match.hit)
3011 {
3012 expr.reset(new soulng::cppcode::PreIncrementExpr(u1.release()));
3013 }
3014 *parentMatch16 = match;
3015 }
3016 *parentMatch15 = match;
3017 }
3018 *parentMatch14 = match;
3019 }
3020 *parentMatch13 = match;
3021 }
3022 *parentMatch8 = match;
3023 }
3024 }
3025 *parentMatch7 = match;
3026 if (!match.hit)
3027 {
3028 soulng::parser::Match match(false);
3029 soulng::parser::Match* parentMatch18 = &match;
3030 lexer.SetPos(save);
3031 {
3032 soulng::parser::Match match(false);
3033 soulng::parser::Match* parentMatch19 = &match;
3034 {
3035 soulng::parser::Match match(false);
3036 if (*lexer == MINUSMINUS)
3037 {
3038 ++lexer;
3039 match.hit = true;
3040 }
3041 *parentMatch19 = match;
3042 }
3043 if (match.hit)
3044 {
3045 soulng::parser::Match match(false);
3046 soulng::parser::Match* parentMatch20 = &match;
3047 {
3048 soulng::parser::Match match(false);
3049 soulng::parser::Match* parentMatch21 = &match;
3050 {
3051 int64_t pos = lexer.GetPos();
3052 soulng::parser::Match match(true);
3053 soulng::parser::Match* parentMatch22 = &match;
3054 {
3055 soulng::lexer::Span span = lexer.GetSpan();
3056 soulng::parser::Match match = ParserExpressionParser::UnaryExpression(lexer);
3057 u2.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3058 if (match.hit)
3059 {
3060 *parentMatch22 = match;
3061 }
3062 else
3063 {
3064 lexer.ThrowExpectationFailure(span, U"unary expression");
3065 }
3066 }
3067 if (match.hit)
3068 {
3069 expr.reset(new soulng::cppcode::PreDecrementExpr(u2.release()));
3070 }
3071 *parentMatch21 = match;
3072 }
3073 *parentMatch20 = match;
3074 }
3075 *parentMatch19 = match;
3076 }
3077 *parentMatch18 = match;
3078 }
3079 *parentMatch7 = match;
3080 }
3081 }
3082 *parentMatch6 = match;
3083 if (!match.hit)
3084 {
3085 soulng::parser::Match match(false);
3086 soulng::parser::Match* parentMatch23 = &match;
3087 lexer.SetPos(save);
3088 {
3089 soulng::parser::Match match(false);
3090 soulng::parser::Match* parentMatch24 = &match;
3091 {
3092 soulng::parser::Match match = ParserExpressionParser::UnaryOperator(lexer);
3093 op.reset(static_cast<soulng::parser::soulng::parser::Value<soulng::cppcode::Operator>*>(match.value));
3094 *parentMatch24 = match;
3095 }
3096 if (match.hit)
3097 {
3098 soulng::parser::Match match(false);
3099 soulng::parser::Match* parentMatch25 = &match;
3100 {
3101 soulng::parser::Match match(false);
3102 soulng::parser::Match* parentMatch26 = &match;
3103 {
3104 int64_t pos = lexer.GetPos();
3105 soulng::parser::Match match(true);
3106 soulng::parser::Match* parentMatch27 = &match;
3107 {
3108 soulng::lexer::Span span = lexer.GetSpan();
3109 soulng::parser::Match match = ParserExpressionParser::CastExpression(lexer);
3110 castExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3111 if (match.hit)
3112 {
3113 *parentMatch27 = match;
3114 }
3115 else
3116 {
3117 lexer.ThrowExpectationFailure(span, U"cast-expression");
3118 }
3119 }
3120 if (match.hit)
3121 {
3122 expr.reset(new soulng::cppcode::UnaryOpExpr(op->value, castExpr.release()));
3123 }
3124 *parentMatch26 = match;
3125 }
3126 *parentMatch25 = match;
3127 }
3128 *parentMatch24 = match;
3129 }
3130 *parentMatch23 = match;
3131 }
3132 *parentMatch6 = match;
3133 }
3134 }
3135 *parentMatch5 = match;
3136 if (!match.hit)
3137 {
3138 soulng::parser::Match match(false);
3139 soulng::parser::Match* parentMatch28 = &match;
3140 lexer.SetPos(save);
3141 {
3142 soulng::parser::Match match(false);
3143 soulng::parser::Match* parentMatch29 = &match;
3144 {
3145 soulng::parser::Match match(false);
3146 soulng::parser::Match* parentMatch30 = &match;
3147 {
3148 soulng::parser::Match match(false);
3149 soulng::parser::Match* parentMatch31 = &match;
3150 {
3151 soulng::parser::Match match(false);
3152 if (*lexer == SIZEOF)
3153 {
3154 ++lexer;
3155 match.hit = true;
3156 }
3157 *parentMatch31 = match;
3158 }
3159 if (match.hit)
3160 {
3161 soulng::parser::Match match(false);
3162 soulng::parser::Match* parentMatch32 = &match;
3163 {
3164 soulng::parser::Match match(false);
3165 if (*lexer == LPAREN)
3166 {
3167 ++lexer;
3168 match.hit = true;
3169 }
3170 *parentMatch32 = match;
3171 }
3172 *parentMatch31 = match;
3173 }
3174 *parentMatch30 = match;
3175 }
3176 if (match.hit)
3177 {
3178 soulng::parser::Match match(false);
3179 soulng::parser::Match* parentMatch33 = &match;
3180 {
3181 soulng::parser::Match match(true);
3182 soulng::parser::Match* parentMatch34 = &match;
3183 {
3184 soulng::lexer::Span span = lexer.GetSpan();
3185 soulng::parser::Match match = ParserDeclaratorParser::TypeId(lexer);
3186 typeId.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
3187 if (match.hit)
3188 {
3189 *parentMatch34 = match;
3190 }
3191 else
3192 {
3193 lexer.ThrowExpectationFailure(span, U"type identifier");
3194 }
3195 }
3196 *parentMatch33 = match;
3197 }
3198 *parentMatch30 = match;
3199 }
3200 *parentMatch29 = match;
3201 }
3202 if (match.hit)
3203 {
3204 soulng::parser::Match match(false);
3205 soulng::parser::Match* parentMatch35 = &match;
3206 {
3207 soulng::parser::Match match(false);
3208 soulng::parser::Match* parentMatch36 = &match;
3209 {
3210 int64_t pos = lexer.GetPos();
3211 soulng::parser::Match match(true);
3212 soulng::parser::Match* parentMatch37 = &match;
3213 {
3214 soulng::lexer::Span span = lexer.GetSpan();
3215 soulng::parser::Match match(false);
3216 if (*lexer == RPAREN)
3217 {
3218 ++lexer;
3219 match.hit = true;
3220 }
3221 if (match.hit)
3222 {
3223 *parentMatch37 = match;
3224 }
3225 else
3226 {
3227 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RPAREN)));
3228 }
3229 }
3230 if (match.hit)
3231 {
3232 expr.reset(new soulng::cppcode::SizeOfExpr(typeId.release(), true));
3233 }
3234 *parentMatch36 = match;
3235 }
3236 *parentMatch35 = match;
3237 }
3238 *parentMatch29 = match;
3239 }
3240 *parentMatch28 = match;
3241 }
3242 *parentMatch5 = match;
3243 }
3244 }
3245 *parentMatch4 = match;
3246 if (!match.hit)
3247 {
3248 soulng::parser::Match match(false);
3249 soulng::parser::Match* parentMatch38 = &match;
3250 lexer.SetPos(save);
3251 {
3252 soulng::parser::Match match(false);
3253 soulng::parser::Match* parentMatch39 = &match;
3254 {
3255 soulng::parser::Match match(false);
3256 if (*lexer == SIZEOF)
3257 {
3258 ++lexer;
3259 match.hit = true;
3260 }
3261 *parentMatch39 = match;
3262 }
3263 if (match.hit)
3264 {
3265 soulng::parser::Match match(false);
3266 soulng::parser::Match* parentMatch40 = &match;
3267 {
3268 soulng::parser::Match match(false);
3269 soulng::parser::Match* parentMatch41 = &match;
3270 {
3271 int64_t pos = lexer.GetPos();
3272 soulng::parser::Match match(true);
3273 soulng::parser::Match* parentMatch42 = &match;
3274 {
3275 soulng::lexer::Span span = lexer.GetSpan();
3276 soulng::parser::Match match = ParserExpressionParser::UnaryExpression(lexer);
3277 u3.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3278 if (match.hit)
3279 {
3280 *parentMatch42 = match;
3281 }
3282 else
3283 {
3284 lexer.ThrowExpectationFailure(span, U"unary expression");
3285 }
3286 }
3287 if (match.hit)
3288 {
3289 expr.reset(new soulng::cppcode::SizeOfExpr(u3.release(), false));
3290 }
3291 *parentMatch41 = match;
3292 }
3293 *parentMatch40 = match;
3294 }
3295 *parentMatch39 = match;
3296 }
3297 *parentMatch38 = match;
3298 }
3299 *parentMatch4 = match;
3300 }
3301 }
3302 *parentMatch3 = match;
3303 if (!match.hit)
3304 {
3305 soulng::parser::Match match(false);
3306 soulng::parser::Match* parentMatch43 = &match;
3307 lexer.SetPos(save);
3308 {
3309 soulng::parser::Match match(false);
3310 soulng::parser::Match* parentMatch44 = &match;
3311 {
3312 int64_t pos = lexer.GetPos();
3313 soulng::parser::Match match = ParserExpressionParser::NewExpression(lexer);
3314 newExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3315 if (match.hit)
3316 {
3317 expr.reset(newExpr.release());
3318 }
3319 *parentMatch44 = match;
3320 }
3321 *parentMatch43 = match;
3322 }
3323 *parentMatch3 = match;
3324 }
3325 }
3326 *parentMatch2 = match;
3327 if (!match.hit)
3328 {
3329 soulng::parser::Match match(false);
3330 soulng::parser::Match* parentMatch45 = &match;
3331 lexer.SetPos(save);
3332 {
3333 soulng::parser::Match match(false);
3334 soulng::parser::Match* parentMatch46 = &match;
3335 {
3336 int64_t pos = lexer.GetPos();
3337 soulng::parser::Match match = ParserExpressionParser::DeleteExpression(lexer);
3338 deleteExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3339 if (match.hit)
3340 {
3341 expr.reset(deleteExpr.release());
3342 }
3343 *parentMatch46 = match;
3344 }
3345 *parentMatch45 = match;
3346 }
3347 *parentMatch2 = match;
3348 }
3349 }
3350 *parentMatch1 = match;
3351 }
3352 if (match.hit)
3353 {
3354 {
3355 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3356
3357 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3358 return soulng::parser::Match(true, expr.release());
3359 }
3360 }
3361 *parentMatch0 = match;
3362 }
3363 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3364
3365
3366
3367
3368
3369 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3370 if (!match.hit)
3371 {
3372 match.value = nullptr;
3373 }
3374 return match;
3375 }
3376
3377 soulng::parser::Match ParserExpressionParser::UnaryOperator(ParserFileLexer& lexer)
3378 {
3379 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3380
3381
3382
3383
3384
3385
3386
3387 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3388 soulng::parser::Match match(false);
3389 int64_t pos = lexer.GetPos();
3390 soulng::lexer::Span span = lexer.GetSpan();
3391 switch (*lexer)
3392 {
3393 case STAR:
3394 {
3395 ++lexer;
3396 {
3397 {
3398 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3399
3400 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3401 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::deref));
3402 }
3403 }
3404 break;
3405 }
3406 case AMP:
3407 {
3408 ++lexer;
3409 {
3410 {
3411 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3412
3413 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3414 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::addrOf));
3415 }
3416 }
3417 break;
3418 }
3419 case PLUS:
3420 {
3421 ++lexer;
3422 {
3423 {
3424 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3425
3426 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3427 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::plus));
3428 }
3429 }
3430 break;
3431 }
3432 case MINUS:
3433 {
3434 ++lexer;
3435 {
3436 {
3437 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3438
3439 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3440 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::minus));
3441 }
3442 }
3443 break;
3444 }
3445 case EXCLAMATION:
3446 {
3447 ++lexer;
3448 {
3449 {
3450 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3451
3452 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3453 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::not_));
3454 }
3455 }
3456 break;
3457 }
3458 case CPL:
3459 {
3460 ++lexer;
3461 {
3462 {
3463 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3464
3465 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3466 return soulng::parser::Match(true, new soulng::parser::Value<soulng::cppcode::Operator>(soulng::cppcode::Operator::cpl));
3467 }
3468 }
3469 break;
3470 }
3471 }
3472 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3473
3474
3475
3476
3477
3478 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3479 if (!match.hit)
3480 {
3481 match.value = nullptr;
3482 }
3483 return match;
3484 }
3485
3486 soulng::parser::Match ParserExpressionParser::PostfixExpression(ParserFileLexer& lexer)
3487 {
3488 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3489
3490
3491
3492
3493
3494
3495
3496 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3497 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
3498 std::unique_ptr<soulng::cppcode::CppObject> primaryExpr;
3499 std::unique_ptr<soulng::cppcode::CppObject> index;
3500 std::unique_ptr<soulng::cppcode::IdExpr> dotMember;
3501 std::unique_ptr<soulng::cppcode::IdExpr> arrowMember;
3502 std::unique_ptr<soulng::cppcode::CppObject> type;
3503 soulng::parser::Match match(false);
3504 soulng::parser::Match* parentMatch0 = &match;
3505 {
3506 int64_t pos = lexer.GetPos();
3507 soulng::parser::Match match(false);
3508 soulng::parser::Match* parentMatch1 = &match;
3509 {
3510 soulng::parser::Match match(false);
3511 soulng::parser::Match* parentMatch2 = &match;
3512 {
3513 int64_t save = lexer.GetPos();
3514 soulng::parser::Match match(false);
3515 soulng::parser::Match* parentMatch3 = &match;
3516 {
3517 soulng::parser::Match match(false);
3518 soulng::parser::Match* parentMatch4 = &match;
3519 {
3520 int64_t pos = lexer.GetPos();
3521 soulng::parser::Match match = ParserExpressionParser::PrimaryExpression(lexer);
3522 primaryExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3523 if (match.hit)
3524 {
3525 expr.reset(primaryExpr.release());
3526 }
3527 *parentMatch4 = match;
3528 }
3529 *parentMatch3 = match;
3530 }
3531 if (match.hit)
3532 {
3533 soulng::parser::Match match(false);
3534 soulng::parser::Match* parentMatch5 = &match;
3535 {
3536 soulng::parser::Match match(true);
3537 soulng::parser::Match* parentMatch6 = &match;
3538 {
3539 while (true)
3540 {
3541 int64_t save = lexer.GetPos();
3542 {
3543 soulng::parser::Match match(false);
3544 soulng::parser::Match* parentMatch7 = &match;
3545 {
3546 soulng::parser::Match match(false);
3547 soulng::parser::Match* parentMatch8 = &match;
3548 {
3549 int64_t save = lexer.GetPos();
3550 soulng::parser::Match match(false);
3551 soulng::parser::Match* parentMatch9 = &match;
3552 {
3553 int64_t save = lexer.GetPos();
3554 soulng::parser::Match match(false);
3555 soulng::parser::Match* parentMatch10 = &match;
3556 {
3557 int64_t save = lexer.GetPos();
3558 soulng::parser::Match match(false);
3559 soulng::parser::Match* parentMatch11 = &match;
3560 {
3561 int64_t save = lexer.GetPos();
3562 soulng::parser::Match match(false);
3563 soulng::parser::Match* parentMatch12 = &match;
3564 {
3565 int64_t save = lexer.GetPos();
3566 soulng::parser::Match match(false);
3567 soulng::parser::Match* parentMatch13 = &match;
3568 {
3569 soulng::parser::Match match(false);
3570 soulng::parser::Match* parentMatch14 = &match;
3571 {
3572 soulng::parser::Match match(false);
3573 if (*lexer == LBRACKET)
3574 {
3575 ++lexer;
3576 match.hit = true;
3577 }
3578 *parentMatch14 = match;
3579 }
3580 if (match.hit)
3581 {
3582 soulng::parser::Match match(false);
3583 soulng::parser::Match* parentMatch15 = &match;
3584 {
3585 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
3586 index.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3587 *parentMatch15 = match;
3588 }
3589 *parentMatch14 = match;
3590 }
3591 *parentMatch13 = match;
3592 }
3593 if (match.hit)
3594 {
3595 soulng::parser::Match match(false);
3596 soulng::parser::Match* parentMatch16 = &match;
3597 {
3598 soulng::parser::Match match(false);
3599 soulng::parser::Match* parentMatch17 = &match;
3600 {
3601 int64_t pos = lexer.GetPos();
3602 soulng::parser::Match match(true);
3603 soulng::parser::Match* parentMatch18 = &match;
3604 {
3605 soulng::lexer::Span span = lexer.GetSpan();
3606 soulng::parser::Match match(false);
3607 if (*lexer == RBRACKET)
3608 {
3609 ++lexer;
3610 match.hit = true;
3611 }
3612 if (match.hit)
3613 {
3614 *parentMatch18 = match;
3615 }
3616 else
3617 {
3618 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RBRACKET)));
3619 }
3620 }
3621 if (match.hit)
3622 {
3623 expr.reset(new soulng::cppcode::IndexExpr(expr.release(), index.release()));
3624 }
3625 *parentMatch17 = match;
3626 }
3627 *parentMatch16 = match;
3628 }
3629 *parentMatch13 = match;
3630 }
3631 *parentMatch12 = match;
3632 if (!match.hit)
3633 {
3634 soulng::parser::Match match(false);
3635 soulng::parser::Match* parentMatch19 = &match;
3636 lexer.SetPos(save);
3637 {
3638 soulng::parser::Match match(false);
3639 soulng::parser::Match* parentMatch20 = &match;
3640 {
3641 soulng::parser::Match match(false);
3642 soulng::parser::Match* parentMatch21 = &match;
3643 {
3644 soulng::parser::Match match(false);
3645 soulng::parser::Match* parentMatch22 = &match;
3646 {
3647 int64_t pos = lexer.GetPos();
3648 soulng::parser::Match match(false);
3649 if (*lexer == LPAREN)
3650 {
3651 ++lexer;
3652 match.hit = true;
3653 }
3654 if (match.hit)
3655 {
3656 expr.reset(new soulng::cppcode::InvokeExpr(expr.release()));
3657 }
3658 *parentMatch22 = match;
3659 }
3660 *parentMatch21 = match;
3661 }
3662 if (match.hit)
3663 {
3664 soulng::parser::Match match(false);
3665 soulng::parser::Match* parentMatch23 = &match;
3666 {
3667 soulng::parser::Match match(true);
3668 int64_t save = lexer.GetPos();
3669 soulng::parser::Match* parentMatch24 = &match;
3670 {
3671 soulng::parser::Match match = ParserExpressionParser::ExpressionList(lexer, expr.get());
3672 if (match.hit)
3673 {
3674 *parentMatch24 = match;
3675 }
3676 else
3677 {
3678 lexer.SetPos(save);
3679 }
3680 }
3681 *parentMatch23 = match;
3682 }
3683 *parentMatch21 = match;
3684 }
3685 *parentMatch20 = match;
3686 }
3687 if (match.hit)
3688 {
3689 soulng::parser::Match match(false);
3690 soulng::parser::Match* parentMatch25 = &match;
3691 {
3692 soulng::parser::Match match(true);
3693 soulng::parser::Match* parentMatch26 = &match;
3694 {
3695 soulng::lexer::Span span = lexer.GetSpan();
3696 soulng::parser::Match match(false);
3697 if (*lexer == RPAREN)
3698 {
3699 ++lexer;
3700 match.hit = true;
3701 }
3702 if (match.hit)
3703 {
3704 *parentMatch26 = match;
3705 }
3706 else
3707 {
3708 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RPAREN)));
3709 }
3710 }
3711 *parentMatch25 = match;
3712 }
3713 *parentMatch20 = match;
3714 }
3715 *parentMatch19 = match;
3716 }
3717 *parentMatch12 = match;
3718 }
3719 }
3720 *parentMatch11 = match;
3721 if (!match.hit)
3722 {
3723 soulng::parser::Match match(false);
3724 soulng::parser::Match* parentMatch27 = &match;
3725 lexer.SetPos(save);
3726 {
3727 soulng::parser::Match match(false);
3728 soulng::parser::Match* parentMatch28 = &match;
3729 {
3730 soulng::parser::Match match(false);
3731 if (*lexer == DOT)
3732 {
3733 ++lexer;
3734 match.hit = true;
3735 }
3736 *parentMatch28 = match;
3737 }
3738 if (match.hit)
3739 {
3740 soulng::parser::Match match(false);
3741 soulng::parser::Match* parentMatch29 = &match;
3742 {
3743 soulng::parser::Match match(false);
3744 soulng::parser::Match* parentMatch30 = &match;
3745 {
3746 int64_t pos = lexer.GetPos();
3747 soulng::parser::Match match(true);
3748 soulng::parser::Match* parentMatch31 = &match;
3749 {
3750 soulng::lexer::Span span = lexer.GetSpan();
3751 soulng::parser::Match match = ParserExpressionParser::IdExpression(lexer);
3752 dotMember.reset(static_cast<soulng::cppcode::IdExpr*>(match.value));
3753 if (match.hit)
3754 {
3755 *parentMatch31 = match;
3756 }
3757 else
3758 {
3759 lexer.ThrowExpectationFailure(span, U"ID-expression");
3760 }
3761 }
3762 if (match.hit)
3763 {
3764 expr.reset(new soulng::cppcode::MemberAccessExpr(expr.release(), dotMember.release()));
3765 }
3766 *parentMatch30 = match;
3767 }
3768 *parentMatch29 = match;
3769 }
3770 *parentMatch28 = match;
3771 }
3772 *parentMatch27 = match;
3773 }
3774 *parentMatch11 = match;
3775 }
3776 }
3777 *parentMatch10 = match;
3778 if (!match.hit)
3779 {
3780 soulng::parser::Match match(false);
3781 soulng::parser::Match* parentMatch32 = &match;
3782 lexer.SetPos(save);
3783 {
3784 soulng::parser::Match match(false);
3785 soulng::parser::Match* parentMatch33 = &match;
3786 {
3787 soulng::parser::Match match(false);
3788 if (*lexer == ARROW)
3789 {
3790 ++lexer;
3791 match.hit = true;
3792 }
3793 *parentMatch33 = match;
3794 }
3795 if (match.hit)
3796 {
3797 soulng::parser::Match match(false);
3798 soulng::parser::Match* parentMatch34 = &match;
3799 {
3800 soulng::parser::Match match(false);
3801 soulng::parser::Match* parentMatch35 = &match;
3802 {
3803 int64_t pos = lexer.GetPos();
3804 soulng::parser::Match match(true);
3805 soulng::parser::Match* parentMatch36 = &match;
3806 {
3807 soulng::lexer::Span span = lexer.GetSpan();
3808 soulng::parser::Match match = ParserExpressionParser::IdExpression(lexer);
3809 arrowMember.reset(static_cast<soulng::cppcode::IdExpr*>(match.value));
3810 if (match.hit)
3811 {
3812 *parentMatch36 = match;
3813 }
3814 else
3815 {
3816 lexer.ThrowExpectationFailure(span, U"ID-expression");
3817 }
3818 }
3819 if (match.hit)
3820 {
3821 expr.reset(new soulng::cppcode::PtrMemberAccessExpr(expr.release(), arrowMember.release()));
3822 }
3823 *parentMatch35 = match;
3824 }
3825 *parentMatch34 = match;
3826 }
3827 *parentMatch33 = match;
3828 }
3829 *parentMatch32 = match;
3830 }
3831 *parentMatch10 = match;
3832 }
3833 }
3834 *parentMatch9 = match;
3835 if (!match.hit)
3836 {
3837 soulng::parser::Match match(false);
3838 soulng::parser::Match* parentMatch37 = &match;
3839 lexer.SetPos(save);
3840 {
3841 soulng::parser::Match match(false);
3842 soulng::parser::Match* parentMatch38 = &match;
3843 {
3844 int64_t pos = lexer.GetPos();
3845 soulng::parser::Match match(false);
3846 if (*lexer == PLUSPLUS)
3847 {
3848 ++lexer;
3849 match.hit = true;
3850 }
3851 if (match.hit)
3852 {
3853 expr.reset(new soulng::cppcode::PostIncrementExpr(expr.release()));
3854 }
3855 *parentMatch38 = match;
3856 }
3857 *parentMatch37 = match;
3858 }
3859 *parentMatch9 = match;
3860 }
3861 }
3862 *parentMatch8 = match;
3863 if (!match.hit)
3864 {
3865 soulng::parser::Match match(false);
3866 soulng::parser::Match* parentMatch39 = &match;
3867 lexer.SetPos(save);
3868 {
3869 soulng::parser::Match match(false);
3870 soulng::parser::Match* parentMatch40 = &match;
3871 {
3872 int64_t pos = lexer.GetPos();
3873 soulng::parser::Match match(false);
3874 if (*lexer == MINUSMINUS)
3875 {
3876 ++lexer;
3877 match.hit = true;
3878 }
3879 if (match.hit)
3880 {
3881 expr.reset(new soulng::cppcode::PostDecrementExpr(expr.release()));
3882 }
3883 *parentMatch40 = match;
3884 }
3885 *parentMatch39 = match;
3886 }
3887 *parentMatch8 = match;
3888 }
3889 }
3890 *parentMatch7 = match;
3891 }
3892 if (match.hit)
3893 {
3894 *parentMatch6 = match;
3895 }
3896 else
3897 {
3898 lexer.SetPos(save);
3899 break;
3900 }
3901 }
3902 }
3903 }
3904 *parentMatch5 = match;
3905 }
3906 *parentMatch3 = match;
3907 }
3908 *parentMatch2 = match;
3909 if (!match.hit)
3910 {
3911 soulng::parser::Match match(false);
3912 soulng::parser::Match* parentMatch41 = &match;
3913 lexer.SetPos(save);
3914 {
3915 soulng::parser::Match match(false);
3916 soulng::parser::Match* parentMatch42 = &match;
3917 {
3918 soulng::parser::Match match(false);
3919 soulng::parser::Match* parentMatch43 = &match;
3920 {
3921 soulng::parser::Match match(false);
3922 soulng::parser::Match* parentMatch44 = &match;
3923 {
3924 soulng::parser::Match match(false);
3925 soulng::parser::Match* parentMatch45 = &match;
3926 {
3927 int64_t pos = lexer.GetPos();
3928 soulng::parser::Match match = ParserExpressionParser::TypeSpecifierOrTypeName(lexer);
3929 type.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3930 if (match.hit)
3931 {
3932 expr.reset(new soulng::cppcode::InvokeExpr(expr.release()));
3933 }
3934 *parentMatch45 = match;
3935 }
3936 *parentMatch44 = match;
3937 }
3938 if (match.hit)
3939 {
3940 soulng::parser::Match match(false);
3941 soulng::parser::Match* parentMatch46 = &match;
3942 {
3943 soulng::parser::Match match(false);
3944 if (*lexer == LPAREN)
3945 {
3946 ++lexer;
3947 match.hit = true;
3948 }
3949 *parentMatch46 = match;
3950 }
3951 *parentMatch44 = match;
3952 }
3953 *parentMatch43 = match;
3954 }
3955 if (match.hit)
3956 {
3957 soulng::parser::Match match(false);
3958 soulng::parser::Match* parentMatch47 = &match;
3959 {
3960 soulng::parser::Match match(true);
3961 int64_t save = lexer.GetPos();
3962 soulng::parser::Match* parentMatch48 = &match;
3963 {
3964 soulng::parser::Match match = ParserExpressionParser::ExpressionList(lexer, expr.get());
3965 if (match.hit)
3966 {
3967 *parentMatch48 = match;
3968 }
3969 else
3970 {
3971 lexer.SetPos(save);
3972 }
3973 }
3974 *parentMatch47 = match;
3975 }
3976 *parentMatch43 = match;
3977 }
3978 *parentMatch42 = match;
3979 }
3980 if (match.hit)
3981 {
3982 soulng::parser::Match match(false);
3983 soulng::parser::Match* parentMatch49 = &match;
3984 {
3985 soulng::parser::Match match(false);
3986 if (*lexer == RPAREN)
3987 {
3988 ++lexer;
3989 match.hit = true;
3990 }
3991 *parentMatch49 = match;
3992 }
3993 *parentMatch42 = match;
3994 }
3995 *parentMatch41 = match;
3996 }
3997 *parentMatch2 = match;
3998 }
3999 }
4000 *parentMatch1 = match;
4001 }
4002 if (match.hit)
4003 {
4004 {
4005 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4006
4007 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4008 return soulng::parser::Match(true, expr.release());
4009 }
4010 }
4011 *parentMatch0 = match;
4012 }
4013 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4014
4015
4016
4017
4018
4019 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4020 if (!match.hit)
4021 {
4022 match.value = nullptr;
4023 }
4024 return match;
4025 }
4026
4027 soulng::parser::Match ParserExpressionParser::PostCastExpression(ParserFileLexer& lexer)
4028 {
4029 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4030
4031
4032
4033
4034
4035
4036
4037 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4038 std::u32string castStr = std::u32string();
4039 std::unique_ptr<soulng::cppcode::TypeId> typeId;
4040 std::unique_ptr<soulng::cppcode::CppObject> expr;
4041 std::unique_ptr<soulng::cppcode::CppObject> typeIdExpr;
4042 soulng::parser::Match match(false);
4043 soulng::parser::Match* parentMatch0 = &match;
4044 {
4045 soulng::parser::Match match(false);
4046 soulng::parser::Match* parentMatch1 = &match;
4047 {
4048 int64_t save = lexer.GetPos();
4049 soulng::parser::Match match(false);
4050 soulng::parser::Match* parentMatch2 = &match;
4051 {
4052 soulng::parser::Match match(false);
4053 soulng::parser::Match* parentMatch3 = &match;
4054 {
4055 soulng::parser::Match match(false);
4056 soulng::parser::Match* parentMatch4 = &match;
4057 {
4058 soulng::parser::Match match(false);
4059 soulng::parser::Match* parentMatch5 = &match;
4060 {
4061 soulng::parser::Match match(false);
4062 soulng::parser::Match* parentMatch6 = &match;
4063 {
4064 soulng::parser::Match match(false);
4065 soulng::parser::Match* parentMatch7 = &match;
4066 {
4067 soulng::parser::Match match(false);
4068 soulng::parser::Match* parentMatch8 = &match;
4069 {
4070 soulng::parser::Match match(false);
4071 soulng::parser::Match* parentMatch9 = &match;
4072 {
4073 int64_t save = lexer.GetPos();
4074 soulng::parser::Match match(false);
4075 soulng::parser::Match* parentMatch10 = &match;
4076 {
4077 int64_t save = lexer.GetPos();
4078 soulng::parser::Match match(false);
4079 soulng::parser::Match* parentMatch11 = &match;
4080 {
4081 int64_t save = lexer.GetPos();
4082 soulng::parser::Match match(false);
4083 soulng::parser::Match* parentMatch12 = &match;
4084 {
4085 int64_t pos = lexer.GetPos();
4086 soulng::parser::Match match(false);
4087 if (*lexer == DYNAMICCAST)
4088 {
4089 ++lexer;
4090 match.hit = true;
4091 }
4092 if (match.hit)
4093 {
4094 castStr = U"dynamic_cast";
4095 }
4096 *parentMatch12 = match;
4097 }
4098 *parentMatch11 = match;
4099 if (!match.hit)
4100 {
4101 soulng::parser::Match match(false);
4102 soulng::parser::Match* parentMatch13 = &match;
4103 lexer.SetPos(save);
4104 {
4105 soulng::parser::Match match(false);
4106 soulng::parser::Match* parentMatch14 = &match;
4107 {
4108 int64_t pos = lexer.GetPos();
4109 soulng::parser::Match match(false);
4110 if (*lexer == STATICCAST)
4111 {
4112 ++lexer;
4113 match.hit = true;
4114 }
4115 if (match.hit)
4116 {
4117 castStr = U"static_cast";
4118 }
4119 *parentMatch14 = match;
4120 }
4121 *parentMatch13 = match;
4122 }
4123 *parentMatch11 = match;
4124 }
4125 }
4126 *parentMatch10 = match;
4127 if (!match.hit)
4128 {
4129 soulng::parser::Match match(false);
4130 soulng::parser::Match* parentMatch15 = &match;
4131 lexer.SetPos(save);
4132 {
4133 soulng::parser::Match match(false);
4134 soulng::parser::Match* parentMatch16 = &match;
4135 {
4136 int64_t pos = lexer.GetPos();
4137 soulng::parser::Match match(false);
4138 if (*lexer == REINTERPRETCAST)
4139 {
4140 ++lexer;
4141 match.hit = true;
4142 }
4143 if (match.hit)
4144 {
4145 castStr = U"reinterpret_cast";
4146 }
4147 *parentMatch16 = match;
4148 }
4149 *parentMatch15 = match;
4150 }
4151 *parentMatch10 = match;
4152 }
4153 }
4154 *parentMatch9 = match;
4155 if (!match.hit)
4156 {
4157 soulng::parser::Match match(false);
4158 soulng::parser::Match* parentMatch17 = &match;
4159 lexer.SetPos(save);
4160 {
4161 soulng::parser::Match match(false);
4162 soulng::parser::Match* parentMatch18 = &match;
4163 {
4164 int64_t pos = lexer.GetPos();
4165 soulng::parser::Match match(false);
4166 if (*lexer == CONSTCAST)
4167 {
4168 ++lexer;
4169 match.hit = true;
4170 }
4171 if (match.hit)
4172 {
4173 castStr = U"const_cast";
4174 }
4175 *parentMatch18 = match;
4176 }
4177 *parentMatch17 = match;
4178 }
4179 *parentMatch9 = match;
4180 }
4181 }
4182 *parentMatch8 = match;
4183 }
4184 *parentMatch7 = match;
4185 }
4186 if (match.hit)
4187 {
4188 soulng::parser::Match match(false);
4189 soulng::parser::Match* parentMatch19 = &match;
4190 {
4191 soulng::parser::Match match(true);
4192 soulng::parser::Match* parentMatch20 = &match;
4193 {
4194 soulng::lexer::Span span = lexer.GetSpan();
4195 soulng::parser::Match match(false);
4196 if (*lexer == LANGLE)
4197 {
4198 ++lexer;
4199 match.hit = true;
4200 }
4201 if (match.hit)
4202 {
4203 *parentMatch20 = match;
4204 }
4205 else
4206 {
4207 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(LANGLE)));
4208 }
4209 }
4210 *parentMatch19 = match;
4211 }
4212 *parentMatch7 = match;
4213 }
4214 *parentMatch6 = match;
4215 }
4216 if (match.hit)
4217 {
4218 soulng::parser::Match match(false);
4219 soulng::parser::Match* parentMatch21 = &match;
4220 {
4221 soulng::parser::Match match(true);
4222 soulng::parser::Match* parentMatch22 = &match;
4223 {
4224 soulng::lexer::Span span = lexer.GetSpan();
4225 soulng::parser::Match match = ParserDeclaratorParser::TypeId(lexer);
4226 typeId.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
4227 if (match.hit)
4228 {
4229 *parentMatch22 = match;
4230 }
4231 else
4232 {
4233 lexer.ThrowExpectationFailure(span, U"type identifier");
4234 }
4235 }
4236 *parentMatch21 = match;
4237 }
4238 *parentMatch6 = match;
4239 }
4240 *parentMatch5 = match;
4241 }
4242 if (match.hit)
4243 {
4244 soulng::parser::Match match(false);
4245 soulng::parser::Match* parentMatch23 = &match;
4246 {
4247 soulng::parser::Match match(true);
4248 soulng::parser::Match* parentMatch24 = &match;
4249 {
4250 soulng::lexer::Span span = lexer.GetSpan();
4251 soulng::parser::Match match(false);
4252 if (*lexer == RANGLE)
4253 {
4254 ++lexer;
4255 match.hit = true;
4256 }
4257 if (match.hit)
4258 {
4259 *parentMatch24 = match;
4260 }
4261 else
4262 {
4263 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RANGLE)));
4264 }
4265 }
4266 *parentMatch23 = match;
4267 }
4268 *parentMatch5 = match;
4269 }
4270 *parentMatch4 = match;
4271 }
4272 if (match.hit)
4273 {
4274 soulng::parser::Match match(false);
4275 soulng::parser::Match* parentMatch25 = &match;
4276 {
4277 soulng::parser::Match match(true);
4278 soulng::parser::Match* parentMatch26 = &match;
4279 {
4280 soulng::lexer::Span span = lexer.GetSpan();
4281 soulng::parser::Match match(false);
4282 if (*lexer == LPAREN)
4283 {
4284 ++lexer;
4285 match.hit = true;
4286 }
4287 if (match.hit)
4288 {
4289 *parentMatch26 = match;
4290 }
4291 else
4292 {
4293 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(LPAREN)));
4294 }
4295 }
4296 *parentMatch25 = match;
4297 }
4298 *parentMatch4 = match;
4299 }
4300 *parentMatch3 = match;
4301 }
4302 if (match.hit)
4303 {
4304 soulng::parser::Match match(false);
4305 soulng::parser::Match* parentMatch27 = &match;
4306 {
4307 soulng::parser::Match match(true);
4308 soulng::parser::Match* parentMatch28 = &match;
4309 {
4310 soulng::lexer::Span span = lexer.GetSpan();
4311 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
4312 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
4313 if (match.hit)
4314 {
4315 *parentMatch28 = match;
4316 }
4317 else
4318 {
4319 lexer.ThrowExpectationFailure(span, U"C++ expression");
4320 }
4321 }
4322 *parentMatch27 = match;
4323 }
4324 *parentMatch3 = match;
4325 }
4326 *parentMatch2 = match;
4327 }
4328 if (match.hit)
4329 {
4330 soulng::parser::Match match(false);
4331 soulng::parser::Match* parentMatch29 = &match;
4332 {
4333 soulng::parser::Match match(false);
4334 soulng::parser::Match* parentMatch30 = &match;
4335 {
4336 int64_t pos = lexer.GetPos();
4337 soulng::parser::Match match(true);
4338 soulng::parser::Match* parentMatch31 = &match;
4339 {
4340 soulng::lexer::Span span = lexer.GetSpan();
4341 soulng::parser::Match match(false);
4342 if (*lexer == RPAREN)
4343 {
4344 ++lexer;
4345 match.hit = true;
4346 }
4347 if (match.hit)
4348 {
4349 *parentMatch31 = match;
4350 }
4351 else
4352 {
4353 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RPAREN)));
4354 }
4355 }
4356 if (match.hit)
4357 {
4358 {
4359 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4360
4361 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4362 return soulng::parser::Match(true, new soulng::cppcode::PostCastExpr(castStr, typeId.release(), expr.release()));
4363 }
4364 }
4365 *parentMatch30 = match;
4366 }
4367 *parentMatch29 = match;
4368 }
4369 *parentMatch2 = match;
4370 }
4371 *parentMatch1 = match;
4372 if (!match.hit)
4373 {
4374 soulng::parser::Match match(false);
4375 soulng::parser::Match* parentMatch32 = &match;
4376 lexer.SetPos(save);
4377 {
4378 soulng::parser::Match match(false);
4379 soulng::parser::Match* parentMatch33 = &match;
4380 {
4381 soulng::parser::Match match(false);
4382 soulng::parser::Match* parentMatch34 = &match;
4383 {
4384 soulng::parser::Match match(false);
4385 soulng::parser::Match* parentMatch35 = &match;
4386 {
4387 soulng::parser::Match match(false);
4388 if (*lexer == TYPEID)
4389 {
4390 ++lexer;
4391 match.hit = true;
4392 }
4393 *parentMatch35 = match;
4394 }
4395 if (match.hit)
4396 {
4397 soulng::parser::Match match(false);
4398 soulng::parser::Match* parentMatch36 = &match;
4399 {
4400 soulng::parser::Match match(true);
4401 soulng::parser::Match* parentMatch37 = &match;
4402 {
4403 soulng::lexer::Span span = lexer.GetSpan();
4404 soulng::parser::Match match(false);
4405 if (*lexer == LPAREN)
4406 {
4407 ++lexer;
4408 match.hit = true;
4409 }
4410 if (match.hit)
4411 {
4412 *parentMatch37 = match;
4413 }
4414 else
4415 {
4416 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(LPAREN)));
4417 }
4418 }
4419 *parentMatch36 = match;
4420 }
4421 *parentMatch35 = match;
4422 }
4423 *parentMatch34 = match;
4424 }
4425 if (match.hit)
4426 {
4427 soulng::parser::Match match(false);
4428 soulng::parser::Match* parentMatch38 = &match;
4429 {
4430 soulng::parser::Match match(true);
4431 soulng::parser::Match* parentMatch39 = &match;
4432 {
4433 soulng::lexer::Span span = lexer.GetSpan();
4434 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
4435 typeIdExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
4436 if (match.hit)
4437 {
4438 *parentMatch39 = match;
4439 }
4440 else
4441 {
4442 lexer.ThrowExpectationFailure(span, U"C++ expression");
4443 }
4444 }
4445 *parentMatch38 = match;
4446 }
4447 *parentMatch34 = match;
4448 }
4449 *parentMatch33 = match;
4450 }
4451 if (match.hit)
4452 {
4453 soulng::parser::Match match(false);
4454 soulng::parser::Match* parentMatch40 = &match;
4455 {
4456 soulng::parser::Match match(false);
4457 soulng::parser::Match* parentMatch41 = &match;
4458 {
4459 int64_t pos = lexer.GetPos();
4460 soulng::parser::Match match(true);
4461 soulng::parser::Match* parentMatch42 = &match;
4462 {
4463 soulng::lexer::Span span = lexer.GetSpan();
4464 soulng::parser::Match match(false);
4465 if (*lexer == RPAREN)
4466 {
4467 ++lexer;
4468 match.hit = true;
4469 }
4470 if (match.hit)
4471 {
4472 *parentMatch42 = match;
4473 }
4474 else
4475 {
4476 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RPAREN)));
4477 }
4478 }
4479 if (match.hit)
4480 {
4481 {
4482 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4483
4484 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4485 return soulng::parser::Match(true, new soulng::cppcode::TypeIdExpr(typeIdExpr.release()));
4486 }
4487 }
4488 *parentMatch41 = match;
4489 }
4490 *parentMatch40 = match;
4491 }
4492 *parentMatch33 = match;
4493 }
4494 *parentMatch32 = match;
4495 }
4496 *parentMatch1 = match;
4497 }
4498 }
4499 *parentMatch0 = match;
4500 }
4501 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4502
4503
4504
4505
4506
4507 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4508 if (!match.hit)
4509 {
4510 match.value = nullptr;
4511 }
4512 return match;
4513 }
4514
4515 soulng::parser::Match ParserExpressionParser::ExpressionList(ParserFileLexer& lexer, soulng::cppcode::CppObject* owner)
4516 {
4517 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4518
4519
4520
4521
4522
4523
4524
4525 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4526 std::unique_ptr<soulng::cppcode::CppObject> expr;
4527 soulng::parser::Match match(false);
4528 soulng::parser::Match* parentMatch0 = &match;
4529 {
4530 soulng::parser::Match match(false);
4531 soulng::parser::Match* parentMatch1 = &match;
4532 {
4533 int64_t pos = lexer.GetPos();
4534 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
4535 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
4536 if (match.hit)
4537 {
4538 owner->AddExpr(expr.release());
4539 }
4540 *parentMatch1 = match;
4541 }
4542 *parentMatch0 = match;
4543 }
4544 if (match.hit)
4545 {
4546 soulng::parser::Match match(false);
4547 soulng::parser::Match* parentMatch2 = &match;
4548 {
4549 soulng::parser::Match match(true);
4550 soulng::parser::Match* parentMatch3 = &match;
4551 {
4552 while (true)
4553 {
4554 int64_t save = lexer.GetPos();
4555 {
4556 soulng::parser::Match match(false);
4557 soulng::parser::Match* parentMatch4 = &match;
4558 {
4559 soulng::parser::Match match(false);
4560 if (*lexer == COMMA)
4561 {
4562 ++lexer;
4563 match.hit = true;
4564 }
4565 *parentMatch4 = match;
4566 }
4567 if (match.hit)
4568 {
4569 soulng::parser::Match match(false);
4570 soulng::parser::Match* parentMatch5 = &match;
4571 {
4572 soulng::parser::Match match(false);
4573 soulng::parser::Match* parentMatch6 = &match;
4574 {
4575 int64_t pos = lexer.GetPos();
4576 soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
4577 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
4578 if (match.hit)
4579 {
4580 owner->AddExpr(expr.release());
4581 }
4582 *parentMatch6 = match;
4583 }
4584 *parentMatch5 = match;
4585 }
4586 *parentMatch4 = match;
4587 }
4588 if (match.hit)
4589 {
4590 *parentMatch3 = match;
4591 }
4592 else
4593 {
4594 lexer.SetPos(save);
4595 break;
4596 }
4597 }
4598 }
4599 }
4600 *parentMatch2 = match;
4601 }
4602 *parentMatch0 = match;
4603 }
4604 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4605
4606
4607
4608
4609
4610 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4611 if (!match.hit)
4612 {
4613 match.value = nullptr;
4614 }
4615 return match;
4616 }
4617
4618 soulng::parser::Match ParserExpressionParser::PrimaryExpression(ParserFileLexer& lexer)
4619 {
4620 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4621
4622
4623
4624
4625
4626
4627
4628 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4629 std::unique_ptr<soulng::cppcode::CppObject> expr = std::unique_ptr<soulng::cppcode::CppObject>();
4630 std::unique_ptr<soulng::cppcode::Literal> literal;
4631 std::unique_ptr<soulng::cppcode::CppObject> pexpr;
4632 std::unique_ptr<soulng::cppcode::IdExpr> idExpr;
4633 soulng::parser::Match match(false);
4634 soulng::parser::Match* parentMatch0 = &match;
4635 {
4636 int64_t save = lexer.GetPos();
4637 soulng::parser::Match match(false);
4638 soulng::parser::Match* parentMatch1 = &match;
4639 {
4640 int64_t save = lexer.GetPos();
4641 soulng::parser::Match match(false);
4642 soulng::parser::Match* parentMatch2 = &match;
4643 {
4644 int64_t save = lexer.GetPos();
4645 soulng::parser::Match match(false);
4646 soulng::parser::Match* parentMatch3 = &match;
4647 {
4648 int64_t pos = lexer.GetPos();
4649 soulng::parser::Match match = ParserLiteralParser::CppLiteral(lexer);
4650 literal.reset(static_cast<soulng::cppcode::Literal*>(match.value));
4651 if (match.hit)
4652 {
4653 {
4654 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4655
4656 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4657 return soulng::parser::Match(true, literal.release());
4658 }
4659 }
4660 *parentMatch3 = match;
4661 }
4662 *parentMatch2 = match;
4663 if (!match.hit)
4664 {
4665 soulng::parser::Match match(false);
4666 soulng::parser::Match* parentMatch4 = &match;
4667 lexer.SetPos(save);
4668 {
4669 soulng::parser::Match match(false);
4670 soulng::parser::Match* parentMatch5 = &match;
4671 {
4672 int64_t pos = lexer.GetPos();
4673 soulng::parser::Match match(false);
4674 if (*lexer == THIS)
4675 {
4676 ++lexer;
4677 match.hit = true;
4678 }
4679 if (match.hit)
4680 {
4681 {
4682 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4683
4684 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4685 return soulng::parser::Match(true, new soulng::cppcode::ThisAccess());
4686 }
4687 }
4688 *parentMatch5 = match;
4689 }
4690 *parentMatch4 = match;
4691 }
4692 *parentMatch2 = match;
4693 }
4694 }
4695 *parentMatch1 = match;
4696 if (!match.hit)
4697 {
4698 soulng::parser::Match match(false);
4699 soulng::parser::Match* parentMatch6 = &match;
4700 lexer.SetPos(save);
4701 {
4702 soulng::parser::Match match(false);
4703 soulng::parser::Match* parentMatch7 = &match;
4704 {
4705 soulng::parser::Match match(false);
4706 soulng::parser::Match* parentMatch8 = &match;
4707 {
4708 soulng::parser::Match match(false);
4709 if (*lexer == LPAREN)
4710 {
4711 ++lexer;
4712 match.hit = true;
4713 }
4714 *parentMatch8 = match;
4715 }
4716 if (match.hit)
4717 {
4718 soulng::parser::Match match(false);
4719 soulng::parser::Match* parentMatch9 = &match;
4720 {
4721 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
4722 pexpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
4723 *parentMatch9 = match;
4724 }
4725 *parentMatch8 = match;
4726 }
4727 *parentMatch7 = match;
4728 }
4729 if (match.hit)
4730 {
4731 soulng::parser::Match match(false);
4732 soulng::parser::Match* parentMatch10 = &match;
4733 {
4734 soulng::parser::Match match(false);
4735 soulng::parser::Match* parentMatch11 = &match;
4736 {
4737 int64_t pos = lexer.GetPos();
4738 soulng::parser::Match match(false);
4739 if (*lexer == RPAREN)
4740 {
4741 ++lexer;
4742 match.hit = true;
4743 }
4744 if (match.hit)
4745 {
4746 {
4747 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4748
4749 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4750 return soulng::parser::Match(true, new soulng::cppcode::ParenExpr(pexpr.release()));
4751 }
4752 }
4753 *parentMatch11 = match;
4754 }
4755 *parentMatch10 = match;
4756 }
4757 *parentMatch7 = match;
4758 }
4759 *parentMatch6 = match;
4760 }
4761 *parentMatch1 = match;
4762 }
4763 }
4764 *parentMatch0 = match;
4765 if (!match.hit)
4766 {
4767 soulng::parser::Match match(false);
4768 soulng::parser::Match* parentMatch12 = &match;
4769 lexer.SetPos(save);
4770 {
4771 soulng::parser::Match match(false);
4772 soulng::parser::Match* parentMatch13 = &match;
4773 {
4774 int64_t pos = lexer.GetPos();
4775 soulng::parser::Match match = ParserExpressionParser::IdExpression(lexer);
4776 idExpr.reset(static_cast<soulng::cppcode::IdExpr*>(match.value));
4777 if (match.hit)
4778 {
4779 {
4780 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4781
4782 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4783 return soulng::parser::Match(true, idExpr.release());
4784 }
4785 }
4786 *parentMatch13 = match;
4787 }
4788 *parentMatch12 = match;
4789 }
4790 *parentMatch0 = match;
4791 }
4792 }
4793 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4794
4795
4796
4797
4798
4799 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4800 if (!match.hit)
4801 {
4802 match.value = nullptr;
4803 }
4804 return match;
4805 }
4806
4807 soulng::parser::Match ParserExpressionParser::IdExpression(ParserFileLexer& lexer)
4808 {
4809 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4810
4811
4812
4813
4814
4815
4816
4817 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4818 Span s = Span();
4819 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>id1;
4820 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>ofId1;
4821 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>ofid2;
4822 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>id2;
4823 soulng::parser::Match match(false);
4824 soulng::parser::Match* parentMatch0 = &match;
4825 {
4826 int64_t save = lexer.GetPos();
4827 soulng::parser::Match match(false);
4828 soulng::parser::Match* parentMatch1 = &match;
4829 {
4830 int64_t save = lexer.GetPos();
4831 soulng::parser::Match match(false);
4832 soulng::parser::Match* parentMatch2 = &match;
4833 {
4834 int64_t pos = lexer.GetPos();
4835 soulng::parser::Match match(false);
4836 soulng::parser::Match* parentMatch3 = &match;
4837 {
4838 soulng::parser::Match match(false);
4839 soulng::parser::Match* parentMatch4 = &match;
4840 {
4841 soulng::parser::Match match(false);
4842 soulng::parser::Match* parentMatch5 = &match;
4843 {
4844 soulng::parser::Match match(false);
4845 soulng::parser::Match* parentMatch6 = &match;
4846 {
4847 int64_t pos = lexer.GetPos();
4848 soulng::lexer::Span span = lexer.GetSpan();
4849 soulng::parser::Match match = ParserIdentifierParser::QualifiedCppId(lexer);
4850 id1.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4851 if (match.hit)
4852 {
4853 s = span;
4854 }
4855 *parentMatch6 = match;
4856 }
4857 *parentMatch5 = match;
4858 }
4859 if (match.hit)
4860 {
4861 soulng::parser::Match match(false);
4862 soulng::parser::Match* parentMatch7 = &match;
4863 {
4864 soulng::parser::Match match(false);
4865 if (*lexer == COLONCOLON)
4866 {
4867 ++lexer;
4868 match.hit = true;
4869 }
4870 *parentMatch7 = match;
4871 }
4872 *parentMatch5 = match;
4873 }
4874 *parentMatch4 = match;
4875 }
4876 if (match.hit)
4877 {
4878 soulng::parser::Match match(false);
4879 soulng::parser::Match* parentMatch8 = &match;
4880 {
4881 soulng::parser::Match match(false);
4882 soulng::parser::Match* parentMatch9 = &match;
4883 {
4884 int64_t pos = lexer.GetPos();
4885 soulng::lexer::Span span = lexer.GetSpan();
4886 soulng::parser::Match match = ParserExpressionParser::OperatorFunctionId(lexer);
4887 ofId1.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4888 if (match.hit)
4889 {
4890 s.end = span.end;
4891 }
4892 *parentMatch9 = match;
4893 }
4894 *parentMatch8 = match;
4895 }
4896 *parentMatch4 = match;
4897 }
4898 *parentMatch3 = match;
4899 }
4900 if (match.hit)
4901 {
4902 {
4903 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4904
4905 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4906 return soulng::parser::Match(true, new soulng::cppcode::IdExpr(lexer.GetMatch(s)));
4907 }
4908 }
4909 *parentMatch2 = match;
4910 }
4911 *parentMatch1 = match;
4912 if (!match.hit)
4913 {
4914 soulng::parser::Match match(false);
4915 soulng::parser::Match* parentMatch10 = &match;
4916 lexer.SetPos(save);
4917 {
4918 soulng::parser::Match match(false);
4919 soulng::parser::Match* parentMatch11 = &match;
4920 {
4921 int64_t pos = lexer.GetPos();
4922 soulng::parser::Match match(false);
4923 soulng::parser::Match* parentMatch12 = &match;
4924 {
4925 soulng::parser::Match match(false);
4926 soulng::parser::Match* parentMatch13 = &match;
4927 {
4928 soulng::parser::Match match(false);
4929 soulng::parser::Match* parentMatch14 = &match;
4930 {
4931 soulng::parser::Match match(false);
4932 soulng::parser::Match* parentMatch15 = &match;
4933 {
4934 int64_t pos = lexer.GetPos();
4935 soulng::lexer::Span span = lexer.GetSpan();
4936 soulng::parser::Match match(true);
4937 if (match.hit)
4938 {
4939 s = span;
4940 }
4941 *parentMatch15 = match;
4942 }
4943 *parentMatch14 = match;
4944 }
4945 if (match.hit)
4946 {
4947 soulng::parser::Match match(false);
4948 soulng::parser::Match* parentMatch16 = &match;
4949 {
4950 soulng::parser::Match match(true);
4951 int64_t save = lexer.GetPos();
4952 soulng::parser::Match* parentMatch17 = &match;
4953 {
4954 soulng::parser::Match match(false);
4955 soulng::parser::Match* parentMatch18 = &match;
4956 {
4957 soulng::parser::Match match(false);
4958 if (*lexer == COLONCOLON)
4959 {
4960 ++lexer;
4961 match.hit = true;
4962 }
4963 *parentMatch18 = match;
4964 }
4965 if (match.hit)
4966 {
4967 *parentMatch17 = match;
4968 }
4969 else
4970 {
4971 lexer.SetPos(save);
4972 }
4973 }
4974 *parentMatch16 = match;
4975 }
4976 *parentMatch14 = match;
4977 }
4978 *parentMatch13 = match;
4979 }
4980 if (match.hit)
4981 {
4982 soulng::parser::Match match(false);
4983 soulng::parser::Match* parentMatch19 = &match;
4984 {
4985 soulng::parser::Match match(false);
4986 soulng::parser::Match* parentMatch20 = &match;
4987 {
4988 int64_t pos = lexer.GetPos();
4989 soulng::lexer::Span span = lexer.GetSpan();
4990 soulng::parser::Match match = ParserExpressionParser::OperatorFunctionId(lexer);
4991 ofid2.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4992 if (match.hit)
4993 {
4994 s.end = span.end;
4995 }
4996 *parentMatch20 = match;
4997 }
4998 *parentMatch19 = match;
4999 }
5000 *parentMatch13 = match;
5001 }
5002 *parentMatch12 = match;
5003 }
5004 if (match.hit)
5005 {
5006 {
5007 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5008
5009 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5010 return soulng::parser::Match(true, new soulng::cppcode::IdExpr(lexer.GetMatch(s)));
5011 }
5012 }
5013 *parentMatch11 = match;
5014 }
5015 *parentMatch10 = match;
5016 }
5017 *parentMatch1 = match;
5018 }
5019 }
5020 *parentMatch0 = match;
5021 if (!match.hit)
5022 {
5023 soulng::parser::Match match(false);
5024 soulng::parser::Match* parentMatch21 = &match;
5025 lexer.SetPos(save);
5026 {
5027 soulng::parser::Match match(false);
5028 soulng::parser::Match* parentMatch22 = &match;
5029 {
5030 int64_t pos = lexer.GetPos();
5031 soulng::parser::Match match = ParserIdentifierParser::QualifiedCppId(lexer);
5032 id2.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5033 if (match.hit)
5034 {
5035 {
5036 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5037
5038 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5039 return soulng::parser::Match(true, new soulng::cppcode::IdExpr(id2->value));
5040 }
5041 }
5042 *parentMatch22 = match;
5043 }
5044 *parentMatch21 = match;
5045 }
5046 *parentMatch0 = match;
5047 }
5048 }
5049 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5050
5051
5052
5053
5054
5055 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5056 if (!match.hit)
5057 {
5058 match.value = nullptr;
5059 }
5060 return match;
5061 }
5062
5063 soulng::parser::Match ParserExpressionParser::TypeSpecifierOrTypeName(ParserFileLexer& lexer)
5064 {
5065 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5066
5067
5068
5069
5070
5071
5072
5073 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5074 std::unique_ptr<soulng::cppcode::TypeSpecifier> simpleTypeSpecifier;
5075 std::unique_ptr<soulng::cppcode::TypeName> typeName;
5076 soulng::parser::Match match(false);
5077 soulng::parser::Match* parentMatch0 = &match;
5078 {
5079 int64_t save = lexer.GetPos();
5080 soulng::parser::Match match(false);
5081 soulng::parser::Match* parentMatch1 = &match;
5082 {
5083 int64_t pos = lexer.GetPos();
5084 soulng::parser::Match match = ParserDeclarationParser::SimpleTypeSpecifier(lexer);
5085 simpleTypeSpecifier.reset(static_cast<soulng::cppcode::TypeSpecifier*>(match.value));
5086 if (match.hit)
5087 {
5088 {
5089 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5090
5091 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5092 return soulng::parser::Match(true, simpleTypeSpecifier.release());
5093 }
5094 }
5095 *parentMatch1 = match;
5096 }
5097 *parentMatch0 = match;
5098 if (!match.hit)
5099 {
5100 soulng::parser::Match match(false);
5101 soulng::parser::Match* parentMatch2 = &match;
5102 lexer.SetPos(save);
5103 {
5104 soulng::parser::Match match(false);
5105 soulng::parser::Match* parentMatch3 = &match;
5106 {
5107 int64_t pos = lexer.GetPos();
5108 soulng::parser::Match match = ParserDeclarationParser::TypeName(lexer);
5109 typeName.reset(static_cast<soulng::cppcode::TypeName*>(match.value));
5110 if (match.hit)
5111 {
5112 {
5113 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5114
5115 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5116 return soulng::parser::Match(true, typeName.release());
5117 }
5118 }
5119 *parentMatch3 = match;
5120 }
5121 *parentMatch2 = match;
5122 }
5123 *parentMatch0 = match;
5124 }
5125 }
5126 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5127
5128
5129
5130
5131
5132 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5133 if (!match.hit)
5134 {
5135 match.value = nullptr;
5136 }
5137 return match;
5138 }
5139
5140 soulng::parser::Match ParserExpressionParser::NewExpression(ParserFileLexer& lexer)
5141 {
5142 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5143
5144
5145
5146
5147
5148
5149
5150 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5151 bool global = bool();
5152 std::unique_ptr<soulng::cppcode::NewExpr> newExpr = std::unique_ptr<soulng::cppcode::NewExpr>();
5153 std::unique_ptr<soulng::cppcode::TypeId> newTypeId;
5154 std::unique_ptr<soulng::cppcode::TypeId> ti;
5155 soulng::parser::Match match(false);
5156 soulng::parser::Match* parentMatch0 = &match;
5157 {
5158 int64_t pos = lexer.GetPos();
5159 soulng::parser::Match match(false);
5160 soulng::parser::Match* parentMatch1 = &match;
5161 {
5162 soulng::parser::Match match(false);
5163 soulng::parser::Match* parentMatch2 = &match;
5164 {
5165 soulng::parser::Match match(false);
5166 soulng::parser::Match* parentMatch3 = &match;
5167 {
5168 soulng::parser::Match match(false);
5169 soulng::parser::Match* parentMatch4 = &match;
5170 {
5171 soulng::parser::Match match(false);
5172 soulng::parser::Match* parentMatch5 = &match;
5173 {
5174 soulng::parser::Match match(false);
5175 soulng::parser::Match* parentMatch6 = &match;
5176 {
5177 soulng::parser::Match match(false);
5178 soulng::parser::Match* parentMatch7 = &match;
5179 {
5180 soulng::parser::Match match(false);
5181 soulng::parser::Match* parentMatch8 = &match;
5182 {
5183 soulng::parser::Match match(false);
5184 soulng::parser::Match* parentMatch9 = &match;
5185 {
5186 soulng::parser::Match match(true);
5187 int64_t save = lexer.GetPos();
5188 soulng::parser::Match* parentMatch10 = &match;
5189 {
5190 soulng::parser::Match match(false);
5191 soulng::parser::Match* parentMatch11 = &match;
5192 {
5193 soulng::parser::Match match(false);
5194 soulng::parser::Match* parentMatch12 = &match;
5195 {
5196 int64_t pos = lexer.GetPos();
5197 soulng::parser::Match match(false);
5198 if (*lexer == COLONCOLON)
5199 {
5200 ++lexer;
5201 match.hit = true;
5202 }
5203 if (match.hit)
5204 {
5205 global = true;
5206 }
5207 *parentMatch12 = match;
5208 }
5209 *parentMatch11 = match;
5210 }
5211 if (match.hit)
5212 {
5213 *parentMatch10 = match;
5214 }
5215 else
5216 {
5217 lexer.SetPos(save);
5218 }
5219 }
5220 *parentMatch9 = match;
5221 }
5222 if (match.hit)
5223 {
5224 soulng::parser::Match match(false);
5225 soulng::parser::Match* parentMatch13 = &match;
5226 {
5227 soulng::parser::Match match(false);
5228 soulng::parser::Match* parentMatch14 = &match;
5229 {
5230 int64_t pos = lexer.GetPos();
5231 soulng::parser::Match match(false);
5232 if (*lexer == NEW)
5233 {
5234 ++lexer;
5235 match.hit = true;
5236 }
5237 if (match.hit)
5238 {
5239 newExpr.reset(new soulng::cppcode::NewExpr(global));
5240 }
5241 *parentMatch14 = match;
5242 }
5243 *parentMatch13 = match;
5244 }
5245 *parentMatch9 = match;
5246 }
5247 *parentMatch8 = match;
5248 }
5249 if (match.hit)
5250 {
5251 soulng::parser::Match match(false);
5252 soulng::parser::Match* parentMatch15 = &match;
5253 {
5254 soulng::parser::Match match(false);
5255 soulng::parser::Match* parentMatch16 = &match;
5256 {
5257 int64_t pos = lexer.GetPos();
5258 soulng::parser::Match match(true);
5259 if (match.hit)
5260 {
5261 newExpr->BeginAddPlacement();
5262 }
5263 *parentMatch16 = match;
5264 }
5265 *parentMatch15 = match;
5266 }
5267 *parentMatch8 = match;
5268 }
5269 *parentMatch7 = match;
5270 }
5271 if (match.hit)
5272 {
5273 soulng::parser::Match match(false);
5274 soulng::parser::Match* parentMatch17 = &match;
5275 {
5276 soulng::parser::Match match(true);
5277 int64_t save = lexer.GetPos();
5278 soulng::parser::Match* parentMatch18 = &match;
5279 {
5280 soulng::parser::Match match = ParserExpressionParser::NewPlacement(lexer, newExpr.get());
5281 if (match.hit)
5282 {
5283 *parentMatch18 = match;
5284 }
5285 else
5286 {
5287 lexer.SetPos(save);
5288 }
5289 }
5290 *parentMatch17 = match;
5291 }
5292 *parentMatch7 = match;
5293 }
5294 *parentMatch6 = match;
5295 }
5296 if (match.hit)
5297 {
5298 soulng::parser::Match match(false);
5299 soulng::parser::Match* parentMatch19 = &match;
5300 {
5301 soulng::parser::Match match(false);
5302 soulng::parser::Match* parentMatch20 = &match;
5303 {
5304 int64_t pos = lexer.GetPos();
5305 soulng::parser::Match match(true);
5306 if (match.hit)
5307 {
5308 newExpr->EndAddPlacement();
5309 }
5310 *parentMatch20 = match;
5311 }
5312 *parentMatch19 = match;
5313 }
5314 *parentMatch6 = match;
5315 }
5316 *parentMatch5 = match;
5317 }
5318 if (match.hit)
5319 {
5320 soulng::parser::Match match(false);
5321 soulng::parser::Match* parentMatch21 = &match;
5322 {
5323 soulng::parser::Match match(false);
5324 soulng::parser::Match* parentMatch22 = &match;
5325 {
5326 soulng::parser::Match match(false);
5327 soulng::parser::Match* parentMatch23 = &match;
5328 {
5329 int64_t save = lexer.GetPos();
5330 soulng::parser::Match match(false);
5331 soulng::parser::Match* parentMatch24 = &match;
5332 {
5333 int64_t pos = lexer.GetPos();
5334 soulng::parser::Match match = ParserExpressionParser::NewTypeId(lexer);
5335 newTypeId.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
5336 if (match.hit)
5337 {
5338 newExpr->SetParens(false);
5339 newExpr->SetTypeId(newTypeId.release());
5340 }
5341 *parentMatch24 = match;
5342 }
5343 *parentMatch23 = match;
5344 if (!match.hit)
5345 {
5346 soulng::parser::Match match(false);
5347 soulng::parser::Match* parentMatch25 = &match;
5348 lexer.SetPos(save);
5349 {
5350 soulng::parser::Match match(false);
5351 soulng::parser::Match* parentMatch26 = &match;
5352 {
5353 soulng::parser::Match match(false);
5354 soulng::parser::Match* parentMatch27 = &match;
5355 {
5356 soulng::parser::Match match(false);
5357 if (*lexer == LPAREN)
5358 {
5359 ++lexer;
5360 match.hit = true;
5361 }
5362 *parentMatch27 = match;
5363 }
5364 if (match.hit)
5365 {
5366 soulng::parser::Match match(false);
5367 soulng::parser::Match* parentMatch28 = &match;
5368 {
5369 soulng::parser::Match match = ParserDeclaratorParser::TypeId(lexer);
5370 ti.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
5371 *parentMatch28 = match;
5372 }
5373 *parentMatch27 = match;
5374 }
5375 *parentMatch26 = match;
5376 }
5377 if (match.hit)
5378 {
5379 soulng::parser::Match match(false);
5380 soulng::parser::Match* parentMatch29 = &match;
5381 {
5382 soulng::parser::Match match(false);
5383 soulng::parser::Match* parentMatch30 = &match;
5384 {
5385 int64_t pos = lexer.GetPos();
5386 soulng::parser::Match match(false);
5387 if (*lexer == RPAREN)
5388 {
5389 ++lexer;
5390 match.hit = true;
5391 }
5392 if (match.hit)
5393 {
5394 newExpr->SetParens(true);
5395 newExpr->SetTypeId(ti.release());
5396 }
5397 *parentMatch30 = match;
5398 }
5399 *parentMatch29 = match;
5400 }
5401 *parentMatch26 = match;
5402 }
5403 *parentMatch25 = match;
5404 }
5405 *parentMatch23 = match;
5406 }
5407 }
5408 *parentMatch22 = match;
5409 }
5410 *parentMatch21 = match;
5411 }
5412 *parentMatch5 = match;
5413 }
5414 *parentMatch4 = match;
5415 }
5416 if (match.hit)
5417 {
5418 soulng::parser::Match match(false);
5419 soulng::parser::Match* parentMatch31 = &match;
5420 {
5421 soulng::parser::Match match(false);
5422 soulng::parser::Match* parentMatch32 = &match;
5423 {
5424 int64_t pos = lexer.GetPos();
5425 soulng::parser::Match match(true);
5426 if (match.hit)
5427 {
5428 newExpr->BeginAddInitializer();
5429 }
5430 *parentMatch32 = match;
5431 }
5432 *parentMatch31 = match;
5433 }
5434 *parentMatch4 = match;
5435 }
5436 *parentMatch3 = match;
5437 }
5438 if (match.hit)
5439 {
5440 soulng::parser::Match match(false);
5441 soulng::parser::Match* parentMatch33 = &match;
5442 {
5443 soulng::parser::Match match(true);
5444 int64_t save = lexer.GetPos();
5445 soulng::parser::Match* parentMatch34 = &match;
5446 {
5447 soulng::parser::Match match = ParserExpressionParser::NewInitializer(lexer, newExpr.get());
5448 if (match.hit)
5449 {
5450 *parentMatch34 = match;
5451 }
5452 else
5453 {
5454 lexer.SetPos(save);
5455 }
5456 }
5457 *parentMatch33 = match;
5458 }
5459 *parentMatch3 = match;
5460 }
5461 *parentMatch2 = match;
5462 }
5463 if (match.hit)
5464 {
5465 soulng::parser::Match match(false);
5466 soulng::parser::Match* parentMatch35 = &match;
5467 {
5468 soulng::parser::Match match(false);
5469 soulng::parser::Match* parentMatch36 = &match;
5470 {
5471 int64_t pos = lexer.GetPos();
5472 soulng::parser::Match match(true);
5473 if (match.hit)
5474 {
5475 newExpr->EndAddInitializer();
5476 }
5477 *parentMatch36 = match;
5478 }
5479 *parentMatch35 = match;
5480 }
5481 *parentMatch2 = match;
5482 }
5483 *parentMatch1 = match;
5484 }
5485 if (match.hit)
5486 {
5487 {
5488 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5489
5490 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5491 return soulng::parser::Match(true, newExpr.release());
5492 }
5493 }
5494 *parentMatch0 = match;
5495 }
5496 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5497
5498
5499
5500
5501
5502 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5503 if (!match.hit)
5504 {
5505 match.value = nullptr;
5506 }
5507 return match;
5508 }
5509
5510 soulng::parser::Match ParserExpressionParser::NewPlacement(ParserFileLexer& lexer, soulng::cppcode::CppObject* owner)
5511 {
5512 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5513
5514
5515
5516
5517
5518
5519
5520 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5521 soulng::parser::Match match(false);
5522 soulng::parser::Match* parentMatch0 = &match;
5523 {
5524 soulng::parser::Match match(false);
5525 soulng::parser::Match* parentMatch1 = &match;
5526 {
5527 soulng::parser::Match match(false);
5528 if (*lexer == LPAREN)
5529 {
5530 ++lexer;
5531 match.hit = true;
5532 }
5533 *parentMatch1 = match;
5534 }
5535 if (match.hit)
5536 {
5537 soulng::parser::Match match(false);
5538 soulng::parser::Match* parentMatch2 = &match;
5539 {
5540 soulng::parser::Match match = ParserExpressionParser::ExpressionList(lexer, owner);
5541 *parentMatch2 = match;
5542 }
5543 *parentMatch1 = match;
5544 }
5545 *parentMatch0 = match;
5546 }
5547 if (match.hit)
5548 {
5549 soulng::parser::Match match(false);
5550 soulng::parser::Match* parentMatch3 = &match;
5551 {
5552 soulng::parser::Match match(false);
5553 if (*lexer == RPAREN)
5554 {
5555 ++lexer;
5556 match.hit = true;
5557 }
5558 *parentMatch3 = match;
5559 }
5560 *parentMatch0 = match;
5561 }
5562 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5563
5564
5565
5566
5567
5568 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5569 if (!match.hit)
5570 {
5571 match.value = nullptr;
5572 }
5573 return match;
5574 }
5575
5576 soulng::parser::Match ParserExpressionParser::NewTypeId(ParserFileLexer& lexer)
5577 {
5578 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5579
5580
5581
5582
5583
5584
5585
5586 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5587 std::unique_ptr<soulng::cppcode::TypeId> ti = std::unique_ptr<soulng::cppcode::TypeId>();
5588 std::unique_ptr<soulng::cppcode::TypeName> typeName;
5589 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>newDeclarator;
5590 soulng::parser::Match match(false);
5591 soulng::parser::Match* parentMatch0 = &match;
5592 {
5593 soulng::parser::Match match(false);
5594 soulng::parser::Match* parentMatch1 = &match;
5595 {
5596 int64_t pos = lexer.GetPos();
5597 soulng::parser::Match match(true);
5598 if (match.hit)
5599 {
5600 ti.reset(new soulng::cppcode::TypeId());
5601 }
5602 *parentMatch1 = match;
5603 }
5604 *parentMatch0 = match;
5605 }
5606 if (match.hit)
5607 {
5608 soulng::parser::Match match(false);
5609 soulng::parser::Match* parentMatch2 = &match;
5610 {
5611 soulng::parser::Match match(false);
5612 soulng::parser::Match* parentMatch3 = &match;
5613 {
5614 int64_t pos = lexer.GetPos();
5615 soulng::parser::Match match(false);
5616 soulng::parser::Match* parentMatch4 = &match;
5617 {
5618 soulng::parser::Match match(false);
5619 soulng::parser::Match* parentMatch5 = &match;
5620 {
5621 soulng::parser::Match match(false);
5622 soulng::parser::Match* parentMatch6 = &match;
5623 {
5624 soulng::parser::Match match(false);
5625 soulng::parser::Match* parentMatch7 = &match;
5626 {
5627 int64_t save = lexer.GetPos();
5628 soulng::parser::Match match = ParserDeclaratorParser::TypeSpecifierSeq(lexer, ti.get());
5629 *parentMatch7 = match;
5630 if (!match.hit)
5631 {
5632 soulng::parser::Match match(false);
5633 soulng::parser::Match* parentMatch8 = &match;
5634 lexer.SetPos(save);
5635 {
5636 soulng::parser::Match match(false);
5637 soulng::parser::Match* parentMatch9 = &match;
5638 {
5639 int64_t pos = lexer.GetPos();
5640 soulng::parser::Match match = ParserDeclarationParser::TypeName(lexer);
5641 typeName.reset(static_cast<soulng::cppcode::TypeName*>(match.value));
5642 if (match.hit)
5643 {
5644 ti->Add(typeName.release());
5645 }
5646 *parentMatch9 = match;
5647 }
5648 *parentMatch8 = match;
5649 }
5650 *parentMatch7 = match;
5651 }
5652 }
5653 *parentMatch6 = match;
5654 }
5655 *parentMatch5 = match;
5656 }
5657 if (match.hit)
5658 {
5659 soulng::parser::Match match(false);
5660 soulng::parser::Match* parentMatch10 = &match;
5661 {
5662 soulng::parser::Match match(true);
5663 int64_t save = lexer.GetPos();
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 int64_t pos = lexer.GetPos();
5673 soulng::parser::Match match = ParserExpressionParser::NewDeclarator(lexer);
5674 newDeclarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5675 if (match.hit)
5676 {
5677 ti->Declarator() = newDeclarator->value;
5678 }
5679 *parentMatch13 = match;
5680 }
5681 *parentMatch12 = match;
5682 }
5683 if (match.hit)
5684 {
5685 *parentMatch11 = match;
5686 }
5687 else
5688 {
5689 lexer.SetPos(save);
5690 }
5691 }
5692 *parentMatch10 = match;
5693 }
5694 *parentMatch5 = match;
5695 }
5696 *parentMatch4 = match;
5697 }
5698 if (match.hit)
5699 {
5700 {
5701 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5702
5703 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5704 return soulng::parser::Match(true, ti.release());
5705 }
5706 }
5707 *parentMatch3 = match;
5708 }
5709 *parentMatch2 = match;
5710 }
5711 *parentMatch0 = match;
5712 }
5713 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5714
5715
5716
5717
5718
5719 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5720 if (!match.hit)
5721 {
5722 match.value = nullptr;
5723 }
5724 return match;
5725 }
5726
5727 soulng::parser::Match ParserExpressionParser::NewDeclarator(ParserFileLexer& lexer)
5728 {
5729 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5730
5731
5732
5733
5734
5735
5736
5737 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5738 Span s = Span();
5739 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>newDeclarator;
5740 soulng::parser::Match match(false);
5741 soulng::parser::Match* parentMatch0 = &match;
5742 {
5743 soulng::parser::Match match(false);
5744 soulng::parser::Match* parentMatch1 = &match;
5745 {
5746 int64_t pos = lexer.GetPos();
5747 soulng::lexer::Span span = lexer.GetSpan();
5748 soulng::parser::Match match(true);
5749 if (match.hit)
5750 {
5751 s = span;
5752 }
5753 *parentMatch1 = match;
5754 }
5755 *parentMatch0 = match;
5756 }
5757 if (match.hit)
5758 {
5759 soulng::parser::Match match(false);
5760 soulng::parser::Match* parentMatch2 = &match;
5761 {
5762 soulng::parser::Match match(false);
5763 soulng::parser::Match* parentMatch3 = &match;
5764 {
5765 int64_t pos = lexer.GetPos();
5766 soulng::parser::Match match(false);
5767 soulng::parser::Match* parentMatch4 = &match;
5768 {
5769 soulng::parser::Match match(false);
5770 soulng::parser::Match* parentMatch5 = &match;
5771 {
5772 int64_t save = lexer.GetPos();
5773 soulng::parser::Match match(false);
5774 soulng::parser::Match* parentMatch6 = &match;
5775 {
5776 soulng::parser::Match match(false);
5777 soulng::parser::Match* parentMatch7 = &match;
5778 {
5779 int64_t pos = lexer.GetPos();
5780 soulng::lexer::Span span = lexer.GetSpan();
5781 soulng::parser::Match match = ParserDeclaratorParser::PtrOperator(lexer);
5782 if (match.hit)
5783 {
5784 s.end = span.end;
5785 }
5786 *parentMatch7 = match;
5787 }
5788 *parentMatch6 = match;
5789 }
5790 if (match.hit)
5791 {
5792 soulng::parser::Match match(false);
5793 soulng::parser::Match* parentMatch8 = &match;
5794 {
5795 soulng::parser::Match match(true);
5796 int64_t save = lexer.GetPos();
5797 soulng::parser::Match* parentMatch9 = &match;
5798 {
5799 soulng::parser::Match match(false);
5800 soulng::parser::Match* parentMatch10 = &match;
5801 {
5802 soulng::parser::Match match(false);
5803 soulng::parser::Match* parentMatch11 = &match;
5804 {
5805 int64_t pos = lexer.GetPos();
5806 soulng::lexer::Span span = lexer.GetSpan();
5807 soulng::parser::Match match = ParserExpressionParser::NewDeclarator(lexer);
5808 newDeclarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5809 if (match.hit)
5810 {
5811 s.end = span.end;
5812 }
5813 *parentMatch11 = match;
5814 }
5815 *parentMatch10 = match;
5816 }
5817 if (match.hit)
5818 {
5819 *parentMatch9 = match;
5820 }
5821 else
5822 {
5823 lexer.SetPos(save);
5824 }
5825 }
5826 *parentMatch8 = match;
5827 }
5828 *parentMatch6 = match;
5829 }
5830 *parentMatch5 = match;
5831 if (!match.hit)
5832 {
5833 soulng::parser::Match match(false);
5834 soulng::parser::Match* parentMatch12 = &match;
5835 lexer.SetPos(save);
5836 {
5837 soulng::parser::Match match(false);
5838 soulng::parser::Match* parentMatch13 = &match;
5839 {
5840 int64_t pos = lexer.GetPos();
5841 soulng::lexer::Span span = lexer.GetSpan();
5842 soulng::parser::Match match = ParserExpressionParser::DirectNewDeclarator(lexer);
5843 if (match.hit)
5844 {
5845 s.end = span.end;
5846 }
5847 *parentMatch13 = match;
5848 }
5849 *parentMatch12 = match;
5850 }
5851 *parentMatch5 = match;
5852 }
5853 }
5854 *parentMatch4 = match;
5855 }
5856 if (match.hit)
5857 {
5858 {
5859 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5860
5861 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5862 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(soulng::util::Trim(lexer.GetMatch(s))));
5863 }
5864 }
5865 *parentMatch3 = match;
5866 }
5867 *parentMatch2 = match;
5868 }
5869 *parentMatch0 = match;
5870 }
5871 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5872
5873
5874
5875
5876
5877 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5878 if (!match.hit)
5879 {
5880 match.value = nullptr;
5881 }
5882 return match;
5883 }
5884
5885 soulng::parser::Match ParserExpressionParser::NewInitializer(ParserFileLexer& lexer, soulng::cppcode::CppObject* owner)
5886 {
5887 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5888
5889
5890
5891
5892
5893
5894
5895 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5896 soulng::parser::Match match(false);
5897 soulng::parser::Match* parentMatch0 = &match;
5898 {
5899 soulng::parser::Match match(false);
5900 soulng::parser::Match* parentMatch1 = &match;
5901 {
5902 soulng::parser::Match match(false);
5903 if (*lexer == LPAREN)
5904 {
5905 ++lexer;
5906 match.hit = true;
5907 }
5908 *parentMatch1 = match;
5909 }
5910 if (match.hit)
5911 {
5912 soulng::parser::Match match(false);
5913 soulng::parser::Match* parentMatch2 = &match;
5914 {
5915 soulng::parser::Match match(true);
5916 int64_t save = lexer.GetPos();
5917 soulng::parser::Match* parentMatch3 = &match;
5918 {
5919 soulng::parser::Match match = ParserExpressionParser::ExpressionList(lexer, owner);
5920 if (match.hit)
5921 {
5922 *parentMatch3 = match;
5923 }
5924 else
5925 {
5926 lexer.SetPos(save);
5927 }
5928 }
5929 *parentMatch2 = match;
5930 }
5931 *parentMatch1 = match;
5932 }
5933 *parentMatch0 = match;
5934 }
5935 if (match.hit)
5936 {
5937 soulng::parser::Match match(false);
5938 soulng::parser::Match* parentMatch4 = &match;
5939 {
5940 soulng::parser::Match match(false);
5941 if (*lexer == RPAREN)
5942 {
5943 ++lexer;
5944 match.hit = true;
5945 }
5946 *parentMatch4 = match;
5947 }
5948 *parentMatch0 = match;
5949 }
5950 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5951
5952
5953
5954
5955
5956 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5957 if (!match.hit)
5958 {
5959 match.value = nullptr;
5960 }
5961 return match;
5962 }
5963
5964 soulng::parser::Match ParserExpressionParser::DirectNewDeclarator(ParserFileLexer& lexer)
5965 {
5966 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5967
5968
5969
5970
5971
5972
5973
5974 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5975 std::unique_ptr<soulng::cppcode::CppObject> expr;
5976 std::unique_ptr<soulng::cppcode::CppObject> constantExpr;
5977 soulng::parser::Match match(false);
5978 soulng::parser::Match* parentMatch0 = &match;
5979 {
5980 soulng::parser::Match match(false);
5981 soulng::parser::Match* parentMatch1 = &match;
5982 {
5983 soulng::parser::Match match(false);
5984 soulng::parser::Match* parentMatch2 = &match;
5985 {
5986 soulng::parser::Match match(false);
5987 if (*lexer == LBRACKET)
5988 {
5989 ++lexer;
5990 match.hit = true;
5991 }
5992 *parentMatch2 = match;
5993 }
5994 if (match.hit)
5995 {
5996 soulng::parser::Match match(false);
5997 soulng::parser::Match* parentMatch3 = &match;
5998 {
5999 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
6000 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
6001 *parentMatch3 = match;
6002 }
6003 *parentMatch2 = match;
6004 }
6005 *parentMatch1 = match;
6006 }
6007 if (match.hit)
6008 {
6009 soulng::parser::Match match(false);
6010 soulng::parser::Match* parentMatch4 = &match;
6011 {
6012 soulng::parser::Match match(false);
6013 if (*lexer == RBRACKET)
6014 {
6015 ++lexer;
6016 match.hit = true;
6017 }
6018 *parentMatch4 = match;
6019 }
6020 *parentMatch1 = match;
6021 }
6022 *parentMatch0 = match;
6023 }
6024 if (match.hit)
6025 {
6026 soulng::parser::Match match(false);
6027 soulng::parser::Match* parentMatch5 = &match;
6028 {
6029 soulng::parser::Match match(true);
6030 soulng::parser::Match* parentMatch6 = &match;
6031 {
6032 while (true)
6033 {
6034 int64_t save = lexer.GetPos();
6035 {
6036 soulng::parser::Match match(false);
6037 soulng::parser::Match* parentMatch7 = &match;
6038 {
6039 soulng::parser::Match match(false);
6040 soulng::parser::Match* parentMatch8 = &match;
6041 {
6042 soulng::parser::Match match(false);
6043 soulng::parser::Match* parentMatch9 = &match;
6044 {
6045 soulng::parser::Match match(false);
6046 if (*lexer == LBRACKET)
6047 {
6048 ++lexer;
6049 match.hit = true;
6050 }
6051 *parentMatch9 = match;
6052 }
6053 if (match.hit)
6054 {
6055 soulng::parser::Match match(false);
6056 soulng::parser::Match* parentMatch10 = &match;
6057 {
6058 soulng::parser::Match match = ParserExpressionParser::ConstantExpression(lexer);
6059 constantExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
6060 *parentMatch10 = match;
6061 }
6062 *parentMatch9 = match;
6063 }
6064 *parentMatch8 = match;
6065 }
6066 if (match.hit)
6067 {
6068 soulng::parser::Match match(false);
6069 soulng::parser::Match* parentMatch11 = &match;
6070 {
6071 soulng::parser::Match match(false);
6072 if (*lexer == RBRACKET)
6073 {
6074 ++lexer;
6075 match.hit = true;
6076 }
6077 *parentMatch11 = match;
6078 }
6079 *parentMatch8 = match;
6080 }
6081 *parentMatch7 = match;
6082 }
6083 if (match.hit)
6084 {
6085 *parentMatch6 = match;
6086 }
6087 else
6088 {
6089 lexer.SetPos(save);
6090 break;
6091 }
6092 }
6093 }
6094 }
6095 *parentMatch5 = match;
6096 }
6097 *parentMatch0 = match;
6098 }
6099 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6100
6101
6102
6103
6104
6105 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6106 if (!match.hit)
6107 {
6108 match.value = nullptr;
6109 }
6110 return match;
6111 }
6112
6113 soulng::parser::Match ParserExpressionParser::DeleteExpression(ParserFileLexer& lexer)
6114 {
6115 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6116
6117
6118
6119
6120
6121
6122
6123 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6124 bool global = bool();
6125 bool array = bool();
6126 std::unique_ptr<soulng::cppcode::CppObject> ptr;
6127 soulng::parser::Match match(false);
6128 soulng::parser::Match* parentMatch0 = &match;
6129 {
6130 int64_t pos = lexer.GetPos();
6131 soulng::parser::Match match(false);
6132 soulng::parser::Match* parentMatch1 = &match;
6133 {
6134 soulng::parser::Match match(false);
6135 soulng::parser::Match* parentMatch2 = &match;
6136 {
6137 soulng::parser::Match match(false);
6138 soulng::parser::Match* parentMatch3 = &match;
6139 {
6140 soulng::parser::Match match(false);
6141 soulng::parser::Match* parentMatch4 = &match;
6142 {
6143 soulng::parser::Match match(true);
6144 int64_t save = lexer.GetPos();
6145 soulng::parser::Match* parentMatch5 = &match;
6146 {
6147 soulng::parser::Match match(false);
6148 soulng::parser::Match* parentMatch6 = &match;
6149 {
6150 soulng::parser::Match match(false);
6151 soulng::parser::Match* parentMatch7 = &match;
6152 {
6153 int64_t pos = lexer.GetPos();
6154 soulng::parser::Match match(false);
6155 if (*lexer == COLONCOLON)
6156 {
6157 ++lexer;
6158 match.hit = true;
6159 }
6160 if (match.hit)
6161 {
6162 global = true;
6163 }
6164 *parentMatch7 = match;
6165 }
6166 *parentMatch6 = match;
6167 }
6168 if (match.hit)
6169 {
6170 *parentMatch5 = match;
6171 }
6172 else
6173 {
6174 lexer.SetPos(save);
6175 }
6176 }
6177 *parentMatch4 = match;
6178 }
6179 if (match.hit)
6180 {
6181 soulng::parser::Match match(false);
6182 soulng::parser::Match* parentMatch8 = &match;
6183 {
6184 soulng::parser::Match match(false);
6185 if (*lexer == DELETE)
6186 {
6187 ++lexer;
6188 match.hit = true;
6189 }
6190 *parentMatch8 = match;
6191 }
6192 *parentMatch4 = match;
6193 }
6194 *parentMatch3 = match;
6195 }
6196 if (match.hit)
6197 {
6198 soulng::parser::Match match(false);
6199 soulng::parser::Match* parentMatch9 = &match;
6200 {
6201 soulng::parser::Match match(true);
6202 int64_t save = lexer.GetPos();
6203 soulng::parser::Match* parentMatch10 = &match;
6204 {
6205 soulng::parser::Match match(false);
6206 soulng::parser::Match* parentMatch11 = &match;
6207 {
6208 soulng::parser::Match match(false);
6209 soulng::parser::Match* parentMatch12 = &match;
6210 {
6211 soulng::parser::Match match(false);
6212 if (*lexer == LBRACKET)
6213 {
6214 ++lexer;
6215 match.hit = true;
6216 }
6217 *parentMatch12 = match;
6218 }
6219 if (match.hit)
6220 {
6221 soulng::parser::Match match(false);
6222 soulng::parser::Match* parentMatch13 = &match;
6223 {
6224 soulng::parser::Match match(false);
6225 soulng::parser::Match* parentMatch14 = &match;
6226 {
6227 int64_t pos = lexer.GetPos();
6228 soulng::parser::Match match(false);
6229 if (*lexer == RBRACKET)
6230 {
6231 ++lexer;
6232 match.hit = true;
6233 }
6234 if (match.hit)
6235 {
6236 array = true;
6237 }
6238 *parentMatch14 = match;
6239 }
6240 *parentMatch13 = match;
6241 }
6242 *parentMatch12 = match;
6243 }
6244 *parentMatch11 = match;
6245 }
6246 if (match.hit)
6247 {
6248 *parentMatch10 = match;
6249 }
6250 else
6251 {
6252 lexer.SetPos(save);
6253 }
6254 }
6255 *parentMatch9 = match;
6256 }
6257 *parentMatch3 = match;
6258 }
6259 *parentMatch2 = match;
6260 }
6261 if (match.hit)
6262 {
6263 soulng::parser::Match match(false);
6264 soulng::parser::Match* parentMatch15 = &match;
6265 {
6266 soulng::parser::Match match = ParserExpressionParser::CastExpression(lexer);
6267 ptr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
6268 *parentMatch15 = match;
6269 }
6270 *parentMatch2 = match;
6271 }
6272 *parentMatch1 = match;
6273 }
6274 if (match.hit)
6275 {
6276 {
6277 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6278
6279 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6280 return soulng::parser::Match(true, new soulng::cppcode::DeleteExpr(global, array, ptr.release()));
6281 }
6282 }
6283 *parentMatch0 = match;
6284 }
6285 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6286
6287
6288
6289
6290
6291 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6292 if (!match.hit)
6293 {
6294 match.value = nullptr;
6295 }
6296 return match;
6297 }
6298
6299 soulng::parser::Match ParserExpressionParser::OperatorFunctionId(ParserFileLexer& lexer)
6300 {
6301 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6302
6303
6304
6305
6306
6307
6308
6309 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6310 Span s = Span();
6311 soulng::parser::Match match(false);
6312 soulng::parser::Match* parentMatch0 = &match;
6313 {
6314 soulng::parser::Match match(false);
6315 soulng::parser::Match* parentMatch1 = &match;
6316 {
6317 int64_t pos = lexer.GetPos();
6318 soulng::lexer::Span span = lexer.GetSpan();
6319 soulng::parser::Match match(false);
6320 if (*lexer == OPERATOR)
6321 {
6322 ++lexer;
6323 match.hit = true;
6324 }
6325 if (match.hit)
6326 {
6327 s = span;
6328 }
6329 *parentMatch1 = match;
6330 }
6331 *parentMatch0 = match;
6332 }
6333 if (match.hit)
6334 {
6335 soulng::parser::Match match(false);
6336 soulng::parser::Match* parentMatch2 = &match;
6337 {
6338 soulng::parser::Match match(false);
6339 soulng::parser::Match* parentMatch3 = &match;
6340 {
6341 int64_t pos = lexer.GetPos();
6342 soulng::lexer::Span span = lexer.GetSpan();
6343 soulng::parser::Match match = ParserExpressionParser::Operator(lexer);
6344 if (match.hit)
6345 {
6346 s.end = span.end;
6347 {
6348 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6349
6350 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6351 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(lexer.GetMatch(s)));
6352 }
6353 }
6354 *parentMatch3 = match;
6355 }
6356 *parentMatch2 = match;
6357 }
6358 *parentMatch0 = match;
6359 }
6360 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6361
6362
6363
6364
6365
6366 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6367 if (!match.hit)
6368 {
6369 match.value = nullptr;
6370 }
6371 return match;
6372 }
6373
6374 soulng::parser::Match ParserExpressionParser::Operator(ParserFileLexer& lexer)
6375 {
6376 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6377
6378
6379
6380
6381
6382
6383
6384 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6385 soulng::parser::Match match(false);
6386 soulng::parser::Match* parentMatch0 = &match;
6387 {
6388 int64_t save = lexer.GetPos();
6389 soulng::parser::Match match(false);
6390 soulng::parser::Match* parentMatch1 = &match;
6391 {
6392 int64_t save = lexer.GetPos();
6393 soulng::parser::Match match(false);
6394 soulng::parser::Match* parentMatch2 = &match;
6395 {
6396 int64_t save = lexer.GetPos();
6397 soulng::parser::Match match(false);
6398 soulng::parser::Match* parentMatch3 = &match;
6399 {
6400 int64_t save = lexer.GetPos();
6401 soulng::parser::Match match(false);
6402 soulng::parser::Match* parentMatch4 = &match;
6403 {
6404 int64_t save = lexer.GetPos();
6405 soulng::parser::Match match(false);
6406 soulng::parser::Match* parentMatch5 = &match;
6407 {
6408 int64_t save = lexer.GetPos();
6409 soulng::parser::Match match(false);
6410 soulng::parser::Match* parentMatch6 = &match;
6411 {
6412 int64_t save = lexer.GetPos();
6413 soulng::parser::Match match(false);
6414 soulng::parser::Match* parentMatch7 = &match;
6415 {
6416 int64_t save = lexer.GetPos();
6417 soulng::parser::Match match(false);
6418 soulng::parser::Match* parentMatch8 = &match;
6419 {
6420 int64_t save = lexer.GetPos();
6421 soulng::parser::Match match(false);
6422 soulng::parser::Match* parentMatch9 = &match;
6423 {
6424 int64_t save = lexer.GetPos();
6425 soulng::parser::Match match(false);
6426 soulng::parser::Match* parentMatch10 = &match;
6427 {
6428 int64_t save = lexer.GetPos();
6429 soulng::parser::Match match(false);
6430 soulng::parser::Match* parentMatch11 = &match;
6431 {
6432 int64_t save = lexer.GetPos();
6433 soulng::parser::Match match(false);
6434 soulng::parser::Match* parentMatch12 = &match;
6435 {
6436 int64_t save = lexer.GetPos();
6437 soulng::parser::Match match(false);
6438 soulng::parser::Match* parentMatch13 = &match;
6439 {
6440 int64_t save = lexer.GetPos();
6441 soulng::parser::Match match(false);
6442 soulng::parser::Match* parentMatch14 = &match;
6443 {
6444 int64_t save = lexer.GetPos();
6445 soulng::parser::Match match(false);
6446 soulng::parser::Match* parentMatch15 = &match;
6447 {
6448 int64_t save = lexer.GetPos();
6449 soulng::parser::Match match(false);
6450 soulng::parser::Match* parentMatch16 = &match;
6451 {
6452 int64_t save = lexer.GetPos();
6453 soulng::parser::Match match(false);
6454 soulng::parser::Match* parentMatch17 = &match;
6455 {
6456 int64_t save = lexer.GetPos();
6457 soulng::parser::Match match(false);
6458 soulng::parser::Match* parentMatch18 = &match;
6459 {
6460 int64_t save = lexer.GetPos();
6461 soulng::parser::Match match(false);
6462 soulng::parser::Match* parentMatch19 = &match;
6463 {
6464 int64_t save = lexer.GetPos();
6465 soulng::parser::Match match(false);
6466 soulng::parser::Match* parentMatch20 = &match;
6467 {
6468 int64_t save = lexer.GetPos();
6469 soulng::parser::Match match(false);
6470 soulng::parser::Match* parentMatch21 = &match;
6471 {
6472 int64_t save = lexer.GetPos();
6473 soulng::parser::Match match(false);
6474 soulng::parser::Match* parentMatch22 = &match;
6475 {
6476 int64_t save = lexer.GetPos();
6477 soulng::parser::Match match(false);
6478 soulng::parser::Match* parentMatch23 = &match;
6479 {
6480 int64_t save = lexer.GetPos();
6481 soulng::parser::Match match(false);
6482 soulng::parser::Match* parentMatch24 = &match;
6483 {
6484 int64_t save = lexer.GetPos();
6485 soulng::parser::Match match(false);
6486 soulng::parser::Match* parentMatch25 = &match;
6487 {
6488 int64_t save = lexer.GetPos();
6489 soulng::parser::Match match(false);
6490 soulng::parser::Match* parentMatch26 = &match;
6491 {
6492 int64_t save = lexer.GetPos();
6493 soulng::parser::Match match(false);
6494 soulng::parser::Match* parentMatch27 = &match;
6495 {
6496 int64_t save = lexer.GetPos();
6497 soulng::parser::Match match(false);
6498 soulng::parser::Match* parentMatch28 = &match;
6499 {
6500 int64_t save = lexer.GetPos();
6501 soulng::parser::Match match(false);
6502 soulng::parser::Match* parentMatch29 = &match;
6503 {
6504 int64_t save = lexer.GetPos();
6505 soulng::parser::Match match(false);
6506 soulng::parser::Match* parentMatch30 = &match;
6507 {
6508 int64_t save = lexer.GetPos();
6509 soulng::parser::Match match(false);
6510 soulng::parser::Match* parentMatch31 = &match;
6511 {
6512 int64_t save = lexer.GetPos();
6513 soulng::parser::Match match(false);
6514 soulng::parser::Match* parentMatch32 = &match;
6515 {
6516 int64_t save = lexer.GetPos();
6517 soulng::parser::Match match(false);
6518 soulng::parser::Match* parentMatch33 = &match;
6519 {
6520 int64_t save = lexer.GetPos();
6521 soulng::parser::Match match(false);
6522 soulng::parser::Match* parentMatch34 = &match;
6523 {
6524 int64_t save = lexer.GetPos();
6525 soulng::parser::Match match(false);
6526 soulng::parser::Match* parentMatch35 = &match;
6527 {
6528 int64_t save = lexer.GetPos();
6529 soulng::parser::Match match(false);
6530 soulng::parser::Match* parentMatch36 = &match;
6531 {
6532 int64_t save = lexer.GetPos();
6533 soulng::parser::Match match(false);
6534 soulng::parser::Match* parentMatch37 = &match;
6535 {
6536 int64_t save = lexer.GetPos();
6537 soulng::parser::Match match(false);
6538 soulng::parser::Match* parentMatch38 = &match;
6539 {
6540 int64_t save = lexer.GetPos();
6541 soulng::parser::Match match(false);
6542 soulng::parser::Match* parentMatch39 = &match;
6543 {
6544 int64_t save = lexer.GetPos();
6545 soulng::parser::Match match(false);
6546 soulng::parser::Match* parentMatch40 = &match;
6547 {
6548 int64_t save = lexer.GetPos();
6549 soulng::parser::Match match(false);
6550 soulng::parser::Match* parentMatch41 = &match;
6551 {
6552 soulng::parser::Match match(false);
6553 if (*lexer == LBRACKET)
6554 {
6555 ++lexer;
6556 match.hit = true;
6557 }
6558 *parentMatch41 = match;
6559 }
6560 if (match.hit)
6561 {
6562 soulng::parser::Match match(false);
6563 soulng::parser::Match* parentMatch42 = &match;
6564 {
6565 soulng::parser::Match match(false);
6566 if (*lexer == RBRACKET)
6567 {
6568 ++lexer;
6569 match.hit = true;
6570 }
6571 *parentMatch42 = match;
6572 }
6573 *parentMatch41 = match;
6574 }
6575 *parentMatch40 = match;
6576 if (!match.hit)
6577 {
6578 soulng::parser::Match match(false);
6579 soulng::parser::Match* parentMatch43 = &match;
6580 lexer.SetPos(save);
6581 {
6582 soulng::parser::Match match(false);
6583 soulng::parser::Match* parentMatch44 = &match;
6584 {
6585 soulng::parser::Match match(false);
6586 if (*lexer == LPAREN)
6587 {
6588 ++lexer;
6589 match.hit = true;
6590 }
6591 *parentMatch44 = match;
6592 }
6593 if (match.hit)
6594 {
6595 soulng::parser::Match match(false);
6596 soulng::parser::Match* parentMatch45 = &match;
6597 {
6598 soulng::parser::Match match(false);
6599 if (*lexer == RPAREN)
6600 {
6601 ++lexer;
6602 match.hit = true;
6603 }
6604 *parentMatch45 = match;
6605 }
6606 *parentMatch44 = match;
6607 }
6608 *parentMatch43 = match;
6609 }
6610 *parentMatch40 = match;
6611 }
6612 }
6613 *parentMatch39 = match;
6614 if (!match.hit)
6615 {
6616 soulng::parser::Match match(false);
6617 soulng::parser::Match* parentMatch46 = &match;
6618 lexer.SetPos(save);
6619 {
6620 soulng::parser::Match match(false);
6621 if (*lexer == ARROWSTAR)
6622 {
6623 ++lexer;
6624 match.hit = true;
6625 }
6626 *parentMatch46 = match;
6627 }
6628 *parentMatch39 = match;
6629 }
6630 }
6631 *parentMatch38 = match;
6632 if (!match.hit)
6633 {
6634 soulng::parser::Match match(false);
6635 soulng::parser::Match* parentMatch47 = &match;
6636 lexer.SetPos(save);
6637 {
6638 soulng::parser::Match match(false);
6639 if (*lexer == ARROW)
6640 {
6641 ++lexer;
6642 match.hit = true;
6643 }
6644 *parentMatch47 = match;
6645 }
6646 *parentMatch38 = match;
6647 }
6648 }
6649 *parentMatch37 = match;
6650 if (!match.hit)
6651 {
6652 soulng::parser::Match match(false);
6653 soulng::parser::Match* parentMatch48 = &match;
6654 lexer.SetPos(save);
6655 {
6656 soulng::parser::Match match(false);
6657 if (*lexer == COMMA)
6658 {
6659 ++lexer;
6660 match.hit = true;
6661 }
6662 *parentMatch48 = match;
6663 }
6664 *parentMatch37 = match;
6665 }
6666 }
6667 *parentMatch36 = match;
6668 if (!match.hit)
6669 {
6670 soulng::parser::Match match(false);
6671 soulng::parser::Match* parentMatch49 = &match;
6672 lexer.SetPos(save);
6673 {
6674 soulng::parser::Match match(false);
6675 if (*lexer == MINUSMINUS)
6676 {
6677 ++lexer;
6678 match.hit = true;
6679 }
6680 *parentMatch49 = match;
6681 }
6682 *parentMatch36 = match;
6683 }
6684 }
6685 *parentMatch35 = match;
6686 if (!match.hit)
6687 {
6688 soulng::parser::Match match(false);
6689 soulng::parser::Match* parentMatch50 = &match;
6690 lexer.SetPos(save);
6691 {
6692 soulng::parser::Match match(false);
6693 if (*lexer == PLUSPLUS)
6694 {
6695 ++lexer;
6696 match.hit = true;
6697 }
6698 *parentMatch50 = match;
6699 }
6700 *parentMatch35 = match;
6701 }
6702 }
6703 *parentMatch34 = match;
6704 if (!match.hit)
6705 {
6706 soulng::parser::Match match(false);
6707 soulng::parser::Match* parentMatch51 = &match;
6708 lexer.SetPos(save);
6709 {
6710 soulng::parser::Match match(false);
6711 if (*lexer == DISJUNCTION)
6712 {
6713 ++lexer;
6714 match.hit = true;
6715 }
6716 *parentMatch51 = match;
6717 }
6718 *parentMatch34 = match;
6719 }
6720 }
6721 *parentMatch33 = match;
6722 if (!match.hit)
6723 {
6724 soulng::parser::Match match(false);
6725 soulng::parser::Match* parentMatch52 = &match;
6726 lexer.SetPos(save);
6727 {
6728 soulng::parser::Match match(false);
6729 if (*lexer == AMPAMP)
6730 {
6731 ++lexer;
6732 match.hit = true;
6733 }
6734 *parentMatch52 = match;
6735 }
6736 *parentMatch33 = match;
6737 }
6738 }
6739 *parentMatch32 = match;
6740 if (!match.hit)
6741 {
6742 soulng::parser::Match match(false);
6743 soulng::parser::Match* parentMatch53 = &match;
6744 lexer.SetPos(save);
6745 {
6746 soulng::parser::Match match(false);
6747 if (*lexer == LEQ)
6748 {
6749 ++lexer;
6750 match.hit = true;
6751 }
6752 *parentMatch53 = match;
6753 }
6754 *parentMatch32 = match;
6755 }
6756 }
6757 *parentMatch31 = match;
6758 if (!match.hit)
6759 {
6760 soulng::parser::Match match(false);
6761 soulng::parser::Match* parentMatch54 = &match;
6762 lexer.SetPos(save);
6763 {
6764 soulng::parser::Match match(false);
6765 if (*lexer == GEQ)
6766 {
6767 ++lexer;
6768 match.hit = true;
6769 }
6770 *parentMatch54 = match;
6771 }
6772 *parentMatch31 = match;
6773 }
6774 }
6775 *parentMatch30 = match;
6776 if (!match.hit)
6777 {
6778 soulng::parser::Match match(false);
6779 soulng::parser::Match* parentMatch55 = &match;
6780 lexer.SetPos(save);
6781 {
6782 soulng::parser::Match match(false);
6783 if (*lexer == NEQ)
6784 {
6785 ++lexer;
6786 match.hit = true;
6787 }
6788 *parentMatch55 = match;
6789 }
6790 *parentMatch30 = match;
6791 }
6792 }
6793 *parentMatch29 = match;
6794 if (!match.hit)
6795 {
6796 soulng::parser::Match match(false);
6797 soulng::parser::Match* parentMatch56 = &match;
6798 lexer.SetPos(save);
6799 {
6800 soulng::parser::Match match(false);
6801 if (*lexer == EQ)
6802 {
6803 ++lexer;
6804 match.hit = true;
6805 }
6806 *parentMatch56 = match;
6807 }
6808 *parentMatch29 = match;
6809 }
6810 }
6811 *parentMatch28 = match;
6812 if (!match.hit)
6813 {
6814 soulng::parser::Match match(false);
6815 soulng::parser::Match* parentMatch57 = &match;
6816 lexer.SetPos(save);
6817 {
6818 soulng::parser::Match match(false);
6819 if (*lexer == SHIFTLEFTASSIGN)
6820 {
6821 ++lexer;
6822 match.hit = true;
6823 }
6824 *parentMatch57 = match;
6825 }
6826 *parentMatch28 = match;
6827 }
6828 }
6829 *parentMatch27 = match;
6830 if (!match.hit)
6831 {
6832 soulng::parser::Match match(false);
6833 soulng::parser::Match* parentMatch58 = &match;
6834 lexer.SetPos(save);
6835 {
6836 soulng::parser::Match match(false);
6837 if (*lexer == SHIFTRIGHTASSIGN)
6838 {
6839 ++lexer;
6840 match.hit = true;
6841 }
6842 *parentMatch58 = match;
6843 }
6844 *parentMatch27 = match;
6845 }
6846 }
6847 *parentMatch26 = match;
6848 if (!match.hit)
6849 {
6850 soulng::parser::Match match(false);
6851 soulng::parser::Match* parentMatch59 = &match;
6852 lexer.SetPos(save);
6853 {
6854 soulng::parser::Match match(false);
6855 if (*lexer == SHIFTLEFT)
6856 {
6857 ++lexer;
6858 match.hit = true;
6859 }
6860 *parentMatch59 = match;
6861 }
6862 *parentMatch26 = match;
6863 }
6864 }
6865 *parentMatch25 = match;
6866 if (!match.hit)
6867 {
6868 soulng::parser::Match match(false);
6869 soulng::parser::Match* parentMatch60 = &match;
6870 lexer.SetPos(save);
6871 {
6872 soulng::parser::Match match(false);
6873 if (*lexer == SHIFTRIGHT)
6874 {
6875 ++lexer;
6876 match.hit = true;
6877 }
6878 *parentMatch60 = match;
6879 }
6880 *parentMatch25 = match;
6881 }
6882 }
6883 *parentMatch24 = match;
6884 if (!match.hit)
6885 {
6886 soulng::parser::Match match(false);
6887 soulng::parser::Match* parentMatch61 = &match;
6888 lexer.SetPos(save);
6889 {
6890 soulng::parser::Match match(false);
6891 if (*lexer == ORASSIGN)
6892 {
6893 ++lexer;
6894 match.hit = true;
6895 }
6896 *parentMatch61 = match;
6897 }
6898 *parentMatch24 = match;
6899 }
6900 }
6901 *parentMatch23 = match;
6902 if (!match.hit)
6903 {
6904 soulng::parser::Match match(false);
6905 soulng::parser::Match* parentMatch62 = &match;
6906 lexer.SetPos(save);
6907 {
6908 soulng::parser::Match match(false);
6909 if (*lexer == ANDASSIGN)
6910 {
6911 ++lexer;
6912 match.hit = true;
6913 }
6914 *parentMatch62 = match;
6915 }
6916 *parentMatch23 = match;
6917 }
6918 }
6919 *parentMatch22 = match;
6920 if (!match.hit)
6921 {
6922 soulng::parser::Match match(false);
6923 soulng::parser::Match* parentMatch63 = &match;
6924 lexer.SetPos(save);
6925 {
6926 soulng::parser::Match match(false);
6927 if (*lexer == XORASSIGN)
6928 {
6929 ++lexer;
6930 match.hit = true;
6931 }
6932 *parentMatch63 = match;
6933 }
6934 *parentMatch22 = match;
6935 }
6936 }
6937 *parentMatch21 = match;
6938 if (!match.hit)
6939 {
6940 soulng::parser::Match match(false);
6941 soulng::parser::Match* parentMatch64 = &match;
6942 lexer.SetPos(save);
6943 {
6944 soulng::parser::Match match(false);
6945 if (*lexer == REMASSIGN)
6946 {
6947 ++lexer;
6948 match.hit = true;
6949 }
6950 *parentMatch64 = match;
6951 }
6952 *parentMatch21 = match;
6953 }
6954 }
6955 *parentMatch20 = match;
6956 if (!match.hit)
6957 {
6958 soulng::parser::Match match(false);
6959 soulng::parser::Match* parentMatch65 = &match;
6960 lexer.SetPos(save);
6961 {
6962 soulng::parser::Match match(false);
6963 if (*lexer == DIVASSIGN)
6964 {
6965 ++lexer;
6966 match.hit = true;
6967 }
6968 *parentMatch65 = match;
6969 }
6970 *parentMatch20 = match;
6971 }
6972 }
6973 *parentMatch19 = match;
6974 if (!match.hit)
6975 {
6976 soulng::parser::Match match(false);
6977 soulng::parser::Match* parentMatch66 = &match;
6978 lexer.SetPos(save);
6979 {
6980 soulng::parser::Match match(false);
6981 if (*lexer == MULASSIGN)
6982 {
6983 ++lexer;
6984 match.hit = true;
6985 }
6986 *parentMatch66 = match;
6987 }
6988 *parentMatch19 = match;
6989 }
6990 }
6991 *parentMatch18 = match;
6992 if (!match.hit)
6993 {
6994 soulng::parser::Match match(false);
6995 soulng::parser::Match* parentMatch67 = &match;
6996 lexer.SetPos(save);
6997 {
6998 soulng::parser::Match match(false);
6999 if (*lexer == MINUSASSIGN)
7000 {
7001 ++lexer;
7002 match.hit = true;
7003 }
7004 *parentMatch67 = match;
7005 }
7006 *parentMatch18 = match;
7007 }
7008 }
7009 *parentMatch17 = match;
7010 if (!match.hit)
7011 {
7012 soulng::parser::Match match(false);
7013 soulng::parser::Match* parentMatch68 = &match;
7014 lexer.SetPos(save);
7015 {
7016 soulng::parser::Match match(false);
7017 if (*lexer == PLUSASSIGN)
7018 {
7019 ++lexer;
7020 match.hit = true;
7021 }
7022 *parentMatch68 = match;
7023 }
7024 *parentMatch17 = match;
7025 }
7026 }
7027 *parentMatch16 = match;
7028 if (!match.hit)
7029 {
7030 soulng::parser::Match match(false);
7031 soulng::parser::Match* parentMatch69 = &match;
7032 lexer.SetPos(save);
7033 {
7034 soulng::parser::Match match(false);
7035 if (*lexer == LANGLE)
7036 {
7037 ++lexer;
7038 match.hit = true;
7039 }
7040 *parentMatch69 = match;
7041 }
7042 *parentMatch16 = match;
7043 }
7044 }
7045 *parentMatch15 = match;
7046 if (!match.hit)
7047 {
7048 soulng::parser::Match match(false);
7049 soulng::parser::Match* parentMatch70 = &match;
7050 lexer.SetPos(save);
7051 {
7052 soulng::parser::Match match(false);
7053 if (*lexer == RANGLE)
7054 {
7055 ++lexer;
7056 match.hit = true;
7057 }
7058 *parentMatch70 = match;
7059 }
7060 *parentMatch15 = match;
7061 }
7062 }
7063 *parentMatch14 = match;
7064 if (!match.hit)
7065 {
7066 soulng::parser::Match match(false);
7067 soulng::parser::Match* parentMatch71 = &match;
7068 lexer.SetPos(save);
7069 {
7070 soulng::parser::Match match(false);
7071 if (*lexer == ASSIGN)
7072 {
7073 ++lexer;
7074 match.hit = true;
7075 }
7076 *parentMatch71 = match;
7077 }
7078 *parentMatch14 = match;
7079 }
7080 }
7081 *parentMatch13 = match;
7082 if (!match.hit)
7083 {
7084 soulng::parser::Match match(false);
7085 soulng::parser::Match* parentMatch72 = &match;
7086 lexer.SetPos(save);
7087 {
7088 soulng::parser::Match match(false);
7089 if (*lexer == EXCLAMATION)
7090 {
7091 ++lexer;
7092 match.hit = true;
7093 }
7094 *parentMatch72 = match;
7095 }
7096 *parentMatch13 = match;
7097 }
7098 }
7099 *parentMatch12 = match;
7100 if (!match.hit)
7101 {
7102 soulng::parser::Match match(false);
7103 soulng::parser::Match* parentMatch73 = &match;
7104 lexer.SetPos(save);
7105 {
7106 soulng::parser::Match match(false);
7107 if (*lexer == CPL)
7108 {
7109 ++lexer;
7110 match.hit = true;
7111 }
7112 *parentMatch73 = match;
7113 }
7114 *parentMatch12 = match;
7115 }
7116 }
7117 *parentMatch11 = match;
7118 if (!match.hit)
7119 {
7120 soulng::parser::Match match(false);
7121 soulng::parser::Match* parentMatch74 = &match;
7122 lexer.SetPos(save);
7123 {
7124 soulng::parser::Match match(false);
7125 if (*lexer == BITOR)
7126 {
7127 ++lexer;
7128 match.hit = true;
7129 }
7130 *parentMatch74 = match;
7131 }
7132 *parentMatch11 = match;
7133 }
7134 }
7135 *parentMatch10 = match;
7136 if (!match.hit)
7137 {
7138 soulng::parser::Match match(false);
7139 soulng::parser::Match* parentMatch75 = &match;
7140 lexer.SetPos(save);
7141 {
7142 soulng::parser::Match match(false);
7143 if (*lexer == AMP)
7144 {
7145 ++lexer;
7146 match.hit = true;
7147 }
7148 *parentMatch75 = match;
7149 }
7150 *parentMatch10 = match;
7151 }
7152 }
7153 *parentMatch9 = match;
7154 if (!match.hit)
7155 {
7156 soulng::parser::Match match(false);
7157 soulng::parser::Match* parentMatch76 = &match;
7158 lexer.SetPos(save);
7159 {
7160 soulng::parser::Match match(false);
7161 if (*lexer == BITXOR)
7162 {
7163 ++lexer;
7164 match.hit = true;
7165 }
7166 *parentMatch76 = match;
7167 }
7168 *parentMatch9 = match;
7169 }
7170 }
7171 *parentMatch8 = match;
7172 if (!match.hit)
7173 {
7174 soulng::parser::Match match(false);
7175 soulng::parser::Match* parentMatch77 = &match;
7176 lexer.SetPos(save);
7177 {
7178 soulng::parser::Match match(false);
7179 if (*lexer == REM)
7180 {
7181 ++lexer;
7182 match.hit = true;
7183 }
7184 *parentMatch77 = match;
7185 }
7186 *parentMatch8 = match;
7187 }
7188 }
7189 *parentMatch7 = match;
7190 if (!match.hit)
7191 {
7192 soulng::parser::Match match(false);
7193 soulng::parser::Match* parentMatch78 = &match;
7194 lexer.SetPos(save);
7195 {
7196 soulng::parser::Match match(false);
7197 if (*lexer == DIV)
7198 {
7199 ++lexer;
7200 match.hit = true;
7201 }
7202 *parentMatch78 = match;
7203 }
7204 *parentMatch7 = match;
7205 }
7206 }
7207 *parentMatch6 = match;
7208 if (!match.hit)
7209 {
7210 soulng::parser::Match match(false);
7211 soulng::parser::Match* parentMatch79 = &match;
7212 lexer.SetPos(save);
7213 {
7214 soulng::parser::Match match(false);
7215 if (*lexer == STAR)
7216 {
7217 ++lexer;
7218 match.hit = true;
7219 }
7220 *parentMatch79 = match;
7221 }
7222 *parentMatch6 = match;
7223 }
7224 }
7225 *parentMatch5 = match;
7226 if (!match.hit)
7227 {
7228 soulng::parser::Match match(false);
7229 soulng::parser::Match* parentMatch80 = &match;
7230 lexer.SetPos(save);
7231 {
7232 soulng::parser::Match match(false);
7233 if (*lexer == MINUS)
7234 {
7235 ++lexer;
7236 match.hit = true;
7237 }
7238 *parentMatch80 = match;
7239 }
7240 *parentMatch5 = match;
7241 }
7242 }
7243 *parentMatch4 = match;
7244 if (!match.hit)
7245 {
7246 soulng::parser::Match match(false);
7247 soulng::parser::Match* parentMatch81 = &match;
7248 lexer.SetPos(save);
7249 {
7250 soulng::parser::Match match(false);
7251 if (*lexer == PLUS)
7252 {
7253 ++lexer;
7254 match.hit = true;
7255 }
7256 *parentMatch81 = match;
7257 }
7258 *parentMatch4 = match;
7259 }
7260 }
7261 *parentMatch3 = match;
7262 if (!match.hit)
7263 {
7264 soulng::parser::Match match(false);
7265 soulng::parser::Match* parentMatch82 = &match;
7266 lexer.SetPos(save);
7267 {
7268 soulng::parser::Match match(false);
7269 soulng::parser::Match* parentMatch83 = &match;
7270 {
7271 soulng::parser::Match match(false);
7272 soulng::parser::Match* parentMatch84 = &match;
7273 {
7274 soulng::parser::Match match(false);
7275 if (*lexer == NEW)
7276 {
7277 ++lexer;
7278 match.hit = true;
7279 }
7280 *parentMatch84 = match;
7281 }
7282 if (match.hit)
7283 {
7284 soulng::parser::Match match(false);
7285 soulng::parser::Match* parentMatch85 = &match;
7286 {
7287 soulng::parser::Match match(false);
7288 if (*lexer == LBRACKET)
7289 {
7290 ++lexer;
7291 match.hit = true;
7292 }
7293 *parentMatch85 = match;
7294 }
7295 *parentMatch84 = match;
7296 }
7297 *parentMatch83 = match;
7298 }
7299 if (match.hit)
7300 {
7301 soulng::parser::Match match(false);
7302 soulng::parser::Match* parentMatch86 = &match;
7303 {
7304 soulng::parser::Match match(false);
7305 if (*lexer == RBRACKET)
7306 {
7307 ++lexer;
7308 match.hit = true;
7309 }
7310 *parentMatch86 = match;
7311 }
7312 *parentMatch83 = match;
7313 }
7314 *parentMatch82 = match;
7315 }
7316 *parentMatch3 = match;
7317 }
7318 }
7319 *parentMatch2 = match;
7320 if (!match.hit)
7321 {
7322 soulng::parser::Match match(false);
7323 soulng::parser::Match* parentMatch87 = &match;
7324 lexer.SetPos(save);
7325 {
7326 soulng::parser::Match match(false);
7327 soulng::parser::Match* parentMatch88 = &match;
7328 {
7329 soulng::parser::Match match(false);
7330 soulng::parser::Match* parentMatch89 = &match;
7331 {
7332 soulng::parser::Match match(false);
7333 if (*lexer == DELETE)
7334 {
7335 ++lexer;
7336 match.hit = true;
7337 }
7338 *parentMatch89 = match;
7339 }
7340 if (match.hit)
7341 {
7342 soulng::parser::Match match(false);
7343 soulng::parser::Match* parentMatch90 = &match;
7344 {
7345 soulng::parser::Match match(false);
7346 if (*lexer == LBRACKET)
7347 {
7348 ++lexer;
7349 match.hit = true;
7350 }
7351 *parentMatch90 = match;
7352 }
7353 *parentMatch89 = match;
7354 }
7355 *parentMatch88 = match;
7356 }
7357 if (match.hit)
7358 {
7359 soulng::parser::Match match(false);
7360 soulng::parser::Match* parentMatch91 = &match;
7361 {
7362 soulng::parser::Match match(false);
7363 if (*lexer == RBRACKET)
7364 {
7365 ++lexer;
7366 match.hit = true;
7367 }
7368 *parentMatch91 = match;
7369 }
7370 *parentMatch88 = match;
7371 }
7372 *parentMatch87 = match;
7373 }
7374 *parentMatch2 = match;
7375 }
7376 }
7377 *parentMatch1 = match;
7378 if (!match.hit)
7379 {
7380 soulng::parser::Match match(false);
7381 soulng::parser::Match* parentMatch92 = &match;
7382 lexer.SetPos(save);
7383 {
7384 soulng::parser::Match match(false);
7385 if (*lexer == NEW)
7386 {
7387 ++lexer;
7388 match.hit = true;
7389 }
7390 *parentMatch92 = match;
7391 }
7392 *parentMatch1 = match;
7393 }
7394 }
7395 *parentMatch0 = match;
7396 if (!match.hit)
7397 {
7398 soulng::parser::Match match(false);
7399 soulng::parser::Match* parentMatch93 = &match;
7400 lexer.SetPos(save);
7401 {
7402 soulng::parser::Match match(false);
7403 if (*lexer == DELETE)
7404 {
7405 ++lexer;
7406 match.hit = true;
7407 }
7408 *parentMatch93 = match;
7409 }
7410 *parentMatch0 = match;
7411 }
7412 }
7413 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7414
7415
7416
7417
7418
7419 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7420 if (!match.hit)
7421 {
7422 match.value = nullptr;
7423 }
7424 return match;
7425 }