1 #include "LexerExpressionParser.hpp"
2 #include <soulng/util/Unicode.hpp>
3 #include <soulng/util/TextUtils.hpp>
4 #include <sng2html/sng2html/LexerDeclaratorParser.hpp>
5 #include <sng2html/sng2html/LexerDeclarationParser.hpp>
6 #include <sng2html/sng2html/LexerLiteralParser.hpp>
7 #include <sng2html/sng2html/LexerIdentifierParser.hpp>
8 #include <sng2html/sng2html/LexerFileLexer.hpp>
9 #include <sng2html/sng2html/LexerFileTokens.hpp>
10
11
12
13 using namespace soulng::unicode;
14 using namespace soulng::lexer;
15 using namespace LexerFileTokens;
16
17 soulng::parser::Match LexerExpressionParser::CppExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::ConstantExpression(LexerFileLexer& 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 = LexerExpressionParser::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 LexerExpressionParser::AssignmentExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::AssignmentOp(LexerFileLexer& 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 LexerExpressionParser::ConditionalExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::ThrowExpression(LexerFileLexer& 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 = LexerExpressionParser::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 LexerExpressionParser::LogicalOrExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::LogicalAndExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::InclusiveOrExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::ExclusiveOrExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::AndExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::EqualityExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::EqOp(LexerFileLexer& 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 LexerExpressionParser::RelationalExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::RelOp(LexerFileLexer& 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 LexerExpressionParser::ShiftExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::ShiftOp(LexerFileLexer& 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 LexerExpressionParser::AdditiveExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::AddOp(LexerFileLexer& 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 LexerExpressionParser::MultiplicativeExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::MulOp(LexerFileLexer& 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 LexerExpressionParser::PmExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::PmOp(LexerFileLexer& 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 LexerExpressionParser::CastExpression(LexerFileLexer& 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 = LexerDeclaratorParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::UnaryExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerDeclaratorParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::UnaryOperator(LexerFileLexer& 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 LexerExpressionParser::PostfixExpression(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::PostCastExpression(LexerFileLexer& 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 = LexerDeclaratorParser::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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::ExpressionList(LexerFileLexer& 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 = LexerExpressionParser::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 = LexerExpressionParser::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 LexerExpressionParser::PrimaryExpression(LexerFileLexer& 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 = LexerLiteralParser::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 = LexerExpressionParser::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(true);
4739 soulng::parser::Match* parentMatch12 = &match;
4740 {
4741 soulng::lexer::Span span = lexer.GetSpan();
4742 soulng::parser::Match match(false);
4743 if (*lexer == RPAREN)
4744 {
4745 ++lexer;
4746 match.hit = true;
4747 }
4748 if (match.hit)
4749 {
4750 *parentMatch12 = match;
4751 }
4752 else
4753 {
4754 lexer.ThrowExpectationFailure(span, ToUtf32(GetTokenInfo(RPAREN)));
4755 }
4756 }
4757 if (match.hit)
4758 {
4759 {
4760 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4761
4762 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4763 return soulng::parser::Match(true, new soulng::cppcode::ParenExpr(pexpr.release()));
4764 }
4765 }
4766 *parentMatch11 = match;
4767 }
4768 *parentMatch10 = match;
4769 }
4770 *parentMatch7 = match;
4771 }
4772 *parentMatch6 = match;
4773 }
4774 *parentMatch1 = match;
4775 }
4776 }
4777 *parentMatch0 = match;
4778 if (!match.hit)
4779 {
4780 soulng::parser::Match match(false);
4781 soulng::parser::Match* parentMatch13 = &match;
4782 lexer.SetPos(save);
4783 {
4784 soulng::parser::Match match(false);
4785 soulng::parser::Match* parentMatch14 = &match;
4786 {
4787 int64_t pos = lexer.GetPos();
4788 soulng::parser::Match match = LexerExpressionParser::IdExpression(lexer);
4789 idExpr.reset(static_cast<soulng::cppcode::IdExpr*>(match.value));
4790 if (match.hit)
4791 {
4792 {
4793 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4794
4795 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4796 return soulng::parser::Match(true, idExpr.release());
4797 }
4798 }
4799 *parentMatch14 = match;
4800 }
4801 *parentMatch13 = match;
4802 }
4803 *parentMatch0 = match;
4804 }
4805 }
4806 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4807
4808
4809
4810
4811
4812 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4813 if (!match.hit)
4814 {
4815 match.value = nullptr;
4816 }
4817 return match;
4818 }
4819
4820 soulng::parser::Match LexerExpressionParser::IdExpression(LexerFileLexer& lexer)
4821 {
4822 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4823
4824
4825
4826
4827
4828
4829
4830 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4831 Span s = Span();
4832 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>id1;
4833 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>ofId1;
4834 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>ofid2;
4835 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>id2;
4836 soulng::parser::Match match(false);
4837 soulng::parser::Match* parentMatch0 = &match;
4838 {
4839 int64_t save = lexer.GetPos();
4840 soulng::parser::Match match(false);
4841 soulng::parser::Match* parentMatch1 = &match;
4842 {
4843 int64_t save = lexer.GetPos();
4844 soulng::parser::Match match(false);
4845 soulng::parser::Match* parentMatch2 = &match;
4846 {
4847 int64_t pos = lexer.GetPos();
4848 soulng::parser::Match match(false);
4849 soulng::parser::Match* parentMatch3 = &match;
4850 {
4851 soulng::parser::Match match(false);
4852 soulng::parser::Match* parentMatch4 = &match;
4853 {
4854 soulng::parser::Match match(false);
4855 soulng::parser::Match* parentMatch5 = &match;
4856 {
4857 soulng::parser::Match match(false);
4858 soulng::parser::Match* parentMatch6 = &match;
4859 {
4860 int64_t pos = lexer.GetPos();
4861 soulng::lexer::Span span = lexer.GetSpan();
4862 soulng::parser::Match match = LexerIdentifierParser::QualifiedCppId(lexer);
4863 id1.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4864 if (match.hit)
4865 {
4866 s = span;
4867 }
4868 *parentMatch6 = match;
4869 }
4870 *parentMatch5 = match;
4871 }
4872 if (match.hit)
4873 {
4874 soulng::parser::Match match(false);
4875 soulng::parser::Match* parentMatch7 = &match;
4876 {
4877 soulng::parser::Match match(false);
4878 if (*lexer == COLONCOLON)
4879 {
4880 ++lexer;
4881 match.hit = true;
4882 }
4883 *parentMatch7 = match;
4884 }
4885 *parentMatch5 = match;
4886 }
4887 *parentMatch4 = match;
4888 }
4889 if (match.hit)
4890 {
4891 soulng::parser::Match match(false);
4892 soulng::parser::Match* parentMatch8 = &match;
4893 {
4894 soulng::parser::Match match(false);
4895 soulng::parser::Match* parentMatch9 = &match;
4896 {
4897 int64_t pos = lexer.GetPos();
4898 soulng::lexer::Span span = lexer.GetSpan();
4899 soulng::parser::Match match = LexerExpressionParser::OperatorFunctionId(lexer);
4900 ofId1.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
4901 if (match.hit)
4902 {
4903 s.end = span.end;
4904 }
4905 *parentMatch9 = match;
4906 }
4907 *parentMatch8 = match;
4908 }
4909 *parentMatch4 = match;
4910 }
4911 *parentMatch3 = match;
4912 }
4913 if (match.hit)
4914 {
4915 {
4916 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
4917
4918 #endif // SOULNG_PARSER_DEBUG_SUPPORT
4919 return soulng::parser::Match(true, new soulng::cppcode::IdExpr(lexer.GetMatch(s)));
4920 }
4921 }
4922 *parentMatch2 = match;
4923 }
4924 *parentMatch1 = match;
4925 if (!match.hit)
4926 {
4927 soulng::parser::Match match(false);
4928 soulng::parser::Match* parentMatch10 = &match;
4929 lexer.SetPos(save);
4930 {
4931 soulng::parser::Match match(false);
4932 soulng::parser::Match* parentMatch11 = &match;
4933 {
4934 int64_t pos = lexer.GetPos();
4935 soulng::parser::Match match(false);
4936 soulng::parser::Match* parentMatch12 = &match;
4937 {
4938 soulng::parser::Match match(false);
4939 soulng::parser::Match* parentMatch13 = &match;
4940 {
4941 soulng::parser::Match match(false);
4942 soulng::parser::Match* parentMatch14 = &match;
4943 {
4944 soulng::parser::Match match(false);
4945 soulng::parser::Match* parentMatch15 = &match;
4946 {
4947 int64_t pos = lexer.GetPos();
4948 soulng::lexer::Span span = lexer.GetSpan();
4949 soulng::parser::Match match(true);
4950 if (match.hit)
4951 {
4952 s = span;
4953 }
4954 *parentMatch15 = match;
4955 }
4956 *parentMatch14 = match;
4957 }
4958 if (match.hit)
4959 {
4960 soulng::parser::Match match(false);
4961 soulng::parser::Match* parentMatch16 = &match;
4962 {
4963 soulng::parser::Match match(true);
4964 int64_t save = lexer.GetPos();
4965 soulng::parser::Match* parentMatch17 = &match;
4966 {
4967 soulng::parser::Match match(false);
4968 soulng::parser::Match* parentMatch18 = &match;
4969 {
4970 soulng::parser::Match match(false);
4971 if (*lexer == COLONCOLON)
4972 {
4973 ++lexer;
4974 match.hit = true;
4975 }
4976 *parentMatch18 = match;
4977 }
4978 if (match.hit)
4979 {
4980 *parentMatch17 = match;
4981 }
4982 else
4983 {
4984 lexer.SetPos(save);
4985 }
4986 }
4987 *parentMatch16 = match;
4988 }
4989 *parentMatch14 = match;
4990 }
4991 *parentMatch13 = match;
4992 }
4993 if (match.hit)
4994 {
4995 soulng::parser::Match match(false);
4996 soulng::parser::Match* parentMatch19 = &match;
4997 {
4998 soulng::parser::Match match(false);
4999 soulng::parser::Match* parentMatch20 = &match;
5000 {
5001 int64_t pos = lexer.GetPos();
5002 soulng::lexer::Span span = lexer.GetSpan();
5003 soulng::parser::Match match = LexerExpressionParser::OperatorFunctionId(lexer);
5004 ofid2.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5005 if (match.hit)
5006 {
5007 s.end = span.end;
5008 }
5009 *parentMatch20 = match;
5010 }
5011 *parentMatch19 = match;
5012 }
5013 *parentMatch13 = match;
5014 }
5015 *parentMatch12 = match;
5016 }
5017 if (match.hit)
5018 {
5019 {
5020 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5021
5022 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5023 return soulng::parser::Match(true, new soulng::cppcode::IdExpr(lexer.GetMatch(s)));
5024 }
5025 }
5026 *parentMatch11 = match;
5027 }
5028 *parentMatch10 = match;
5029 }
5030 *parentMatch1 = match;
5031 }
5032 }
5033 *parentMatch0 = match;
5034 if (!match.hit)
5035 {
5036 soulng::parser::Match match(false);
5037 soulng::parser::Match* parentMatch21 = &match;
5038 lexer.SetPos(save);
5039 {
5040 soulng::parser::Match match(false);
5041 soulng::parser::Match* parentMatch22 = &match;
5042 {
5043 int64_t pos = lexer.GetPos();
5044 soulng::parser::Match match = LexerIdentifierParser::QualifiedCppId(lexer);
5045 id2.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5046 if (match.hit)
5047 {
5048 {
5049 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5050
5051 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5052 return soulng::parser::Match(true, new soulng::cppcode::IdExpr(id2->value));
5053 }
5054 }
5055 *parentMatch22 = match;
5056 }
5057 *parentMatch21 = match;
5058 }
5059 *parentMatch0 = match;
5060 }
5061 }
5062 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5063
5064
5065
5066
5067
5068 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5069 if (!match.hit)
5070 {
5071 match.value = nullptr;
5072 }
5073 return match;
5074 }
5075
5076 soulng::parser::Match LexerExpressionParser::TypeSpecifierOrTypeName(LexerFileLexer& lexer)
5077 {
5078 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5079
5080
5081
5082
5083
5084
5085
5086 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5087 std::unique_ptr<soulng::cppcode::TypeSpecifier> simpleTypeSpecifier;
5088 std::unique_ptr<soulng::cppcode::TypeName> typeName;
5089 soulng::parser::Match match(false);
5090 soulng::parser::Match* parentMatch0 = &match;
5091 {
5092 int64_t save = lexer.GetPos();
5093 soulng::parser::Match match(false);
5094 soulng::parser::Match* parentMatch1 = &match;
5095 {
5096 int64_t pos = lexer.GetPos();
5097 soulng::parser::Match match = LexerDeclarationParser::SimpleTypeSpecifier(lexer);
5098 simpleTypeSpecifier.reset(static_cast<soulng::cppcode::TypeSpecifier*>(match.value));
5099 if (match.hit)
5100 {
5101 {
5102 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5103
5104 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5105 return soulng::parser::Match(true, simpleTypeSpecifier.release());
5106 }
5107 }
5108 *parentMatch1 = match;
5109 }
5110 *parentMatch0 = match;
5111 if (!match.hit)
5112 {
5113 soulng::parser::Match match(false);
5114 soulng::parser::Match* parentMatch2 = &match;
5115 lexer.SetPos(save);
5116 {
5117 soulng::parser::Match match(false);
5118 soulng::parser::Match* parentMatch3 = &match;
5119 {
5120 int64_t pos = lexer.GetPos();
5121 soulng::parser::Match match = LexerDeclarationParser::TypeName(lexer);
5122 typeName.reset(static_cast<soulng::cppcode::TypeName*>(match.value));
5123 if (match.hit)
5124 {
5125 {
5126 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5127
5128 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5129 return soulng::parser::Match(true, typeName.release());
5130 }
5131 }
5132 *parentMatch3 = match;
5133 }
5134 *parentMatch2 = match;
5135 }
5136 *parentMatch0 = match;
5137 }
5138 }
5139 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5140
5141
5142
5143
5144
5145 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5146 if (!match.hit)
5147 {
5148 match.value = nullptr;
5149 }
5150 return match;
5151 }
5152
5153 soulng::parser::Match LexerExpressionParser::NewExpression(LexerFileLexer& lexer)
5154 {
5155 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5156
5157
5158
5159
5160
5161
5162
5163 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5164 bool global = bool();
5165 std::unique_ptr<soulng::cppcode::NewExpr> newExpr = std::unique_ptr<soulng::cppcode::NewExpr>();
5166 std::unique_ptr<soulng::cppcode::TypeId> newTypeId;
5167 std::unique_ptr<soulng::cppcode::TypeId> ti;
5168 soulng::parser::Match match(false);
5169 soulng::parser::Match* parentMatch0 = &match;
5170 {
5171 int64_t pos = lexer.GetPos();
5172 soulng::parser::Match match(false);
5173 soulng::parser::Match* parentMatch1 = &match;
5174 {
5175 soulng::parser::Match match(false);
5176 soulng::parser::Match* parentMatch2 = &match;
5177 {
5178 soulng::parser::Match match(false);
5179 soulng::parser::Match* parentMatch3 = &match;
5180 {
5181 soulng::parser::Match match(false);
5182 soulng::parser::Match* parentMatch4 = &match;
5183 {
5184 soulng::parser::Match match(false);
5185 soulng::parser::Match* parentMatch5 = &match;
5186 {
5187 soulng::parser::Match match(false);
5188 soulng::parser::Match* parentMatch6 = &match;
5189 {
5190 soulng::parser::Match match(false);
5191 soulng::parser::Match* parentMatch7 = &match;
5192 {
5193 soulng::parser::Match match(false);
5194 soulng::parser::Match* parentMatch8 = &match;
5195 {
5196 soulng::parser::Match match(false);
5197 soulng::parser::Match* parentMatch9 = &match;
5198 {
5199 soulng::parser::Match match(true);
5200 int64_t save = lexer.GetPos();
5201 soulng::parser::Match* parentMatch10 = &match;
5202 {
5203 soulng::parser::Match match(false);
5204 soulng::parser::Match* parentMatch11 = &match;
5205 {
5206 soulng::parser::Match match(false);
5207 soulng::parser::Match* parentMatch12 = &match;
5208 {
5209 int64_t pos = lexer.GetPos();
5210 soulng::parser::Match match(false);
5211 if (*lexer == COLONCOLON)
5212 {
5213 ++lexer;
5214 match.hit = true;
5215 }
5216 if (match.hit)
5217 {
5218 global = true;
5219 }
5220 *parentMatch12 = match;
5221 }
5222 *parentMatch11 = match;
5223 }
5224 if (match.hit)
5225 {
5226 *parentMatch10 = match;
5227 }
5228 else
5229 {
5230 lexer.SetPos(save);
5231 }
5232 }
5233 *parentMatch9 = match;
5234 }
5235 if (match.hit)
5236 {
5237 soulng::parser::Match match(false);
5238 soulng::parser::Match* parentMatch13 = &match;
5239 {
5240 soulng::parser::Match match(false);
5241 soulng::parser::Match* parentMatch14 = &match;
5242 {
5243 int64_t pos = lexer.GetPos();
5244 soulng::parser::Match match(false);
5245 if (*lexer == NEW)
5246 {
5247 ++lexer;
5248 match.hit = true;
5249 }
5250 if (match.hit)
5251 {
5252 newExpr.reset(new soulng::cppcode::NewExpr(global));
5253 }
5254 *parentMatch14 = match;
5255 }
5256 *parentMatch13 = match;
5257 }
5258 *parentMatch9 = match;
5259 }
5260 *parentMatch8 = match;
5261 }
5262 if (match.hit)
5263 {
5264 soulng::parser::Match match(false);
5265 soulng::parser::Match* parentMatch15 = &match;
5266 {
5267 soulng::parser::Match match(false);
5268 soulng::parser::Match* parentMatch16 = &match;
5269 {
5270 int64_t pos = lexer.GetPos();
5271 soulng::parser::Match match(true);
5272 if (match.hit)
5273 {
5274 newExpr->BeginAddPlacement();
5275 }
5276 *parentMatch16 = match;
5277 }
5278 *parentMatch15 = match;
5279 }
5280 *parentMatch8 = match;
5281 }
5282 *parentMatch7 = match;
5283 }
5284 if (match.hit)
5285 {
5286 soulng::parser::Match match(false);
5287 soulng::parser::Match* parentMatch17 = &match;
5288 {
5289 soulng::parser::Match match(true);
5290 int64_t save = lexer.GetPos();
5291 soulng::parser::Match* parentMatch18 = &match;
5292 {
5293 soulng::parser::Match match = LexerExpressionParser::NewPlacement(lexer, newExpr.get());
5294 if (match.hit)
5295 {
5296 *parentMatch18 = match;
5297 }
5298 else
5299 {
5300 lexer.SetPos(save);
5301 }
5302 }
5303 *parentMatch17 = match;
5304 }
5305 *parentMatch7 = match;
5306 }
5307 *parentMatch6 = match;
5308 }
5309 if (match.hit)
5310 {
5311 soulng::parser::Match match(false);
5312 soulng::parser::Match* parentMatch19 = &match;
5313 {
5314 soulng::parser::Match match(false);
5315 soulng::parser::Match* parentMatch20 = &match;
5316 {
5317 int64_t pos = lexer.GetPos();
5318 soulng::parser::Match match(true);
5319 if (match.hit)
5320 {
5321 newExpr->EndAddPlacement();
5322 }
5323 *parentMatch20 = match;
5324 }
5325 *parentMatch19 = match;
5326 }
5327 *parentMatch6 = match;
5328 }
5329 *parentMatch5 = match;
5330 }
5331 if (match.hit)
5332 {
5333 soulng::parser::Match match(false);
5334 soulng::parser::Match* parentMatch21 = &match;
5335 {
5336 soulng::parser::Match match(false);
5337 soulng::parser::Match* parentMatch22 = &match;
5338 {
5339 soulng::parser::Match match(false);
5340 soulng::parser::Match* parentMatch23 = &match;
5341 {
5342 int64_t save = lexer.GetPos();
5343 soulng::parser::Match match(false);
5344 soulng::parser::Match* parentMatch24 = &match;
5345 {
5346 int64_t pos = lexer.GetPos();
5347 soulng::parser::Match match = LexerExpressionParser::NewTypeId(lexer);
5348 newTypeId.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
5349 if (match.hit)
5350 {
5351 newExpr->SetParens(false);
5352 newExpr->SetTypeId(newTypeId.release());
5353 }
5354 *parentMatch24 = match;
5355 }
5356 *parentMatch23 = match;
5357 if (!match.hit)
5358 {
5359 soulng::parser::Match match(false);
5360 soulng::parser::Match* parentMatch25 = &match;
5361 lexer.SetPos(save);
5362 {
5363 soulng::parser::Match match(false);
5364 soulng::parser::Match* parentMatch26 = &match;
5365 {
5366 soulng::parser::Match match(false);
5367 soulng::parser::Match* parentMatch27 = &match;
5368 {
5369 soulng::parser::Match match(false);
5370 if (*lexer == LPAREN)
5371 {
5372 ++lexer;
5373 match.hit = true;
5374 }
5375 *parentMatch27 = match;
5376 }
5377 if (match.hit)
5378 {
5379 soulng::parser::Match match(false);
5380 soulng::parser::Match* parentMatch28 = &match;
5381 {
5382 soulng::parser::Match match = LexerDeclaratorParser::TypeId(lexer);
5383 ti.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
5384 *parentMatch28 = match;
5385 }
5386 *parentMatch27 = match;
5387 }
5388 *parentMatch26 = match;
5389 }
5390 if (match.hit)
5391 {
5392 soulng::parser::Match match(false);
5393 soulng::parser::Match* parentMatch29 = &match;
5394 {
5395 soulng::parser::Match match(false);
5396 soulng::parser::Match* parentMatch30 = &match;
5397 {
5398 int64_t pos = lexer.GetPos();
5399 soulng::parser::Match match(false);
5400 if (*lexer == RPAREN)
5401 {
5402 ++lexer;
5403 match.hit = true;
5404 }
5405 if (match.hit)
5406 {
5407 newExpr->SetParens(true);
5408 newExpr->SetTypeId(ti.release());
5409 }
5410 *parentMatch30 = match;
5411 }
5412 *parentMatch29 = match;
5413 }
5414 *parentMatch26 = match;
5415 }
5416 *parentMatch25 = match;
5417 }
5418 *parentMatch23 = match;
5419 }
5420 }
5421 *parentMatch22 = match;
5422 }
5423 *parentMatch21 = match;
5424 }
5425 *parentMatch5 = match;
5426 }
5427 *parentMatch4 = match;
5428 }
5429 if (match.hit)
5430 {
5431 soulng::parser::Match match(false);
5432 soulng::parser::Match* parentMatch31 = &match;
5433 {
5434 soulng::parser::Match match(false);
5435 soulng::parser::Match* parentMatch32 = &match;
5436 {
5437 int64_t pos = lexer.GetPos();
5438 soulng::parser::Match match(true);
5439 if (match.hit)
5440 {
5441 newExpr->BeginAddInitializer();
5442 }
5443 *parentMatch32 = match;
5444 }
5445 *parentMatch31 = match;
5446 }
5447 *parentMatch4 = match;
5448 }
5449 *parentMatch3 = match;
5450 }
5451 if (match.hit)
5452 {
5453 soulng::parser::Match match(false);
5454 soulng::parser::Match* parentMatch33 = &match;
5455 {
5456 soulng::parser::Match match(true);
5457 int64_t save = lexer.GetPos();
5458 soulng::parser::Match* parentMatch34 = &match;
5459 {
5460 soulng::parser::Match match = LexerExpressionParser::NewInitializer(lexer, newExpr.get());
5461 if (match.hit)
5462 {
5463 *parentMatch34 = match;
5464 }
5465 else
5466 {
5467 lexer.SetPos(save);
5468 }
5469 }
5470 *parentMatch33 = match;
5471 }
5472 *parentMatch3 = match;
5473 }
5474 *parentMatch2 = match;
5475 }
5476 if (match.hit)
5477 {
5478 soulng::parser::Match match(false);
5479 soulng::parser::Match* parentMatch35 = &match;
5480 {
5481 soulng::parser::Match match(false);
5482 soulng::parser::Match* parentMatch36 = &match;
5483 {
5484 int64_t pos = lexer.GetPos();
5485 soulng::parser::Match match(true);
5486 if (match.hit)
5487 {
5488 newExpr->EndAddInitializer();
5489 }
5490 *parentMatch36 = match;
5491 }
5492 *parentMatch35 = match;
5493 }
5494 *parentMatch2 = match;
5495 }
5496 *parentMatch1 = match;
5497 }
5498 if (match.hit)
5499 {
5500 {
5501 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5502
5503 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5504 return soulng::parser::Match(true, newExpr.release());
5505 }
5506 }
5507 *parentMatch0 = match;
5508 }
5509 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5510
5511
5512
5513
5514
5515 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5516 if (!match.hit)
5517 {
5518 match.value = nullptr;
5519 }
5520 return match;
5521 }
5522
5523 soulng::parser::Match LexerExpressionParser::NewPlacement(LexerFileLexer& lexer, soulng::cppcode::CppObject* owner)
5524 {
5525 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5526
5527
5528
5529
5530
5531
5532
5533 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5534 soulng::parser::Match match(false);
5535 soulng::parser::Match* parentMatch0 = &match;
5536 {
5537 soulng::parser::Match match(false);
5538 soulng::parser::Match* parentMatch1 = &match;
5539 {
5540 soulng::parser::Match match(false);
5541 if (*lexer == LPAREN)
5542 {
5543 ++lexer;
5544 match.hit = true;
5545 }
5546 *parentMatch1 = match;
5547 }
5548 if (match.hit)
5549 {
5550 soulng::parser::Match match(false);
5551 soulng::parser::Match* parentMatch2 = &match;
5552 {
5553 soulng::parser::Match match = LexerExpressionParser::ExpressionList(lexer, owner);
5554 *parentMatch2 = match;
5555 }
5556 *parentMatch1 = match;
5557 }
5558 *parentMatch0 = match;
5559 }
5560 if (match.hit)
5561 {
5562 soulng::parser::Match match(false);
5563 soulng::parser::Match* parentMatch3 = &match;
5564 {
5565 soulng::parser::Match match(false);
5566 if (*lexer == RPAREN)
5567 {
5568 ++lexer;
5569 match.hit = true;
5570 }
5571 *parentMatch3 = match;
5572 }
5573 *parentMatch0 = match;
5574 }
5575 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5576
5577
5578
5579
5580
5581 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5582 if (!match.hit)
5583 {
5584 match.value = nullptr;
5585 }
5586 return match;
5587 }
5588
5589 soulng::parser::Match LexerExpressionParser::NewTypeId(LexerFileLexer& lexer)
5590 {
5591 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5592
5593
5594
5595
5596
5597
5598
5599 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5600 std::unique_ptr<soulng::cppcode::TypeId> ti = std::unique_ptr<soulng::cppcode::TypeId>();
5601 std::unique_ptr<soulng::cppcode::TypeName> typeName;
5602 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>newDeclarator;
5603 soulng::parser::Match match(false);
5604 soulng::parser::Match* parentMatch0 = &match;
5605 {
5606 soulng::parser::Match match(false);
5607 soulng::parser::Match* parentMatch1 = &match;
5608 {
5609 int64_t pos = lexer.GetPos();
5610 soulng::parser::Match match(true);
5611 if (match.hit)
5612 {
5613 ti.reset(new soulng::cppcode::TypeId());
5614 }
5615 *parentMatch1 = match;
5616 }
5617 *parentMatch0 = match;
5618 }
5619 if (match.hit)
5620 {
5621 soulng::parser::Match match(false);
5622 soulng::parser::Match* parentMatch2 = &match;
5623 {
5624 soulng::parser::Match match(false);
5625 soulng::parser::Match* parentMatch3 = &match;
5626 {
5627 int64_t pos = lexer.GetPos();
5628 soulng::parser::Match match(false);
5629 soulng::parser::Match* parentMatch4 = &match;
5630 {
5631 soulng::parser::Match match(false);
5632 soulng::parser::Match* parentMatch5 = &match;
5633 {
5634 soulng::parser::Match match(false);
5635 soulng::parser::Match* parentMatch6 = &match;
5636 {
5637 soulng::parser::Match match(false);
5638 soulng::parser::Match* parentMatch7 = &match;
5639 {
5640 int64_t save = lexer.GetPos();
5641 soulng::parser::Match match = LexerDeclaratorParser::TypeSpecifierSeq(lexer, ti.get());
5642 *parentMatch7 = match;
5643 if (!match.hit)
5644 {
5645 soulng::parser::Match match(false);
5646 soulng::parser::Match* parentMatch8 = &match;
5647 lexer.SetPos(save);
5648 {
5649 soulng::parser::Match match(false);
5650 soulng::parser::Match* parentMatch9 = &match;
5651 {
5652 int64_t pos = lexer.GetPos();
5653 soulng::parser::Match match = LexerDeclarationParser::TypeName(lexer);
5654 typeName.reset(static_cast<soulng::cppcode::TypeName*>(match.value));
5655 if (match.hit)
5656 {
5657 ti->Add(typeName.release());
5658 }
5659 *parentMatch9 = match;
5660 }
5661 *parentMatch8 = match;
5662 }
5663 *parentMatch7 = match;
5664 }
5665 }
5666 *parentMatch6 = match;
5667 }
5668 *parentMatch5 = match;
5669 }
5670 if (match.hit)
5671 {
5672 soulng::parser::Match match(false);
5673 soulng::parser::Match* parentMatch10 = &match;
5674 {
5675 soulng::parser::Match match(true);
5676 int64_t save = lexer.GetPos();
5677 soulng::parser::Match* parentMatch11 = &match;
5678 {
5679 soulng::parser::Match match(false);
5680 soulng::parser::Match* parentMatch12 = &match;
5681 {
5682 soulng::parser::Match match(false);
5683 soulng::parser::Match* parentMatch13 = &match;
5684 {
5685 int64_t pos = lexer.GetPos();
5686 soulng::parser::Match match = LexerExpressionParser::NewDeclarator(lexer);
5687 newDeclarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5688 if (match.hit)
5689 {
5690 ti->Declarator() = newDeclarator->value;
5691 }
5692 *parentMatch13 = match;
5693 }
5694 *parentMatch12 = match;
5695 }
5696 if (match.hit)
5697 {
5698 *parentMatch11 = match;
5699 }
5700 else
5701 {
5702 lexer.SetPos(save);
5703 }
5704 }
5705 *parentMatch10 = match;
5706 }
5707 *parentMatch5 = match;
5708 }
5709 *parentMatch4 = match;
5710 }
5711 if (match.hit)
5712 {
5713 {
5714 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5715
5716 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5717 return soulng::parser::Match(true, ti.release());
5718 }
5719 }
5720 *parentMatch3 = match;
5721 }
5722 *parentMatch2 = match;
5723 }
5724 *parentMatch0 = match;
5725 }
5726 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5727
5728
5729
5730
5731
5732 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5733 if (!match.hit)
5734 {
5735 match.value = nullptr;
5736 }
5737 return match;
5738 }
5739
5740 soulng::parser::Match LexerExpressionParser::NewDeclarator(LexerFileLexer& lexer)
5741 {
5742 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5743
5744
5745
5746
5747
5748
5749
5750 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5751 Span s = Span();
5752 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>newDeclarator;
5753 soulng::parser::Match match(false);
5754 soulng::parser::Match* parentMatch0 = &match;
5755 {
5756 soulng::parser::Match match(false);
5757 soulng::parser::Match* parentMatch1 = &match;
5758 {
5759 int64_t pos = lexer.GetPos();
5760 soulng::lexer::Span span = lexer.GetSpan();
5761 soulng::parser::Match match(true);
5762 if (match.hit)
5763 {
5764 s = span;
5765 }
5766 *parentMatch1 = match;
5767 }
5768 *parentMatch0 = match;
5769 }
5770 if (match.hit)
5771 {
5772 soulng::parser::Match match(false);
5773 soulng::parser::Match* parentMatch2 = &match;
5774 {
5775 soulng::parser::Match match(false);
5776 soulng::parser::Match* parentMatch3 = &match;
5777 {
5778 int64_t pos = lexer.GetPos();
5779 soulng::parser::Match match(false);
5780 soulng::parser::Match* parentMatch4 = &match;
5781 {
5782 soulng::parser::Match match(false);
5783 soulng::parser::Match* parentMatch5 = &match;
5784 {
5785 int64_t save = lexer.GetPos();
5786 soulng::parser::Match match(false);
5787 soulng::parser::Match* parentMatch6 = &match;
5788 {
5789 soulng::parser::Match match(false);
5790 soulng::parser::Match* parentMatch7 = &match;
5791 {
5792 int64_t pos = lexer.GetPos();
5793 soulng::lexer::Span span = lexer.GetSpan();
5794 soulng::parser::Match match = LexerDeclaratorParser::PtrOperator(lexer);
5795 if (match.hit)
5796 {
5797 s.end = span.end;
5798 }
5799 *parentMatch7 = match;
5800 }
5801 *parentMatch6 = match;
5802 }
5803 if (match.hit)
5804 {
5805 soulng::parser::Match match(false);
5806 soulng::parser::Match* parentMatch8 = &match;
5807 {
5808 soulng::parser::Match match(true);
5809 int64_t save = lexer.GetPos();
5810 soulng::parser::Match* parentMatch9 = &match;
5811 {
5812 soulng::parser::Match match(false);
5813 soulng::parser::Match* parentMatch10 = &match;
5814 {
5815 soulng::parser::Match match(false);
5816 soulng::parser::Match* parentMatch11 = &match;
5817 {
5818 int64_t pos = lexer.GetPos();
5819 soulng::lexer::Span span = lexer.GetSpan();
5820 soulng::parser::Match match = LexerExpressionParser::NewDeclarator(lexer);
5821 newDeclarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
5822 if (match.hit)
5823 {
5824 s.end = span.end;
5825 }
5826 *parentMatch11 = match;
5827 }
5828 *parentMatch10 = match;
5829 }
5830 if (match.hit)
5831 {
5832 *parentMatch9 = match;
5833 }
5834 else
5835 {
5836 lexer.SetPos(save);
5837 }
5838 }
5839 *parentMatch8 = match;
5840 }
5841 *parentMatch6 = match;
5842 }
5843 *parentMatch5 = match;
5844 if (!match.hit)
5845 {
5846 soulng::parser::Match match(false);
5847 soulng::parser::Match* parentMatch12 = &match;
5848 lexer.SetPos(save);
5849 {
5850 soulng::parser::Match match(false);
5851 soulng::parser::Match* parentMatch13 = &match;
5852 {
5853 int64_t pos = lexer.GetPos();
5854 soulng::lexer::Span span = lexer.GetSpan();
5855 soulng::parser::Match match = LexerExpressionParser::DirectNewDeclarator(lexer);
5856 if (match.hit)
5857 {
5858 s.end = span.end;
5859 }
5860 *parentMatch13 = match;
5861 }
5862 *parentMatch12 = match;
5863 }
5864 *parentMatch5 = match;
5865 }
5866 }
5867 *parentMatch4 = match;
5868 }
5869 if (match.hit)
5870 {
5871 {
5872 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5873
5874 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5875 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(soulng::util::Trim(lexer.GetMatch(s))));
5876 }
5877 }
5878 *parentMatch3 = match;
5879 }
5880 *parentMatch2 = match;
5881 }
5882 *parentMatch0 = match;
5883 }
5884 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5885
5886
5887
5888
5889
5890 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5891 if (!match.hit)
5892 {
5893 match.value = nullptr;
5894 }
5895 return match;
5896 }
5897
5898 soulng::parser::Match LexerExpressionParser::NewInitializer(LexerFileLexer& lexer, soulng::cppcode::CppObject* owner)
5899 {
5900 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5901
5902
5903
5904
5905
5906
5907
5908 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5909 soulng::parser::Match match(false);
5910 soulng::parser::Match* parentMatch0 = &match;
5911 {
5912 soulng::parser::Match match(false);
5913 soulng::parser::Match* parentMatch1 = &match;
5914 {
5915 soulng::parser::Match match(false);
5916 if (*lexer == LPAREN)
5917 {
5918 ++lexer;
5919 match.hit = true;
5920 }
5921 *parentMatch1 = match;
5922 }
5923 if (match.hit)
5924 {
5925 soulng::parser::Match match(false);
5926 soulng::parser::Match* parentMatch2 = &match;
5927 {
5928 soulng::parser::Match match(true);
5929 int64_t save = lexer.GetPos();
5930 soulng::parser::Match* parentMatch3 = &match;
5931 {
5932 soulng::parser::Match match = LexerExpressionParser::ExpressionList(lexer, owner);
5933 if (match.hit)
5934 {
5935 *parentMatch3 = match;
5936 }
5937 else
5938 {
5939 lexer.SetPos(save);
5940 }
5941 }
5942 *parentMatch2 = match;
5943 }
5944 *parentMatch1 = match;
5945 }
5946 *parentMatch0 = match;
5947 }
5948 if (match.hit)
5949 {
5950 soulng::parser::Match match(false);
5951 soulng::parser::Match* parentMatch4 = &match;
5952 {
5953 soulng::parser::Match match(false);
5954 if (*lexer == RPAREN)
5955 {
5956 ++lexer;
5957 match.hit = true;
5958 }
5959 *parentMatch4 = match;
5960 }
5961 *parentMatch0 = match;
5962 }
5963 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5964
5965
5966
5967
5968
5969 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5970 if (!match.hit)
5971 {
5972 match.value = nullptr;
5973 }
5974 return match;
5975 }
5976
5977 soulng::parser::Match LexerExpressionParser::DirectNewDeclarator(LexerFileLexer& lexer)
5978 {
5979 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
5980
5981
5982
5983
5984
5985
5986
5987 #endif // SOULNG_PARSER_DEBUG_SUPPORT
5988 std::unique_ptr<soulng::cppcode::CppObject> expr;
5989 std::unique_ptr<soulng::cppcode::CppObject> constantExpr;
5990 soulng::parser::Match match(false);
5991 soulng::parser::Match* parentMatch0 = &match;
5992 {
5993 soulng::parser::Match match(false);
5994 soulng::parser::Match* parentMatch1 = &match;
5995 {
5996 soulng::parser::Match match(false);
5997 soulng::parser::Match* parentMatch2 = &match;
5998 {
5999 soulng::parser::Match match(false);
6000 if (*lexer == LBRACKET)
6001 {
6002 ++lexer;
6003 match.hit = true;
6004 }
6005 *parentMatch2 = match;
6006 }
6007 if (match.hit)
6008 {
6009 soulng::parser::Match match(false);
6010 soulng::parser::Match* parentMatch3 = &match;
6011 {
6012 soulng::parser::Match match = LexerExpressionParser::CppExpression(lexer);
6013 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
6014 *parentMatch3 = match;
6015 }
6016 *parentMatch2 = match;
6017 }
6018 *parentMatch1 = match;
6019 }
6020 if (match.hit)
6021 {
6022 soulng::parser::Match match(false);
6023 soulng::parser::Match* parentMatch4 = &match;
6024 {
6025 soulng::parser::Match match(false);
6026 if (*lexer == RBRACKET)
6027 {
6028 ++lexer;
6029 match.hit = true;
6030 }
6031 *parentMatch4 = match;
6032 }
6033 *parentMatch1 = match;
6034 }
6035 *parentMatch0 = match;
6036 }
6037 if (match.hit)
6038 {
6039 soulng::parser::Match match(false);
6040 soulng::parser::Match* parentMatch5 = &match;
6041 {
6042 soulng::parser::Match match(true);
6043 soulng::parser::Match* parentMatch6 = &match;
6044 {
6045 while (true)
6046 {
6047 int64_t save = lexer.GetPos();
6048 {
6049 soulng::parser::Match match(false);
6050 soulng::parser::Match* parentMatch7 = &match;
6051 {
6052 soulng::parser::Match match(false);
6053 soulng::parser::Match* parentMatch8 = &match;
6054 {
6055 soulng::parser::Match match(false);
6056 soulng::parser::Match* parentMatch9 = &match;
6057 {
6058 soulng::parser::Match match(false);
6059 if (*lexer == LBRACKET)
6060 {
6061 ++lexer;
6062 match.hit = true;
6063 }
6064 *parentMatch9 = match;
6065 }
6066 if (match.hit)
6067 {
6068 soulng::parser::Match match(false);
6069 soulng::parser::Match* parentMatch10 = &match;
6070 {
6071 soulng::parser::Match match = LexerExpressionParser::ConstantExpression(lexer);
6072 constantExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
6073 *parentMatch10 = match;
6074 }
6075 *parentMatch9 = match;
6076 }
6077 *parentMatch8 = match;
6078 }
6079 if (match.hit)
6080 {
6081 soulng::parser::Match match(false);
6082 soulng::parser::Match* parentMatch11 = &match;
6083 {
6084 soulng::parser::Match match(false);
6085 if (*lexer == RBRACKET)
6086 {
6087 ++lexer;
6088 match.hit = true;
6089 }
6090 *parentMatch11 = match;
6091 }
6092 *parentMatch8 = match;
6093 }
6094 *parentMatch7 = match;
6095 }
6096 if (match.hit)
6097 {
6098 *parentMatch6 = match;
6099 }
6100 else
6101 {
6102 lexer.SetPos(save);
6103 break;
6104 }
6105 }
6106 }
6107 }
6108 *parentMatch5 = match;
6109 }
6110 *parentMatch0 = match;
6111 }
6112 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6113
6114
6115
6116
6117
6118 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6119 if (!match.hit)
6120 {
6121 match.value = nullptr;
6122 }
6123 return match;
6124 }
6125
6126 soulng::parser::Match LexerExpressionParser::DeleteExpression(LexerFileLexer& lexer)
6127 {
6128 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6129
6130
6131
6132
6133
6134
6135
6136 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6137 bool global = bool();
6138 bool array = bool();
6139 std::unique_ptr<soulng::cppcode::CppObject> ptr;
6140 soulng::parser::Match match(false);
6141 soulng::parser::Match* parentMatch0 = &match;
6142 {
6143 int64_t pos = lexer.GetPos();
6144 soulng::parser::Match match(false);
6145 soulng::parser::Match* parentMatch1 = &match;
6146 {
6147 soulng::parser::Match match(false);
6148 soulng::parser::Match* parentMatch2 = &match;
6149 {
6150 soulng::parser::Match match(false);
6151 soulng::parser::Match* parentMatch3 = &match;
6152 {
6153 soulng::parser::Match match(false);
6154 soulng::parser::Match* parentMatch4 = &match;
6155 {
6156 soulng::parser::Match match(true);
6157 int64_t save = lexer.GetPos();
6158 soulng::parser::Match* parentMatch5 = &match;
6159 {
6160 soulng::parser::Match match(false);
6161 soulng::parser::Match* parentMatch6 = &match;
6162 {
6163 soulng::parser::Match match(false);
6164 soulng::parser::Match* parentMatch7 = &match;
6165 {
6166 int64_t pos = lexer.GetPos();
6167 soulng::parser::Match match(false);
6168 if (*lexer == COLONCOLON)
6169 {
6170 ++lexer;
6171 match.hit = true;
6172 }
6173 if (match.hit)
6174 {
6175 global = true;
6176 }
6177 *parentMatch7 = match;
6178 }
6179 *parentMatch6 = match;
6180 }
6181 if (match.hit)
6182 {
6183 *parentMatch5 = match;
6184 }
6185 else
6186 {
6187 lexer.SetPos(save);
6188 }
6189 }
6190 *parentMatch4 = match;
6191 }
6192 if (match.hit)
6193 {
6194 soulng::parser::Match match(false);
6195 soulng::parser::Match* parentMatch8 = &match;
6196 {
6197 soulng::parser::Match match(false);
6198 if (*lexer == DELETE)
6199 {
6200 ++lexer;
6201 match.hit = true;
6202 }
6203 *parentMatch8 = match;
6204 }
6205 *parentMatch4 = match;
6206 }
6207 *parentMatch3 = match;
6208 }
6209 if (match.hit)
6210 {
6211 soulng::parser::Match match(false);
6212 soulng::parser::Match* parentMatch9 = &match;
6213 {
6214 soulng::parser::Match match(true);
6215 int64_t save = lexer.GetPos();
6216 soulng::parser::Match* parentMatch10 = &match;
6217 {
6218 soulng::parser::Match match(false);
6219 soulng::parser::Match* parentMatch11 = &match;
6220 {
6221 soulng::parser::Match match(false);
6222 soulng::parser::Match* parentMatch12 = &match;
6223 {
6224 soulng::parser::Match match(false);
6225 if (*lexer == LBRACKET)
6226 {
6227 ++lexer;
6228 match.hit = true;
6229 }
6230 *parentMatch12 = match;
6231 }
6232 if (match.hit)
6233 {
6234 soulng::parser::Match match(false);
6235 soulng::parser::Match* parentMatch13 = &match;
6236 {
6237 soulng::parser::Match match(false);
6238 soulng::parser::Match* parentMatch14 = &match;
6239 {
6240 int64_t pos = lexer.GetPos();
6241 soulng::parser::Match match(false);
6242 if (*lexer == RBRACKET)
6243 {
6244 ++lexer;
6245 match.hit = true;
6246 }
6247 if (match.hit)
6248 {
6249 array = true;
6250 }
6251 *parentMatch14 = match;
6252 }
6253 *parentMatch13 = match;
6254 }
6255 *parentMatch12 = match;
6256 }
6257 *parentMatch11 = match;
6258 }
6259 if (match.hit)
6260 {
6261 *parentMatch10 = match;
6262 }
6263 else
6264 {
6265 lexer.SetPos(save);
6266 }
6267 }
6268 *parentMatch9 = match;
6269 }
6270 *parentMatch3 = match;
6271 }
6272 *parentMatch2 = match;
6273 }
6274 if (match.hit)
6275 {
6276 soulng::parser::Match match(false);
6277 soulng::parser::Match* parentMatch15 = &match;
6278 {
6279 soulng::parser::Match match = LexerExpressionParser::CastExpression(lexer);
6280 ptr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
6281 *parentMatch15 = match;
6282 }
6283 *parentMatch2 = match;
6284 }
6285 *parentMatch1 = match;
6286 }
6287 if (match.hit)
6288 {
6289 {
6290 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6291
6292 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6293 return soulng::parser::Match(true, new soulng::cppcode::DeleteExpr(global, array, ptr.release()));
6294 }
6295 }
6296 *parentMatch0 = match;
6297 }
6298 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6299
6300
6301
6302
6303
6304 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6305 if (!match.hit)
6306 {
6307 match.value = nullptr;
6308 }
6309 return match;
6310 }
6311
6312 soulng::parser::Match LexerExpressionParser::OperatorFunctionId(LexerFileLexer& lexer)
6313 {
6314 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6315
6316
6317
6318
6319
6320
6321
6322 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6323 Span s = Span();
6324 soulng::parser::Match match(false);
6325 soulng::parser::Match* parentMatch0 = &match;
6326 {
6327 soulng::parser::Match match(false);
6328 soulng::parser::Match* parentMatch1 = &match;
6329 {
6330 int64_t pos = lexer.GetPos();
6331 soulng::lexer::Span span = lexer.GetSpan();
6332 soulng::parser::Match match(false);
6333 if (*lexer == OPERATOR)
6334 {
6335 ++lexer;
6336 match.hit = true;
6337 }
6338 if (match.hit)
6339 {
6340 s = span;
6341 }
6342 *parentMatch1 = match;
6343 }
6344 *parentMatch0 = match;
6345 }
6346 if (match.hit)
6347 {
6348 soulng::parser::Match match(false);
6349 soulng::parser::Match* parentMatch2 = &match;
6350 {
6351 soulng::parser::Match match(false);
6352 soulng::parser::Match* parentMatch3 = &match;
6353 {
6354 int64_t pos = lexer.GetPos();
6355 soulng::lexer::Span span = lexer.GetSpan();
6356 soulng::parser::Match match = LexerExpressionParser::Operator(lexer);
6357 if (match.hit)
6358 {
6359 s.end = span.end;
6360 {
6361 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6362
6363 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6364 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(lexer.GetMatch(s)));
6365 }
6366 }
6367 *parentMatch3 = match;
6368 }
6369 *parentMatch2 = match;
6370 }
6371 *parentMatch0 = match;
6372 }
6373 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6374
6375
6376
6377
6378
6379 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6380 if (!match.hit)
6381 {
6382 match.value = nullptr;
6383 }
6384 return match;
6385 }
6386
6387 soulng::parser::Match LexerExpressionParser::Operator(LexerFileLexer& lexer)
6388 {
6389 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
6390
6391
6392
6393
6394
6395
6396
6397 #endif // SOULNG_PARSER_DEBUG_SUPPORT
6398 soulng::parser::Match match(false);
6399 soulng::parser::Match* parentMatch0 = &match;
6400 {
6401 int64_t save = lexer.GetPos();
6402 soulng::parser::Match match(false);
6403 soulng::parser::Match* parentMatch1 = &match;
6404 {
6405 int64_t save = lexer.GetPos();
6406 soulng::parser::Match match(false);
6407 soulng::parser::Match* parentMatch2 = &match;
6408 {
6409 int64_t save = lexer.GetPos();
6410 soulng::parser::Match match(false);
6411 soulng::parser::Match* parentMatch3 = &match;
6412 {
6413 int64_t save = lexer.GetPos();
6414 soulng::parser::Match match(false);
6415 soulng::parser::Match* parentMatch4 = &match;
6416 {
6417 int64_t save = lexer.GetPos();
6418 soulng::parser::Match match(false);
6419 soulng::parser::Match* parentMatch5 = &match;
6420 {
6421 int64_t save = lexer.GetPos();
6422 soulng::parser::Match match(false);
6423 soulng::parser::Match* parentMatch6 = &match;
6424 {
6425 int64_t save = lexer.GetPos();
6426 soulng::parser::Match match(false);
6427 soulng::parser::Match* parentMatch7 = &match;
6428 {
6429 int64_t save = lexer.GetPos();
6430 soulng::parser::Match match(false);
6431 soulng::parser::Match* parentMatch8 = &match;
6432 {
6433 int64_t save = lexer.GetPos();
6434 soulng::parser::Match match(false);
6435 soulng::parser::Match* parentMatch9 = &match;
6436 {
6437 int64_t save = lexer.GetPos();
6438 soulng::parser::Match match(false);
6439 soulng::parser::Match* parentMatch10 = &match;
6440 {
6441 int64_t save = lexer.GetPos();
6442 soulng::parser::Match match(false);
6443 soulng::parser::Match* parentMatch11 = &match;
6444 {
6445 int64_t save = lexer.GetPos();
6446 soulng::parser::Match match(false);
6447 soulng::parser::Match* parentMatch12 = &match;
6448 {
6449 int64_t save = lexer.GetPos();
6450 soulng::parser::Match match(false);
6451 soulng::parser::Match* parentMatch13 = &match;
6452 {
6453 int64_t save = lexer.GetPos();
6454 soulng::parser::Match match(false);
6455 soulng::parser::Match* parentMatch14 = &match;
6456 {
6457 int64_t save = lexer.GetPos();
6458 soulng::parser::Match match(false);
6459 soulng::parser::Match* parentMatch15 = &match;
6460 {
6461 int64_t save = lexer.GetPos();
6462 soulng::parser::Match match(false);
6463 soulng::parser::Match* parentMatch16 = &match;
6464 {
6465 int64_t save = lexer.GetPos();
6466 soulng::parser::Match match(false);
6467 soulng::parser::Match* parentMatch17 = &match;
6468 {
6469 int64_t save = lexer.GetPos();
6470 soulng::parser::Match match(false);
6471 soulng::parser::Match* parentMatch18 = &match;
6472 {
6473 int64_t save = lexer.GetPos();
6474 soulng::parser::Match match(false);
6475 soulng::parser::Match* parentMatch19 = &match;
6476 {
6477 int64_t save = lexer.GetPos();
6478 soulng::parser::Match match(false);
6479 soulng::parser::Match* parentMatch20 = &match;
6480 {
6481 int64_t save = lexer.GetPos();
6482 soulng::parser::Match match(false);
6483 soulng::parser::Match* parentMatch21 = &match;
6484 {
6485 int64_t save = lexer.GetPos();
6486 soulng::parser::Match match(false);
6487 soulng::parser::Match* parentMatch22 = &match;
6488 {
6489 int64_t save = lexer.GetPos();
6490 soulng::parser::Match match(false);
6491 soulng::parser::Match* parentMatch23 = &match;
6492 {
6493 int64_t save = lexer.GetPos();
6494 soulng::parser::Match match(false);
6495 soulng::parser::Match* parentMatch24 = &match;
6496 {
6497 int64_t save = lexer.GetPos();
6498 soulng::parser::Match match(false);
6499 soulng::parser::Match* parentMatch25 = &match;
6500 {
6501 int64_t save = lexer.GetPos();
6502 soulng::parser::Match match(false);
6503 soulng::parser::Match* parentMatch26 = &match;
6504 {
6505 int64_t save = lexer.GetPos();
6506 soulng::parser::Match match(false);
6507 soulng::parser::Match* parentMatch27 = &match;
6508 {
6509 int64_t save = lexer.GetPos();
6510 soulng::parser::Match match(false);
6511 soulng::parser::Match* parentMatch28 = &match;
6512 {
6513 int64_t save = lexer.GetPos();
6514 soulng::parser::Match match(false);
6515 soulng::parser::Match* parentMatch29 = &match;
6516 {
6517 int64_t save = lexer.GetPos();
6518 soulng::parser::Match match(false);
6519 soulng::parser::Match* parentMatch30 = &match;
6520 {
6521 int64_t save = lexer.GetPos();
6522 soulng::parser::Match match(false);
6523 soulng::parser::Match* parentMatch31 = &match;
6524 {
6525 int64_t save = lexer.GetPos();
6526 soulng::parser::Match match(false);
6527 soulng::parser::Match* parentMatch32 = &match;
6528 {
6529 int64_t save = lexer.GetPos();
6530 soulng::parser::Match match(false);
6531 soulng::parser::Match* parentMatch33 = &match;
6532 {
6533 int64_t save = lexer.GetPos();
6534 soulng::parser::Match match(false);
6535 soulng::parser::Match* parentMatch34 = &match;
6536 {
6537 int64_t save = lexer.GetPos();
6538 soulng::parser::Match match(false);
6539 soulng::parser::Match* parentMatch35 = &match;
6540 {
6541 int64_t save = lexer.GetPos();
6542 soulng::parser::Match match(false);
6543 soulng::parser::Match* parentMatch36 = &match;
6544 {
6545 int64_t save = lexer.GetPos();
6546 soulng::parser::Match match(false);
6547 soulng::parser::Match* parentMatch37 = &match;
6548 {
6549 int64_t save = lexer.GetPos();
6550 soulng::parser::Match match(false);
6551 soulng::parser::Match* parentMatch38 = &match;
6552 {
6553 int64_t save = lexer.GetPos();
6554 soulng::parser::Match match(false);
6555 soulng::parser::Match* parentMatch39 = &match;
6556 {
6557 int64_t save = lexer.GetPos();
6558 soulng::parser::Match match(false);
6559 soulng::parser::Match* parentMatch40 = &match;
6560 {
6561 int64_t save = lexer.GetPos();
6562 soulng::parser::Match match(false);
6563 soulng::parser::Match* parentMatch41 = &match;
6564 {
6565 soulng::parser::Match match(false);
6566 if (*lexer == LBRACKET)
6567 {
6568 ++lexer;
6569 match.hit = true;
6570 }
6571 *parentMatch41 = match;
6572 }
6573 if (match.hit)
6574 {
6575 soulng::parser::Match match(false);
6576 soulng::parser::Match* parentMatch42 = &match;
6577 {
6578 soulng::parser::Match match(false);
6579 if (*lexer == RBRACKET)
6580 {
6581 ++lexer;
6582 match.hit = true;
6583 }
6584 *parentMatch42 = match;
6585 }
6586 *parentMatch41 = match;
6587 }
6588 *parentMatch40 = match;
6589 if (!match.hit)
6590 {
6591 soulng::parser::Match match(false);
6592 soulng::parser::Match* parentMatch43 = &match;
6593 lexer.SetPos(save);
6594 {
6595 soulng::parser::Match match(false);
6596 soulng::parser::Match* parentMatch44 = &match;
6597 {
6598 soulng::parser::Match match(false);
6599 if (*lexer == LPAREN)
6600 {
6601 ++lexer;
6602 match.hit = true;
6603 }
6604 *parentMatch44 = match;
6605 }
6606 if (match.hit)
6607 {
6608 soulng::parser::Match match(false);
6609 soulng::parser::Match* parentMatch45 = &match;
6610 {
6611 soulng::parser::Match match(false);
6612 if (*lexer == RPAREN)
6613 {
6614 ++lexer;
6615 match.hit = true;
6616 }
6617 *parentMatch45 = match;
6618 }
6619 *parentMatch44 = match;
6620 }
6621 *parentMatch43 = match;
6622 }
6623 *parentMatch40 = match;
6624 }
6625 }
6626 *parentMatch39 = match;
6627 if (!match.hit)
6628 {
6629 soulng::parser::Match match(false);
6630 soulng::parser::Match* parentMatch46 = &match;
6631 lexer.SetPos(save);
6632 {
6633 soulng::parser::Match match(false);
6634 if (*lexer == ARROWSTAR)
6635 {
6636 ++lexer;
6637 match.hit = true;
6638 }
6639 *parentMatch46 = match;
6640 }
6641 *parentMatch39 = match;
6642 }
6643 }
6644 *parentMatch38 = match;
6645 if (!match.hit)
6646 {
6647 soulng::parser::Match match(false);
6648 soulng::parser::Match* parentMatch47 = &match;
6649 lexer.SetPos(save);
6650 {
6651 soulng::parser::Match match(false);
6652 if (*lexer == ARROW)
6653 {
6654 ++lexer;
6655 match.hit = true;
6656 }
6657 *parentMatch47 = match;
6658 }
6659 *parentMatch38 = match;
6660 }
6661 }
6662 *parentMatch37 = match;
6663 if (!match.hit)
6664 {
6665 soulng::parser::Match match(false);
6666 soulng::parser::Match* parentMatch48 = &match;
6667 lexer.SetPos(save);
6668 {
6669 soulng::parser::Match match(false);
6670 if (*lexer == COMMA)
6671 {
6672 ++lexer;
6673 match.hit = true;
6674 }
6675 *parentMatch48 = match;
6676 }
6677 *parentMatch37 = match;
6678 }
6679 }
6680 *parentMatch36 = match;
6681 if (!match.hit)
6682 {
6683 soulng::parser::Match match(false);
6684 soulng::parser::Match* parentMatch49 = &match;
6685 lexer.SetPos(save);
6686 {
6687 soulng::parser::Match match(false);
6688 if (*lexer == MINUSMINUS)
6689 {
6690 ++lexer;
6691 match.hit = true;
6692 }
6693 *parentMatch49 = match;
6694 }
6695 *parentMatch36 = match;
6696 }
6697 }
6698 *parentMatch35 = match;
6699 if (!match.hit)
6700 {
6701 soulng::parser::Match match(false);
6702 soulng::parser::Match* parentMatch50 = &match;
6703 lexer.SetPos(save);
6704 {
6705 soulng::parser::Match match(false);
6706 if (*lexer == PLUSPLUS)
6707 {
6708 ++lexer;
6709 match.hit = true;
6710 }
6711 *parentMatch50 = match;
6712 }
6713 *parentMatch35 = match;
6714 }
6715 }
6716 *parentMatch34 = match;
6717 if (!match.hit)
6718 {
6719 soulng::parser::Match match(false);
6720 soulng::parser::Match* parentMatch51 = &match;
6721 lexer.SetPos(save);
6722 {
6723 soulng::parser::Match match(false);
6724 if (*lexer == DISJUNCTION)
6725 {
6726 ++lexer;
6727 match.hit = true;
6728 }
6729 *parentMatch51 = match;
6730 }
6731 *parentMatch34 = match;
6732 }
6733 }
6734 *parentMatch33 = match;
6735 if (!match.hit)
6736 {
6737 soulng::parser::Match match(false);
6738 soulng::parser::Match* parentMatch52 = &match;
6739 lexer.SetPos(save);
6740 {
6741 soulng::parser::Match match(false);
6742 if (*lexer == AMPAMP)
6743 {
6744 ++lexer;
6745 match.hit = true;
6746 }
6747 *parentMatch52 = match;
6748 }
6749 *parentMatch33 = match;
6750 }
6751 }
6752 *parentMatch32 = match;
6753 if (!match.hit)
6754 {
6755 soulng::parser::Match match(false);
6756 soulng::parser::Match* parentMatch53 = &match;
6757 lexer.SetPos(save);
6758 {
6759 soulng::parser::Match match(false);
6760 if (*lexer == LEQ)
6761 {
6762 ++lexer;
6763 match.hit = true;
6764 }
6765 *parentMatch53 = match;
6766 }
6767 *parentMatch32 = match;
6768 }
6769 }
6770 *parentMatch31 = match;
6771 if (!match.hit)
6772 {
6773 soulng::parser::Match match(false);
6774 soulng::parser::Match* parentMatch54 = &match;
6775 lexer.SetPos(save);
6776 {
6777 soulng::parser::Match match(false);
6778 if (*lexer == GEQ)
6779 {
6780 ++lexer;
6781 match.hit = true;
6782 }
6783 *parentMatch54 = match;
6784 }
6785 *parentMatch31 = match;
6786 }
6787 }
6788 *parentMatch30 = match;
6789 if (!match.hit)
6790 {
6791 soulng::parser::Match match(false);
6792 soulng::parser::Match* parentMatch55 = &match;
6793 lexer.SetPos(save);
6794 {
6795 soulng::parser::Match match(false);
6796 if (*lexer == NEQ)
6797 {
6798 ++lexer;
6799 match.hit = true;
6800 }
6801 *parentMatch55 = match;
6802 }
6803 *parentMatch30 = match;
6804 }
6805 }
6806 *parentMatch29 = match;
6807 if (!match.hit)
6808 {
6809 soulng::parser::Match match(false);
6810 soulng::parser::Match* parentMatch56 = &match;
6811 lexer.SetPos(save);
6812 {
6813 soulng::parser::Match match(false);
6814 if (*lexer == EQ)
6815 {
6816 ++lexer;
6817 match.hit = true;
6818 }
6819 *parentMatch56 = match;
6820 }
6821 *parentMatch29 = match;
6822 }
6823 }
6824 *parentMatch28 = match;
6825 if (!match.hit)
6826 {
6827 soulng::parser::Match match(false);
6828 soulng::parser::Match* parentMatch57 = &match;
6829 lexer.SetPos(save);
6830 {
6831 soulng::parser::Match match(false);
6832 if (*lexer == SHIFTLEFTASSIGN)
6833 {
6834 ++lexer;
6835 match.hit = true;
6836 }
6837 *parentMatch57 = match;
6838 }
6839 *parentMatch28 = match;
6840 }
6841 }
6842 *parentMatch27 = match;
6843 if (!match.hit)
6844 {
6845 soulng::parser::Match match(false);
6846 soulng::parser::Match* parentMatch58 = &match;
6847 lexer.SetPos(save);
6848 {
6849 soulng::parser::Match match(false);
6850 if (*lexer == SHIFTRIGHTASSIGN)
6851 {
6852 ++lexer;
6853 match.hit = true;
6854 }
6855 *parentMatch58 = match;
6856 }
6857 *parentMatch27 = match;
6858 }
6859 }
6860 *parentMatch26 = match;
6861 if (!match.hit)
6862 {
6863 soulng::parser::Match match(false);
6864 soulng::parser::Match* parentMatch59 = &match;
6865 lexer.SetPos(save);
6866 {
6867 soulng::parser::Match match(false);
6868 if (*lexer == SHIFTLEFT)
6869 {
6870 ++lexer;
6871 match.hit = true;
6872 }
6873 *parentMatch59 = match;
6874 }
6875 *parentMatch26 = match;
6876 }
6877 }
6878 *parentMatch25 = match;
6879 if (!match.hit)
6880 {
6881 soulng::parser::Match match(false);
6882 soulng::parser::Match* parentMatch60 = &match;
6883 lexer.SetPos(save);
6884 {
6885 soulng::parser::Match match(false);
6886 if (*lexer == SHIFTRIGHT)
6887 {
6888 ++lexer;
6889 match.hit = true;
6890 }
6891 *parentMatch60 = match;
6892 }
6893 *parentMatch25 = match;
6894 }
6895 }
6896 *parentMatch24 = match;
6897 if (!match.hit)
6898 {
6899 soulng::parser::Match match(false);
6900 soulng::parser::Match* parentMatch61 = &match;
6901 lexer.SetPos(save);
6902 {
6903 soulng::parser::Match match(false);
6904 if (*lexer == ORASSIGN)
6905 {
6906 ++lexer;
6907 match.hit = true;
6908 }
6909 *parentMatch61 = match;
6910 }
6911 *parentMatch24 = match;
6912 }
6913 }
6914 *parentMatch23 = match;
6915 if (!match.hit)
6916 {
6917 soulng::parser::Match match(false);
6918 soulng::parser::Match* parentMatch62 = &match;
6919 lexer.SetPos(save);
6920 {
6921 soulng::parser::Match match(false);
6922 if (*lexer == ANDASSIGN)
6923 {
6924 ++lexer;
6925 match.hit = true;
6926 }
6927 *parentMatch62 = match;
6928 }
6929 *parentMatch23 = match;
6930 }
6931 }
6932 *parentMatch22 = match;
6933 if (!match.hit)
6934 {
6935 soulng::parser::Match match(false);
6936 soulng::parser::Match* parentMatch63 = &match;
6937 lexer.SetPos(save);
6938 {
6939 soulng::parser::Match match(false);
6940 if (*lexer == XORASSIGN)
6941 {
6942 ++lexer;
6943 match.hit = true;
6944 }
6945 *parentMatch63 = match;
6946 }
6947 *parentMatch22 = match;
6948 }
6949 }
6950 *parentMatch21 = match;
6951 if (!match.hit)
6952 {
6953 soulng::parser::Match match(false);
6954 soulng::parser::Match* parentMatch64 = &match;
6955 lexer.SetPos(save);
6956 {
6957 soulng::parser::Match match(false);
6958 if (*lexer == REMASSIGN)
6959 {
6960 ++lexer;
6961 match.hit = true;
6962 }
6963 *parentMatch64 = match;
6964 }
6965 *parentMatch21 = match;
6966 }
6967 }
6968 *parentMatch20 = match;
6969 if (!match.hit)
6970 {
6971 soulng::parser::Match match(false);
6972 soulng::parser::Match* parentMatch65 = &match;
6973 lexer.SetPos(save);
6974 {
6975 soulng::parser::Match match(false);
6976 if (*lexer == DIVASSIGN)
6977 {
6978 ++lexer;
6979 match.hit = true;
6980 }
6981 *parentMatch65 = match;
6982 }
6983 *parentMatch20 = match;
6984 }
6985 }
6986 *parentMatch19 = match;
6987 if (!match.hit)
6988 {
6989 soulng::parser::Match match(false);
6990 soulng::parser::Match* parentMatch66 = &match;
6991 lexer.SetPos(save);
6992 {
6993 soulng::parser::Match match(false);
6994 if (*lexer == MULASSIGN)
6995 {
6996 ++lexer;
6997 match.hit = true;
6998 }
6999 *parentMatch66 = match;
7000 }
7001 *parentMatch19 = match;
7002 }
7003 }
7004 *parentMatch18 = match;
7005 if (!match.hit)
7006 {
7007 soulng::parser::Match match(false);
7008 soulng::parser::Match* parentMatch67 = &match;
7009 lexer.SetPos(save);
7010 {
7011 soulng::parser::Match match(false);
7012 if (*lexer == MINUSASSIGN)
7013 {
7014 ++lexer;
7015 match.hit = true;
7016 }
7017 *parentMatch67 = match;
7018 }
7019 *parentMatch18 = match;
7020 }
7021 }
7022 *parentMatch17 = match;
7023 if (!match.hit)
7024 {
7025 soulng::parser::Match match(false);
7026 soulng::parser::Match* parentMatch68 = &match;
7027 lexer.SetPos(save);
7028 {
7029 soulng::parser::Match match(false);
7030 if (*lexer == PLUSASSIGN)
7031 {
7032 ++lexer;
7033 match.hit = true;
7034 }
7035 *parentMatch68 = match;
7036 }
7037 *parentMatch17 = match;
7038 }
7039 }
7040 *parentMatch16 = match;
7041 if (!match.hit)
7042 {
7043 soulng::parser::Match match(false);
7044 soulng::parser::Match* parentMatch69 = &match;
7045 lexer.SetPos(save);
7046 {
7047 soulng::parser::Match match(false);
7048 if (*lexer == LANGLE)
7049 {
7050 ++lexer;
7051 match.hit = true;
7052 }
7053 *parentMatch69 = match;
7054 }
7055 *parentMatch16 = match;
7056 }
7057 }
7058 *parentMatch15 = match;
7059 if (!match.hit)
7060 {
7061 soulng::parser::Match match(false);
7062 soulng::parser::Match* parentMatch70 = &match;
7063 lexer.SetPos(save);
7064 {
7065 soulng::parser::Match match(false);
7066 if (*lexer == RANGLE)
7067 {
7068 ++lexer;
7069 match.hit = true;
7070 }
7071 *parentMatch70 = match;
7072 }
7073 *parentMatch15 = match;
7074 }
7075 }
7076 *parentMatch14 = match;
7077 if (!match.hit)
7078 {
7079 soulng::parser::Match match(false);
7080 soulng::parser::Match* parentMatch71 = &match;
7081 lexer.SetPos(save);
7082 {
7083 soulng::parser::Match match(false);
7084 if (*lexer == ASSIGN)
7085 {
7086 ++lexer;
7087 match.hit = true;
7088 }
7089 *parentMatch71 = match;
7090 }
7091 *parentMatch14 = match;
7092 }
7093 }
7094 *parentMatch13 = match;
7095 if (!match.hit)
7096 {
7097 soulng::parser::Match match(false);
7098 soulng::parser::Match* parentMatch72 = &match;
7099 lexer.SetPos(save);
7100 {
7101 soulng::parser::Match match(false);
7102 if (*lexer == EXCLAMATION)
7103 {
7104 ++lexer;
7105 match.hit = true;
7106 }
7107 *parentMatch72 = match;
7108 }
7109 *parentMatch13 = match;
7110 }
7111 }
7112 *parentMatch12 = match;
7113 if (!match.hit)
7114 {
7115 soulng::parser::Match match(false);
7116 soulng::parser::Match* parentMatch73 = &match;
7117 lexer.SetPos(save);
7118 {
7119 soulng::parser::Match match(false);
7120 if (*lexer == CPL)
7121 {
7122 ++lexer;
7123 match.hit = true;
7124 }
7125 *parentMatch73 = match;
7126 }
7127 *parentMatch12 = match;
7128 }
7129 }
7130 *parentMatch11 = match;
7131 if (!match.hit)
7132 {
7133 soulng::parser::Match match(false);
7134 soulng::parser::Match* parentMatch74 = &match;
7135 lexer.SetPos(save);
7136 {
7137 soulng::parser::Match match(false);
7138 if (*lexer == BITOR)
7139 {
7140 ++lexer;
7141 match.hit = true;
7142 }
7143 *parentMatch74 = match;
7144 }
7145 *parentMatch11 = match;
7146 }
7147 }
7148 *parentMatch10 = match;
7149 if (!match.hit)
7150 {
7151 soulng::parser::Match match(false);
7152 soulng::parser::Match* parentMatch75 = &match;
7153 lexer.SetPos(save);
7154 {
7155 soulng::parser::Match match(false);
7156 if (*lexer == AMP)
7157 {
7158 ++lexer;
7159 match.hit = true;
7160 }
7161 *parentMatch75 = match;
7162 }
7163 *parentMatch10 = match;
7164 }
7165 }
7166 *parentMatch9 = match;
7167 if (!match.hit)
7168 {
7169 soulng::parser::Match match(false);
7170 soulng::parser::Match* parentMatch76 = &match;
7171 lexer.SetPos(save);
7172 {
7173 soulng::parser::Match match(false);
7174 if (*lexer == BITXOR)
7175 {
7176 ++lexer;
7177 match.hit = true;
7178 }
7179 *parentMatch76 = match;
7180 }
7181 *parentMatch9 = match;
7182 }
7183 }
7184 *parentMatch8 = match;
7185 if (!match.hit)
7186 {
7187 soulng::parser::Match match(false);
7188 soulng::parser::Match* parentMatch77 = &match;
7189 lexer.SetPos(save);
7190 {
7191 soulng::parser::Match match(false);
7192 if (*lexer == REM)
7193 {
7194 ++lexer;
7195 match.hit = true;
7196 }
7197 *parentMatch77 = match;
7198 }
7199 *parentMatch8 = match;
7200 }
7201 }
7202 *parentMatch7 = match;
7203 if (!match.hit)
7204 {
7205 soulng::parser::Match match(false);
7206 soulng::parser::Match* parentMatch78 = &match;
7207 lexer.SetPos(save);
7208 {
7209 soulng::parser::Match match(false);
7210 if (*lexer == DIV)
7211 {
7212 ++lexer;
7213 match.hit = true;
7214 }
7215 *parentMatch78 = match;
7216 }
7217 *parentMatch7 = match;
7218 }
7219 }
7220 *parentMatch6 = match;
7221 if (!match.hit)
7222 {
7223 soulng::parser::Match match(false);
7224 soulng::parser::Match* parentMatch79 = &match;
7225 lexer.SetPos(save);
7226 {
7227 soulng::parser::Match match(false);
7228 if (*lexer == STAR)
7229 {
7230 ++lexer;
7231 match.hit = true;
7232 }
7233 *parentMatch79 = match;
7234 }
7235 *parentMatch6 = match;
7236 }
7237 }
7238 *parentMatch5 = match;
7239 if (!match.hit)
7240 {
7241 soulng::parser::Match match(false);
7242 soulng::parser::Match* parentMatch80 = &match;
7243 lexer.SetPos(save);
7244 {
7245 soulng::parser::Match match(false);
7246 if (*lexer == MINUS)
7247 {
7248 ++lexer;
7249 match.hit = true;
7250 }
7251 *parentMatch80 = match;
7252 }
7253 *parentMatch5 = match;
7254 }
7255 }
7256 *parentMatch4 = match;
7257 if (!match.hit)
7258 {
7259 soulng::parser::Match match(false);
7260 soulng::parser::Match* parentMatch81 = &match;
7261 lexer.SetPos(save);
7262 {
7263 soulng::parser::Match match(false);
7264 if (*lexer == PLUS)
7265 {
7266 ++lexer;
7267 match.hit = true;
7268 }
7269 *parentMatch81 = match;
7270 }
7271 *parentMatch4 = match;
7272 }
7273 }
7274 *parentMatch3 = match;
7275 if (!match.hit)
7276 {
7277 soulng::parser::Match match(false);
7278 soulng::parser::Match* parentMatch82 = &match;
7279 lexer.SetPos(save);
7280 {
7281 soulng::parser::Match match(false);
7282 soulng::parser::Match* parentMatch83 = &match;
7283 {
7284 soulng::parser::Match match(false);
7285 soulng::parser::Match* parentMatch84 = &match;
7286 {
7287 soulng::parser::Match match(false);
7288 if (*lexer == NEW)
7289 {
7290 ++lexer;
7291 match.hit = true;
7292 }
7293 *parentMatch84 = match;
7294 }
7295 if (match.hit)
7296 {
7297 soulng::parser::Match match(false);
7298 soulng::parser::Match* parentMatch85 = &match;
7299 {
7300 soulng::parser::Match match(false);
7301 if (*lexer == LBRACKET)
7302 {
7303 ++lexer;
7304 match.hit = true;
7305 }
7306 *parentMatch85 = match;
7307 }
7308 *parentMatch84 = match;
7309 }
7310 *parentMatch83 = match;
7311 }
7312 if (match.hit)
7313 {
7314 soulng::parser::Match match(false);
7315 soulng::parser::Match* parentMatch86 = &match;
7316 {
7317 soulng::parser::Match match(false);
7318 if (*lexer == RBRACKET)
7319 {
7320 ++lexer;
7321 match.hit = true;
7322 }
7323 *parentMatch86 = match;
7324 }
7325 *parentMatch83 = match;
7326 }
7327 *parentMatch82 = match;
7328 }
7329 *parentMatch3 = match;
7330 }
7331 }
7332 *parentMatch2 = match;
7333 if (!match.hit)
7334 {
7335 soulng::parser::Match match(false);
7336 soulng::parser::Match* parentMatch87 = &match;
7337 lexer.SetPos(save);
7338 {
7339 soulng::parser::Match match(false);
7340 soulng::parser::Match* parentMatch88 = &match;
7341 {
7342 soulng::parser::Match match(false);
7343 soulng::parser::Match* parentMatch89 = &match;
7344 {
7345 soulng::parser::Match match(false);
7346 if (*lexer == DELETE)
7347 {
7348 ++lexer;
7349 match.hit = true;
7350 }
7351 *parentMatch89 = match;
7352 }
7353 if (match.hit)
7354 {
7355 soulng::parser::Match match(false);
7356 soulng::parser::Match* parentMatch90 = &match;
7357 {
7358 soulng::parser::Match match(false);
7359 if (*lexer == LBRACKET)
7360 {
7361 ++lexer;
7362 match.hit = true;
7363 }
7364 *parentMatch90 = match;
7365 }
7366 *parentMatch89 = match;
7367 }
7368 *parentMatch88 = match;
7369 }
7370 if (match.hit)
7371 {
7372 soulng::parser::Match match(false);
7373 soulng::parser::Match* parentMatch91 = &match;
7374 {
7375 soulng::parser::Match match(false);
7376 if (*lexer == RBRACKET)
7377 {
7378 ++lexer;
7379 match.hit = true;
7380 }
7381 *parentMatch91 = match;
7382 }
7383 *parentMatch88 = match;
7384 }
7385 *parentMatch87 = match;
7386 }
7387 *parentMatch2 = match;
7388 }
7389 }
7390 *parentMatch1 = match;
7391 if (!match.hit)
7392 {
7393 soulng::parser::Match match(false);
7394 soulng::parser::Match* parentMatch92 = &match;
7395 lexer.SetPos(save);
7396 {
7397 soulng::parser::Match match(false);
7398 if (*lexer == NEW)
7399 {
7400 ++lexer;
7401 match.hit = true;
7402 }
7403 *parentMatch92 = match;
7404 }
7405 *parentMatch1 = match;
7406 }
7407 }
7408 *parentMatch0 = match;
7409 if (!match.hit)
7410 {
7411 soulng::parser::Match match(false);
7412 soulng::parser::Match* parentMatch93 = &match;
7413 lexer.SetPos(save);
7414 {
7415 soulng::parser::Match match(false);
7416 if (*lexer == DELETE)
7417 {
7418 ++lexer;
7419 match.hit = true;
7420 }
7421 *parentMatch93 = match;
7422 }
7423 *parentMatch0 = match;
7424 }
7425 }
7426 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
7427
7428
7429
7430
7431
7432 #endif // SOULNG_PARSER_DEBUG_SUPPORT
7433 if (!match.hit)
7434 {
7435 match.value = nullptr;
7436 }
7437 return match;
7438 }