1 #include "Function.hpp"
2 #include <soulng/util/Unicode.hpp>
3 #include <sngcm/cmlexer/CmajorLexer.hpp>
4 #include <sngcm/cmlexer/CmajorTokens.hpp>
5 #include <sngcm/cmparser/Attribute.hpp>
6 #include <sngcm/cmparser/Specifier.hpp>
7 #include <sngcm/cmparser/TypeExpr.hpp>
8 #include <sngcm/cmparser/Concept.hpp>
9 #include <sngcm/cmparser/Identifier.hpp>
10 #include <sngcm/cmparser/Template.hpp>
11 #include <sngcm/cmparser/Parameter.hpp>
12 #include <sngcm/cmparser/Statement.hpp>
13
14
15
16 using namespace soulng::unicode;
17 using namespace sngcm::ast;
18 using namespace CmajorTokens;
19
20 soulng::parser::Match FunctionParser::Function(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx)
21 {
22 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
23
24
25
26
27
28
29
30 #endif // SOULNG_PARSER_DEBUG_SUPPORT
31 std::unique_ptr<FunctionNode> fun = std::unique_ptr<FunctionNode>();
32 Span s = Span();
33 Span specifierSpan = Span();
34 std::unique_ptr<sngcm::ast::AttributesNode> attrs;
35 std::unique_ptr<soulng::parser::soulng::parser::Value<sngcm::ast::Specifiers>>specifiers;
36 std::unique_ptr<sngcm::ast::Node> returnType;
37 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>functionGroupId;
38 std::unique_ptr<WhereConstraintNode> constraint;
39 std::unique_ptr<CompoundStatementNode> body;
40 soulng::parser::Match match(false);
41 soulng::parser::Match* parentMatch0 = &match;
42 {
43 soulng::parser::Match match(false);
44 soulng::parser::Match* parentMatch1 = &match;
45 {
46 soulng::parser::Match match(false);
47 soulng::parser::Match* parentMatch2 = &match;
48 {
49 soulng::parser::Match match(false);
50 soulng::parser::Match* parentMatch3 = &match;
51 {
52 soulng::parser::Match match(false);
53 soulng::parser::Match* parentMatch4 = &match;
54 {
55 soulng::parser::Match match(false);
56 soulng::parser::Match* parentMatch5 = &match;
57 {
58 soulng::parser::Match match(false);
59 soulng::parser::Match* parentMatch6 = &match;
60 {
61 soulng::parser::Match match(false);
62 soulng::parser::Match* parentMatch7 = &match;
63 {
64 soulng::parser::Match match(false);
65 soulng::parser::Match* parentMatch8 = &match;
66 {
67 int64_t pos = lexer.GetPos();
68 soulng::lexer::Span span = lexer.GetSpan();
69 soulng::parser::Match match(true);
70 if (match.hit)
71 {
72 s = span;
73 }
74 *parentMatch8 = match;
75 }
76 *parentMatch7 = match;
77 }
78 if (match.hit)
79 {
80 soulng::parser::Match match(false);
81 soulng::parser::Match* parentMatch9 = &match;
82 {
83 soulng::parser::Match match(true);
84 int64_t save = lexer.GetPos();
85 soulng::parser::Match* parentMatch10 = &match;
86 {
87 soulng::parser::Match match = AttributeParser::Attributes(lexer, moduleId);
88 attrs.reset(static_cast<sngcm::ast::AttributesNode*>(match.value));
89 if (match.hit)
90 {
91 *parentMatch10 = match;
92 }
93 else
94 {
95 lexer.SetPos(save);
96 }
97 }
98 *parentMatch9 = match;
99 }
100 *parentMatch7 = match;
101 }
102 *parentMatch6 = match;
103 }
104 if (match.hit)
105 {
106 soulng::parser::Match match(false);
107 soulng::parser::Match* parentMatch11 = &match;
108 {
109 soulng::parser::Match match(false);
110 soulng::parser::Match* parentMatch12 = &match;
111 {
112 int64_t pos = lexer.GetPos();
113 soulng::lexer::Span span = lexer.GetSpan();
114 soulng::parser::Match match = SpecifierParser::Specifiers(lexer);
115 specifiers.reset(static_cast<soulng::parser::soulng::parser::Value<sngcm::ast::Specifiers>*>(match.value));
116 if (match.hit)
117 {
118 specifierSpan = span;
119 }
120 *parentMatch12 = match;
121 }
122 *parentMatch11 = match;
123 }
124 *parentMatch6 = match;
125 }
126 *parentMatch5 = match;
127 }
128 if (match.hit)
129 {
130 soulng::parser::Match match(false);
131 soulng::parser::Match* parentMatch13 = &match;
132 {
133 soulng::parser::Match match = TypeExprParser::TypeExpr(lexer, moduleId, ctx);
134 returnType.reset(static_cast<sngcm::ast::Node*>(match.value));
135 *parentMatch13 = match;
136 }
137 *parentMatch5 = match;
138 }
139 *parentMatch4 = match;
140 }
141 if (match.hit)
142 {
143 soulng::parser::Match match(false);
144 soulng::parser::Match* parentMatch14 = &match;
145 {
146 soulng::parser::Match match(false);
147 soulng::parser::Match* parentMatch15 = &match;
148 {
149 int64_t pos = lexer.GetPos();
150 soulng::lexer::Span span = lexer.GetSpan();
151 soulng::parser::Match match = FunctionParser::FunctionGroupId(lexer, moduleId, ctx);
152 functionGroupId.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
153 if (match.hit)
154 {
155 s.end = span.end;
156 fun.reset(new FunctionNode(s, *moduleId, specifiers->value, returnType.release(), functionGroupId->value, attrs.release()));
157 fun->SetSpecifierSpan(specifierSpan);
158 fun->SetGroupIdSpan(span);
159 }
160 *parentMatch15 = match;
161 }
162 *parentMatch14 = match;
163 }
164 *parentMatch4 = match;
165 }
166 *parentMatch3 = match;
167 }
168 if (match.hit)
169 {
170 soulng::parser::Match match(false);
171 soulng::parser::Match* parentMatch16 = &match;
172 {
173 soulng::parser::Match match(true);
174 int64_t save = lexer.GetPos();
175 soulng::parser::Match* parentMatch17 = &match;
176 {
177 soulng::parser::Match match = TemplateParser::TemplateParameterList(lexer, moduleId, ctx, fun.get());
178 if (match.hit)
179 {
180 *parentMatch17 = match;
181 }
182 else
183 {
184 lexer.SetPos(save);
185 }
186 }
187 *parentMatch16 = match;
188 }
189 *parentMatch3 = match;
190 }
191 *parentMatch2 = match;
192 }
193 if (match.hit)
194 {
195 soulng::parser::Match match(false);
196 soulng::parser::Match* parentMatch18 = &match;
197 {
198 soulng::parser::Match match = ParameterParser::ParameterList(lexer, moduleId, ctx, fun.get());
199 *parentMatch18 = match;
200 }
201 *parentMatch2 = match;
202 }
203 *parentMatch1 = match;
204 }
205 if (match.hit)
206 {
207 soulng::parser::Match match(false);
208 soulng::parser::Match* parentMatch19 = &match;
209 {
210 soulng::parser::Match match(true);
211 int64_t save = lexer.GetPos();
212 soulng::parser::Match* parentMatch20 = &match;
213 {
214 soulng::parser::Match match(false);
215 soulng::parser::Match* parentMatch21 = &match;
216 {
217 soulng::parser::Match match(false);
218 soulng::parser::Match* parentMatch22 = &match;
219 {
220 int64_t pos = lexer.GetPos();
221 soulng::parser::Match match = ConceptParser::WhereConstraint(lexer, moduleId, ctx);
222 constraint.reset(static_cast<WhereConstraintNode*>(match.value));
223 if (match.hit)
224 {
225 fun->SetConstraint(constraint.release());
226 }
227 *parentMatch22 = match;
228 }
229 *parentMatch21 = match;
230 }
231 if (match.hit)
232 {
233 *parentMatch20 = match;
234 }
235 else
236 {
237 lexer.SetPos(save);
238 }
239 }
240 *parentMatch19 = match;
241 }
242 *parentMatch1 = match;
243 }
244 *parentMatch0 = match;
245 }
246 if (match.hit)
247 {
248 soulng::parser::Match match(false);
249 soulng::parser::Match* parentMatch23 = &match;
250 {
251 soulng::parser::Match match(false);
252 soulng::parser::Match* parentMatch24 = &match;
253 {
254 int64_t pos = lexer.GetPos();
255 soulng::parser::Match match(false);
256 soulng::parser::Match* parentMatch25 = &match;
257 {
258 soulng::parser::Match match(false);
259 soulng::parser::Match* parentMatch26 = &match;
260 {
261 int64_t save = lexer.GetPos();
262 soulng::parser::Match match(false);
263 soulng::parser::Match* parentMatch27 = &match;
264 {
265 int64_t pos = lexer.GetPos();
266 soulng::parser::Match match = StatementParser::CompoundStatement(lexer, moduleId, ctx);
267 body.reset(static_cast<CompoundStatementNode*>(match.value));
268 if (match.hit)
269 {
270 fun->SetBody(body.release());
271 }
272 *parentMatch27 = match;
273 }
274 *parentMatch26 = match;
275 if (!match.hit)
276 {
277 soulng::parser::Match match(false);
278 soulng::parser::Match* parentMatch28 = &match;
279 lexer.SetPos(save);
280 {
281 soulng::parser::Match match(false);
282 if (*lexer == SEMICOLON)
283 {
284 ++lexer;
285 match.hit = true;
286 }
287 *parentMatch28 = match;
288 }
289 *parentMatch26 = match;
290 }
291 }
292 *parentMatch25 = match;
293 }
294 if (match.hit)
295 {
296 {
297 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
298
299 #endif // SOULNG_PARSER_DEBUG_SUPPORT
300 return soulng::parser::Match(true, fun.release());
301 }
302 }
303 *parentMatch24 = match;
304 }
305 *parentMatch23 = match;
306 }
307 *parentMatch0 = match;
308 }
309 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
310
311
312
313
314
315 #endif // SOULNG_PARSER_DEBUG_SUPPORT
316 if (!match.hit)
317 {
318 match.value = nullptr;
319 }
320 return match;
321 }
322
323 soulng::parser::Match FunctionParser::FunctionGroupId(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx)
324 {
325 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
326
327
328
329
330
331
332
333 #endif // SOULNG_PARSER_DEBUG_SUPPORT
334 std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>operatorFunctionGroupId;
335 soulng::parser::Match match(false);
336 soulng::parser::Match* parentMatch0 = &match;
337 {
338 int64_t save = lexer.GetPos();
339 soulng::parser::Match match(false);
340 soulng::parser::Match* parentMatch1 = &match;
341 {
342 int64_t pos = lexer.GetPos();
343 soulng::lexer::Span span = lexer.GetSpan();
344 soulng::parser::Match match(false);
345 if (*lexer == ID)
346 {
347 ++lexer;
348 match.hit = true;
349 }
350 if (match.hit)
351 {
352 {
353 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
354
355 #endif // SOULNG_PARSER_DEBUG_SUPPORT
356 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(lexer.GetMatch(span)));
357 }
358 }
359 *parentMatch1 = match;
360 }
361 *parentMatch0 = match;
362 if (!match.hit)
363 {
364 soulng::parser::Match match(false);
365 soulng::parser::Match* parentMatch2 = &match;
366 lexer.SetPos(save);
367 {
368 soulng::parser::Match match(false);
369 soulng::parser::Match* parentMatch3 = &match;
370 {
371 int64_t pos = lexer.GetPos();
372 soulng::parser::Match match = FunctionParser::OperatorFunctionGroupId(lexer, moduleId, ctx);
373 operatorFunctionGroupId.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
374 if (match.hit)
375 {
376 {
377 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
378
379 #endif // SOULNG_PARSER_DEBUG_SUPPORT
380 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(operatorFunctionGroupId->value));
381 }
382 }
383 *parentMatch3 = match;
384 }
385 *parentMatch2 = match;
386 }
387 *parentMatch0 = match;
388 }
389 }
390 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
391
392
393
394
395
396 #endif // SOULNG_PARSER_DEBUG_SUPPORT
397 if (!match.hit)
398 {
399 match.value = nullptr;
400 }
401 return match;
402 }
403
404 soulng::parser::Match FunctionParser::OperatorFunctionGroupId(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx)
405 {
406 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
407
408
409
410
411
412
413
414 #endif // SOULNG_PARSER_DEBUG_SUPPORT
415 std::unique_ptr<sngcm::ast::Node> typeExpr;
416 soulng::parser::Match match(false);
417 soulng::parser::Match* parentMatch0 = &match;
418 {
419 soulng::parser::Match match(false);
420 soulng::parser::Match* parentMatch1 = &match;
421 {
422 int64_t pos = lexer.GetPos();
423 soulng::parser::Match match(true);
424 if (match.hit)
425 {
426 lexer.parsingOperatorFunctionGroupId = true;
427 }
428 *parentMatch1 = match;
429 }
430 *parentMatch0 = match;
431 }
432 if (match.hit)
433 {
434 soulng::parser::Match match(false);
435 soulng::parser::Match* parentMatch2 = &match;
436 {
437 soulng::parser::Match match(false);
438 soulng::parser::Match* parentMatch3 = &match;
439 {
440 int64_t pos = lexer.GetPos();
441 soulng::parser::Match match(false);
442 soulng::parser::Match* parentMatch4 = &match;
443 {
444 soulng::parser::Match match(false);
445 soulng::parser::Match* parentMatch5 = &match;
446 {
447 soulng::parser::Match match(false);
448 if (*lexer == OPERATOR)
449 {
450 ++lexer;
451 match.hit = true;
452 }
453 *parentMatch5 = match;
454 }
455 if (match.hit)
456 {
457 soulng::parser::Match match(false);
458 soulng::parser::Match* parentMatch6 = &match;
459 {
460 soulng::parser::Match match(false);
461 soulng::parser::Match* parentMatch7 = &match;
462 {
463 soulng::parser::Match match(false);
464 soulng::parser::Match* parentMatch8 = &match;
465 {
466 int64_t save = lexer.GetPos();
467 soulng::parser::Match match(false);
468 soulng::parser::Match* parentMatch9 = &match;
469 {
470 int64_t save = lexer.GetPos();
471 soulng::parser::Match match(false);
472 soulng::parser::Match* parentMatch10 = &match;
473 {
474 int64_t save = lexer.GetPos();
475 soulng::parser::Match match(false);
476 soulng::parser::Match* parentMatch11 = &match;
477 {
478 int64_t save = lexer.GetPos();
479 soulng::parser::Match match(false);
480 soulng::parser::Match* parentMatch12 = &match;
481 {
482 int64_t save = lexer.GetPos();
483 soulng::parser::Match match(false);
484 soulng::parser::Match* parentMatch13 = &match;
485 {
486 int64_t save = lexer.GetPos();
487 soulng::parser::Match match(false);
488 soulng::parser::Match* parentMatch14 = &match;
489 {
490 int64_t save = lexer.GetPos();
491 soulng::parser::Match match(false);
492 soulng::parser::Match* parentMatch15 = &match;
493 {
494 int64_t save = lexer.GetPos();
495 soulng::parser::Match match(false);
496 soulng::parser::Match* parentMatch16 = &match;
497 {
498 int64_t save = lexer.GetPos();
499 soulng::parser::Match match(false);
500 soulng::parser::Match* parentMatch17 = &match;
501 {
502 int64_t save = lexer.GetPos();
503 soulng::parser::Match match(false);
504 soulng::parser::Match* parentMatch18 = &match;
505 {
506 int64_t save = lexer.GetPos();
507 soulng::parser::Match match(false);
508 soulng::parser::Match* parentMatch19 = &match;
509 {
510 int64_t save = lexer.GetPos();
511 soulng::parser::Match match(false);
512 soulng::parser::Match* parentMatch20 = &match;
513 {
514 int64_t save = lexer.GetPos();
515 soulng::parser::Match match(false);
516 soulng::parser::Match* parentMatch21 = &match;
517 {
518 int64_t save = lexer.GetPos();
519 soulng::parser::Match match(false);
520 soulng::parser::Match* parentMatch22 = &match;
521 {
522 int64_t save = lexer.GetPos();
523 soulng::parser::Match match(false);
524 soulng::parser::Match* parentMatch23 = &match;
525 {
526 int64_t save = lexer.GetPos();
527 soulng::parser::Match match(false);
528 soulng::parser::Match* parentMatch24 = &match;
529 {
530 int64_t save = lexer.GetPos();
531 soulng::parser::Match match(false);
532 soulng::parser::Match* parentMatch25 = &match;
533 {
534 int64_t save = lexer.GetPos();
535 soulng::parser::Match match(false);
536 soulng::parser::Match* parentMatch26 = &match;
537 {
538 int64_t save = lexer.GetPos();
539 soulng::parser::Match match(false);
540 soulng::parser::Match* parentMatch27 = &match;
541 {
542 int64_t pos = lexer.GetPos();
543 soulng::parser::Match match(false);
544 soulng::parser::Match* parentMatch28 = &match;
545 {
546 soulng::parser::Match match(false);
547 soulng::parser::Match* parentMatch29 = &match;
548 int64_t save = lexer.GetPos();
549 {
550 soulng::parser::Match match(false);
551 soulng::parser::Match* parentMatch30 = &match;
552 {
553 soulng::parser::Match match(false);
554 soulng::parser::Match* parentMatch31 = &match;
555 {
556 soulng::parser::Match match(false);
557 if (*lexer == LANGLE)
558 {
559 ++lexer;
560 match.hit = true;
561 }
562 *parentMatch31 = match;
563 }
564 if (match.hit)
565 {
566 soulng::parser::Match match(false);
567 soulng::parser::Match* parentMatch32 = &match;
568 {
569 soulng::parser::Match match(false);
570 if (*lexer == LANGLE)
571 {
572 ++lexer;
573 match.hit = true;
574 }
575 *parentMatch32 = match;
576 }
577 *parentMatch31 = match;
578 }
579 *parentMatch30 = match;
580 }
581 *parentMatch29 = match;
582 }
583 if (match.hit)
584 {
585 soulng::parser::Match match(false);
586 soulng::parser::Match* parentMatch33 = &match;
587 {
588 int64_t tmp = lexer.GetPos();
589 lexer.SetPos(save);
590 save = tmp;
591 soulng::parser::Match match(false);
592 soulng::parser::Match* parentMatch34 = &match;
593 {
594 soulng::parser::Match match(false);
595 soulng::parser::Match* parentMatch35 = &match;
596 {
597 soulng::parser::Match match(false);
598 soulng::parser::Match* parentMatch36 = &match;
599 {
600 soulng::parser::Match match(false);
601 soulng::parser::Match* parentMatch37 = &match;
602 {
603 soulng::parser::Match match(false);
604 if (*lexer == LANGLE)
605 {
606 ++lexer;
607 match.hit = true;
608 }
609 *parentMatch37 = match;
610 }
611 if (match.hit)
612 {
613 soulng::parser::Match match(false);
614 soulng::parser::Match* parentMatch38 = &match;
615 {
616 soulng::parser::Match match(false);
617 if (*lexer == LANGLE)
618 {
619 ++lexer;
620 match.hit = true;
621 }
622 *parentMatch38 = match;
623 }
624 *parentMatch37 = match;
625 }
626 *parentMatch36 = match;
627 }
628 if (match.hit)
629 {
630 soulng::parser::Match match(false);
631 soulng::parser::Match* parentMatch39 = &match;
632 {
633 soulng::parser::Match match(false);
634 soulng::parser::Match* parentMatch40 = &match;
635 {
636 soulng::parser::Match match(false);
637 soulng::parser::Match* parentMatch41 = &match;
638 {
639 soulng::parser::Match match = TypeExprParser::TypeExpr(lexer, moduleId, ctx);
640 typeExpr.reset(static_cast<sngcm::ast::Node*>(match.value));
641 *parentMatch41 = match;
642 }
643 if (match.hit)
644 {
645 soulng::parser::Match match(false);
646 soulng::parser::Match* parentMatch42 = &match;
647 {
648 soulng::parser::Match match(true);
649 soulng::parser::Match* parentMatch43 = &match;
650 {
651 while (true)
652 {
653 int64_t save = lexer.GetPos();
654 {
655 soulng::parser::Match match(false);
656 soulng::parser::Match* parentMatch44 = &match;
657 {
658 soulng::parser::Match match(false);
659 if (*lexer == COMMA)
660 {
661 ++lexer;
662 match.hit = true;
663 }
664 *parentMatch44 = match;
665 }
666 if (match.hit)
667 {
668 soulng::parser::Match match(false);
669 soulng::parser::Match* parentMatch45 = &match;
670 {
671 soulng::parser::Match match = TypeExprParser::TypeExpr(lexer, moduleId, ctx);
672 typeExpr.reset(static_cast<sngcm::ast::Node*>(match.value));
673 *parentMatch45 = match;
674 }
675 *parentMatch44 = match;
676 }
677 if (match.hit)
678 {
679 *parentMatch43 = match;
680 }
681 else
682 {
683 lexer.SetPos(save);
684 break;
685 }
686 }
687 }
688 }
689 *parentMatch42 = match;
690 }
691 *parentMatch41 = match;
692 }
693 *parentMatch40 = match;
694 }
695 *parentMatch39 = match;
696 }
697 *parentMatch36 = match;
698 }
699 *parentMatch35 = match;
700 }
701 if (match.hit)
702 {
703 soulng::parser::Match match(false);
704 soulng::parser::Match* parentMatch46 = &match;
705 {
706 soulng::parser::Match match(false);
707 if (*lexer == RANGLE)
708 {
709 ++lexer;
710 match.hit = true;
711 }
712 *parentMatch46 = match;
713 }
714 *parentMatch35 = match;
715 }
716 *parentMatch34 = match;
717 }
718 *parentMatch33 = match;
719 }
720 if (!match.hit)
721 {
722 lexer.SetPos(save);
723 }
724 *parentMatch29 = soulng::parser::Match(!match.hit, match.value);
725 }
726 *parentMatch28 = match;
727 }
728 if (match.hit)
729 {
730 lexer.parsingOperatorFunctionGroupId = false;
731 {
732 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
733
734 #endif // SOULNG_PARSER_DEBUG_SUPPORT
735 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator<<"));
736 }
737 }
738 *parentMatch27 = match;
739 }
740 *parentMatch26 = match;
741 if (!match.hit)
742 {
743 soulng::parser::Match match(false);
744 soulng::parser::Match* parentMatch47 = &match;
745 lexer.SetPos(save);
746 {
747 soulng::parser::Match match(false);
748 soulng::parser::Match* parentMatch48 = &match;
749 {
750 int64_t pos = lexer.GetPos();
751 soulng::parser::Match match(false);
752 if (*lexer == SHIFTRIGHT)
753 {
754 ++lexer;
755 match.hit = true;
756 }
757 if (match.hit)
758 {
759 lexer.parsingOperatorFunctionGroupId = false;
760 {
761 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
762
763 #endif // SOULNG_PARSER_DEBUG_SUPPORT
764 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator>>"));
765 }
766 }
767 *parentMatch48 = match;
768 }
769 *parentMatch47 = match;
770 }
771 *parentMatch26 = match;
772 }
773 }
774 *parentMatch25 = match;
775 if (!match.hit)
776 {
777 soulng::parser::Match match(false);
778 soulng::parser::Match* parentMatch49 = &match;
779 lexer.SetPos(save);
780 {
781 soulng::parser::Match match(false);
782 soulng::parser::Match* parentMatch50 = &match;
783 {
784 int64_t pos = lexer.GetPos();
785 soulng::parser::Match match(false);
786 if (*lexer == EQ)
787 {
788 ++lexer;
789 match.hit = true;
790 }
791 if (match.hit)
792 {
793 lexer.parsingOperatorFunctionGroupId = false;
794 {
795 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
796
797 #endif // SOULNG_PARSER_DEBUG_SUPPORT
798 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator=="));
799 }
800 }
801 *parentMatch50 = match;
802 }
803 *parentMatch49 = match;
804 }
805 *parentMatch25 = match;
806 }
807 }
808 *parentMatch24 = match;
809 if (!match.hit)
810 {
811 soulng::parser::Match match(false);
812 soulng::parser::Match* parentMatch51 = &match;
813 lexer.SetPos(save);
814 {
815 soulng::parser::Match match(false);
816 soulng::parser::Match* parentMatch52 = &match;
817 {
818 int64_t pos = lexer.GetPos();
819 soulng::parser::Match match(false);
820 if (*lexer == ASSIGN)
821 {
822 ++lexer;
823 match.hit = true;
824 }
825 if (match.hit)
826 {
827 lexer.parsingOperatorFunctionGroupId = false;
828 {
829 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
830
831 #endif // SOULNG_PARSER_DEBUG_SUPPORT
832 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator="));
833 }
834 }
835 *parentMatch52 = match;
836 }
837 *parentMatch51 = match;
838 }
839 *parentMatch24 = match;
840 }
841 }
842 *parentMatch23 = match;
843 if (!match.hit)
844 {
845 soulng::parser::Match match(false);
846 soulng::parser::Match* parentMatch53 = &match;
847 lexer.SetPos(save);
848 {
849 soulng::parser::Match match(false);
850 soulng::parser::Match* parentMatch54 = &match;
851 {
852 int64_t pos = lexer.GetPos();
853 soulng::parser::Match match(false);
854 if (*lexer == LANGLE)
855 {
856 ++lexer;
857 match.hit = true;
858 }
859 if (match.hit)
860 {
861 lexer.parsingOperatorFunctionGroupId = false;
862 {
863 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
864
865 #endif // SOULNG_PARSER_DEBUG_SUPPORT
866 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator<"));
867 }
868 }
869 *parentMatch54 = match;
870 }
871 *parentMatch53 = match;
872 }
873 *parentMatch23 = match;
874 }
875 }
876 *parentMatch22 = match;
877 if (!match.hit)
878 {
879 soulng::parser::Match match(false);
880 soulng::parser::Match* parentMatch55 = &match;
881 lexer.SetPos(save);
882 {
883 soulng::parser::Match match(false);
884 soulng::parser::Match* parentMatch56 = &match;
885 {
886 int64_t pos = lexer.GetPos();
887 soulng::parser::Match match(false);
888 if (*lexer == ARROW)
889 {
890 ++lexer;
891 match.hit = true;
892 }
893 if (match.hit)
894 {
895 lexer.parsingOperatorFunctionGroupId = false;
896 {
897 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
898
899 #endif // SOULNG_PARSER_DEBUG_SUPPORT
900 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator->"));
901 }
902 }
903 *parentMatch56 = match;
904 }
905 *parentMatch55 = match;
906 }
907 *parentMatch22 = match;
908 }
909 }
910 *parentMatch21 = match;
911 if (!match.hit)
912 {
913 soulng::parser::Match match(false);
914 soulng::parser::Match* parentMatch57 = &match;
915 lexer.SetPos(save);
916 {
917 soulng::parser::Match match(false);
918 soulng::parser::Match* parentMatch58 = &match;
919 {
920 int64_t pos = lexer.GetPos();
921 soulng::parser::Match match(false);
922 if (*lexer == PLUSPLUS)
923 {
924 ++lexer;
925 match.hit = true;
926 }
927 if (match.hit)
928 {
929 lexer.parsingOperatorFunctionGroupId = false;
930 {
931 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
932
933 #endif // SOULNG_PARSER_DEBUG_SUPPORT
934 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator++"));
935 }
936 }
937 *parentMatch58 = match;
938 }
939 *parentMatch57 = match;
940 }
941 *parentMatch21 = match;
942 }
943 }
944 *parentMatch20 = match;
945 if (!match.hit)
946 {
947 soulng::parser::Match match(false);
948 soulng::parser::Match* parentMatch59 = &match;
949 lexer.SetPos(save);
950 {
951 soulng::parser::Match match(false);
952 soulng::parser::Match* parentMatch60 = &match;
953 {
954 int64_t pos = lexer.GetPos();
955 soulng::parser::Match match(false);
956 if (*lexer == MINUSMINUS)
957 {
958 ++lexer;
959 match.hit = true;
960 }
961 if (match.hit)
962 {
963 lexer.parsingOperatorFunctionGroupId = false;
964 {
965 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
966
967 #endif // SOULNG_PARSER_DEBUG_SUPPORT
968 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator--"));
969 }
970 }
971 *parentMatch60 = match;
972 }
973 *parentMatch59 = match;
974 }
975 *parentMatch20 = match;
976 }
977 }
978 *parentMatch19 = match;
979 if (!match.hit)
980 {
981 soulng::parser::Match match(false);
982 soulng::parser::Match* parentMatch61 = &match;
983 lexer.SetPos(save);
984 {
985 soulng::parser::Match match(false);
986 soulng::parser::Match* parentMatch62 = &match;
987 {
988 int64_t pos = lexer.GetPos();
989 soulng::parser::Match match(false);
990 if (*lexer == PLUS)
991 {
992 ++lexer;
993 match.hit = true;
994 }
995 if (match.hit)
996 {
997 lexer.parsingOperatorFunctionGroupId = false;
998 {
999 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1000
1001 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1002 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator+"));
1003 }
1004 }
1005 *parentMatch62 = match;
1006 }
1007 *parentMatch61 = match;
1008 }
1009 *parentMatch19 = match;
1010 }
1011 }
1012 *parentMatch18 = match;
1013 if (!match.hit)
1014 {
1015 soulng::parser::Match match(false);
1016 soulng::parser::Match* parentMatch63 = &match;
1017 lexer.SetPos(save);
1018 {
1019 soulng::parser::Match match(false);
1020 soulng::parser::Match* parentMatch64 = &match;
1021 {
1022 int64_t pos = lexer.GetPos();
1023 soulng::parser::Match match(false);
1024 if (*lexer == MINUS)
1025 {
1026 ++lexer;
1027 match.hit = true;
1028 }
1029 if (match.hit)
1030 {
1031 lexer.parsingOperatorFunctionGroupId = false;
1032 {
1033 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1034
1035 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1036 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator-"));
1037 }
1038 }
1039 *parentMatch64 = match;
1040 }
1041 *parentMatch63 = match;
1042 }
1043 *parentMatch18 = match;
1044 }
1045 }
1046 *parentMatch17 = match;
1047 if (!match.hit)
1048 {
1049 soulng::parser::Match match(false);
1050 soulng::parser::Match* parentMatch65 = &match;
1051 lexer.SetPos(save);
1052 {
1053 soulng::parser::Match match(false);
1054 soulng::parser::Match* parentMatch66 = &match;
1055 {
1056 int64_t pos = lexer.GetPos();
1057 soulng::parser::Match match(false);
1058 if (*lexer == STAR)
1059 {
1060 ++lexer;
1061 match.hit = true;
1062 }
1063 if (match.hit)
1064 {
1065 lexer.parsingOperatorFunctionGroupId = false;
1066 {
1067 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1068
1069 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1070 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator*"));
1071 }
1072 }
1073 *parentMatch66 = match;
1074 }
1075 *parentMatch65 = match;
1076 }
1077 *parentMatch17 = match;
1078 }
1079 }
1080 *parentMatch16 = match;
1081 if (!match.hit)
1082 {
1083 soulng::parser::Match match(false);
1084 soulng::parser::Match* parentMatch67 = &match;
1085 lexer.SetPos(save);
1086 {
1087 soulng::parser::Match match(false);
1088 soulng::parser::Match* parentMatch68 = &match;
1089 {
1090 int64_t pos = lexer.GetPos();
1091 soulng::parser::Match match(false);
1092 if (*lexer == DIV)
1093 {
1094 ++lexer;
1095 match.hit = true;
1096 }
1097 if (match.hit)
1098 {
1099 lexer.parsingOperatorFunctionGroupId = false;
1100 {
1101 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1102
1103 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1104 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator/"));
1105 }
1106 }
1107 *parentMatch68 = match;
1108 }
1109 *parentMatch67 = match;
1110 }
1111 *parentMatch16 = match;
1112 }
1113 }
1114 *parentMatch15 = match;
1115 if (!match.hit)
1116 {
1117 soulng::parser::Match match(false);
1118 soulng::parser::Match* parentMatch69 = &match;
1119 lexer.SetPos(save);
1120 {
1121 soulng::parser::Match match(false);
1122 soulng::parser::Match* parentMatch70 = &match;
1123 {
1124 int64_t pos = lexer.GetPos();
1125 soulng::parser::Match match(false);
1126 if (*lexer == REM)
1127 {
1128 ++lexer;
1129 match.hit = true;
1130 }
1131 if (match.hit)
1132 {
1133 lexer.parsingOperatorFunctionGroupId = false;
1134 {
1135 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1136
1137 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1138 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator%"));
1139 }
1140 }
1141 *parentMatch70 = match;
1142 }
1143 *parentMatch69 = match;
1144 }
1145 *parentMatch15 = match;
1146 }
1147 }
1148 *parentMatch14 = match;
1149 if (!match.hit)
1150 {
1151 soulng::parser::Match match(false);
1152 soulng::parser::Match* parentMatch71 = &match;
1153 lexer.SetPos(save);
1154 {
1155 soulng::parser::Match match(false);
1156 soulng::parser::Match* parentMatch72 = &match;
1157 {
1158 int64_t pos = lexer.GetPos();
1159 soulng::parser::Match match(false);
1160 if (*lexer == AMP)
1161 {
1162 ++lexer;
1163 match.hit = true;
1164 }
1165 if (match.hit)
1166 {
1167 lexer.parsingOperatorFunctionGroupId = false;
1168 {
1169 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1170
1171 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1172 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator&"));
1173 }
1174 }
1175 *parentMatch72 = match;
1176 }
1177 *parentMatch71 = match;
1178 }
1179 *parentMatch14 = match;
1180 }
1181 }
1182 *parentMatch13 = match;
1183 if (!match.hit)
1184 {
1185 soulng::parser::Match match(false);
1186 soulng::parser::Match* parentMatch73 = &match;
1187 lexer.SetPos(save);
1188 {
1189 soulng::parser::Match match(false);
1190 soulng::parser::Match* parentMatch74 = &match;
1191 {
1192 int64_t pos = lexer.GetPos();
1193 soulng::parser::Match match(false);
1194 if (*lexer == BITOR)
1195 {
1196 ++lexer;
1197 match.hit = true;
1198 }
1199 if (match.hit)
1200 {
1201 lexer.parsingOperatorFunctionGroupId = false;
1202 {
1203 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1204
1205 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1206 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator|"));
1207 }
1208 }
1209 *parentMatch74 = match;
1210 }
1211 *parentMatch73 = match;
1212 }
1213 *parentMatch13 = match;
1214 }
1215 }
1216 *parentMatch12 = match;
1217 if (!match.hit)
1218 {
1219 soulng::parser::Match match(false);
1220 soulng::parser::Match* parentMatch75 = &match;
1221 lexer.SetPos(save);
1222 {
1223 soulng::parser::Match match(false);
1224 soulng::parser::Match* parentMatch76 = &match;
1225 {
1226 int64_t pos = lexer.GetPos();
1227 soulng::parser::Match match(false);
1228 if (*lexer == BITXOR)
1229 {
1230 ++lexer;
1231 match.hit = true;
1232 }
1233 if (match.hit)
1234 {
1235 lexer.parsingOperatorFunctionGroupId = false;
1236 {
1237 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1238
1239 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1240 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator^"));
1241 }
1242 }
1243 *parentMatch76 = match;
1244 }
1245 *parentMatch75 = match;
1246 }
1247 *parentMatch12 = match;
1248 }
1249 }
1250 *parentMatch11 = match;
1251 if (!match.hit)
1252 {
1253 soulng::parser::Match match(false);
1254 soulng::parser::Match* parentMatch77 = &match;
1255 lexer.SetPos(save);
1256 {
1257 soulng::parser::Match match(false);
1258 soulng::parser::Match* parentMatch78 = &match;
1259 {
1260 int64_t pos = lexer.GetPos();
1261 soulng::parser::Match match(false);
1262 if (*lexer == EXCLAMATION)
1263 {
1264 ++lexer;
1265 match.hit = true;
1266 }
1267 if (match.hit)
1268 {
1269 lexer.parsingOperatorFunctionGroupId = false;
1270 {
1271 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1272
1273 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1274 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator!"));
1275 }
1276 }
1277 *parentMatch78 = match;
1278 }
1279 *parentMatch77 = match;
1280 }
1281 *parentMatch11 = match;
1282 }
1283 }
1284 *parentMatch10 = match;
1285 if (!match.hit)
1286 {
1287 soulng::parser::Match match(false);
1288 soulng::parser::Match* parentMatch79 = &match;
1289 lexer.SetPos(save);
1290 {
1291 soulng::parser::Match match(false);
1292 soulng::parser::Match* parentMatch80 = &match;
1293 {
1294 int64_t pos = lexer.GetPos();
1295 soulng::parser::Match match(false);
1296 if (*lexer == CPL)
1297 {
1298 ++lexer;
1299 match.hit = true;
1300 }
1301 if (match.hit)
1302 {
1303 lexer.parsingOperatorFunctionGroupId = false;
1304 {
1305 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1306
1307 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1308 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator~"));
1309 }
1310 }
1311 *parentMatch80 = match;
1312 }
1313 *parentMatch79 = match;
1314 }
1315 *parentMatch10 = match;
1316 }
1317 }
1318 *parentMatch9 = match;
1319 if (!match.hit)
1320 {
1321 soulng::parser::Match match(false);
1322 soulng::parser::Match* parentMatch81 = &match;
1323 lexer.SetPos(save);
1324 {
1325 soulng::parser::Match match(false);
1326 soulng::parser::Match* parentMatch82 = &match;
1327 {
1328 soulng::parser::Match match(false);
1329 if (*lexer == LBRACKET)
1330 {
1331 ++lexer;
1332 match.hit = true;
1333 }
1334 *parentMatch82 = match;
1335 }
1336 if (match.hit)
1337 {
1338 soulng::parser::Match match(false);
1339 soulng::parser::Match* parentMatch83 = &match;
1340 {
1341 soulng::parser::Match match(false);
1342 soulng::parser::Match* parentMatch84 = &match;
1343 {
1344 int64_t pos = lexer.GetPos();
1345 soulng::parser::Match match(false);
1346 if (*lexer == RBRACKET)
1347 {
1348 ++lexer;
1349 match.hit = true;
1350 }
1351 if (match.hit)
1352 {
1353 lexer.parsingOperatorFunctionGroupId = false;
1354 {
1355 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1356
1357 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1358 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator[]"));
1359 }
1360 }
1361 *parentMatch84 = match;
1362 }
1363 *parentMatch83 = match;
1364 }
1365 *parentMatch82 = match;
1366 }
1367 *parentMatch81 = match;
1368 }
1369 *parentMatch9 = match;
1370 }
1371 }
1372 *parentMatch8 = match;
1373 if (!match.hit)
1374 {
1375 soulng::parser::Match match(false);
1376 soulng::parser::Match* parentMatch85 = &match;
1377 lexer.SetPos(save);
1378 {
1379 soulng::parser::Match match(false);
1380 soulng::parser::Match* parentMatch86 = &match;
1381 {
1382 soulng::parser::Match match(false);
1383 if (*lexer == LPAREN)
1384 {
1385 ++lexer;
1386 match.hit = true;
1387 }
1388 *parentMatch86 = match;
1389 }
1390 if (match.hit)
1391 {
1392 soulng::parser::Match match(false);
1393 soulng::parser::Match* parentMatch87 = &match;
1394 {
1395 soulng::parser::Match match(false);
1396 soulng::parser::Match* parentMatch88 = &match;
1397 {
1398 int64_t pos = lexer.GetPos();
1399 soulng::parser::Match match(false);
1400 if (*lexer == RPAREN)
1401 {
1402 ++lexer;
1403 match.hit = true;
1404 }
1405 if (match.hit)
1406 {
1407 lexer.parsingOperatorFunctionGroupId = false;
1408 {
1409 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1410
1411 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1412 return soulng::parser::Match(true, new soulng::parser::Value<std::u32string>(U"operator()"));
1413 }
1414 }
1415 *parentMatch88 = match;
1416 }
1417 *parentMatch87 = match;
1418 }
1419 *parentMatch86 = match;
1420 }
1421 *parentMatch85 = match;
1422 }
1423 *parentMatch8 = match;
1424 }
1425 }
1426 *parentMatch7 = match;
1427 }
1428 *parentMatch6 = match;
1429 }
1430 *parentMatch5 = match;
1431 }
1432 *parentMatch4 = match;
1433 }
1434 if (match.hit)
1435 {
1436 lexer.parsingOperatorFunctionGroupId = false;
1437 }
1438 else
1439 {
1440 lexer.parsingOperatorFunctionGroupId = false;
1441 }
1442 *parentMatch3 = match;
1443 }
1444 *parentMatch2 = match;
1445 }
1446 *parentMatch0 = match;
1447 }
1448 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1449
1450
1451
1452
1453
1454 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1455 if (!match.hit)
1456 {
1457 match.value = nullptr;
1458 }
1459 return match;
1460 }