1 #include "ParserStatementParser.hpp"
   2 #include <soulng/util/Unicode.hpp>
   3 #include <sng2html/sng2html/ParserDeclarationParser.hpp>
   4 #include <sng2html/sng2html/ParserDeclaratorParser.hpp>
   5 #include <sng2html/sng2html/ParserExpressionParser.hpp>
   6 #include <sng2html/sng2html/ParserFileLexer.hpp>
   7 #include <sng2html/sng2html/ParserFileTokens.hpp>
   8 
   9 // this file has been automatically generated from 'D:/work/soulng-project/tools/sng2html/sng2html/ParserStatementParser.parser' using soulng parser generator spg version 3.0.0
  10 
  11 using namespace soulng::unicode;
  12 using namespace soulng::lexer;
  13 using namespace ParserFileTokens;
  14 
  15 soulng::parser::Match ParserStatementParser::Statement(ParserFileLexer& lexer)
  16 {
  17     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25     #endif // SOULNG_PARSER_DEBUG_SUPPORT
  26     std::unique_ptr<soulng::cppcode::Statement> labeledStatement;
  27     std::unique_ptr<soulng::cppcode::Statement> emptyStatement;
  28     std::unique_ptr<soulng::cppcode::CompoundStatement> compoundStatement;
  29     std::unique_ptr<soulng::cppcode::Statement> selectionStatement;
  30     std::unique_ptr<soulng::cppcode::Statement> iterationStatement;
  31     std::unique_ptr<soulng::cppcode::Statement> jumpStatement;
  32     std::unique_ptr<soulng::cppcode::Statement> declarationStatement;
  33     std::unique_ptr<soulng::cppcode::Statement> tryStatement;
  34     std::unique_ptr<soulng::cppcode::Statement> expressionStatement;
  35     soulng::parser::Match match(false);
  36     soulng::parser::Match* parentMatch0 = &match;
  37     {
  38         int64_t save = lexer.GetPos();
  39         soulng::parser::Match match(false);
  40         soulng::parser::Match* parentMatch1 = &match;
  41         {
  42             int64_t save = lexer.GetPos();
  43             soulng::parser::Match match(false);
  44             soulng::parser::Match* parentMatch2 = &match;
  45             {
  46                 int64_t save = lexer.GetPos();
  47                 soulng::parser::Match match(false);
  48                 soulng::parser::Match* parentMatch3 = &match;
  49                 {
  50                     int64_t save = lexer.GetPos();
  51                     soulng::parser::Match match(false);
  52                     soulng::parser::Match* parentMatch4 = &match;
  53                     {
  54                         int64_t save = lexer.GetPos();
  55                         soulng::parser::Match match(false);
  56                         soulng::parser::Match* parentMatch5 = &match;
  57                         {
  58                             int64_t save = lexer.GetPos();
  59                             soulng::parser::Match match(false);
  60                             soulng::parser::Match* parentMatch6 = &match;
  61                             {
  62                                 int64_t save = lexer.GetPos();
  63                                 soulng::parser::Match match(false);
  64                                 soulng::parser::Match* parentMatch7 = &match;
  65                                 {
  66                                     int64_t save = lexer.GetPos();
  67                                     soulng::parser::Match match(false);
  68                                     soulng::parser::Match* parentMatch8 = &match;
  69                                     {
  70                                         int64_t pos = lexer.GetPos();
  71                                         soulng::parser::Match match = ParserStatementParser::LabeledStatement(lexer);
  72                                         labeledStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
  73                                         if (match.hit)
  74                                         {
  75                                             {
  76                                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
  77 
  78                                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
  79                                                 return soulng::parser::Match(truelabeledStatement.release());
  80                                             }
  81                                         }
  82                                         *parentMatch8 = match;
  83                                     }
  84                                     *parentMatch7 = match;
  85                                     if (!match.hit)
  86                                     {
  87                                         soulng::parser::Match match(false);
  88                                         soulng::parser::Match* parentMatch9 = &match;
  89                                         lexer.SetPos(save);
  90                                         {
  91                                             soulng::parser::Match match(false);
  92                                             soulng::parser::Match* parentMatch10 = &match;
  93                                             {
  94                                                 int64_t pos = lexer.GetPos();
  95                                                 soulng::parser::Match match = ParserStatementParser::EmptyStatement(lexer);
  96                                                 emptyStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
  97                                                 if (match.hit)
  98                                                 {
  99                                                     {
 100                                                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 101 
 102                                                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
 103                                                         return soulng::parser::Match(trueemptyStatement.release());
 104                                                     }
 105                                                 }
 106                                                 *parentMatch10 = match;
 107                                             }
 108                                             *parentMatch9 = match;
 109                                         }
 110                                         *parentMatch7 = match;
 111                                     }
 112                                 }
 113                                 *parentMatch6 = match;
 114                                 if (!match.hit)
 115                                 {
 116                                     soulng::parser::Match match(false);
 117                                     soulng::parser::Match* parentMatch11 = &match;
 118                                     lexer.SetPos(save);
 119                                     {
 120                                         soulng::parser::Match match(false);
 121                                         soulng::parser::Match* parentMatch12 = &match;
 122                                         {
 123                                             int64_t pos = lexer.GetPos();
 124                                             soulng::parser::Match match = ParserStatementParser::CompoundStatement(lexer);
 125                                             compoundStatement.reset(static_cast<soulng::cppcode::CompoundStatement*>(match.value));
 126                                             if (match.hit)
 127                                             {
 128                                                 {
 129                                                     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 130 
 131                                                     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 132                                                     return soulng::parser::Match(truecompoundStatement.release());
 133                                                 }
 134                                             }
 135                                             *parentMatch12 = match;
 136                                         }
 137                                         *parentMatch11 = match;
 138                                     }
 139                                     *parentMatch6 = match;
 140                                 }
 141                             }
 142                             *parentMatch5 = match;
 143                             if (!match.hit)
 144                             {
 145                                 soulng::parser::Match match(false);
 146                                 soulng::parser::Match* parentMatch13 = &match;
 147                                 lexer.SetPos(save);
 148                                 {
 149                                     soulng::parser::Match match(false);
 150                                     soulng::parser::Match* parentMatch14 = &match;
 151                                     {
 152                                         int64_t pos = lexer.GetPos();
 153                                         soulng::parser::Match match = ParserStatementParser::SelectionStatement(lexer);
 154                                         selectionStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 155                                         if (match.hit)
 156                                         {
 157                                             {
 158                                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 159 
 160                                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
 161                                                 return soulng::parser::Match(trueselectionStatement.release());
 162                                             }
 163                                         }
 164                                         *parentMatch14 = match;
 165                                     }
 166                                     *parentMatch13 = match;
 167                                 }
 168                                 *parentMatch5 = match;
 169                             }
 170                         }
 171                         *parentMatch4 = match;
 172                         if (!match.hit)
 173                         {
 174                             soulng::parser::Match match(false);
 175                             soulng::parser::Match* parentMatch15 = &match;
 176                             lexer.SetPos(save);
 177                             {
 178                                 soulng::parser::Match match(false);
 179                                 soulng::parser::Match* parentMatch16 = &match;
 180                                 {
 181                                     int64_t pos = lexer.GetPos();
 182                                     soulng::parser::Match match = ParserStatementParser::IterationStatement(lexer);
 183                                     iterationStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 184                                     if (match.hit)
 185                                     {
 186                                         {
 187                                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 188 
 189                                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
 190                                             return soulng::parser::Match(trueiterationStatement.release());
 191                                         }
 192                                     }
 193                                     *parentMatch16 = match;
 194                                 }
 195                                 *parentMatch15 = match;
 196                             }
 197                             *parentMatch4 = match;
 198                         }
 199                     }
 200                     *parentMatch3 = match;
 201                     if (!match.hit)
 202                     {
 203                         soulng::parser::Match match(false);
 204                         soulng::parser::Match* parentMatch17 = &match;
 205                         lexer.SetPos(save);
 206                         {
 207                             soulng::parser::Match match(false);
 208                             soulng::parser::Match* parentMatch18 = &match;
 209                             {
 210                                 int64_t pos = lexer.GetPos();
 211                                 soulng::parser::Match match = ParserStatementParser::JumpStatement(lexer);
 212                                 jumpStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 213                                 if (match.hit)
 214                                 {
 215                                     {
 216                                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 217 
 218                                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
 219                                         return soulng::parser::Match(truejumpStatement.release());
 220                                     }
 221                                 }
 222                                 *parentMatch18 = match;
 223                             }
 224                             *parentMatch17 = match;
 225                         }
 226                         *parentMatch3 = match;
 227                     }
 228                 }
 229                 *parentMatch2 = match;
 230                 if (!match.hit)
 231                 {
 232                     soulng::parser::Match match(false);
 233                     soulng::parser::Match* parentMatch19 = &match;
 234                     lexer.SetPos(save);
 235                     {
 236                         soulng::parser::Match match(false);
 237                         soulng::parser::Match* parentMatch20 = &match;
 238                         {
 239                             int64_t pos = lexer.GetPos();
 240                             soulng::parser::Match match = ParserStatementParser::DeclarationStatement(lexer);
 241                             declarationStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 242                             if (match.hit)
 243                             {
 244                                 {
 245                                     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 246 
 247                                     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 248                                     return soulng::parser::Match(truedeclarationStatement.release());
 249                                 }
 250                             }
 251                             *parentMatch20 = match;
 252                         }
 253                         *parentMatch19 = match;
 254                     }
 255                     *parentMatch2 = match;
 256                 }
 257             }
 258             *parentMatch1 = match;
 259             if (!match.hit)
 260             {
 261                 soulng::parser::Match match(false);
 262                 soulng::parser::Match* parentMatch21 = &match;
 263                 lexer.SetPos(save);
 264                 {
 265                     soulng::parser::Match match(false);
 266                     soulng::parser::Match* parentMatch22 = &match;
 267                     {
 268                         int64_t pos = lexer.GetPos();
 269                         soulng::parser::Match match = ParserStatementParser::TryStatement(lexer);
 270                         tryStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 271                         if (match.hit)
 272                         {
 273                             {
 274                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 275 
 276                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
 277                                 return soulng::parser::Match(truetryStatement.release());
 278                             }
 279                         }
 280                         *parentMatch22 = match;
 281                     }
 282                     *parentMatch21 = match;
 283                 }
 284                 *parentMatch1 = match;
 285             }
 286         }
 287         *parentMatch0 = match;
 288         if (!match.hit)
 289         {
 290             soulng::parser::Match match(false);
 291             soulng::parser::Match* parentMatch23 = &match;
 292             lexer.SetPos(save);
 293             {
 294                 soulng::parser::Match match(false);
 295                 soulng::parser::Match* parentMatch24 = &match;
 296                 {
 297                     int64_t pos = lexer.GetPos();
 298                     soulng::parser::Match match = ParserStatementParser::ExpressionStatement(lexer);
 299                     expressionStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 300                     if (match.hit)
 301                     {
 302                         {
 303                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 304 
 305                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
 306                             return soulng::parser::Match(trueexpressionStatement.release());
 307                         }
 308                     }
 309                     *parentMatch24 = match;
 310                 }
 311                 *parentMatch23 = match;
 312             }
 313             *parentMatch0 = match;
 314         }
 315     }
 316     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 317 
 318 
 319 
 320 
 321 
 322     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 323     if (!match.hit)
 324     {
 325         match.value = nullptr;
 326     }
 327     return match;
 328 }
 329 
 330 soulng::parser::Match ParserStatementParser::LabeledStatement(ParserFileLexer& lexer)
 331 {
 332     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 333 
 334 
 335 
 336 
 337 
 338 
 339 
 340     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 341     std::u32string label = std::u32string();
 342     std::unique_ptr<soulng::cppcode::Statement> stmt1;
 343     std::unique_ptr<soulng::cppcode::CppObject> caseExpr;
 344     std::unique_ptr<soulng::cppcode::Statement> stmt2;
 345     std::unique_ptr<soulng::cppcode::Statement> stmt3;
 346     soulng::parser::Match match(false);
 347     soulng::parser::Match* parentMatch0 = &match;
 348     {
 349         int64_t save = lexer.GetPos();
 350         soulng::parser::Match match(false);
 351         soulng::parser::Match* parentMatch1 = &match;
 352         {
 353             int64_t save = lexer.GetPos();
 354             soulng::parser::Match match(false);
 355             soulng::parser::Match* parentMatch2 = &match;
 356             {
 357                 soulng::parser::Match match(false);
 358                 soulng::parser::Match* parentMatch3 = &match;
 359                 {
 360                     soulng::parser::Match match(false);
 361                     soulng::parser::Match* parentMatch4 = &match;
 362                     {
 363                         int64_t pos = lexer.GetPos();
 364                         soulng::lexer::Span span = lexer.GetSpan();
 365                         soulng::parser::Match match(false);
 366                         if (*lexer == ID)
 367                         {
 368                             ++lexer;
 369                             match.hit = true;
 370                         }
 371                         if (match.hit)
 372                         {
 373                             label = lexer.GetMatch(span);
 374                         }
 375                         *parentMatch4 = match;
 376                     }
 377                     *parentMatch3 = match;
 378                 }
 379                 if (match.hit)
 380                 {
 381                     soulng::parser::Match match(false);
 382                     soulng::parser::Match* parentMatch5 = &match;
 383                     {
 384                         soulng::parser::Match match(false);
 385                         if (*lexer == COLON)
 386                         {
 387                             ++lexer;
 388                             match.hit = true;
 389                         }
 390                         *parentMatch5 = match;
 391                     }
 392                     *parentMatch3 = match;
 393                 }
 394                 *parentMatch2 = match;
 395             }
 396             if (match.hit)
 397             {
 398                 soulng::parser::Match match(false);
 399                 soulng::parser::Match* parentMatch6 = &match;
 400                 {
 401                     soulng::parser::Match match(false);
 402                     soulng::parser::Match* parentMatch7 = &match;
 403                     {
 404                         int64_t pos = lexer.GetPos();
 405                         soulng::parser::Match match(true);
 406                         soulng::parser::Match* parentMatch8 = &match;
 407                         {
 408                             soulng::lexer::Span span = lexer.GetSpan();
 409                             soulng::parser::Match match = ParserStatementParser::Statement(lexer);
 410                             stmt1.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 411                             if (match.hit)
 412                             {
 413                                 *parentMatch8 = match;
 414                             }
 415                             else
 416                             {
 417                                 lexer.ThrowExpectationFailure(spanU"C++ statement");
 418                             }
 419                         }
 420                         if (match.hit)
 421                         {
 422                             {
 423                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 424 
 425                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
 426                                 return soulng::parser::Match(truenew soulng::cppcode::LabeledStatement(labelstmt1.release()));
 427                             }
 428                         }
 429                         *parentMatch7 = match;
 430                     }
 431                     *parentMatch6 = match;
 432                 }
 433                 *parentMatch2 = match;
 434             }
 435             *parentMatch1 = match;
 436             if (!match.hit)
 437             {
 438                 soulng::parser::Match match(false);
 439                 soulng::parser::Match* parentMatch9 = &match;
 440                 lexer.SetPos(save);
 441                 {
 442                     soulng::parser::Match match(false);
 443                     soulng::parser::Match* parentMatch10 = &match;
 444                     {
 445                         soulng::parser::Match match(false);
 446                         soulng::parser::Match* parentMatch11 = &match;
 447                         {
 448                             soulng::parser::Match match(false);
 449                             soulng::parser::Match* parentMatch12 = &match;
 450                             {
 451                                 soulng::parser::Match match(false);
 452                                 if (*lexer == CASE)
 453                                 {
 454                                     ++lexer;
 455                                     match.hit = true;
 456                                 }
 457                                 *parentMatch12 = match;
 458                             }
 459                             if (match.hit)
 460                             {
 461                                 soulng::parser::Match match(false);
 462                                 soulng::parser::Match* parentMatch13 = &match;
 463                                 {
 464                                     soulng::parser::Match match(true);
 465                                     soulng::parser::Match* parentMatch14 = &match;
 466                                     {
 467                                         soulng::lexer::Span span = lexer.GetSpan();
 468                                         soulng::parser::Match match = ParserExpressionParser::ConstantExpression(lexer);
 469                                         caseExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
 470                                         if (match.hit)
 471                                         {
 472                                             *parentMatch14 = match;
 473                                         }
 474                                         else
 475                                         {
 476                                             lexer.ThrowExpectationFailure(spanU"constant C++ expression");
 477                                         }
 478                                     }
 479                                     *parentMatch13 = match;
 480                                 }
 481                                 *parentMatch12 = match;
 482                             }
 483                             *parentMatch11 = match;
 484                         }
 485                         if (match.hit)
 486                         {
 487                             soulng::parser::Match match(false);
 488                             soulng::parser::Match* parentMatch15 = &match;
 489                             {
 490                                 soulng::parser::Match match(true);
 491                                 soulng::parser::Match* parentMatch16 = &match;
 492                                 {
 493                                     soulng::lexer::Span span = lexer.GetSpan();
 494                                     soulng::parser::Match match(false);
 495                                     if (*lexer == COLON)
 496                                     {
 497                                         ++lexer;
 498                                         match.hit = true;
 499                                     }
 500                                     if (match.hit)
 501                                     {
 502                                         *parentMatch16 = match;
 503                                     }
 504                                     else
 505                                     {
 506                                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(COLON)));
 507                                     }
 508                                 }
 509                                 *parentMatch15 = match;
 510                             }
 511                             *parentMatch11 = match;
 512                         }
 513                         *parentMatch10 = match;
 514                     }
 515                     if (match.hit)
 516                     {
 517                         soulng::parser::Match match(false);
 518                         soulng::parser::Match* parentMatch17 = &match;
 519                         {
 520                             soulng::parser::Match match(false);
 521                             soulng::parser::Match* parentMatch18 = &match;
 522                             {
 523                                 int64_t pos = lexer.GetPos();
 524                                 soulng::parser::Match match(true);
 525                                 soulng::parser::Match* parentMatch19 = &match;
 526                                 {
 527                                     soulng::lexer::Span span = lexer.GetSpan();
 528                                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
 529                                     stmt2.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 530                                     if (match.hit)
 531                                     {
 532                                         *parentMatch19 = match;
 533                                     }
 534                                     else
 535                                     {
 536                                         lexer.ThrowExpectationFailure(spanU"C++ statement");
 537                                     }
 538                                 }
 539                                 if (match.hit)
 540                                 {
 541                                     {
 542                                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 543 
 544                                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
 545                                         return soulng::parser::Match(truenew soulng::cppcode::CaseStatement(caseExpr.release()stmt2.release()));
 546                                     }
 547                                 }
 548                                 *parentMatch18 = match;
 549                             }
 550                             *parentMatch17 = match;
 551                         }
 552                         *parentMatch10 = match;
 553                     }
 554                     *parentMatch9 = match;
 555                 }
 556                 *parentMatch1 = match;
 557             }
 558         }
 559         *parentMatch0 = match;
 560         if (!match.hit)
 561         {
 562             soulng::parser::Match match(false);
 563             soulng::parser::Match* parentMatch20 = &match;
 564             lexer.SetPos(save);
 565             {
 566                 soulng::parser::Match match(false);
 567                 soulng::parser::Match* parentMatch21 = &match;
 568                 {
 569                     soulng::parser::Match match(false);
 570                     soulng::parser::Match* parentMatch22 = &match;
 571                     {
 572                         soulng::parser::Match match(false);
 573                         if (*lexer == DEFAULT)
 574                         {
 575                             ++lexer;
 576                             match.hit = true;
 577                         }
 578                         *parentMatch22 = match;
 579                     }
 580                     if (match.hit)
 581                     {
 582                         soulng::parser::Match match(false);
 583                         soulng::parser::Match* parentMatch23 = &match;
 584                         {
 585                             soulng::parser::Match match(true);
 586                             soulng::parser::Match* parentMatch24 = &match;
 587                             {
 588                                 soulng::lexer::Span span = lexer.GetSpan();
 589                                 soulng::parser::Match match(false);
 590                                 if (*lexer == COLON)
 591                                 {
 592                                     ++lexer;
 593                                     match.hit = true;
 594                                 }
 595                                 if (match.hit)
 596                                 {
 597                                     *parentMatch24 = match;
 598                                 }
 599                                 else
 600                                 {
 601                                     lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(COLON)));
 602                                 }
 603                             }
 604                             *parentMatch23 = match;
 605                         }
 606                         *parentMatch22 = match;
 607                     }
 608                     *parentMatch21 = match;
 609                 }
 610                 if (match.hit)
 611                 {
 612                     soulng::parser::Match match(false);
 613                     soulng::parser::Match* parentMatch25 = &match;
 614                     {
 615                         soulng::parser::Match match(false);
 616                         soulng::parser::Match* parentMatch26 = &match;
 617                         {
 618                             int64_t pos = lexer.GetPos();
 619                             soulng::parser::Match match(true);
 620                             soulng::parser::Match* parentMatch27 = &match;
 621                             {
 622                                 soulng::lexer::Span span = lexer.GetSpan();
 623                                 soulng::parser::Match match = ParserStatementParser::Statement(lexer);
 624                                 stmt3.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 625                                 if (match.hit)
 626                                 {
 627                                     *parentMatch27 = match;
 628                                 }
 629                                 else
 630                                 {
 631                                     lexer.ThrowExpectationFailure(spanU"C++ statement");
 632                                 }
 633                             }
 634                             if (match.hit)
 635                             {
 636                                 {
 637                                     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 638 
 639                                     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 640                                     return soulng::parser::Match(truenew soulng::cppcode::DefaultStatement(stmt3.release()));
 641                                 }
 642                             }
 643                             *parentMatch26 = match;
 644                         }
 645                         *parentMatch25 = match;
 646                     }
 647                     *parentMatch21 = match;
 648                 }
 649                 *parentMatch20 = match;
 650             }
 651             *parentMatch0 = match;
 652         }
 653     }
 654     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 655 
 656 
 657 
 658 
 659 
 660     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 661     if (!match.hit)
 662     {
 663         match.value = nullptr;
 664     }
 665     return match;
 666 }
 667 
 668 soulng::parser::Match ParserStatementParser::EmptyStatement(ParserFileLexer& lexer)
 669 {
 670     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 671 
 672 
 673 
 674 
 675 
 676 
 677 
 678     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 679     soulng::parser::Match match(false);
 680     soulng::parser::Match* parentMatch0 = &match;
 681     {
 682         int64_t pos = lexer.GetPos();
 683         soulng::parser::Match match(false);
 684         if (*lexer == SEMICOLON)
 685         {
 686             ++lexer;
 687             match.hit = true;
 688         }
 689         if (match.hit)
 690         {
 691             {
 692                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 693 
 694                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
 695                 return soulng::parser::Match(truenew soulng::cppcode::EmptyStatement());
 696             }
 697         }
 698         *parentMatch0 = match;
 699     }
 700     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 701 
 702 
 703 
 704 
 705 
 706     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 707     if (!match.hit)
 708     {
 709         match.value = nullptr;
 710     }
 711     return match;
 712 }
 713 
 714 soulng::parser::Match ParserStatementParser::CompoundStatement(ParserFileLexer& lexer)
 715 {
 716     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 717 
 718 
 719 
 720 
 721 
 722 
 723 
 724     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 725     std::unique_ptr<soulng::cppcode::CompoundStatement> compoundStatement = std::unique_ptr<soulng::cppcode::CompoundStatement>();
 726     std::unique_ptr<soulng::cppcode::Statement> stmt;
 727     soulng::parser::Match match(false);
 728     soulng::parser::Match* parentMatch0 = &match;
 729     {
 730         soulng::parser::Match match(false);
 731         soulng::parser::Match* parentMatch1 = &match;
 732         {
 733             soulng::parser::Match match(false);
 734             soulng::parser::Match* parentMatch2 = &match;
 735             {
 736                 int64_t pos = lexer.GetPos();
 737                 soulng::parser::Match match(false);
 738                 if (*lexer == LBRACE)
 739                 {
 740                     ++lexer;
 741                     match.hit = true;
 742                 }
 743                 if (match.hit)
 744                 {
 745                     compoundStatement.reset(new soulng::cppcode::CompoundStatement());
 746                 }
 747                 *parentMatch2 = match;
 748             }
 749             *parentMatch1 = match;
 750         }
 751         if (match.hit)
 752         {
 753             soulng::parser::Match match(false);
 754             soulng::parser::Match* parentMatch3 = &match;
 755             {
 756                 soulng::parser::Match match(true);
 757                 soulng::parser::Match* parentMatch4 = &match;
 758                 {
 759                     while (true)
 760                     {
 761                         int64_t save = lexer.GetPos();
 762                         {
 763                             soulng::parser::Match match(false);
 764                             soulng::parser::Match* parentMatch5 = &match;
 765                             {
 766                                 soulng::parser::Match match(false);
 767                                 soulng::parser::Match* parentMatch6 = &match;
 768                                 {
 769                                     int64_t pos = lexer.GetPos();
 770                                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
 771                                     stmt.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 772                                     if (match.hit)
 773                                     {
 774                                         compoundStatement->Add(stmt.release());
 775                                     }
 776                                     *parentMatch6 = match;
 777                                 }
 778                                 *parentMatch5 = match;
 779                             }
 780                             if (match.hit)
 781                             {
 782                                 *parentMatch4 = match;
 783                             }
 784                             else
 785                             {
 786                                 lexer.SetPos(save);
 787                                 break;
 788                             }
 789                         }
 790                     }
 791                 }
 792                 *parentMatch3 = match;
 793             }
 794             *parentMatch1 = match;
 795         }
 796         *parentMatch0 = match;
 797     }
 798     if (match.hit)
 799     {
 800         soulng::parser::Match match(false);
 801         soulng::parser::Match* parentMatch7 = &match;
 802         {
 803             soulng::parser::Match match(false);
 804             soulng::parser::Match* parentMatch8 = &match;
 805             {
 806                 int64_t pos = lexer.GetPos();
 807                 soulng::parser::Match match(true);
 808                 soulng::parser::Match* parentMatch9 = &match;
 809                 {
 810                     soulng::lexer::Span span = lexer.GetSpan();
 811                     soulng::parser::Match match(false);
 812                     if (*lexer == RBRACE)
 813                     {
 814                         ++lexer;
 815                         match.hit = true;
 816                     }
 817                     if (match.hit)
 818                     {
 819                         *parentMatch9 = match;
 820                     }
 821                     else
 822                     {
 823                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RBRACE)));
 824                     }
 825                 }
 826                 if (match.hit)
 827                 {
 828                     {
 829                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 830 
 831                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
 832                         return soulng::parser::Match(truecompoundStatement.release());
 833                     }
 834                 }
 835                 *parentMatch8 = match;
 836             }
 837             *parentMatch7 = match;
 838         }
 839         *parentMatch0 = match;
 840     }
 841     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 842 
 843 
 844 
 845 
 846 
 847     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 848     if (!match.hit)
 849     {
 850         match.value = nullptr;
 851     }
 852     return match;
 853 }
 854 
 855 soulng::parser::Match ParserStatementParser::SelectionStatement(ParserFileLexer& lexer)
 856 {
 857     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 858 
 859 
 860 
 861 
 862 
 863 
 864 
 865     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 866     std::unique_ptr<soulng::cppcode::Statement> ifStatement;
 867     std::unique_ptr<soulng::cppcode::Statement> switchStatement;
 868     soulng::parser::Match match(false);
 869     soulng::parser::Match* parentMatch0 = &match;
 870     {
 871         int64_t save = lexer.GetPos();
 872         soulng::parser::Match match(false);
 873         soulng::parser::Match* parentMatch1 = &match;
 874         {
 875             int64_t pos = lexer.GetPos();
 876             soulng::parser::Match match = ParserStatementParser::IfStatement(lexer);
 877             ifStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 878             if (match.hit)
 879             {
 880                 {
 881                     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 882 
 883                     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 884                     return soulng::parser::Match(trueifStatement.release());
 885                 }
 886             }
 887             *parentMatch1 = match;
 888         }
 889         *parentMatch0 = match;
 890         if (!match.hit)
 891         {
 892             soulng::parser::Match match(false);
 893             soulng::parser::Match* parentMatch2 = &match;
 894             lexer.SetPos(save);
 895             {
 896                 soulng::parser::Match match(false);
 897                 soulng::parser::Match* parentMatch3 = &match;
 898                 {
 899                     int64_t pos = lexer.GetPos();
 900                     soulng::parser::Match match = ParserStatementParser::SwitchStatement(lexer);
 901                     switchStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
 902                     if (match.hit)
 903                     {
 904                         {
 905                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 906 
 907                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
 908                             return soulng::parser::Match(trueswitchStatement.release());
 909                         }
 910                     }
 911                     *parentMatch3 = match;
 912                 }
 913                 *parentMatch2 = match;
 914             }
 915             *parentMatch0 = match;
 916         }
 917     }
 918     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 919 
 920 
 921 
 922 
 923 
 924     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 925     if (!match.hit)
 926     {
 927         match.value = nullptr;
 928     }
 929     return match;
 930 }
 931 
 932 soulng::parser::Match ParserStatementParser::IfStatement(ParserFileLexer& lexer)
 933 {
 934     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
 935 
 936 
 937 
 938 
 939 
 940 
 941 
 942     #endif // SOULNG_PARSER_DEBUG_SUPPORT
 943     std::unique_ptr<soulng::cppcode::CppObject> cond;
 944     std::unique_ptr<soulng::cppcode::Statement> thenS;
 945     std::unique_ptr<soulng::cppcode::Statement> elseS;
 946     soulng::parser::Match match(false);
 947     soulng::parser::Match* parentMatch0 = &match;
 948     {
 949         int64_t pos = lexer.GetPos();
 950         soulng::parser::Match match(false);
 951         soulng::parser::Match* parentMatch1 = &match;
 952         {
 953             soulng::parser::Match match(false);
 954             soulng::parser::Match* parentMatch2 = &match;
 955             {
 956                 soulng::parser::Match match(false);
 957                 soulng::parser::Match* parentMatch3 = &match;
 958                 {
 959                     soulng::parser::Match match(false);
 960                     soulng::parser::Match* parentMatch4 = &match;
 961                     {
 962                         soulng::parser::Match match(false);
 963                         soulng::parser::Match* parentMatch5 = &match;
 964                         {
 965                             soulng::parser::Match match(false);
 966                             soulng::parser::Match* parentMatch6 = &match;
 967                             {
 968                                 soulng::parser::Match match(false);
 969                                 if (*lexer == IF)
 970                                 {
 971                                     ++lexer;
 972                                     match.hit = true;
 973                                 }
 974                                 *parentMatch6 = match;
 975                             }
 976                             if (match.hit)
 977                             {
 978                                 soulng::parser::Match match(false);
 979                                 soulng::parser::Match* parentMatch7 = &match;
 980                                 {
 981                                     soulng::parser::Match match(true);
 982                                     soulng::parser::Match* parentMatch8 = &match;
 983                                     {
 984                                         soulng::lexer::Span span = lexer.GetSpan();
 985                                         soulng::parser::Match match(false);
 986                                         if (*lexer == LPAREN)
 987                                         {
 988                                             ++lexer;
 989                                             match.hit = true;
 990                                         }
 991                                         if (match.hit)
 992                                         {
 993                                             *parentMatch8 = match;
 994                                         }
 995                                         else
 996                                         {
 997                                             lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(LPAREN)));
 998                                         }
 999                                     }
1000                                     *parentMatch7 = match;
1001                                 }
1002                                 *parentMatch6 = match;
1003                             }
1004                             *parentMatch5 = match;
1005                         }
1006                         if (match.hit)
1007                         {
1008                             soulng::parser::Match match(false);
1009                             soulng::parser::Match* parentMatch9 = &match;
1010                             {
1011                                 soulng::parser::Match match(true);
1012                                 soulng::parser::Match* parentMatch10 = &match;
1013                                 {
1014                                     soulng::lexer::Span span = lexer.GetSpan();
1015                                     soulng::parser::Match match = ParserStatementParser::Condition(lexer);
1016                                     cond.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1017                                     if (match.hit)
1018                                     {
1019                                         *parentMatch10 = match;
1020                                     }
1021                                     else
1022                                     {
1023                                         lexer.ThrowExpectationFailure(spanU"condition");
1024                                     }
1025                                 }
1026                                 *parentMatch9 = match;
1027                             }
1028                             *parentMatch5 = match;
1029                         }
1030                         *parentMatch4 = match;
1031                     }
1032                     if (match.hit)
1033                     {
1034                         soulng::parser::Match match(false);
1035                         soulng::parser::Match* parentMatch11 = &match;
1036                         {
1037                             soulng::parser::Match match(true);
1038                             soulng::parser::Match* parentMatch12 = &match;
1039                             {
1040                                 soulng::lexer::Span span = lexer.GetSpan();
1041                                 soulng::parser::Match match(false);
1042                                 if (*lexer == RPAREN)
1043                                 {
1044                                     ++lexer;
1045                                     match.hit = true;
1046                                 }
1047                                 if (match.hit)
1048                                 {
1049                                     *parentMatch12 = match;
1050                                 }
1051                                 else
1052                                 {
1053                                     lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
1054                                 }
1055                             }
1056                             *parentMatch11 = match;
1057                         }
1058                         *parentMatch4 = match;
1059                     }
1060                     *parentMatch3 = match;
1061                 }
1062                 if (match.hit)
1063                 {
1064                     soulng::parser::Match match(false);
1065                     soulng::parser::Match* parentMatch13 = &match;
1066                     {
1067                         soulng::parser::Match match(true);
1068                         soulng::parser::Match* parentMatch14 = &match;
1069                         {
1070                             soulng::lexer::Span span = lexer.GetSpan();
1071                             soulng::parser::Match match = ParserStatementParser::Statement(lexer);
1072                             thenS.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1073                             if (match.hit)
1074                             {
1075                                 *parentMatch14 = match;
1076                             }
1077                             else
1078                             {
1079                                 lexer.ThrowExpectationFailure(spanU"C++ statement");
1080                             }
1081                         }
1082                         *parentMatch13 = match;
1083                     }
1084                     *parentMatch3 = match;
1085                 }
1086                 *parentMatch2 = match;
1087             }
1088             if (match.hit)
1089             {
1090                 soulng::parser::Match match(false);
1091                 soulng::parser::Match* parentMatch15 = &match;
1092                 {
1093                     soulng::parser::Match match(true);
1094                     int64_t save = lexer.GetPos();
1095                     soulng::parser::Match* parentMatch16 = &match;
1096                     {
1097                         soulng::parser::Match match(false);
1098                         soulng::parser::Match* parentMatch17 = &match;
1099                         {
1100                             soulng::parser::Match match(false);
1101                             soulng::parser::Match* parentMatch18 = &match;
1102                             {
1103                                 soulng::parser::Match match(false);
1104                                 if (*lexer == ELSE)
1105                                 {
1106                                     ++lexer;
1107                                     match.hit = true;
1108                                 }
1109                                 *parentMatch18 = match;
1110                             }
1111                             if (match.hit)
1112                             {
1113                                 soulng::parser::Match match(false);
1114                                 soulng::parser::Match* parentMatch19 = &match;
1115                                 {
1116                                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
1117                                     elseS.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1118                                     *parentMatch19 = match;
1119                                 }
1120                                 *parentMatch18 = match;
1121                             }
1122                             *parentMatch17 = match;
1123                         }
1124                         if (match.hit)
1125                         {
1126                             *parentMatch16 = match;
1127                         }
1128                         else
1129                         {
1130                             lexer.SetPos(save);
1131                         }
1132                     }
1133                     *parentMatch15 = match;
1134                 }
1135                 *parentMatch2 = match;
1136             }
1137             *parentMatch1 = match;
1138         }
1139         if (match.hit)
1140         {
1141             {
1142                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1143 
1144                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1145                 return soulng::parser::Match(truenew soulng::cppcode::IfStatement(cond.release()thenS.release()elseS.release()));
1146             }
1147         }
1148         *parentMatch0 = match;
1149     }
1150     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1151 
1152 
1153 
1154 
1155 
1156     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1157     if (!match.hit)
1158     {
1159         match.value = nullptr;
1160     }
1161     return match;
1162 }
1163 
1164 soulng::parser::Match ParserStatementParser::SwitchStatement(ParserFileLexer& lexer)
1165 {
1166     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1167 
1168 
1169 
1170 
1171 
1172 
1173 
1174     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1175     std::unique_ptr<soulng::cppcode::CppObject> cond;
1176     std::unique_ptr<soulng::cppcode::Statement> stmt;
1177     soulng::parser::Match match(false);
1178     soulng::parser::Match* parentMatch0 = &match;
1179     {
1180         soulng::parser::Match match(false);
1181         soulng::parser::Match* parentMatch1 = &match;
1182         {
1183             soulng::parser::Match match(false);
1184             soulng::parser::Match* parentMatch2 = &match;
1185             {
1186                 soulng::parser::Match match(false);
1187                 soulng::parser::Match* parentMatch3 = &match;
1188                 {
1189                     soulng::parser::Match match(false);
1190                     if (*lexer == SWITCH)
1191                     {
1192                         ++lexer;
1193                         match.hit = true;
1194                     }
1195                     *parentMatch3 = match;
1196                 }
1197                 if (match.hit)
1198                 {
1199                     soulng::parser::Match match(false);
1200                     soulng::parser::Match* parentMatch4 = &match;
1201                     {
1202                         soulng::parser::Match match(true);
1203                         soulng::parser::Match* parentMatch5 = &match;
1204                         {
1205                             soulng::lexer::Span span = lexer.GetSpan();
1206                             soulng::parser::Match match(false);
1207                             if (*lexer == LPAREN)
1208                             {
1209                                 ++lexer;
1210                                 match.hit = true;
1211                             }
1212                             if (match.hit)
1213                             {
1214                                 *parentMatch5 = match;
1215                             }
1216                             else
1217                             {
1218                                 lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(LPAREN)));
1219                             }
1220                         }
1221                         *parentMatch4 = match;
1222                     }
1223                     *parentMatch3 = match;
1224                 }
1225                 *parentMatch2 = match;
1226             }
1227             if (match.hit)
1228             {
1229                 soulng::parser::Match match(false);
1230                 soulng::parser::Match* parentMatch6 = &match;
1231                 {
1232                     soulng::parser::Match match(true);
1233                     soulng::parser::Match* parentMatch7 = &match;
1234                     {
1235                         soulng::lexer::Span span = lexer.GetSpan();
1236                         soulng::parser::Match match = ParserStatementParser::Condition(lexer);
1237                         cond.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1238                         if (match.hit)
1239                         {
1240                             *parentMatch7 = match;
1241                         }
1242                         else
1243                         {
1244                             lexer.ThrowExpectationFailure(spanU"condition");
1245                         }
1246                     }
1247                     *parentMatch6 = match;
1248                 }
1249                 *parentMatch2 = match;
1250             }
1251             *parentMatch1 = match;
1252         }
1253         if (match.hit)
1254         {
1255             soulng::parser::Match match(false);
1256             soulng::parser::Match* parentMatch8 = &match;
1257             {
1258                 soulng::parser::Match match(true);
1259                 soulng::parser::Match* parentMatch9 = &match;
1260                 {
1261                     soulng::lexer::Span span = lexer.GetSpan();
1262                     soulng::parser::Match match(false);
1263                     if (*lexer == RPAREN)
1264                     {
1265                         ++lexer;
1266                         match.hit = true;
1267                     }
1268                     if (match.hit)
1269                     {
1270                         *parentMatch9 = match;
1271                     }
1272                     else
1273                     {
1274                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
1275                     }
1276                 }
1277                 *parentMatch8 = match;
1278             }
1279             *parentMatch1 = match;
1280         }
1281         *parentMatch0 = match;
1282     }
1283     if (match.hit)
1284     {
1285         soulng::parser::Match match(false);
1286         soulng::parser::Match* parentMatch10 = &match;
1287         {
1288             soulng::parser::Match match(false);
1289             soulng::parser::Match* parentMatch11 = &match;
1290             {
1291                 int64_t pos = lexer.GetPos();
1292                 soulng::parser::Match match(true);
1293                 soulng::parser::Match* parentMatch12 = &match;
1294                 {
1295                     soulng::lexer::Span span = lexer.GetSpan();
1296                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
1297                     stmt.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1298                     if (match.hit)
1299                     {
1300                         *parentMatch12 = match;
1301                     }
1302                     else
1303                     {
1304                         lexer.ThrowExpectationFailure(spanU"C++ statement");
1305                     }
1306                 }
1307                 if (match.hit)
1308                 {
1309                     {
1310                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1311 
1312                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
1313                         return soulng::parser::Match(truenew soulng::cppcode::SwitchStatement(cond.release()stmt.release()));
1314                     }
1315                 }
1316                 *parentMatch11 = match;
1317             }
1318             *parentMatch10 = match;
1319         }
1320         *parentMatch0 = match;
1321     }
1322     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1323 
1324 
1325 
1326 
1327 
1328     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1329     if (!match.hit)
1330     {
1331         match.value = nullptr;
1332     }
1333     return match;
1334 }
1335 
1336 soulng::parser::Match ParserStatementParser::IterationStatement(ParserFileLexer& lexer)
1337 {
1338     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1339 
1340 
1341 
1342 
1343 
1344 
1345 
1346     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1347     std::unique_ptr<soulng::cppcode::Statement> whileStatement;
1348     std::unique_ptr<soulng::cppcode::Statement> doStatement;
1349     std::unique_ptr<soulng::cppcode::Statement> rangeForStatement;
1350     std::unique_ptr<soulng::cppcode::Statement> forStatement;
1351     soulng::parser::Match match(false);
1352     soulng::parser::Match* parentMatch0 = &match;
1353     {
1354         int64_t save = lexer.GetPos();
1355         soulng::parser::Match match(false);
1356         soulng::parser::Match* parentMatch1 = &match;
1357         {
1358             int64_t save = lexer.GetPos();
1359             soulng::parser::Match match(false);
1360             soulng::parser::Match* parentMatch2 = &match;
1361             {
1362                 int64_t save = lexer.GetPos();
1363                 soulng::parser::Match match(false);
1364                 soulng::parser::Match* parentMatch3 = &match;
1365                 {
1366                     int64_t pos = lexer.GetPos();
1367                     soulng::parser::Match match = ParserStatementParser::WhileStatement(lexer);
1368                     whileStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1369                     if (match.hit)
1370                     {
1371                         {
1372                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1373 
1374                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
1375                             return soulng::parser::Match(truewhileStatement.release());
1376                         }
1377                     }
1378                     *parentMatch3 = match;
1379                 }
1380                 *parentMatch2 = match;
1381                 if (!match.hit)
1382                 {
1383                     soulng::parser::Match match(false);
1384                     soulng::parser::Match* parentMatch4 = &match;
1385                     lexer.SetPos(save);
1386                     {
1387                         soulng::parser::Match match(false);
1388                         soulng::parser::Match* parentMatch5 = &match;
1389                         {
1390                             int64_t pos = lexer.GetPos();
1391                             soulng::parser::Match match = ParserStatementParser::DoStatement(lexer);
1392                             doStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1393                             if (match.hit)
1394                             {
1395                                 {
1396                                     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1397 
1398                                     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1399                                     return soulng::parser::Match(truedoStatement.release());
1400                                 }
1401                             }
1402                             *parentMatch5 = match;
1403                         }
1404                         *parentMatch4 = match;
1405                     }
1406                     *parentMatch2 = match;
1407                 }
1408             }
1409             *parentMatch1 = match;
1410             if (!match.hit)
1411             {
1412                 soulng::parser::Match match(false);
1413                 soulng::parser::Match* parentMatch6 = &match;
1414                 lexer.SetPos(save);
1415                 {
1416                     soulng::parser::Match match(false);
1417                     soulng::parser::Match* parentMatch7 = &match;
1418                     {
1419                         int64_t pos = lexer.GetPos();
1420                         soulng::parser::Match match = ParserStatementParser::RangeForStatement(lexer);
1421                         rangeForStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1422                         if (match.hit)
1423                         {
1424                             {
1425                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1426 
1427                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
1428                                 return soulng::parser::Match(truerangeForStatement.release());
1429                             }
1430                         }
1431                         *parentMatch7 = match;
1432                     }
1433                     *parentMatch6 = match;
1434                 }
1435                 *parentMatch1 = match;
1436             }
1437         }
1438         *parentMatch0 = match;
1439         if (!match.hit)
1440         {
1441             soulng::parser::Match match(false);
1442             soulng::parser::Match* parentMatch8 = &match;
1443             lexer.SetPos(save);
1444             {
1445                 soulng::parser::Match match(false);
1446                 soulng::parser::Match* parentMatch9 = &match;
1447                 {
1448                     int64_t pos = lexer.GetPos();
1449                     soulng::parser::Match match = ParserStatementParser::ForStatement(lexer);
1450                     forStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1451                     if (match.hit)
1452                     {
1453                         {
1454                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1455 
1456                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
1457                             return soulng::parser::Match(trueforStatement.release());
1458                         }
1459                     }
1460                     *parentMatch9 = match;
1461                 }
1462                 *parentMatch8 = match;
1463             }
1464             *parentMatch0 = match;
1465         }
1466     }
1467     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1468 
1469 
1470 
1471 
1472 
1473     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1474     if (!match.hit)
1475     {
1476         match.value = nullptr;
1477     }
1478     return match;
1479 }
1480 
1481 soulng::parser::Match ParserStatementParser::WhileStatement(ParserFileLexer& lexer)
1482 {
1483     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1484 
1485 
1486 
1487 
1488 
1489 
1490 
1491     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1492     std::unique_ptr<soulng::cppcode::CppObject> cond;
1493     std::unique_ptr<soulng::cppcode::Statement> stmt;
1494     soulng::parser::Match match(false);
1495     soulng::parser::Match* parentMatch0 = &match;
1496     {
1497         soulng::parser::Match match(false);
1498         soulng::parser::Match* parentMatch1 = &match;
1499         {
1500             soulng::parser::Match match(false);
1501             soulng::parser::Match* parentMatch2 = &match;
1502             {
1503                 soulng::parser::Match match(false);
1504                 soulng::parser::Match* parentMatch3 = &match;
1505                 {
1506                     soulng::parser::Match match(false);
1507                     if (*lexer == WHILE)
1508                     {
1509                         ++lexer;
1510                         match.hit = true;
1511                     }
1512                     *parentMatch3 = match;
1513                 }
1514                 if (match.hit)
1515                 {
1516                     soulng::parser::Match match(false);
1517                     soulng::parser::Match* parentMatch4 = &match;
1518                     {
1519                         soulng::parser::Match match(true);
1520                         soulng::parser::Match* parentMatch5 = &match;
1521                         {
1522                             soulng::lexer::Span span = lexer.GetSpan();
1523                             soulng::parser::Match match(false);
1524                             if (*lexer == LPAREN)
1525                             {
1526                                 ++lexer;
1527                                 match.hit = true;
1528                             }
1529                             if (match.hit)
1530                             {
1531                                 *parentMatch5 = match;
1532                             }
1533                             else
1534                             {
1535                                 lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(LPAREN)));
1536                             }
1537                         }
1538                         *parentMatch4 = match;
1539                     }
1540                     *parentMatch3 = match;
1541                 }
1542                 *parentMatch2 = match;
1543             }
1544             if (match.hit)
1545             {
1546                 soulng::parser::Match match(false);
1547                 soulng::parser::Match* parentMatch6 = &match;
1548                 {
1549                     soulng::parser::Match match(true);
1550                     soulng::parser::Match* parentMatch7 = &match;
1551                     {
1552                         soulng::lexer::Span span = lexer.GetSpan();
1553                         soulng::parser::Match match = ParserStatementParser::Condition(lexer);
1554                         cond.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1555                         if (match.hit)
1556                         {
1557                             *parentMatch7 = match;
1558                         }
1559                         else
1560                         {
1561                             lexer.ThrowExpectationFailure(spanU"condition");
1562                         }
1563                     }
1564                     *parentMatch6 = match;
1565                 }
1566                 *parentMatch2 = match;
1567             }
1568             *parentMatch1 = match;
1569         }
1570         if (match.hit)
1571         {
1572             soulng::parser::Match match(false);
1573             soulng::parser::Match* parentMatch8 = &match;
1574             {
1575                 soulng::parser::Match match(true);
1576                 soulng::parser::Match* parentMatch9 = &match;
1577                 {
1578                     soulng::lexer::Span span = lexer.GetSpan();
1579                     soulng::parser::Match match(false);
1580                     if (*lexer == RPAREN)
1581                     {
1582                         ++lexer;
1583                         match.hit = true;
1584                     }
1585                     if (match.hit)
1586                     {
1587                         *parentMatch9 = match;
1588                     }
1589                     else
1590                     {
1591                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
1592                     }
1593                 }
1594                 *parentMatch8 = match;
1595             }
1596             *parentMatch1 = match;
1597         }
1598         *parentMatch0 = match;
1599     }
1600     if (match.hit)
1601     {
1602         soulng::parser::Match match(false);
1603         soulng::parser::Match* parentMatch10 = &match;
1604         {
1605             soulng::parser::Match match(false);
1606             soulng::parser::Match* parentMatch11 = &match;
1607             {
1608                 int64_t pos = lexer.GetPos();
1609                 soulng::parser::Match match(true);
1610                 soulng::parser::Match* parentMatch12 = &match;
1611                 {
1612                     soulng::lexer::Span span = lexer.GetSpan();
1613                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
1614                     stmt.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1615                     if (match.hit)
1616                     {
1617                         *parentMatch12 = match;
1618                     }
1619                     else
1620                     {
1621                         lexer.ThrowExpectationFailure(spanU"C++ statement");
1622                     }
1623                 }
1624                 if (match.hit)
1625                 {
1626                     {
1627                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1628 
1629                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
1630                         return soulng::parser::Match(truenew soulng::cppcode::WhileStatement(cond.release()stmt.release()));
1631                     }
1632                 }
1633                 *parentMatch11 = match;
1634             }
1635             *parentMatch10 = match;
1636         }
1637         *parentMatch0 = match;
1638     }
1639     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1640 
1641 
1642 
1643 
1644 
1645     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1646     if (!match.hit)
1647     {
1648         match.value = nullptr;
1649     }
1650     return match;
1651 }
1652 
1653 soulng::parser::Match ParserStatementParser::DoStatement(ParserFileLexer& lexer)
1654 {
1655     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1656 
1657 
1658 
1659 
1660 
1661 
1662 
1663     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1664     std::unique_ptr<soulng::cppcode::Statement> stmt;
1665     std::unique_ptr<soulng::cppcode::CppObject> cond;
1666     soulng::parser::Match match(false);
1667     soulng::parser::Match* parentMatch0 = &match;
1668     {
1669         soulng::parser::Match match(false);
1670         soulng::parser::Match* parentMatch1 = &match;
1671         {
1672             soulng::parser::Match match(false);
1673             soulng::parser::Match* parentMatch2 = &match;
1674             {
1675                 soulng::parser::Match match(false);
1676                 soulng::parser::Match* parentMatch3 = &match;
1677                 {
1678                     soulng::parser::Match match(false);
1679                     soulng::parser::Match* parentMatch4 = &match;
1680                     {
1681                         soulng::parser::Match match(false);
1682                         soulng::parser::Match* parentMatch5 = &match;
1683                         {
1684                             soulng::parser::Match match(false);
1685                             if (*lexer == DO)
1686                             {
1687                                 ++lexer;
1688                                 match.hit = true;
1689                             }
1690                             *parentMatch5 = match;
1691                         }
1692                         if (match.hit)
1693                         {
1694                             soulng::parser::Match match(false);
1695                             soulng::parser::Match* parentMatch6 = &match;
1696                             {
1697                                 soulng::parser::Match match(true);
1698                                 soulng::parser::Match* parentMatch7 = &match;
1699                                 {
1700                                     soulng::lexer::Span span = lexer.GetSpan();
1701                                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
1702                                     stmt.reset(static_cast<soulng::cppcode::Statement*>(match.value));
1703                                     if (match.hit)
1704                                     {
1705                                         *parentMatch7 = match;
1706                                     }
1707                                     else
1708                                     {
1709                                         lexer.ThrowExpectationFailure(spanU"C++ statement");
1710                                     }
1711                                 }
1712                                 *parentMatch6 = match;
1713                             }
1714                             *parentMatch5 = match;
1715                         }
1716                         *parentMatch4 = match;
1717                     }
1718                     if (match.hit)
1719                     {
1720                         soulng::parser::Match match(false);
1721                         soulng::parser::Match* parentMatch8 = &match;
1722                         {
1723                             soulng::parser::Match match(true);
1724                             soulng::parser::Match* parentMatch9 = &match;
1725                             {
1726                                 soulng::lexer::Span span = lexer.GetSpan();
1727                                 soulng::parser::Match match(false);
1728                                 if (*lexer == WHILE)
1729                                 {
1730                                     ++lexer;
1731                                     match.hit = true;
1732                                 }
1733                                 if (match.hit)
1734                                 {
1735                                     *parentMatch9 = match;
1736                                 }
1737                                 else
1738                                 {
1739                                     lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(WHILE)));
1740                                 }
1741                             }
1742                             *parentMatch8 = match;
1743                         }
1744                         *parentMatch4 = match;
1745                     }
1746                     *parentMatch3 = match;
1747                 }
1748                 if (match.hit)
1749                 {
1750                     soulng::parser::Match match(false);
1751                     soulng::parser::Match* parentMatch10 = &match;
1752                     {
1753                         soulng::parser::Match match(true);
1754                         soulng::parser::Match* parentMatch11 = &match;
1755                         {
1756                             soulng::lexer::Span span = lexer.GetSpan();
1757                             soulng::parser::Match match(false);
1758                             if (*lexer == LPAREN)
1759                             {
1760                                 ++lexer;
1761                                 match.hit = true;
1762                             }
1763                             if (match.hit)
1764                             {
1765                                 *parentMatch11 = match;
1766                             }
1767                             else
1768                             {
1769                                 lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(LPAREN)));
1770                             }
1771                         }
1772                         *parentMatch10 = match;
1773                     }
1774                     *parentMatch3 = match;
1775                 }
1776                 *parentMatch2 = match;
1777             }
1778             if (match.hit)
1779             {
1780                 soulng::parser::Match match(false);
1781                 soulng::parser::Match* parentMatch12 = &match;
1782                 {
1783                     soulng::parser::Match match(true);
1784                     soulng::parser::Match* parentMatch13 = &match;
1785                     {
1786                         soulng::lexer::Span span = lexer.GetSpan();
1787                         soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
1788                         cond.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1789                         if (match.hit)
1790                         {
1791                             *parentMatch13 = match;
1792                         }
1793                         else
1794                         {
1795                             lexer.ThrowExpectationFailure(spanU"C++ expression");
1796                         }
1797                     }
1798                     *parentMatch12 = match;
1799                 }
1800                 *parentMatch2 = match;
1801             }
1802             *parentMatch1 = match;
1803         }
1804         if (match.hit)
1805         {
1806             soulng::parser::Match match(false);
1807             soulng::parser::Match* parentMatch14 = &match;
1808             {
1809                 soulng::parser::Match match(true);
1810                 soulng::parser::Match* parentMatch15 = &match;
1811                 {
1812                     soulng::lexer::Span span = lexer.GetSpan();
1813                     soulng::parser::Match match(false);
1814                     if (*lexer == RPAREN)
1815                     {
1816                         ++lexer;
1817                         match.hit = true;
1818                     }
1819                     if (match.hit)
1820                     {
1821                         *parentMatch15 = match;
1822                     }
1823                     else
1824                     {
1825                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
1826                     }
1827                 }
1828                 *parentMatch14 = match;
1829             }
1830             *parentMatch1 = match;
1831         }
1832         *parentMatch0 = match;
1833     }
1834     if (match.hit)
1835     {
1836         soulng::parser::Match match(false);
1837         soulng::parser::Match* parentMatch16 = &match;
1838         {
1839             soulng::parser::Match match(false);
1840             soulng::parser::Match* parentMatch17 = &match;
1841             {
1842                 int64_t pos = lexer.GetPos();
1843                 soulng::parser::Match match(true);
1844                 soulng::parser::Match* parentMatch18 = &match;
1845                 {
1846                     soulng::lexer::Span span = lexer.GetSpan();
1847                     soulng::parser::Match match(false);
1848                     if (*lexer == SEMICOLON)
1849                     {
1850                         ++lexer;
1851                         match.hit = true;
1852                     }
1853                     if (match.hit)
1854                     {
1855                         *parentMatch18 = match;
1856                     }
1857                     else
1858                     {
1859                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(SEMICOLON)));
1860                     }
1861                 }
1862                 if (match.hit)
1863                 {
1864                     {
1865                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1866 
1867                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
1868                         return soulng::parser::Match(truenew soulng::cppcode::DoStatement(stmt.release()cond.release()));
1869                     }
1870                 }
1871                 *parentMatch17 = match;
1872             }
1873             *parentMatch16 = match;
1874         }
1875         *parentMatch0 = match;
1876     }
1877     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1878 
1879 
1880 
1881 
1882 
1883     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1884     if (!match.hit)
1885     {
1886         match.value = nullptr;
1887     }
1888     return match;
1889 }
1890 
1891 soulng::parser::Match ParserStatementParser::RangeForStatement(ParserFileLexer& lexer)
1892 {
1893     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
1894 
1895 
1896 
1897 
1898 
1899 
1900 
1901     #endif // SOULNG_PARSER_DEBUG_SUPPORT
1902     std::unique_ptr<soulng::cppcode::ForRangeDeclaration> forRangeDeclaration;
1903     std::unique_ptr<soulng::cppcode::CppObject> container;
1904     std::unique_ptr<soulng::cppcode::Statement> stmt;
1905     soulng::parser::Match match(false);
1906     soulng::parser::Match* parentMatch0 = &match;
1907     {
1908         soulng::parser::Match match(false);
1909         soulng::parser::Match* parentMatch1 = &match;
1910         {
1911             soulng::parser::Match match(false);
1912             soulng::parser::Match* parentMatch2 = &match;
1913             {
1914                 soulng::parser::Match match(false);
1915                 soulng::parser::Match* parentMatch3 = &match;
1916                 {
1917                     soulng::parser::Match match(false);
1918                     soulng::parser::Match* parentMatch4 = &match;
1919                     {
1920                         soulng::parser::Match match(false);
1921                         soulng::parser::Match* parentMatch5 = &match;
1922                         {
1923                             soulng::parser::Match match(false);
1924                             if (*lexer == FOR)
1925                             {
1926                                 ++lexer;
1927                                 match.hit = true;
1928                             }
1929                             *parentMatch5 = match;
1930                         }
1931                         if (match.hit)
1932                         {
1933                             soulng::parser::Match match(false);
1934                             soulng::parser::Match* parentMatch6 = &match;
1935                             {
1936                                 soulng::parser::Match match(false);
1937                                 if (*lexer == LPAREN)
1938                                 {
1939                                     ++lexer;
1940                                     match.hit = true;
1941                                 }
1942                                 *parentMatch6 = match;
1943                             }
1944                             *parentMatch5 = match;
1945                         }
1946                         *parentMatch4 = match;
1947                     }
1948                     if (match.hit)
1949                     {
1950                         soulng::parser::Match match(false);
1951                         soulng::parser::Match* parentMatch7 = &match;
1952                         {
1953                             soulng::parser::Match match = ParserStatementParser::ForRangeDeclaration(lexer);
1954                             forRangeDeclaration.reset(static_cast<soulng::cppcode::ForRangeDeclaration*>(match.value));
1955                             *parentMatch7 = match;
1956                         }
1957                         *parentMatch4 = match;
1958                     }
1959                     *parentMatch3 = match;
1960                 }
1961                 if (match.hit)
1962                 {
1963                     soulng::parser::Match match(false);
1964                     soulng::parser::Match* parentMatch8 = &match;
1965                     {
1966                         soulng::parser::Match match(false);
1967                         if (*lexer == COLON)
1968                         {
1969                             ++lexer;
1970                             match.hit = true;
1971                         }
1972                         *parentMatch8 = match;
1973                     }
1974                     *parentMatch3 = match;
1975                 }
1976                 *parentMatch2 = match;
1977             }
1978             if (match.hit)
1979             {
1980                 soulng::parser::Match match(false);
1981                 soulng::parser::Match* parentMatch9 = &match;
1982                 {
1983                     soulng::parser::Match match(true);
1984                     soulng::parser::Match* parentMatch10 = &match;
1985                     {
1986                         soulng::lexer::Span span = lexer.GetSpan();
1987                         soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
1988                         container.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
1989                         if (match.hit)
1990                         {
1991                             *parentMatch10 = match;
1992                         }
1993                         else
1994                         {
1995                             lexer.ThrowExpectationFailure(spanU"C++ expression");
1996                         }
1997                     }
1998                     *parentMatch9 = match;
1999                 }
2000                 *parentMatch2 = match;
2001             }
2002             *parentMatch1 = match;
2003         }
2004         if (match.hit)
2005         {
2006             soulng::parser::Match match(false);
2007             soulng::parser::Match* parentMatch11 = &match;
2008             {
2009                 soulng::parser::Match match(true);
2010                 soulng::parser::Match* parentMatch12 = &match;
2011                 {
2012                     soulng::lexer::Span span = lexer.GetSpan();
2013                     soulng::parser::Match match(false);
2014                     if (*lexer == RPAREN)
2015                     {
2016                         ++lexer;
2017                         match.hit = true;
2018                     }
2019                     if (match.hit)
2020                     {
2021                         *parentMatch12 = match;
2022                     }
2023                     else
2024                     {
2025                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
2026                     }
2027                 }
2028                 *parentMatch11 = match;
2029             }
2030             *parentMatch1 = match;
2031         }
2032         *parentMatch0 = match;
2033     }
2034     if (match.hit)
2035     {
2036         soulng::parser::Match match(false);
2037         soulng::parser::Match* parentMatch13 = &match;
2038         {
2039             soulng::parser::Match match(false);
2040             soulng::parser::Match* parentMatch14 = &match;
2041             {
2042                 int64_t pos = lexer.GetPos();
2043                 soulng::parser::Match match(true);
2044                 soulng::parser::Match* parentMatch15 = &match;
2045                 {
2046                     soulng::lexer::Span span = lexer.GetSpan();
2047                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
2048                     stmt.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2049                     if (match.hit)
2050                     {
2051                         *parentMatch15 = match;
2052                     }
2053                     else
2054                     {
2055                         lexer.ThrowExpectationFailure(spanU"C++ statement");
2056                     }
2057                 }
2058                 if (match.hit)
2059                 {
2060                     {
2061                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2062 
2063                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
2064                         return soulng::parser::Match(truenew soulng::cppcode::RangeForStatement(forRangeDeclaration.release()container.release()stmt.release()));
2065                     }
2066                 }
2067                 *parentMatch14 = match;
2068             }
2069             *parentMatch13 = match;
2070         }
2071         *parentMatch0 = match;
2072     }
2073     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2074 
2075 
2076 
2077 
2078 
2079     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2080     if (!match.hit)
2081     {
2082         match.value = nullptr;
2083     }
2084     return match;
2085 }
2086 
2087 soulng::parser::Match ParserStatementParser::ForRangeDeclaration(ParserFileLexer& lexer)
2088 {
2089     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2090 
2091 
2092 
2093 
2094 
2095 
2096 
2097     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2098     std::unique_ptr<soulng::cppcode::ForRangeDeclaration> forRangeDeclaration = std::unique_ptr<soulng::cppcode::ForRangeDeclaration>();
2099     std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>declarator;
2100     soulng::parser::Match match(false);
2101     soulng::parser::Match* parentMatch0 = &match;
2102     {
2103         int64_t pos = lexer.GetPos();
2104         soulng::parser::Match match(false);
2105         soulng::parser::Match* parentMatch1 = &match;
2106         {
2107             soulng::parser::Match match(false);
2108             soulng::parser::Match* parentMatch2 = &match;
2109             {
2110                 soulng::parser::Match match(false);
2111                 soulng::parser::Match* parentMatch3 = &match;
2112                 {
2113                     soulng::parser::Match match(false);
2114                     soulng::parser::Match* parentMatch4 = &match;
2115                     {
2116                         int64_t pos = lexer.GetPos();
2117                         soulng::parser::Match match(true);
2118                         if (match.hit)
2119                         {
2120                             forRangeDeclaration.reset(new soulng::cppcode::ForRangeDeclaration());
2121                         }
2122                         *parentMatch4 = match;
2123                     }
2124                     *parentMatch3 = match;
2125                 }
2126                 if (match.hit)
2127                 {
2128                     soulng::parser::Match match(false);
2129                     soulng::parser::Match* parentMatch5 = &match;
2130                     {
2131                         soulng::parser::Match match = ParserDeclaratorParser::TypeSpecifierSeq(lexerforRangeDeclaration->GetTypeId());
2132                         *parentMatch5 = match;
2133                     }
2134                     *parentMatch3 = match;
2135                 }
2136                 *parentMatch2 = match;
2137             }
2138             if (match.hit)
2139             {
2140                 soulng::parser::Match match(false);
2141                 soulng::parser::Match* parentMatch6 = &match;
2142                 {
2143                     soulng::parser::Match match(false);
2144                     soulng::parser::Match* parentMatch7 = &match;
2145                     {
2146                         int64_t pos = lexer.GetPos();
2147                         soulng::parser::Match match = ParserDeclaratorParser::Declarator(lexer);
2148                         declarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
2149                         if (match.hit)
2150                         {
2151                             forRangeDeclaration->SetDeclarator(declarator->value);
2152                         }
2153                         *parentMatch7 = match;
2154                     }
2155                     *parentMatch6 = match;
2156                 }
2157                 *parentMatch2 = match;
2158             }
2159             *parentMatch1 = match;
2160         }
2161         if (match.hit)
2162         {
2163             {
2164                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2165 
2166                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2167                 return soulng::parser::Match(trueforRangeDeclaration.release());
2168             }
2169         }
2170         *parentMatch0 = match;
2171     }
2172     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2173 
2174 
2175 
2176 
2177 
2178     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2179     if (!match.hit)
2180     {
2181         match.value = nullptr;
2182     }
2183     return match;
2184 }
2185 
2186 soulng::parser::Match ParserStatementParser::ForStatement(ParserFileLexer& lexer)
2187 {
2188     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2189 
2190 
2191 
2192 
2193 
2194 
2195 
2196     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2197     std::unique_ptr<soulng::cppcode::CppObject> forInitStatement;
2198     std::unique_ptr<soulng::cppcode::CppObject> cond;
2199     std::unique_ptr<soulng::cppcode::CppObject> loopExpr;
2200     std::unique_ptr<soulng::cppcode::Statement> stmt;
2201     soulng::parser::Match match(false);
2202     soulng::parser::Match* parentMatch0 = &match;
2203     {
2204         soulng::parser::Match match(false);
2205         soulng::parser::Match* parentMatch1 = &match;
2206         {
2207             soulng::parser::Match match(false);
2208             soulng::parser::Match* parentMatch2 = &match;
2209             {
2210                 soulng::parser::Match match(false);
2211                 soulng::parser::Match* parentMatch3 = &match;
2212                 {
2213                     soulng::parser::Match match(false);
2214                     soulng::parser::Match* parentMatch4 = &match;
2215                     {
2216                         soulng::parser::Match match(false);
2217                         soulng::parser::Match* parentMatch5 = &match;
2218                         {
2219                             soulng::parser::Match match(false);
2220                             soulng::parser::Match* parentMatch6 = &match;
2221                             {
2222                                 soulng::parser::Match match(false);
2223                                 if (*lexer == FOR)
2224                                 {
2225                                     ++lexer;
2226                                     match.hit = true;
2227                                 }
2228                                 *parentMatch6 = match;
2229                             }
2230                             if (match.hit)
2231                             {
2232                                 soulng::parser::Match match(false);
2233                                 soulng::parser::Match* parentMatch7 = &match;
2234                                 {
2235                                     soulng::parser::Match match(false);
2236                                     if (*lexer == LPAREN)
2237                                     {
2238                                         ++lexer;
2239                                         match.hit = true;
2240                                     }
2241                                     *parentMatch7 = match;
2242                                 }
2243                                 *parentMatch6 = match;
2244                             }
2245                             *parentMatch5 = match;
2246                         }
2247                         if (match.hit)
2248                         {
2249                             soulng::parser::Match match(false);
2250                             soulng::parser::Match* parentMatch8 = &match;
2251                             {
2252                                 soulng::parser::Match match = ParserStatementParser::ForInitStatement(lexer);
2253                                 forInitStatement.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2254                                 *parentMatch8 = match;
2255                             }
2256                             *parentMatch5 = match;
2257                         }
2258                         *parentMatch4 = match;
2259                     }
2260                     if (match.hit)
2261                     {
2262                         soulng::parser::Match match(false);
2263                         soulng::parser::Match* parentMatch9 = &match;
2264                         {
2265                             soulng::parser::Match match(true);
2266                             int64_t save = lexer.GetPos();
2267                             soulng::parser::Match* parentMatch10 = &match;
2268                             {
2269                                 soulng::parser::Match match = ParserStatementParser::Condition(lexer);
2270                                 cond.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2271                                 if (match.hit)
2272                                 {
2273                                     *parentMatch10 = match;
2274                                 }
2275                                 else
2276                                 {
2277                                     lexer.SetPos(save);
2278                                 }
2279                             }
2280                             *parentMatch9 = match;
2281                         }
2282                         *parentMatch4 = match;
2283                     }
2284                     *parentMatch3 = match;
2285                 }
2286                 if (match.hit)
2287                 {
2288                     soulng::parser::Match match(false);
2289                     soulng::parser::Match* parentMatch11 = &match;
2290                     {
2291                         soulng::parser::Match match(false);
2292                         if (*lexer == SEMICOLON)
2293                         {
2294                             ++lexer;
2295                             match.hit = true;
2296                         }
2297                         *parentMatch11 = match;
2298                     }
2299                     *parentMatch3 = match;
2300                 }
2301                 *parentMatch2 = match;
2302             }
2303             if (match.hit)
2304             {
2305                 soulng::parser::Match match(false);
2306                 soulng::parser::Match* parentMatch12 = &match;
2307                 {
2308                     soulng::parser::Match match(true);
2309                     int64_t save = lexer.GetPos();
2310                     soulng::parser::Match* parentMatch13 = &match;
2311                     {
2312                         soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
2313                         loopExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2314                         if (match.hit)
2315                         {
2316                             *parentMatch13 = match;
2317                         }
2318                         else
2319                         {
2320                             lexer.SetPos(save);
2321                         }
2322                     }
2323                     *parentMatch12 = match;
2324                 }
2325                 *parentMatch2 = match;
2326             }
2327             *parentMatch1 = match;
2328         }
2329         if (match.hit)
2330         {
2331             soulng::parser::Match match(false);
2332             soulng::parser::Match* parentMatch14 = &match;
2333             {
2334                 soulng::parser::Match match(true);
2335                 soulng::parser::Match* parentMatch15 = &match;
2336                 {
2337                     soulng::lexer::Span span = lexer.GetSpan();
2338                     soulng::parser::Match match(false);
2339                     if (*lexer == RPAREN)
2340                     {
2341                         ++lexer;
2342                         match.hit = true;
2343                     }
2344                     if (match.hit)
2345                     {
2346                         *parentMatch15 = match;
2347                     }
2348                     else
2349                     {
2350                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
2351                     }
2352                 }
2353                 *parentMatch14 = match;
2354             }
2355             *parentMatch1 = match;
2356         }
2357         *parentMatch0 = match;
2358     }
2359     if (match.hit)
2360     {
2361         soulng::parser::Match match(false);
2362         soulng::parser::Match* parentMatch16 = &match;
2363         {
2364             soulng::parser::Match match(false);
2365             soulng::parser::Match* parentMatch17 = &match;
2366             {
2367                 int64_t pos = lexer.GetPos();
2368                 soulng::parser::Match match(true);
2369                 soulng::parser::Match* parentMatch18 = &match;
2370                 {
2371                     soulng::lexer::Span span = lexer.GetSpan();
2372                     soulng::parser::Match match = ParserStatementParser::Statement(lexer);
2373                     stmt.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2374                     if (match.hit)
2375                     {
2376                         *parentMatch18 = match;
2377                     }
2378                     else
2379                     {
2380                         lexer.ThrowExpectationFailure(spanU"C++ statement");
2381                     }
2382                 }
2383                 if (match.hit)
2384                 {
2385                     {
2386                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2387 
2388                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
2389                         return soulng::parser::Match(truenew soulng::cppcode::ForStatement(forInitStatement.release()cond.release()loopExpr.release()stmt.release()));
2390                     }
2391                 }
2392                 *parentMatch17 = match;
2393             }
2394             *parentMatch16 = match;
2395         }
2396         *parentMatch0 = match;
2397     }
2398     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2399 
2400 
2401 
2402 
2403 
2404     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2405     if (!match.hit)
2406     {
2407         match.value = nullptr;
2408     }
2409     return match;
2410 }
2411 
2412 soulng::parser::Match ParserStatementParser::ForInitStatement(ParserFileLexer& lexer)
2413 {
2414     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2415 
2416 
2417 
2418 
2419 
2420 
2421 
2422     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2423     std::unique_ptr<soulng::cppcode::Statement> emptyStatement;
2424     std::unique_ptr<soulng::cppcode::Statement> expressionStatement;
2425     std::unique_ptr<soulng::cppcode::SimpleDeclaration> simpleDeclaration;
2426     soulng::parser::Match match(false);
2427     soulng::parser::Match* parentMatch0 = &match;
2428     {
2429         int64_t save = lexer.GetPos();
2430         soulng::parser::Match match(false);
2431         soulng::parser::Match* parentMatch1 = &match;
2432         {
2433             int64_t save = lexer.GetPos();
2434             soulng::parser::Match match(false);
2435             soulng::parser::Match* parentMatch2 = &match;
2436             {
2437                 int64_t pos = lexer.GetPos();
2438                 soulng::parser::Match match = ParserStatementParser::EmptyStatement(lexer);
2439                 emptyStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2440                 if (match.hit)
2441                 {
2442                     {
2443                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2444 
2445                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
2446                         return soulng::parser::Match(trueemptyStatement.release());
2447                     }
2448                 }
2449                 *parentMatch2 = match;
2450             }
2451             *parentMatch1 = match;
2452             if (!match.hit)
2453             {
2454                 soulng::parser::Match match(false);
2455                 soulng::parser::Match* parentMatch3 = &match;
2456                 lexer.SetPos(save);
2457                 {
2458                     soulng::parser::Match match(false);
2459                     soulng::parser::Match* parentMatch4 = &match;
2460                     {
2461                         int64_t pos = lexer.GetPos();
2462                         soulng::parser::Match match = ParserStatementParser::ExpressionStatement(lexer);
2463                         expressionStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2464                         if (match.hit)
2465                         {
2466                             {
2467                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2468 
2469                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2470                                 return soulng::parser::Match(trueexpressionStatement.release());
2471                             }
2472                         }
2473                         *parentMatch4 = match;
2474                     }
2475                     *parentMatch3 = match;
2476                 }
2477                 *parentMatch1 = match;
2478             }
2479         }
2480         *parentMatch0 = match;
2481         if (!match.hit)
2482         {
2483             soulng::parser::Match match(false);
2484             soulng::parser::Match* parentMatch5 = &match;
2485             lexer.SetPos(save);
2486             {
2487                 soulng::parser::Match match(false);
2488                 soulng::parser::Match* parentMatch6 = &match;
2489                 {
2490                     int64_t pos = lexer.GetPos();
2491                     soulng::parser::Match match = ParserDeclarationParser::SimpleDeclaration(lexer);
2492                     simpleDeclaration.reset(static_cast<soulng::cppcode::SimpleDeclaration*>(match.value));
2493                     if (match.hit)
2494                     {
2495                         {
2496                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2497 
2498                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
2499                             return soulng::parser::Match(truesimpleDeclaration.release());
2500                         }
2501                     }
2502                     *parentMatch6 = match;
2503                 }
2504                 *parentMatch5 = match;
2505             }
2506             *parentMatch0 = match;
2507         }
2508     }
2509     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2510 
2511 
2512 
2513 
2514 
2515     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2516     if (!match.hit)
2517     {
2518         match.value = nullptr;
2519     }
2520     return match;
2521 }
2522 
2523 soulng::parser::Match ParserStatementParser::JumpStatement(ParserFileLexer& lexer)
2524 {
2525     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2526 
2527 
2528 
2529 
2530 
2531 
2532 
2533     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2534     std::unique_ptr<soulng::cppcode::Statement> breakStatement;
2535     std::unique_ptr<soulng::cppcode::Statement> continueStatement;
2536     std::unique_ptr<soulng::cppcode::Statement> returnStatement;
2537     std::unique_ptr<soulng::cppcode::Statement> gotoStatement;
2538     soulng::parser::Match match(false);
2539     soulng::parser::Match* parentMatch0 = &match;
2540     {
2541         int64_t save = lexer.GetPos();
2542         soulng::parser::Match match(false);
2543         soulng::parser::Match* parentMatch1 = &match;
2544         {
2545             int64_t save = lexer.GetPos();
2546             soulng::parser::Match match(false);
2547             soulng::parser::Match* parentMatch2 = &match;
2548             {
2549                 int64_t save = lexer.GetPos();
2550                 soulng::parser::Match match(false);
2551                 soulng::parser::Match* parentMatch3 = &match;
2552                 {
2553                     int64_t pos = lexer.GetPos();
2554                     soulng::parser::Match match = ParserStatementParser::BreakStatement(lexer);
2555                     breakStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2556                     if (match.hit)
2557                     {
2558                         {
2559                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2560 
2561                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
2562                             return soulng::parser::Match(truebreakStatement.release());
2563                         }
2564                     }
2565                     *parentMatch3 = match;
2566                 }
2567                 *parentMatch2 = match;
2568                 if (!match.hit)
2569                 {
2570                     soulng::parser::Match match(false);
2571                     soulng::parser::Match* parentMatch4 = &match;
2572                     lexer.SetPos(save);
2573                     {
2574                         soulng::parser::Match match(false);
2575                         soulng::parser::Match* parentMatch5 = &match;
2576                         {
2577                             int64_t pos = lexer.GetPos();
2578                             soulng::parser::Match match = ParserStatementParser::ContinueStatement(lexer);
2579                             continueStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2580                             if (match.hit)
2581                             {
2582                                 {
2583                                     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2584 
2585                                     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2586                                     return soulng::parser::Match(truecontinueStatement.release());
2587                                 }
2588                             }
2589                             *parentMatch5 = match;
2590                         }
2591                         *parentMatch4 = match;
2592                     }
2593                     *parentMatch2 = match;
2594                 }
2595             }
2596             *parentMatch1 = match;
2597             if (!match.hit)
2598             {
2599                 soulng::parser::Match match(false);
2600                 soulng::parser::Match* parentMatch6 = &match;
2601                 lexer.SetPos(save);
2602                 {
2603                     soulng::parser::Match match(false);
2604                     soulng::parser::Match* parentMatch7 = &match;
2605                     {
2606                         int64_t pos = lexer.GetPos();
2607                         soulng::parser::Match match = ParserStatementParser::ReturnStatement(lexer);
2608                         returnStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2609                         if (match.hit)
2610                         {
2611                             {
2612                                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2613 
2614                                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2615                                 return soulng::parser::Match(truereturnStatement.release());
2616                             }
2617                         }
2618                         *parentMatch7 = match;
2619                     }
2620                     *parentMatch6 = match;
2621                 }
2622                 *parentMatch1 = match;
2623             }
2624         }
2625         *parentMatch0 = match;
2626         if (!match.hit)
2627         {
2628             soulng::parser::Match match(false);
2629             soulng::parser::Match* parentMatch8 = &match;
2630             lexer.SetPos(save);
2631             {
2632                 soulng::parser::Match match(false);
2633                 soulng::parser::Match* parentMatch9 = &match;
2634                 {
2635                     int64_t pos = lexer.GetPos();
2636                     soulng::parser::Match match = ParserStatementParser::GotoStatement(lexer);
2637                     gotoStatement.reset(static_cast<soulng::cppcode::Statement*>(match.value));
2638                     if (match.hit)
2639                     {
2640                         {
2641                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2642 
2643                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
2644                             return soulng::parser::Match(truegotoStatement.release());
2645                         }
2646                     }
2647                     *parentMatch9 = match;
2648                 }
2649                 *parentMatch8 = match;
2650             }
2651             *parentMatch0 = match;
2652         }
2653     }
2654     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2655 
2656 
2657 
2658 
2659 
2660     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2661     if (!match.hit)
2662     {
2663         match.value = nullptr;
2664     }
2665     return match;
2666 }
2667 
2668 soulng::parser::Match ParserStatementParser::BreakStatement(ParserFileLexer& lexer)
2669 {
2670     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2671 
2672 
2673 
2674 
2675 
2676 
2677 
2678     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2679     soulng::parser::Match match(false);
2680     soulng::parser::Match* parentMatch0 = &match;
2681     {
2682         int64_t pos = lexer.GetPos();
2683         soulng::parser::Match match(false);
2684         soulng::parser::Match* parentMatch1 = &match;
2685         {
2686             soulng::parser::Match match(false);
2687             soulng::parser::Match* parentMatch2 = &match;
2688             {
2689                 soulng::parser::Match match(false);
2690                 if (*lexer == BREAK)
2691                 {
2692                     ++lexer;
2693                     match.hit = true;
2694                 }
2695                 *parentMatch2 = match;
2696             }
2697             if (match.hit)
2698             {
2699                 soulng::parser::Match match(false);
2700                 soulng::parser::Match* parentMatch3 = &match;
2701                 {
2702                     soulng::parser::Match match(true);
2703                     soulng::parser::Match* parentMatch4 = &match;
2704                     {
2705                         soulng::lexer::Span span = lexer.GetSpan();
2706                         soulng::parser::Match match(false);
2707                         if (*lexer == SEMICOLON)
2708                         {
2709                             ++lexer;
2710                             match.hit = true;
2711                         }
2712                         if (match.hit)
2713                         {
2714                             *parentMatch4 = match;
2715                         }
2716                         else
2717                         {
2718                             lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(SEMICOLON)));
2719                         }
2720                     }
2721                     *parentMatch3 = match;
2722                 }
2723                 *parentMatch2 = match;
2724             }
2725             *parentMatch1 = match;
2726         }
2727         if (match.hit)
2728         {
2729             {
2730                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2731 
2732                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2733                 return soulng::parser::Match(truenew soulng::cppcode::BreakStatement());
2734             }
2735         }
2736         *parentMatch0 = match;
2737     }
2738     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2739 
2740 
2741 
2742 
2743 
2744     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2745     if (!match.hit)
2746     {
2747         match.value = nullptr;
2748     }
2749     return match;
2750 }
2751 
2752 soulng::parser::Match ParserStatementParser::ContinueStatement(ParserFileLexer& lexer)
2753 {
2754     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2755 
2756 
2757 
2758 
2759 
2760 
2761 
2762     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2763     soulng::parser::Match match(false);
2764     soulng::parser::Match* parentMatch0 = &match;
2765     {
2766         int64_t pos = lexer.GetPos();
2767         soulng::parser::Match match(false);
2768         soulng::parser::Match* parentMatch1 = &match;
2769         {
2770             soulng::parser::Match match(false);
2771             soulng::parser::Match* parentMatch2 = &match;
2772             {
2773                 soulng::parser::Match match(false);
2774                 if (*lexer == CONTINUE)
2775                 {
2776                     ++lexer;
2777                     match.hit = true;
2778                 }
2779                 *parentMatch2 = match;
2780             }
2781             if (match.hit)
2782             {
2783                 soulng::parser::Match match(false);
2784                 soulng::parser::Match* parentMatch3 = &match;
2785                 {
2786                     soulng::parser::Match match(true);
2787                     soulng::parser::Match* parentMatch4 = &match;
2788                     {
2789                         soulng::lexer::Span span = lexer.GetSpan();
2790                         soulng::parser::Match match(false);
2791                         if (*lexer == SEMICOLON)
2792                         {
2793                             ++lexer;
2794                             match.hit = true;
2795                         }
2796                         if (match.hit)
2797                         {
2798                             *parentMatch4 = match;
2799                         }
2800                         else
2801                         {
2802                             lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(SEMICOLON)));
2803                         }
2804                     }
2805                     *parentMatch3 = match;
2806                 }
2807                 *parentMatch2 = match;
2808             }
2809             *parentMatch1 = match;
2810         }
2811         if (match.hit)
2812         {
2813             {
2814                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2815 
2816                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2817                 return soulng::parser::Match(truenew soulng::cppcode::ContinueStatement());
2818             }
2819         }
2820         *parentMatch0 = match;
2821     }
2822     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2823 
2824 
2825 
2826 
2827 
2828     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2829     if (!match.hit)
2830     {
2831         match.value = nullptr;
2832     }
2833     return match;
2834 }
2835 
2836 soulng::parser::Match ParserStatementParser::ReturnStatement(ParserFileLexer& lexer)
2837 {
2838     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2839 
2840 
2841 
2842 
2843 
2844 
2845 
2846     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2847     std::unique_ptr<soulng::cppcode::CppObject> returnValue;
2848     soulng::parser::Match match(false);
2849     soulng::parser::Match* parentMatch0 = &match;
2850     {
2851         int64_t pos = lexer.GetPos();
2852         soulng::parser::Match match(false);
2853         soulng::parser::Match* parentMatch1 = &match;
2854         {
2855             soulng::parser::Match match(false);
2856             soulng::parser::Match* parentMatch2 = &match;
2857             {
2858                 soulng::parser::Match match(false);
2859                 soulng::parser::Match* parentMatch3 = &match;
2860                 {
2861                     soulng::parser::Match match(false);
2862                     if (*lexer == RETURN)
2863                     {
2864                         ++lexer;
2865                         match.hit = true;
2866                     }
2867                     *parentMatch3 = match;
2868                 }
2869                 if (match.hit)
2870                 {
2871                     soulng::parser::Match match(false);
2872                     soulng::parser::Match* parentMatch4 = &match;
2873                     {
2874                         soulng::parser::Match match(true);
2875                         int64_t save = lexer.GetPos();
2876                         soulng::parser::Match* parentMatch5 = &match;
2877                         {
2878                             soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
2879                             returnValue.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
2880                             if (match.hit)
2881                             {
2882                                 *parentMatch5 = match;
2883                             }
2884                             else
2885                             {
2886                                 lexer.SetPos(save);
2887                             }
2888                         }
2889                         *parentMatch4 = match;
2890                     }
2891                     *parentMatch3 = match;
2892                 }
2893                 *parentMatch2 = match;
2894             }
2895             if (match.hit)
2896             {
2897                 soulng::parser::Match match(false);
2898                 soulng::parser::Match* parentMatch6 = &match;
2899                 {
2900                     soulng::parser::Match match(true);
2901                     soulng::parser::Match* parentMatch7 = &match;
2902                     {
2903                         soulng::lexer::Span span = lexer.GetSpan();
2904                         soulng::parser::Match match(false);
2905                         if (*lexer == SEMICOLON)
2906                         {
2907                             ++lexer;
2908                             match.hit = true;
2909                         }
2910                         if (match.hit)
2911                         {
2912                             *parentMatch7 = match;
2913                         }
2914                         else
2915                         {
2916                             lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(SEMICOLON)));
2917                         }
2918                     }
2919                     *parentMatch6 = match;
2920                 }
2921                 *parentMatch2 = match;
2922             }
2923             *parentMatch1 = match;
2924         }
2925         if (match.hit)
2926         {
2927             {
2928                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2929 
2930                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
2931                 return soulng::parser::Match(truenew soulng::cppcode::ReturnStatement(returnValue.release()));
2932             }
2933         }
2934         *parentMatch0 = match;
2935     }
2936     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2937 
2938 
2939 
2940 
2941 
2942     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2943     if (!match.hit)
2944     {
2945         match.value = nullptr;
2946     }
2947     return match;
2948 }
2949 
2950 soulng::parser::Match ParserStatementParser::GotoStatement(ParserFileLexer& lexer)
2951 {
2952     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
2953 
2954 
2955 
2956 
2957 
2958 
2959 
2960     #endif // SOULNG_PARSER_DEBUG_SUPPORT
2961     std::u32string target = std::u32string();
2962     soulng::parser::Match match(false);
2963     soulng::parser::Match* parentMatch0 = &match;
2964     {
2965         int64_t pos = lexer.GetPos();
2966         soulng::parser::Match match(false);
2967         soulng::parser::Match* parentMatch1 = &match;
2968         {
2969             soulng::parser::Match match(false);
2970             soulng::parser::Match* parentMatch2 = &match;
2971             {
2972                 soulng::parser::Match match(false);
2973                 soulng::parser::Match* parentMatch3 = &match;
2974                 {
2975                     soulng::parser::Match match(false);
2976                     if (*lexer == GOTO)
2977                     {
2978                         ++lexer;
2979                         match.hit = true;
2980                     }
2981                     *parentMatch3 = match;
2982                 }
2983                 if (match.hit)
2984                 {
2985                     soulng::parser::Match match(false);
2986                     soulng::parser::Match* parentMatch4 = &match;
2987                     {
2988                         soulng::parser::Match match(false);
2989                         soulng::parser::Match* parentMatch5 = &match;
2990                         {
2991                             int64_t pos = lexer.GetPos();
2992                             soulng::lexer::Span span = lexer.GetSpan();
2993                             soulng::parser::Match match(true);
2994                             soulng::parser::Match* parentMatch6 = &match;
2995                             {
2996                                 soulng::lexer::Span span = lexer.GetSpan();
2997                                 soulng::parser::Match match(false);
2998                                 if (*lexer == ID)
2999                                 {
3000                                     ++lexer;
3001                                     match.hit = true;
3002                                 }
3003                                 if (match.hit)
3004                                 {
3005                                     *parentMatch6 = match;
3006                                 }
3007                                 else
3008                                 {
3009                                     lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(ID)));
3010                                 }
3011                             }
3012                             if (match.hit)
3013                             {
3014                                 target = lexer.GetMatch(span);
3015                             }
3016                             *parentMatch5 = match;
3017                         }
3018                         *parentMatch4 = match;
3019                     }
3020                     *parentMatch3 = match;
3021                 }
3022                 *parentMatch2 = match;
3023             }
3024             if (match.hit)
3025             {
3026                 soulng::parser::Match match(false);
3027                 soulng::parser::Match* parentMatch7 = &match;
3028                 {
3029                     soulng::parser::Match match(true);
3030                     soulng::parser::Match* parentMatch8 = &match;
3031                     {
3032                         soulng::lexer::Span span = lexer.GetSpan();
3033                         soulng::parser::Match match(false);
3034                         if (*lexer == SEMICOLON)
3035                         {
3036                             ++lexer;
3037                             match.hit = true;
3038                         }
3039                         if (match.hit)
3040                         {
3041                             *parentMatch8 = match;
3042                         }
3043                         else
3044                         {
3045                             lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(SEMICOLON)));
3046                         }
3047                     }
3048                     *parentMatch7 = match;
3049                 }
3050                 *parentMatch2 = match;
3051             }
3052             *parentMatch1 = match;
3053         }
3054         if (match.hit)
3055         {
3056             {
3057                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3058 
3059                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3060                 return soulng::parser::Match(truenew soulng::cppcode::GotoStatement(target));
3061             }
3062         }
3063         *parentMatch0 = match;
3064     }
3065     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3066 
3067 
3068 
3069 
3070 
3071     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3072     if (!match.hit)
3073     {
3074         match.value = nullptr;
3075     }
3076     return match;
3077 }
3078 
3079 soulng::parser::Match ParserStatementParser::DeclarationStatement(ParserFileLexer& lexer)
3080 {
3081     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3082 
3083 
3084 
3085 
3086 
3087 
3088 
3089     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3090     std::unique_ptr<soulng::cppcode::CppObject> declaration;
3091     soulng::parser::Match match(false);
3092     soulng::parser::Match* parentMatch0 = &match;
3093     {
3094         int64_t pos = lexer.GetPos();
3095         soulng::parser::Match match = ParserDeclarationParser::BlockDeclaration(lexer);
3096         declaration.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3097         if (match.hit)
3098         {
3099             {
3100                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3101 
3102                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3103                 return soulng::parser::Match(truenew soulng::cppcode::DeclarationStatement(declaration.release()));
3104             }
3105         }
3106         *parentMatch0 = match;
3107     }
3108     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3109 
3110 
3111 
3112 
3113 
3114     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3115     if (!match.hit)
3116     {
3117         match.value = nullptr;
3118     }
3119     return match;
3120 }
3121 
3122 soulng::parser::Match ParserStatementParser::Condition(ParserFileLexer& lexer)
3123 {
3124     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3125 
3126 
3127 
3128 
3129 
3130 
3131 
3132     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3133     std::unique_ptr<soulng::cppcode::TypeId> typeId;
3134     std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>declarator;
3135     std::unique_ptr<soulng::cppcode::CppObject> assignmentExpr;
3136     std::unique_ptr<soulng::cppcode::CppObject> expr;
3137     soulng::parser::Match match(false);
3138     soulng::parser::Match* parentMatch0 = &match;
3139     {
3140         int64_t save = lexer.GetPos();
3141         soulng::parser::Match match(false);
3142         soulng::parser::Match* parentMatch1 = &match;
3143         {
3144             soulng::parser::Match match(false);
3145             soulng::parser::Match* parentMatch2 = &match;
3146             {
3147                 soulng::parser::Match match(false);
3148                 soulng::parser::Match* parentMatch3 = &match;
3149                 {
3150                     soulng::parser::Match match = ParserDeclaratorParser::TypeId(lexer);
3151                     typeId.reset(static_cast<soulng::cppcode::TypeId*>(match.value));
3152                     *parentMatch3 = match;
3153                 }
3154                 if (match.hit)
3155                 {
3156                     soulng::parser::Match match(false);
3157                     soulng::parser::Match* parentMatch4 = &match;
3158                     {
3159                         soulng::parser::Match match = ParserDeclaratorParser::Declarator(lexer);
3160                         declarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
3161                         *parentMatch4 = match;
3162                     }
3163                     *parentMatch3 = match;
3164                 }
3165                 *parentMatch2 = match;
3166             }
3167             if (match.hit)
3168             {
3169                 soulng::parser::Match match(false);
3170                 soulng::parser::Match* parentMatch5 = &match;
3171                 {
3172                     soulng::parser::Match match(false);
3173                     if (*lexer == ASSIGN)
3174                     {
3175                         ++lexer;
3176                         match.hit = true;
3177                     }
3178                     *parentMatch5 = match;
3179                 }
3180                 *parentMatch2 = match;
3181             }
3182             *parentMatch1 = match;
3183         }
3184         if (match.hit)
3185         {
3186             soulng::parser::Match match(false);
3187             soulng::parser::Match* parentMatch6 = &match;
3188             {
3189                 soulng::parser::Match match(false);
3190                 soulng::parser::Match* parentMatch7 = &match;
3191                 {
3192                     int64_t pos = lexer.GetPos();
3193                     soulng::parser::Match match = ParserExpressionParser::AssignmentExpression(lexer);
3194                     assignmentExpr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3195                     if (match.hit)
3196                     {
3197                         {
3198                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3199 
3200                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
3201                             return soulng::parser::Match(truenew soulng::cppcode::ConditionWithDeclarator(typeId.release()declarator->valueassignmentExpr.release()));
3202                         }
3203                     }
3204                     *parentMatch7 = match;
3205                 }
3206                 *parentMatch6 = match;
3207             }
3208             *parentMatch1 = match;
3209         }
3210         *parentMatch0 = match;
3211         if (!match.hit)
3212         {
3213             soulng::parser::Match match(false);
3214             soulng::parser::Match* parentMatch8 = &match;
3215             lexer.SetPos(save);
3216             {
3217                 soulng::parser::Match match(false);
3218                 soulng::parser::Match* parentMatch9 = &match;
3219                 {
3220                     int64_t pos = lexer.GetPos();
3221                     soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
3222                     expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3223                     if (match.hit)
3224                     {
3225                         {
3226                             #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3227 
3228                             #endif // SOULNG_PARSER_DEBUG_SUPPORT
3229                             return soulng::parser::Match(trueexpr.release());
3230                         }
3231                     }
3232                     *parentMatch9 = match;
3233                 }
3234                 *parentMatch8 = match;
3235             }
3236             *parentMatch0 = match;
3237         }
3238     }
3239     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3240 
3241 
3242 
3243 
3244 
3245     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3246     if (!match.hit)
3247     {
3248         match.value = nullptr;
3249     }
3250     return match;
3251 }
3252 
3253 soulng::parser::Match ParserStatementParser::TryStatement(ParserFileLexer& lexer)
3254 {
3255     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3256 
3257 
3258 
3259 
3260 
3261 
3262 
3263     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3264     std::unique_ptr<soulng::cppcode::TryStatement> tryStatement = std::unique_ptr<soulng::cppcode::TryStatement>();
3265     std::unique_ptr<soulng::cppcode::CompoundStatement> tryBlock;
3266     soulng::parser::Match match(false);
3267     soulng::parser::Match* parentMatch0 = &match;
3268     {
3269         int64_t pos = lexer.GetPos();
3270         soulng::parser::Match match(false);
3271         soulng::parser::Match* parentMatch1 = &match;
3272         {
3273             soulng::parser::Match match(false);
3274             soulng::parser::Match* parentMatch2 = &match;
3275             {
3276                 soulng::parser::Match match(false);
3277                 soulng::parser::Match* parentMatch3 = &match;
3278                 {
3279                     soulng::parser::Match match(false);
3280                     if (*lexer == TRY)
3281                     {
3282                         ++lexer;
3283                         match.hit = true;
3284                     }
3285                     *parentMatch3 = match;
3286                 }
3287                 if (match.hit)
3288                 {
3289                     soulng::parser::Match match(false);
3290                     soulng::parser::Match* parentMatch4 = &match;
3291                     {
3292                         soulng::parser::Match match(false);
3293                         soulng::parser::Match* parentMatch5 = &match;
3294                         {
3295                             int64_t pos = lexer.GetPos();
3296                             soulng::parser::Match match = ParserStatementParser::CompoundStatement(lexer);
3297                             tryBlock.reset(static_cast<soulng::cppcode::CompoundStatement*>(match.value));
3298                             if (match.hit)
3299                             {
3300                                 tryStatement.reset(new soulng::cppcode::TryStatement(tryBlock.release()));
3301                             }
3302                             *parentMatch5 = match;
3303                         }
3304                         *parentMatch4 = match;
3305                     }
3306                     *parentMatch3 = match;
3307                 }
3308                 *parentMatch2 = match;
3309             }
3310             if (match.hit)
3311             {
3312                 soulng::parser::Match match(false);
3313                 soulng::parser::Match* parentMatch6 = &match;
3314                 {
3315                     soulng::parser::Match match(true);
3316                     soulng::parser::Match* parentMatch7 = &match;
3317                     {
3318                         soulng::lexer::Span span = lexer.GetSpan();
3319                         soulng::parser::Match match = ParserStatementParser::HandlerSeq(lexertryStatement.get());
3320                         if (match.hit)
3321                         {
3322                             *parentMatch7 = match;
3323                         }
3324                         else
3325                         {
3326                             lexer.ThrowExpectationFailure(spanU"handler sequence");
3327                         }
3328                     }
3329                     *parentMatch6 = match;
3330                 }
3331                 *parentMatch2 = match;
3332             }
3333             *parentMatch1 = match;
3334         }
3335         if (match.hit)
3336         {
3337             {
3338                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3339 
3340                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3341                 return soulng::parser::Match(truetryStatement.release());
3342             }
3343         }
3344         *parentMatch0 = match;
3345     }
3346     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3347 
3348 
3349 
3350 
3351 
3352     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3353     if (!match.hit)
3354     {
3355         match.value = nullptr;
3356     }
3357     return match;
3358 }
3359 
3360 soulng::parser::Match ParserStatementParser::HandlerSeq(ParserFileLexer& lexersoulng::cppcode::TryStatement* tryStatement)
3361 {
3362     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3363 
3364 
3365 
3366 
3367 
3368 
3369 
3370     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3371     std::unique_ptr<soulng::cppcode::Handler> handler;
3372     soulng::parser::Match match(false);
3373     soulng::parser::Match* parentMatch0 = &match;
3374     {
3375         soulng::parser::Match match(false);
3376         soulng::parser::Match* parentMatch1 = &match;
3377         {
3378             int64_t pos = lexer.GetPos();
3379             soulng::parser::Match match(true);
3380             soulng::parser::Match* parentMatch2 = &match;
3381             {
3382                 soulng::lexer::Span span = lexer.GetSpan();
3383                 soulng::parser::Match match = ParserStatementParser::Handler(lexer);
3384                 handler.reset(static_cast<soulng::cppcode::Handler*>(match.value));
3385                 if (match.hit)
3386                 {
3387                     *parentMatch2 = match;
3388                 }
3389                 else
3390                 {
3391                     lexer.ThrowExpectationFailure(spanU"handler");
3392                 }
3393             }
3394             if (match.hit)
3395             {
3396                 tryStatement->Add(handler.release());
3397             }
3398             *parentMatch1 = match;
3399         }
3400         *parentMatch0 = match;
3401     }
3402     if (match.hit)
3403     {
3404         soulng::parser::Match match(false);
3405         soulng::parser::Match* parentMatch3 = &match;
3406         {
3407             soulng::parser::Match match(true);
3408             int64_t save = lexer.GetPos();
3409             soulng::parser::Match* parentMatch4 = &match;
3410             {
3411                 soulng::parser::Match match = ParserStatementParser::HandlerSeq(lexertryStatement);
3412                 if (match.hit)
3413                 {
3414                     *parentMatch4 = match;
3415                 }
3416                 else
3417                 {
3418                     lexer.SetPos(save);
3419                 }
3420             }
3421             *parentMatch3 = match;
3422         }
3423         *parentMatch0 = match;
3424     }
3425     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3426 
3427 
3428 
3429 
3430 
3431     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3432     if (!match.hit)
3433     {
3434         match.value = nullptr;
3435     }
3436     return match;
3437 }
3438 
3439 soulng::parser::Match ParserStatementParser::Handler(ParserFileLexer& lexer)
3440 {
3441     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3442 
3443 
3444 
3445 
3446 
3447 
3448 
3449     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3450     std::unique_ptr<soulng::cppcode::ExceptionDeclaration> exceptionDeclaration;
3451     std::unique_ptr<soulng::cppcode::CompoundStatement> catchBlock;
3452     soulng::parser::Match match(false);
3453     soulng::parser::Match* parentMatch0 = &match;
3454     {
3455         soulng::parser::Match match(false);
3456         soulng::parser::Match* parentMatch1 = &match;
3457         {
3458             soulng::parser::Match match(false);
3459             soulng::parser::Match* parentMatch2 = &match;
3460             {
3461                 soulng::parser::Match match(false);
3462                 soulng::parser::Match* parentMatch3 = &match;
3463                 {
3464                     soulng::parser::Match match(false);
3465                     if (*lexer == CATCH)
3466                     {
3467                         ++lexer;
3468                         match.hit = true;
3469                     }
3470                     *parentMatch3 = match;
3471                 }
3472                 if (match.hit)
3473                 {
3474                     soulng::parser::Match match(false);
3475                     soulng::parser::Match* parentMatch4 = &match;
3476                     {
3477                         soulng::parser::Match match(true);
3478                         soulng::parser::Match* parentMatch5 = &match;
3479                         {
3480                             soulng::lexer::Span span = lexer.GetSpan();
3481                             soulng::parser::Match match(false);
3482                             if (*lexer == LPAREN)
3483                             {
3484                                 ++lexer;
3485                                 match.hit = true;
3486                             }
3487                             if (match.hit)
3488                             {
3489                                 *parentMatch5 = match;
3490                             }
3491                             else
3492                             {
3493                                 lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(LPAREN)));
3494                             }
3495                         }
3496                         *parentMatch4 = match;
3497                     }
3498                     *parentMatch3 = match;
3499                 }
3500                 *parentMatch2 = match;
3501             }
3502             if (match.hit)
3503             {
3504                 soulng::parser::Match match(false);
3505                 soulng::parser::Match* parentMatch6 = &match;
3506                 {
3507                     soulng::parser::Match match(true);
3508                     soulng::parser::Match* parentMatch7 = &match;
3509                     {
3510                         soulng::lexer::Span span = lexer.GetSpan();
3511                         soulng::parser::Match match = ParserStatementParser::ExceptionDeclaration(lexer);
3512                         exceptionDeclaration.reset(static_cast<soulng::cppcode::ExceptionDeclaration*>(match.value));
3513                         if (match.hit)
3514                         {
3515                             *parentMatch7 = match;
3516                         }
3517                         else
3518                         {
3519                             lexer.ThrowExpectationFailure(spanU"exception declaration");
3520                         }
3521                     }
3522                     *parentMatch6 = match;
3523                 }
3524                 *parentMatch2 = match;
3525             }
3526             *parentMatch1 = match;
3527         }
3528         if (match.hit)
3529         {
3530             soulng::parser::Match match(false);
3531             soulng::parser::Match* parentMatch8 = &match;
3532             {
3533                 soulng::parser::Match match(true);
3534                 soulng::parser::Match* parentMatch9 = &match;
3535                 {
3536                     soulng::lexer::Span span = lexer.GetSpan();
3537                     soulng::parser::Match match(false);
3538                     if (*lexer == RPAREN)
3539                     {
3540                         ++lexer;
3541                         match.hit = true;
3542                     }
3543                     if (match.hit)
3544                     {
3545                         *parentMatch9 = match;
3546                     }
3547                     else
3548                     {
3549                         lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(RPAREN)));
3550                     }
3551                 }
3552                 *parentMatch8 = match;
3553             }
3554             *parentMatch1 = match;
3555         }
3556         *parentMatch0 = match;
3557     }
3558     if (match.hit)
3559     {
3560         soulng::parser::Match match(false);
3561         soulng::parser::Match* parentMatch10 = &match;
3562         {
3563             soulng::parser::Match match(false);
3564             soulng::parser::Match* parentMatch11 = &match;
3565             {
3566                 int64_t pos = lexer.GetPos();
3567                 soulng::parser::Match match(true);
3568                 soulng::parser::Match* parentMatch12 = &match;
3569                 {
3570                     soulng::lexer::Span span = lexer.GetSpan();
3571                     soulng::parser::Match match = ParserStatementParser::CompoundStatement(lexer);
3572                     catchBlock.reset(static_cast<soulng::cppcode::CompoundStatement*>(match.value));
3573                     if (match.hit)
3574                     {
3575                         *parentMatch12 = match;
3576                     }
3577                     else
3578                     {
3579                         lexer.ThrowExpectationFailure(spanU"compound statement");
3580                     }
3581                 }
3582                 if (match.hit)
3583                 {
3584                     {
3585                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3586 
3587                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
3588                         return soulng::parser::Match(truenew soulng::cppcode::Handler(exceptionDeclaration.release()catchBlock.release()));
3589                     }
3590                 }
3591                 *parentMatch11 = match;
3592             }
3593             *parentMatch10 = match;
3594         }
3595         *parentMatch0 = match;
3596     }
3597     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3598 
3599 
3600 
3601 
3602 
3603     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3604     if (!match.hit)
3605     {
3606         match.value = nullptr;
3607     }
3608     return match;
3609 }
3610 
3611 soulng::parser::Match ParserStatementParser::ExceptionDeclaration(ParserFileLexer& lexer)
3612 {
3613     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3614 
3615 
3616 
3617 
3618 
3619 
3620 
3621     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3622     std::unique_ptr<soulng::cppcode::ExceptionDeclaration> exceptionDeclaration = std::unique_ptr<soulng::cppcode::ExceptionDeclaration>();
3623     std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>declarator;
3624     std::unique_ptr<soulng::parser::soulng::parser::Value<std::u32string>>abstractDeclarator;
3625     soulng::parser::Match match(false);
3626     soulng::parser::Match* parentMatch0 = &match;
3627     {
3628         soulng::parser::Match match(false);
3629         soulng::parser::Match* parentMatch1 = &match;
3630         {
3631             int64_t pos = lexer.GetPos();
3632             soulng::parser::Match match(true);
3633             if (match.hit)
3634             {
3635                 exceptionDeclaration.reset(new soulng::cppcode::ExceptionDeclaration());
3636             }
3637             *parentMatch1 = match;
3638         }
3639         *parentMatch0 = match;
3640     }
3641     if (match.hit)
3642     {
3643         soulng::parser::Match match(false);
3644         soulng::parser::Match* parentMatch2 = &match;
3645         {
3646             soulng::parser::Match match(false);
3647             soulng::parser::Match* parentMatch3 = &match;
3648             {
3649                 int64_t pos = lexer.GetPos();
3650                 soulng::parser::Match match(false);
3651                 soulng::parser::Match* parentMatch4 = &match;
3652                 {
3653                     soulng::parser::Match match(false);
3654                     soulng::parser::Match* parentMatch5 = &match;
3655                     {
3656                         int64_t save = lexer.GetPos();
3657                         soulng::parser::Match match(false);
3658                         soulng::parser::Match* parentMatch6 = &match;
3659                         {
3660                             soulng::parser::Match match = ParserDeclaratorParser::TypeSpecifierSeq(lexerexceptionDeclaration->GetTypeId());
3661                             *parentMatch6 = match;
3662                         }
3663                         if (match.hit)
3664                         {
3665                             soulng::parser::Match match(false);
3666                             soulng::parser::Match* parentMatch7 = &match;
3667                             {
3668                                 soulng::parser::Match match(true);
3669                                 int64_t save = lexer.GetPos();
3670                                 soulng::parser::Match* parentMatch8 = &match;
3671                                 {
3672                                     soulng::parser::Match match(false);
3673                                     soulng::parser::Match* parentMatch9 = &match;
3674                                     {
3675                                         soulng::parser::Match match(false);
3676                                         soulng::parser::Match* parentMatch10 = &match;
3677                                         {
3678                                             int64_t save = lexer.GetPos();
3679                                             soulng::parser::Match match(false);
3680                                             soulng::parser::Match* parentMatch11 = &match;
3681                                             {
3682                                                 int64_t pos = lexer.GetPos();
3683                                                 soulng::parser::Match match = ParserDeclaratorParser::Declarator(lexer);
3684                                                 declarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
3685                                                 if (match.hit)
3686                                                 {
3687                                                     exceptionDeclaration->GetTypeId()->Declarator() = declarator->value;
3688                                                 }
3689                                                 *parentMatch11 = match;
3690                                             }
3691                                             *parentMatch10 = match;
3692                                             if (!match.hit)
3693                                             {
3694                                                 soulng::parser::Match match(false);
3695                                                 soulng::parser::Match* parentMatch12 = &match;
3696                                                 lexer.SetPos(save);
3697                                                 {
3698                                                     soulng::parser::Match match(false);
3699                                                     soulng::parser::Match* parentMatch13 = &match;
3700                                                     {
3701                                                         int64_t pos = lexer.GetPos();
3702                                                         soulng::parser::Match match = ParserDeclaratorParser::AbstractDeclarator(lexer);
3703                                                         abstractDeclarator.reset(static_cast<soulng::parser::soulng::parser::Value<std::u32string>*>(match.value));
3704                                                         if (match.hit)
3705                                                         {
3706                                                             exceptionDeclaration->GetTypeId()->Declarator() = abstractDeclarator->value;
3707                                                         }
3708                                                         *parentMatch13 = match;
3709                                                     }
3710                                                     *parentMatch12 = match;
3711                                                 }
3712                                                 *parentMatch10 = match;
3713                                             }
3714                                         }
3715                                         *parentMatch9 = match;
3716                                     }
3717                                     if (match.hit)
3718                                     {
3719                                         *parentMatch8 = match;
3720                                     }
3721                                     else
3722                                     {
3723                                         lexer.SetPos(save);
3724                                     }
3725                                 }
3726                                 *parentMatch7 = match;
3727                             }
3728                             *parentMatch6 = match;
3729                         }
3730                         *parentMatch5 = match;
3731                         if (!match.hit)
3732                         {
3733                             soulng::parser::Match match(false);
3734                             soulng::parser::Match* parentMatch14 = &match;
3735                             lexer.SetPos(save);
3736                             {
3737                                 soulng::parser::Match match(false);
3738                                 soulng::parser::Match* parentMatch15 = &match;
3739                                 {
3740                                     int64_t pos = lexer.GetPos();
3741                                     soulng::parser::Match match(false);
3742                                     if (*lexer == ELLIPSIS)
3743                                     {
3744                                         ++lexer;
3745                                         match.hit = true;
3746                                     }
3747                                     if (match.hit)
3748                                     {
3749                                         exceptionDeclaration->CatchAll() = true;
3750                                     }
3751                                     *parentMatch15 = match;
3752                                 }
3753                                 *parentMatch14 = match;
3754                             }
3755                             *parentMatch5 = match;
3756                         }
3757                     }
3758                     *parentMatch4 = match;
3759                 }
3760                 if (match.hit)
3761                 {
3762                     {
3763                         #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3764 
3765                         #endif // SOULNG_PARSER_DEBUG_SUPPORT
3766                         return soulng::parser::Match(trueexceptionDeclaration.release());
3767                     }
3768                 }
3769                 *parentMatch3 = match;
3770             }
3771             *parentMatch2 = match;
3772         }
3773         *parentMatch0 = match;
3774     }
3775     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3776 
3777 
3778 
3779 
3780 
3781     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3782     if (!match.hit)
3783     {
3784         match.value = nullptr;
3785     }
3786     return match;
3787 }
3788 
3789 soulng::parser::Match ParserStatementParser::ExpressionStatement(ParserFileLexer& lexer)
3790 {
3791     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3792 
3793 
3794 
3795 
3796 
3797 
3798 
3799     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3800     std::unique_ptr<soulng::cppcode::CppObject> expr;
3801     soulng::parser::Match match(false);
3802     soulng::parser::Match* parentMatch0 = &match;
3803     {
3804         int64_t pos = lexer.GetPos();
3805         soulng::parser::Match match(false);
3806         soulng::parser::Match* parentMatch1 = &match;
3807         {
3808             soulng::parser::Match match(false);
3809             soulng::parser::Match* parentMatch2 = &match;
3810             {
3811                 soulng::parser::Match match = ParserExpressionParser::CppExpression(lexer);
3812                 expr.reset(static_cast<soulng::cppcode::CppObject*>(match.value));
3813                 *parentMatch2 = match;
3814             }
3815             if (match.hit)
3816             {
3817                 soulng::parser::Match match(false);
3818                 soulng::parser::Match* parentMatch3 = &match;
3819                 {
3820                     soulng::parser::Match match(true);
3821                     soulng::parser::Match* parentMatch4 = &match;
3822                     {
3823                         soulng::lexer::Span span = lexer.GetSpan();
3824                         soulng::parser::Match match(false);
3825                         if (*lexer == SEMICOLON)
3826                         {
3827                             ++lexer;
3828                             match.hit = true;
3829                         }
3830                         if (match.hit)
3831                         {
3832                             *parentMatch4 = match;
3833                         }
3834                         else
3835                         {
3836                             lexer.ThrowExpectationFailure(spanToUtf32(GetTokenInfo(SEMICOLON)));
3837                         }
3838                     }
3839                     *parentMatch3 = match;
3840                 }
3841                 *parentMatch2 = match;
3842             }
3843             *parentMatch1 = match;
3844         }
3845         if (match.hit)
3846         {
3847             {
3848                 #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3849 
3850                 #endif // SOULNG_PARSER_DEBUG_SUPPORT
3851                 return soulng::parser::Match(truenew soulng::cppcode::ExpressionStatement(expr.release()));
3852             }
3853         }
3854         *parentMatch0 = match;
3855     }
3856     #ifdef SOULNG_PARSER_DEBUG_SUPPORT
3857 
3858 
3859 
3860 
3861 
3862     #endif // SOULNG_PARSER_DEBUG_SUPPORT
3863     if (!match.hit)
3864     {
3865         match.value = nullptr;
3866     }
3867     return match;
3868 }