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