How to use UnexpectedTokenException class of Gherkin package

Best Gherkin-dotnet code snippet using Gherkin.UnexpectedTokenException

Parser.cs

Source:Parser.cs Github

copy

Full Screen

...477            const string stateComment = "State: 0 - Start";478            token.Detach();479            var expectedTokens = new string[] {"#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"};480            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 481                : new UnexpectedTokenException(token, expectedTokens, stateComment);482            if (StopAtFirstError)483                throw error;484            485            AddError(context, error);486            return 0;487488        }489        490        491        // GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0492        int MatchTokenAt_1(Token token, ParserContext context)493        {494            if (Match_TagLine(context, token))495            {496                StartRule(context, RuleType.Tags);497                Build(context, token);498                return 2;499            }500            if (Match_FeatureLine(context, token))501            {502                Build(context, token);503                return 3;504            }505            if (Match_Comment(context, token))506            {507                Build(context, token);508                return 1;509            }510            if (Match_Empty(context, token))511            {512                Build(context, token);513                return 1;514            }515            516            const string stateComment = "State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0";517            token.Detach();518            var expectedTokens = new string[] {"#TagLine", "#FeatureLine", "#Comment", "#Empty"};519            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 520                : new UnexpectedTokenException(token, expectedTokens, stateComment);521            if (StopAtFirstError)522                throw error;523            524            AddError(context, error);525            return 1;526527        }528        529        530        // GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0531        int MatchTokenAt_2(Token token, ParserContext context)532        {533            if (Match_TagLine(context, token))534            {535                Build(context, token);536                return 2;537            }538            if (Match_FeatureLine(context, token))539            {540                EndRule(context, RuleType.Tags);541                Build(context, token);542                return 3;543            }544            if (Match_Comment(context, token))545            {546                Build(context, token);547                return 2;548            }549            if (Match_Empty(context, token))550            {551                Build(context, token);552                return 2;553            }554            555            const string stateComment = "State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0";556            token.Detach();557            var expectedTokens = new string[] {"#TagLine", "#FeatureLine", "#Comment", "#Empty"};558            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 559                : new UnexpectedTokenException(token, expectedTokens, stateComment);560            if (StopAtFirstError)561                throw error;562            563            AddError(context, error);564            return 2;565566        }567        568        569        // GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0570        int MatchTokenAt_3(Token token, ParserContext context)571        {572            if (Match_EOF(context, token))573            {574                EndRule(context, RuleType.FeatureHeader);575                EndRule(context, RuleType.Feature);576                Build(context, token);577                return 41;578            }579            if (Match_Empty(context, token))580            {581                Build(context, token);582                return 3;583            }584            if (Match_Comment(context, token))585            {586                Build(context, token);587                return 5;588            }589            if (Match_BackgroundLine(context, token))590            {591                EndRule(context, RuleType.FeatureHeader);592                StartRule(context, RuleType.Background);593                Build(context, token);594                return 6;595            }596            if (Match_TagLine(context, token))597            {598                EndRule(context, RuleType.FeatureHeader);599                StartRule(context, RuleType.ScenarioDefinition);600                StartRule(context, RuleType.Tags);601                Build(context, token);602                return 11;603            }604            if (Match_ScenarioLine(context, token))605            {606                EndRule(context, RuleType.FeatureHeader);607                StartRule(context, RuleType.ScenarioDefinition);608                StartRule(context, RuleType.Scenario);609                Build(context, token);610                return 12;611            }612            if (Match_RuleLine(context, token))613            {614                EndRule(context, RuleType.FeatureHeader);615                StartRule(context, RuleType.Rule);616                StartRule(context, RuleType.RuleHeader);617                Build(context, token);618                return 22;619            }620            if (Match_Other(context, token))621            {622                StartRule(context, RuleType.Description);623                Build(context, token);624                return 4;625            }626            627            const string stateComment = "State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0";628            token.Detach();629            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};630            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 631                : new UnexpectedTokenException(token, expectedTokens, stateComment);632            if (StopAtFirstError)633                throw error;634            635            AddError(context, error);636            return 3;637638        }639        640        641        // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0642        int MatchTokenAt_4(Token token, ParserContext context)643        {644            if (Match_EOF(context, token))645            {646                EndRule(context, RuleType.Description);647                EndRule(context, RuleType.FeatureHeader);648                EndRule(context, RuleType.Feature);649                Build(context, token);650                return 41;651            }652            if (Match_Comment(context, token))653            {654                EndRule(context, RuleType.Description);655                Build(context, token);656                return 5;657            }658            if (Match_BackgroundLine(context, token))659            {660                EndRule(context, RuleType.Description);661                EndRule(context, RuleType.FeatureHeader);662                StartRule(context, RuleType.Background);663                Build(context, token);664                return 6;665            }666            if (Match_TagLine(context, token))667            {668                EndRule(context, RuleType.Description);669                EndRule(context, RuleType.FeatureHeader);670                StartRule(context, RuleType.ScenarioDefinition);671                StartRule(context, RuleType.Tags);672                Build(context, token);673                return 11;674            }675            if (Match_ScenarioLine(context, token))676            {677                EndRule(context, RuleType.Description);678                EndRule(context, RuleType.FeatureHeader);679                StartRule(context, RuleType.ScenarioDefinition);680                StartRule(context, RuleType.Scenario);681                Build(context, token);682                return 12;683            }684            if (Match_RuleLine(context, token))685            {686                EndRule(context, RuleType.Description);687                EndRule(context, RuleType.FeatureHeader);688                StartRule(context, RuleType.Rule);689                StartRule(context, RuleType.RuleHeader);690                Build(context, token);691                return 22;692            }693            if (Match_Other(context, token))694            {695                Build(context, token);696                return 4;697            }698            699            const string stateComment = "State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0";700            token.Detach();701            var expectedTokens = new string[] {"#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};702            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 703                : new UnexpectedTokenException(token, expectedTokens, stateComment);704            if (StopAtFirstError)705                throw error;706            707            AddError(context, error);708            return 4;709710        }711        712        713        // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0714        int MatchTokenAt_5(Token token, ParserContext context)715        {716            if (Match_EOF(context, token))717            {718                EndRule(context, RuleType.FeatureHeader);719                EndRule(context, RuleType.Feature);720                Build(context, token);721                return 41;722            }723            if (Match_Comment(context, token))724            {725                Build(context, token);726                return 5;727            }728            if (Match_BackgroundLine(context, token))729            {730                EndRule(context, RuleType.FeatureHeader);731                StartRule(context, RuleType.Background);732                Build(context, token);733                return 6;734            }735            if (Match_TagLine(context, token))736            {737                EndRule(context, RuleType.FeatureHeader);738                StartRule(context, RuleType.ScenarioDefinition);739                StartRule(context, RuleType.Tags);740                Build(context, token);741                return 11;742            }743            if (Match_ScenarioLine(context, token))744            {745                EndRule(context, RuleType.FeatureHeader);746                StartRule(context, RuleType.ScenarioDefinition);747                StartRule(context, RuleType.Scenario);748                Build(context, token);749                return 12;750            }751            if (Match_RuleLine(context, token))752            {753                EndRule(context, RuleType.FeatureHeader);754                StartRule(context, RuleType.Rule);755                StartRule(context, RuleType.RuleHeader);756                Build(context, token);757                return 22;758            }759            if (Match_Empty(context, token))760            {761                Build(context, token);762                return 5;763            }764            765            const string stateComment = "State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0";766            token.Detach();767            var expectedTokens = new string[] {"#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"};768            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 769                : new UnexpectedTokenException(token, expectedTokens, stateComment);770            if (StopAtFirstError)771                throw error;772            773            AddError(context, error);774            return 5;775776        }777        778        779        // GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0780        int MatchTokenAt_6(Token token, ParserContext context)781        {782            if (Match_EOF(context, token))783            {784                EndRule(context, RuleType.Background);785                EndRule(context, RuleType.Feature);786                Build(context, token);787                return 41;788            }789            if (Match_Empty(context, token))790            {791                Build(context, token);792                return 6;793            }794            if (Match_Comment(context, token))795            {796                Build(context, token);797                return 8;798            }799            if (Match_StepLine(context, token))800            {801                StartRule(context, RuleType.Step);802                Build(context, token);803                return 9;804            }805            if (Match_TagLine(context, token))806            {807                EndRule(context, RuleType.Background);808                StartRule(context, RuleType.ScenarioDefinition);809                StartRule(context, RuleType.Tags);810                Build(context, token);811                return 11;812            }813            if (Match_ScenarioLine(context, token))814            {815                EndRule(context, RuleType.Background);816                StartRule(context, RuleType.ScenarioDefinition);817                StartRule(context, RuleType.Scenario);818                Build(context, token);819                return 12;820            }821            if (Match_RuleLine(context, token))822            {823                EndRule(context, RuleType.Background);824                StartRule(context, RuleType.Rule);825                StartRule(context, RuleType.RuleHeader);826                Build(context, token);827                return 22;828            }829            if (Match_Other(context, token))830            {831                StartRule(context, RuleType.Description);832                Build(context, token);833                return 7;834            }835            836            const string stateComment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0";837            token.Detach();838            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};839            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 840                : new UnexpectedTokenException(token, expectedTokens, stateComment);841            if (StopAtFirstError)842                throw error;843            844            AddError(context, error);845            return 6;846847        }848        849        850        // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0851        int MatchTokenAt_7(Token token, ParserContext context)852        {853            if (Match_EOF(context, token))854            {855                EndRule(context, RuleType.Description);856                EndRule(context, RuleType.Background);857                EndRule(context, RuleType.Feature);858                Build(context, token);859                return 41;860            }861            if (Match_Comment(context, token))862            {863                EndRule(context, RuleType.Description);864                Build(context, token);865                return 8;866            }867            if (Match_StepLine(context, token))868            {869                EndRule(context, RuleType.Description);870                StartRule(context, RuleType.Step);871                Build(context, token);872                return 9;873            }874            if (Match_TagLine(context, token))875            {876                EndRule(context, RuleType.Description);877                EndRule(context, RuleType.Background);878                StartRule(context, RuleType.ScenarioDefinition);879                StartRule(context, RuleType.Tags);880                Build(context, token);881                return 11;882            }883            if (Match_ScenarioLine(context, token))884            {885                EndRule(context, RuleType.Description);886                EndRule(context, RuleType.Background);887                StartRule(context, RuleType.ScenarioDefinition);888                StartRule(context, RuleType.Scenario);889                Build(context, token);890                return 12;891            }892            if (Match_RuleLine(context, token))893            {894                EndRule(context, RuleType.Description);895                EndRule(context, RuleType.Background);896                StartRule(context, RuleType.Rule);897                StartRule(context, RuleType.RuleHeader);898                Build(context, token);899                return 22;900            }901            if (Match_Other(context, token))902            {903                Build(context, token);904                return 7;905            }906            907            const string stateComment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";908            token.Detach();909            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};910            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 911                : new UnexpectedTokenException(token, expectedTokens, stateComment);912            if (StopAtFirstError)913                throw error;914            915            AddError(context, error);916            return 7;917918        }919        920        921        // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0922        int MatchTokenAt_8(Token token, ParserContext context)923        {924            if (Match_EOF(context, token))925            {926                EndRule(context, RuleType.Background);927                EndRule(context, RuleType.Feature);928                Build(context, token);929                return 41;930            }931            if (Match_Comment(context, token))932            {933                Build(context, token);934                return 8;935            }936            if (Match_StepLine(context, token))937            {938                StartRule(context, RuleType.Step);939                Build(context, token);940                return 9;941            }942            if (Match_TagLine(context, token))943            {944                EndRule(context, RuleType.Background);945                StartRule(context, RuleType.ScenarioDefinition);946                StartRule(context, RuleType.Tags);947                Build(context, token);948                return 11;949            }950            if (Match_ScenarioLine(context, token))951            {952                EndRule(context, RuleType.Background);953                StartRule(context, RuleType.ScenarioDefinition);954                StartRule(context, RuleType.Scenario);955                Build(context, token);956                return 12;957            }958            if (Match_RuleLine(context, token))959            {960                EndRule(context, RuleType.Background);961                StartRule(context, RuleType.Rule);962                StartRule(context, RuleType.RuleHeader);963                Build(context, token);964                return 22;965            }966            if (Match_Empty(context, token))967            {968                Build(context, token);969                return 8;970            }971            972            const string stateComment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0";973            token.Detach();974            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"};975            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 976                : new UnexpectedTokenException(token, expectedTokens, stateComment);977            if (StopAtFirstError)978                throw error;979            980            AddError(context, error);981            return 8;982983        }984        985        986        // GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0987        int MatchTokenAt_9(Token token, ParserContext context)988        {989            if (Match_EOF(context, token))990            {991                EndRule(context, RuleType.Step);992                EndRule(context, RuleType.Background);993                EndRule(context, RuleType.Feature);994                Build(context, token);995                return 41;996            }997            if (Match_TableRow(context, token))998            {999                StartRule(context, RuleType.DataTable);1000                Build(context, token);1001                return 10;1002            }1003            if (Match_DocStringSeparator(context, token))1004            {1005                StartRule(context, RuleType.DocString);1006                Build(context, token);1007                return 48;1008            }1009            if (Match_StepLine(context, token))1010            {1011                EndRule(context, RuleType.Step);1012                StartRule(context, RuleType.Step);1013                Build(context, token);1014                return 9;1015            }1016            if (Match_TagLine(context, token))1017            {1018                EndRule(context, RuleType.Step);1019                EndRule(context, RuleType.Background);1020                StartRule(context, RuleType.ScenarioDefinition);1021                StartRule(context, RuleType.Tags);1022                Build(context, token);1023                return 11;1024            }1025            if (Match_ScenarioLine(context, token))1026            {1027                EndRule(context, RuleType.Step);1028                EndRule(context, RuleType.Background);1029                StartRule(context, RuleType.ScenarioDefinition);1030                StartRule(context, RuleType.Scenario);1031                Build(context, token);1032                return 12;1033            }1034            if (Match_RuleLine(context, token))1035            {1036                EndRule(context, RuleType.Step);1037                EndRule(context, RuleType.Background);1038                StartRule(context, RuleType.Rule);1039                StartRule(context, RuleType.RuleHeader);1040                Build(context, token);1041                return 22;1042            }1043            if (Match_Comment(context, token))1044            {1045                Build(context, token);1046                return 9;1047            }1048            if (Match_Empty(context, token))1049            {1050                Build(context, token);1051                return 9;1052            }1053            1054            const string stateComment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0";1055            token.Detach();1056            var expectedTokens = new string[] {"#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};1057            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1058                : new UnexpectedTokenException(token, expectedTokens, stateComment);1059            if (StopAtFirstError)1060                throw error;1061            1062            AddError(context, error);1063            return 9;10641065        }1066        1067        1068        // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:01069        int MatchTokenAt_10(Token token, ParserContext context)1070        {1071            if (Match_EOF(context, token))1072            {1073                EndRule(context, RuleType.DataTable);1074                EndRule(context, RuleType.Step);1075                EndRule(context, RuleType.Background);1076                EndRule(context, RuleType.Feature);1077                Build(context, token);1078                return 41;1079            }1080            if (Match_TableRow(context, token))1081            {1082                Build(context, token);1083                return 10;1084            }1085            if (Match_StepLine(context, token))1086            {1087                EndRule(context, RuleType.DataTable);1088                EndRule(context, RuleType.Step);1089                StartRule(context, RuleType.Step);1090                Build(context, token);1091                return 9;1092            }1093            if (Match_TagLine(context, token))1094            {1095                EndRule(context, RuleType.DataTable);1096                EndRule(context, RuleType.Step);1097                EndRule(context, RuleType.Background);1098                StartRule(context, RuleType.ScenarioDefinition);1099                StartRule(context, RuleType.Tags);1100                Build(context, token);1101                return 11;1102            }1103            if (Match_ScenarioLine(context, token))1104            {1105                EndRule(context, RuleType.DataTable);1106                EndRule(context, RuleType.Step);1107                EndRule(context, RuleType.Background);1108                StartRule(context, RuleType.ScenarioDefinition);1109                StartRule(context, RuleType.Scenario);1110                Build(context, token);1111                return 12;1112            }1113            if (Match_RuleLine(context, token))1114            {1115                EndRule(context, RuleType.DataTable);1116                EndRule(context, RuleType.Step);1117                EndRule(context, RuleType.Background);1118                StartRule(context, RuleType.Rule);1119                StartRule(context, RuleType.RuleHeader);1120                Build(context, token);1121                return 22;1122            }1123            if (Match_Comment(context, token))1124            {1125                Build(context, token);1126                return 10;1127            }1128            if (Match_Empty(context, token))1129            {1130                Build(context, token);1131                return 10;1132            }1133            1134            const string stateComment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";1135            token.Detach();1136            var expectedTokens = new string[] {"#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};1137            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1138                : new UnexpectedTokenException(token, expectedTokens, stateComment);1139            if (StopAtFirstError)1140                throw error;1141            1142            AddError(context, error);1143            return 10;11441145        }1146        1147        1148        // GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:01149        int MatchTokenAt_11(Token token, ParserContext context)1150        {1151            if (Match_TagLine(context, token))1152            {1153                Build(context, token);1154                return 11;1155            }1156            if (Match_ScenarioLine(context, token))1157            {1158                EndRule(context, RuleType.Tags);1159                StartRule(context, RuleType.Scenario);1160                Build(context, token);1161                return 12;1162            }1163            if (Match_Comment(context, token))1164            {1165                Build(context, token);1166                return 11;1167            }1168            if (Match_Empty(context, token))1169            {1170                Build(context, token);1171                return 11;1172            }1173            1174            const string stateComment = "State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0";1175            token.Detach();1176            var expectedTokens = new string[] {"#TagLine", "#ScenarioLine", "#Comment", "#Empty"};1177            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1178                : new UnexpectedTokenException(token, expectedTokens, stateComment);1179            if (StopAtFirstError)1180                throw error;1181            1182            AddError(context, error);1183            return 11;11841185        }1186        1187        1188        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:01189        int MatchTokenAt_12(Token token, ParserContext context)1190        {1191            if (Match_EOF(context, token))1192            {1193                EndRule(context, RuleType.Scenario);1194                EndRule(context, RuleType.ScenarioDefinition);1195                EndRule(context, RuleType.Feature);1196                Build(context, token);1197                return 41;1198            }1199            if (Match_Empty(context, token))1200            {1201                Build(context, token);1202                return 12;1203            }1204            if (Match_Comment(context, token))1205            {1206                Build(context, token);1207                return 14;1208            }1209            if (Match_StepLine(context, token))1210            {1211                StartRule(context, RuleType.Step);1212                Build(context, token);1213                return 15;1214            }1215            if (Match_TagLine(context, token))1216            {1217                if (LookAhead_0(context, token))1218                {1219                StartRule(context, RuleType.ExamplesDefinition);1220                StartRule(context, RuleType.Tags);1221                Build(context, token);1222                return 17;1223                }1224            }1225            if (Match_TagLine(context, token))1226            {1227                EndRule(context, RuleType.Scenario);1228                EndRule(context, RuleType.ScenarioDefinition);1229                StartRule(context, RuleType.ScenarioDefinition);1230                StartRule(context, RuleType.Tags);1231                Build(context, token);1232                return 11;1233            }1234            if (Match_ExamplesLine(context, token))1235            {1236                StartRule(context, RuleType.ExamplesDefinition);1237                StartRule(context, RuleType.Examples);1238                Build(context, token);1239                return 18;1240            }1241            if (Match_ScenarioLine(context, token))1242            {1243                EndRule(context, RuleType.Scenario);1244                EndRule(context, RuleType.ScenarioDefinition);1245                StartRule(context, RuleType.ScenarioDefinition);1246                StartRule(context, RuleType.Scenario);1247                Build(context, token);1248                return 12;1249            }1250            if (Match_RuleLine(context, token))1251            {1252                EndRule(context, RuleType.Scenario);1253                EndRule(context, RuleType.ScenarioDefinition);1254                StartRule(context, RuleType.Rule);1255                StartRule(context, RuleType.RuleHeader);1256                Build(context, token);1257                return 22;1258            }1259            if (Match_Other(context, token))1260            {1261                StartRule(context, RuleType.Description);1262                Build(context, token);1263                return 13;1264            }1265            1266            const string stateComment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";1267            token.Detach();1268            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};1269            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1270                : new UnexpectedTokenException(token, expectedTokens, stateComment);1271            if (StopAtFirstError)1272                throw error;1273            1274            AddError(context, error);1275            return 12;12761277        }1278        1279        1280        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:01281        int MatchTokenAt_13(Token token, ParserContext context)1282        {1283            if (Match_EOF(context, token))1284            {1285                EndRule(context, RuleType.Description);1286                EndRule(context, RuleType.Scenario);1287                EndRule(context, RuleType.ScenarioDefinition);1288                EndRule(context, RuleType.Feature);1289                Build(context, token);1290                return 41;1291            }1292            if (Match_Comment(context, token))1293            {1294                EndRule(context, RuleType.Description);1295                Build(context, token);1296                return 14;1297            }1298            if (Match_StepLine(context, token))1299            {1300                EndRule(context, RuleType.Description);1301                StartRule(context, RuleType.Step);1302                Build(context, token);1303                return 15;1304            }1305            if (Match_TagLine(context, token))1306            {1307                if (LookAhead_0(context, token))1308                {1309                EndRule(context, RuleType.Description);1310                StartRule(context, RuleType.ExamplesDefinition);1311                StartRule(context, RuleType.Tags);1312                Build(context, token);1313                return 17;1314                }1315            }1316            if (Match_TagLine(context, token))1317            {1318                EndRule(context, RuleType.Description);1319                EndRule(context, RuleType.Scenario);1320                EndRule(context, RuleType.ScenarioDefinition);1321                StartRule(context, RuleType.ScenarioDefinition);1322                StartRule(context, RuleType.Tags);1323                Build(context, token);1324                return 11;1325            }1326            if (Match_ExamplesLine(context, token))1327            {1328                EndRule(context, RuleType.Description);1329                StartRule(context, RuleType.ExamplesDefinition);1330                StartRule(context, RuleType.Examples);1331                Build(context, token);1332                return 18;1333            }1334            if (Match_ScenarioLine(context, token))1335            {1336                EndRule(context, RuleType.Description);1337                EndRule(context, RuleType.Scenario);1338                EndRule(context, RuleType.ScenarioDefinition);1339                StartRule(context, RuleType.ScenarioDefinition);1340                StartRule(context, RuleType.Scenario);1341                Build(context, token);1342                return 12;1343            }1344            if (Match_RuleLine(context, token))1345            {1346                EndRule(context, RuleType.Description);1347                EndRule(context, RuleType.Scenario);1348                EndRule(context, RuleType.ScenarioDefinition);1349                StartRule(context, RuleType.Rule);1350                StartRule(context, RuleType.RuleHeader);1351                Build(context, token);1352                return 22;1353            }1354            if (Match_Other(context, token))1355            {1356                Build(context, token);1357                return 13;1358            }1359            1360            const string stateComment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";1361            token.Detach();1362            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};1363            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1364                : new UnexpectedTokenException(token, expectedTokens, stateComment);1365            if (StopAtFirstError)1366                throw error;1367            1368            AddError(context, error);1369            return 13;13701371        }1372        1373        1374        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:01375        int MatchTokenAt_14(Token token, ParserContext context)1376        {1377            if (Match_EOF(context, token))1378            {1379                EndRule(context, RuleType.Scenario);1380                EndRule(context, RuleType.ScenarioDefinition);1381                EndRule(context, RuleType.Feature);1382                Build(context, token);1383                return 41;1384            }1385            if (Match_Comment(context, token))1386            {1387                Build(context, token);1388                return 14;1389            }1390            if (Match_StepLine(context, token))1391            {1392                StartRule(context, RuleType.Step);1393                Build(context, token);1394                return 15;1395            }1396            if (Match_TagLine(context, token))1397            {1398                if (LookAhead_0(context, token))1399                {1400                StartRule(context, RuleType.ExamplesDefinition);1401                StartRule(context, RuleType.Tags);1402                Build(context, token);1403                return 17;1404                }1405            }1406            if (Match_TagLine(context, token))1407            {1408                EndRule(context, RuleType.Scenario);1409                EndRule(context, RuleType.ScenarioDefinition);1410                StartRule(context, RuleType.ScenarioDefinition);1411                StartRule(context, RuleType.Tags);1412                Build(context, token);1413                return 11;1414            }1415            if (Match_ExamplesLine(context, token))1416            {1417                StartRule(context, RuleType.ExamplesDefinition);1418                StartRule(context, RuleType.Examples);1419                Build(context, token);1420                return 18;1421            }1422            if (Match_ScenarioLine(context, token))1423            {1424                EndRule(context, RuleType.Scenario);1425                EndRule(context, RuleType.ScenarioDefinition);1426                StartRule(context, RuleType.ScenarioDefinition);1427                StartRule(context, RuleType.Scenario);1428                Build(context, token);1429                return 12;1430            }1431            if (Match_RuleLine(context, token))1432            {1433                EndRule(context, RuleType.Scenario);1434                EndRule(context, RuleType.ScenarioDefinition);1435                StartRule(context, RuleType.Rule);1436                StartRule(context, RuleType.RuleHeader);1437                Build(context, token);1438                return 22;1439            }1440            if (Match_Empty(context, token))1441            {1442                Build(context, token);1443                return 14;1444            }1445            1446            const string stateComment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";1447            token.Detach();1448            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"};1449            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1450                : new UnexpectedTokenException(token, expectedTokens, stateComment);1451            if (StopAtFirstError)1452                throw error;1453            1454            AddError(context, error);1455            return 14;14561457        }1458        1459        1460        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:01461        int MatchTokenAt_15(Token token, ParserContext context)1462        {1463            if (Match_EOF(context, token))1464            {1465                EndRule(context, RuleType.Step);1466                EndRule(context, RuleType.Scenario);1467                EndRule(context, RuleType.ScenarioDefinition);1468                EndRule(context, RuleType.Feature);1469                Build(context, token);1470                return 41;1471            }1472            if (Match_TableRow(context, token))1473            {1474                StartRule(context, RuleType.DataTable);1475                Build(context, token);1476                return 16;1477            }1478            if (Match_DocStringSeparator(context, token))1479            {1480                StartRule(context, RuleType.DocString);1481                Build(context, token);1482                return 46;1483            }1484            if (Match_StepLine(context, token))1485            {1486                EndRule(context, RuleType.Step);1487                StartRule(context, RuleType.Step);1488                Build(context, token);1489                return 15;1490            }1491            if (Match_TagLine(context, token))1492            {1493                if (LookAhead_0(context, token))1494                {1495                EndRule(context, RuleType.Step);1496                StartRule(context, RuleType.ExamplesDefinition);1497                StartRule(context, RuleType.Tags);1498                Build(context, token);1499                return 17;1500                }1501            }1502            if (Match_TagLine(context, token))1503            {1504                EndRule(context, RuleType.Step);1505                EndRule(context, RuleType.Scenario);1506                EndRule(context, RuleType.ScenarioDefinition);1507                StartRule(context, RuleType.ScenarioDefinition);1508                StartRule(context, RuleType.Tags);1509                Build(context, token);1510                return 11;1511            }1512            if (Match_ExamplesLine(context, token))1513            {1514                EndRule(context, RuleType.Step);1515                StartRule(context, RuleType.ExamplesDefinition);1516                StartRule(context, RuleType.Examples);1517                Build(context, token);1518                return 18;1519            }1520            if (Match_ScenarioLine(context, token))1521            {1522                EndRule(context, RuleType.Step);1523                EndRule(context, RuleType.Scenario);1524                EndRule(context, RuleType.ScenarioDefinition);1525                StartRule(context, RuleType.ScenarioDefinition);1526                StartRule(context, RuleType.Scenario);1527                Build(context, token);1528                return 12;1529            }1530            if (Match_RuleLine(context, token))1531            {1532                EndRule(context, RuleType.Step);1533                EndRule(context, RuleType.Scenario);1534                EndRule(context, RuleType.ScenarioDefinition);1535                StartRule(context, RuleType.Rule);1536                StartRule(context, RuleType.RuleHeader);1537                Build(context, token);1538                return 22;1539            }1540            if (Match_Comment(context, token))1541            {1542                Build(context, token);1543                return 15;1544            }1545            if (Match_Empty(context, token))1546            {1547                Build(context, token);1548                return 15;1549            }1550            1551            const string stateComment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";1552            token.Detach();1553            var expectedTokens = new string[] {"#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};1554            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1555                : new UnexpectedTokenException(token, expectedTokens, stateComment);1556            if (StopAtFirstError)1557                throw error;1558            1559            AddError(context, error);1560            return 15;15611562        }1563        1564        1565        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:01566        int MatchTokenAt_16(Token token, ParserContext context)1567        {1568            if (Match_EOF(context, token))1569            {1570                EndRule(context, RuleType.DataTable);1571                EndRule(context, RuleType.Step);1572                EndRule(context, RuleType.Scenario);1573                EndRule(context, RuleType.ScenarioDefinition);1574                EndRule(context, RuleType.Feature);1575                Build(context, token);1576                return 41;1577            }1578            if (Match_TableRow(context, token))1579            {1580                Build(context, token);1581                return 16;1582            }1583            if (Match_StepLine(context, token))1584            {1585                EndRule(context, RuleType.DataTable);1586                EndRule(context, RuleType.Step);1587                StartRule(context, RuleType.Step);1588                Build(context, token);1589                return 15;1590            }1591            if (Match_TagLine(context, token))1592            {1593                if (LookAhead_0(context, token))1594                {1595                EndRule(context, RuleType.DataTable);1596                EndRule(context, RuleType.Step);1597                StartRule(context, RuleType.ExamplesDefinition);1598                StartRule(context, RuleType.Tags);1599                Build(context, token);1600                return 17;1601                }1602            }1603            if (Match_TagLine(context, token))1604            {1605                EndRule(context, RuleType.DataTable);1606                EndRule(context, RuleType.Step);1607                EndRule(context, RuleType.Scenario);1608                EndRule(context, RuleType.ScenarioDefinition);1609                StartRule(context, RuleType.ScenarioDefinition);1610                StartRule(context, RuleType.Tags);1611                Build(context, token);1612                return 11;1613            }1614            if (Match_ExamplesLine(context, token))1615            {1616                EndRule(context, RuleType.DataTable);1617                EndRule(context, RuleType.Step);1618                StartRule(context, RuleType.ExamplesDefinition);1619                StartRule(context, RuleType.Examples);1620                Build(context, token);1621                return 18;1622            }1623            if (Match_ScenarioLine(context, token))1624            {1625                EndRule(context, RuleType.DataTable);1626                EndRule(context, RuleType.Step);1627                EndRule(context, RuleType.Scenario);1628                EndRule(context, RuleType.ScenarioDefinition);1629                StartRule(context, RuleType.ScenarioDefinition);1630                StartRule(context, RuleType.Scenario);1631                Build(context, token);1632                return 12;1633            }1634            if (Match_RuleLine(context, token))1635            {1636                EndRule(context, RuleType.DataTable);1637                EndRule(context, RuleType.Step);1638                EndRule(context, RuleType.Scenario);1639                EndRule(context, RuleType.ScenarioDefinition);1640                StartRule(context, RuleType.Rule);1641                StartRule(context, RuleType.RuleHeader);1642                Build(context, token);1643                return 22;1644            }1645            if (Match_Comment(context, token))1646            {1647                Build(context, token);1648                return 16;1649            }1650            if (Match_Empty(context, token))1651            {1652                Build(context, token);1653                return 16;1654            }1655            1656            const string stateComment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";1657            token.Detach();1658            var expectedTokens = new string[] {"#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};1659            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1660                : new UnexpectedTokenException(token, expectedTokens, stateComment);1661            if (StopAtFirstError)1662                throw error;1663            1664            AddError(context, error);1665            return 16;16661667        }1668        1669        1670        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:01671        int MatchTokenAt_17(Token token, ParserContext context)1672        {1673            if (Match_TagLine(context, token))1674            {1675                Build(context, token);1676                return 17;1677            }1678            if (Match_ExamplesLine(context, token))1679            {1680                EndRule(context, RuleType.Tags);1681                StartRule(context, RuleType.Examples);1682                Build(context, token);1683                return 18;1684            }1685            if (Match_Comment(context, token))1686            {1687                Build(context, token);1688                return 17;1689            }1690            if (Match_Empty(context, token))1691            {1692                Build(context, token);1693                return 17;1694            }1695            1696            const string stateComment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";1697            token.Detach();1698            var expectedTokens = new string[] {"#TagLine", "#ExamplesLine", "#Comment", "#Empty"};1699            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1700                : new UnexpectedTokenException(token, expectedTokens, stateComment);1701            if (StopAtFirstError)1702                throw error;1703            1704            AddError(context, error);1705            return 17;17061707        }1708        1709        1710        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:01711        int MatchTokenAt_18(Token token, ParserContext context)1712        {1713            if (Match_EOF(context, token))1714            {1715                EndRule(context, RuleType.Examples);1716                EndRule(context, RuleType.ExamplesDefinition);1717                EndRule(context, RuleType.Scenario);1718                EndRule(context, RuleType.ScenarioDefinition);1719                EndRule(context, RuleType.Feature);1720                Build(context, token);1721                return 41;1722            }1723            if (Match_Empty(context, token))1724            {1725                Build(context, token);1726                return 18;1727            }1728            if (Match_Comment(context, token))1729            {1730                Build(context, token);1731                return 20;1732            }1733            if (Match_TableRow(context, token))1734            {1735                StartRule(context, RuleType.ExamplesTable);1736                Build(context, token);1737                return 21;1738            }1739            if (Match_TagLine(context, token))1740            {1741                if (LookAhead_0(context, token))1742                {1743                EndRule(context, RuleType.Examples);1744                EndRule(context, RuleType.ExamplesDefinition);1745                StartRule(context, RuleType.ExamplesDefinition);1746                StartRule(context, RuleType.Tags);1747                Build(context, token);1748                return 17;1749                }1750            }1751            if (Match_TagLine(context, token))1752            {1753                EndRule(context, RuleType.Examples);1754                EndRule(context, RuleType.ExamplesDefinition);1755                EndRule(context, RuleType.Scenario);1756                EndRule(context, RuleType.ScenarioDefinition);1757                StartRule(context, RuleType.ScenarioDefinition);1758                StartRule(context, RuleType.Tags);1759                Build(context, token);1760                return 11;1761            }1762            if (Match_ExamplesLine(context, token))1763            {1764                EndRule(context, RuleType.Examples);1765                EndRule(context, RuleType.ExamplesDefinition);1766                StartRule(context, RuleType.ExamplesDefinition);1767                StartRule(context, RuleType.Examples);1768                Build(context, token);1769                return 18;1770            }1771            if (Match_ScenarioLine(context, token))1772            {1773                EndRule(context, RuleType.Examples);1774                EndRule(context, RuleType.ExamplesDefinition);1775                EndRule(context, RuleType.Scenario);1776                EndRule(context, RuleType.ScenarioDefinition);1777                StartRule(context, RuleType.ScenarioDefinition);1778                StartRule(context, RuleType.Scenario);1779                Build(context, token);1780                return 12;1781            }1782            if (Match_RuleLine(context, token))1783            {1784                EndRule(context, RuleType.Examples);1785                EndRule(context, RuleType.ExamplesDefinition);1786                EndRule(context, RuleType.Scenario);1787                EndRule(context, RuleType.ScenarioDefinition);1788                StartRule(context, RuleType.Rule);1789                StartRule(context, RuleType.RuleHeader);1790                Build(context, token);1791                return 22;1792            }1793            if (Match_Other(context, token))1794            {1795                StartRule(context, RuleType.Description);1796                Build(context, token);1797                return 19;1798            }1799            1800            const string stateComment = "State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";1801            token.Detach();1802            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};1803            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1804                : new UnexpectedTokenException(token, expectedTokens, stateComment);1805            if (StopAtFirstError)1806                throw error;1807            1808            AddError(context, error);1809            return 18;18101811        }1812        1813        1814        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:01815        int MatchTokenAt_19(Token token, ParserContext context)1816        {1817            if (Match_EOF(context, token))1818            {1819                EndRule(context, RuleType.Description);1820                EndRule(context, RuleType.Examples);1821                EndRule(context, RuleType.ExamplesDefinition);1822                EndRule(context, RuleType.Scenario);1823                EndRule(context, RuleType.ScenarioDefinition);1824                EndRule(context, RuleType.Feature);1825                Build(context, token);1826                return 41;1827            }1828            if (Match_Comment(context, token))1829            {1830                EndRule(context, RuleType.Description);1831                Build(context, token);1832                return 20;1833            }1834            if (Match_TableRow(context, token))1835            {1836                EndRule(context, RuleType.Description);1837                StartRule(context, RuleType.ExamplesTable);1838                Build(context, token);1839                return 21;1840            }1841            if (Match_TagLine(context, token))1842            {1843                if (LookAhead_0(context, token))1844                {1845                EndRule(context, RuleType.Description);1846                EndRule(context, RuleType.Examples);1847                EndRule(context, RuleType.ExamplesDefinition);1848                StartRule(context, RuleType.ExamplesDefinition);1849                StartRule(context, RuleType.Tags);1850                Build(context, token);1851                return 17;1852                }1853            }1854            if (Match_TagLine(context, token))1855            {1856                EndRule(context, RuleType.Description);1857                EndRule(context, RuleType.Examples);1858                EndRule(context, RuleType.ExamplesDefinition);1859                EndRule(context, RuleType.Scenario);1860                EndRule(context, RuleType.ScenarioDefinition);1861                StartRule(context, RuleType.ScenarioDefinition);1862                StartRule(context, RuleType.Tags);1863                Build(context, token);1864                return 11;1865            }1866            if (Match_ExamplesLine(context, token))1867            {1868                EndRule(context, RuleType.Description);1869                EndRule(context, RuleType.Examples);1870                EndRule(context, RuleType.ExamplesDefinition);1871                StartRule(context, RuleType.ExamplesDefinition);1872                StartRule(context, RuleType.Examples);1873                Build(context, token);1874                return 18;1875            }1876            if (Match_ScenarioLine(context, token))1877            {1878                EndRule(context, RuleType.Description);1879                EndRule(context, RuleType.Examples);1880                EndRule(context, RuleType.ExamplesDefinition);1881                EndRule(context, RuleType.Scenario);1882                EndRule(context, RuleType.ScenarioDefinition);1883                StartRule(context, RuleType.ScenarioDefinition);1884                StartRule(context, RuleType.Scenario);1885                Build(context, token);1886                return 12;1887            }1888            if (Match_RuleLine(context, token))1889            {1890                EndRule(context, RuleType.Description);1891                EndRule(context, RuleType.Examples);1892                EndRule(context, RuleType.ExamplesDefinition);1893                EndRule(context, RuleType.Scenario);1894                EndRule(context, RuleType.ScenarioDefinition);1895                StartRule(context, RuleType.Rule);1896                StartRule(context, RuleType.RuleHeader);1897                Build(context, token);1898                return 22;1899            }1900            if (Match_Other(context, token))1901            {1902                Build(context, token);1903                return 19;1904            }1905            1906            const string stateComment = "State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";1907            token.Detach();1908            var expectedTokens = new string[] {"#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};1909            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 1910                : new UnexpectedTokenException(token, expectedTokens, stateComment);1911            if (StopAtFirstError)1912                throw error;1913            1914            AddError(context, error);1915            return 19;19161917        }1918        1919        1920        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:01921        int MatchTokenAt_20(Token token, ParserContext context)1922        {1923            if (Match_EOF(context, token))1924            {1925                EndRule(context, RuleType.Examples);1926                EndRule(context, RuleType.ExamplesDefinition);1927                EndRule(context, RuleType.Scenario);1928                EndRule(context, RuleType.ScenarioDefinition);1929                EndRule(context, RuleType.Feature);1930                Build(context, token);1931                return 41;1932            }1933            if (Match_Comment(context, token))1934            {1935                Build(context, token);1936                return 20;1937            }1938            if (Match_TableRow(context, token))1939            {1940                StartRule(context, RuleType.ExamplesTable);1941                Build(context, token);1942                return 21;1943            }1944            if (Match_TagLine(context, token))1945            {1946                if (LookAhead_0(context, token))1947                {1948                EndRule(context, RuleType.Examples);1949                EndRule(context, RuleType.ExamplesDefinition);1950                StartRule(context, RuleType.ExamplesDefinition);1951                StartRule(context, RuleType.Tags);1952                Build(context, token);1953                return 17;1954                }1955            }1956            if (Match_TagLine(context, token))1957            {1958                EndRule(context, RuleType.Examples);1959                EndRule(context, RuleType.ExamplesDefinition);1960                EndRule(context, RuleType.Scenario);1961                EndRule(context, RuleType.ScenarioDefinition);1962                StartRule(context, RuleType.ScenarioDefinition);1963                StartRule(context, RuleType.Tags);1964                Build(context, token);1965                return 11;1966            }1967            if (Match_ExamplesLine(context, token))1968            {1969                EndRule(context, RuleType.Examples);1970                EndRule(context, RuleType.ExamplesDefinition);1971                StartRule(context, RuleType.ExamplesDefinition);1972                StartRule(context, RuleType.Examples);1973                Build(context, token);1974                return 18;1975            }1976            if (Match_ScenarioLine(context, token))1977            {1978                EndRule(context, RuleType.Examples);1979                EndRule(context, RuleType.ExamplesDefinition);1980                EndRule(context, RuleType.Scenario);1981                EndRule(context, RuleType.ScenarioDefinition);1982                StartRule(context, RuleType.ScenarioDefinition);1983                StartRule(context, RuleType.Scenario);1984                Build(context, token);1985                return 12;1986            }1987            if (Match_RuleLine(context, token))1988            {1989                EndRule(context, RuleType.Examples);1990                EndRule(context, RuleType.ExamplesDefinition);1991                EndRule(context, RuleType.Scenario);1992                EndRule(context, RuleType.ScenarioDefinition);1993                StartRule(context, RuleType.Rule);1994                StartRule(context, RuleType.RuleHeader);1995                Build(context, token);1996                return 22;1997            }1998            if (Match_Empty(context, token))1999            {2000                Build(context, token);2001                return 20;2002            }2003            2004            const string stateComment = "State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";2005            token.Detach();2006            var expectedTokens = new string[] {"#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"};2007            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2008                : new UnexpectedTokenException(token, expectedTokens, stateComment);2009            if (StopAtFirstError)2010                throw error;2011            2012            AddError(context, error);2013            return 20;20142015        }2016        2017        2018        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:02019        int MatchTokenAt_21(Token token, ParserContext context)2020        {2021            if (Match_EOF(context, token))2022            {2023                EndRule(context, RuleType.ExamplesTable);2024                EndRule(context, RuleType.Examples);2025                EndRule(context, RuleType.ExamplesDefinition);2026                EndRule(context, RuleType.Scenario);2027                EndRule(context, RuleType.ScenarioDefinition);2028                EndRule(context, RuleType.Feature);2029                Build(context, token);2030                return 41;2031            }2032            if (Match_TableRow(context, token))2033            {2034                Build(context, token);2035                return 21;2036            }2037            if (Match_TagLine(context, token))2038            {2039                if (LookAhead_0(context, token))2040                {2041                EndRule(context, RuleType.ExamplesTable);2042                EndRule(context, RuleType.Examples);2043                EndRule(context, RuleType.ExamplesDefinition);2044                StartRule(context, RuleType.ExamplesDefinition);2045                StartRule(context, RuleType.Tags);2046                Build(context, token);2047                return 17;2048                }2049            }2050            if (Match_TagLine(context, token))2051            {2052                EndRule(context, RuleType.ExamplesTable);2053                EndRule(context, RuleType.Examples);2054                EndRule(context, RuleType.ExamplesDefinition);2055                EndRule(context, RuleType.Scenario);2056                EndRule(context, RuleType.ScenarioDefinition);2057                StartRule(context, RuleType.ScenarioDefinition);2058                StartRule(context, RuleType.Tags);2059                Build(context, token);2060                return 11;2061            }2062            if (Match_ExamplesLine(context, token))2063            {2064                EndRule(context, RuleType.ExamplesTable);2065                EndRule(context, RuleType.Examples);2066                EndRule(context, RuleType.ExamplesDefinition);2067                StartRule(context, RuleType.ExamplesDefinition);2068                StartRule(context, RuleType.Examples);2069                Build(context, token);2070                return 18;2071            }2072            if (Match_ScenarioLine(context, token))2073            {2074                EndRule(context, RuleType.ExamplesTable);2075                EndRule(context, RuleType.Examples);2076                EndRule(context, RuleType.ExamplesDefinition);2077                EndRule(context, RuleType.Scenario);2078                EndRule(context, RuleType.ScenarioDefinition);2079                StartRule(context, RuleType.ScenarioDefinition);2080                StartRule(context, RuleType.Scenario);2081                Build(context, token);2082                return 12;2083            }2084            if (Match_RuleLine(context, token))2085            {2086                EndRule(context, RuleType.ExamplesTable);2087                EndRule(context, RuleType.Examples);2088                EndRule(context, RuleType.ExamplesDefinition);2089                EndRule(context, RuleType.Scenario);2090                EndRule(context, RuleType.ScenarioDefinition);2091                StartRule(context, RuleType.Rule);2092                StartRule(context, RuleType.RuleHeader);2093                Build(context, token);2094                return 22;2095            }2096            if (Match_Comment(context, token))2097            {2098                Build(context, token);2099                return 21;2100            }2101            if (Match_Empty(context, token))2102            {2103                Build(context, token);2104                return 21;2105            }2106            2107            const string stateComment = "State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";2108            token.Detach();2109            var expectedTokens = new string[] {"#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};2110            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2111                : new UnexpectedTokenException(token, expectedTokens, stateComment);2112            if (StopAtFirstError)2113                throw error;2114            2115            AddError(context, error);2116            return 21;21172118        }2119        2120        2121        // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:02122        int MatchTokenAt_22(Token token, ParserContext context)2123        {2124            if (Match_EOF(context, token))2125            {2126                EndRule(context, RuleType.RuleHeader);2127                EndRule(context, RuleType.Rule);2128                EndRule(context, RuleType.Feature);2129                Build(context, token);2130                return 41;2131            }2132            if (Match_Empty(context, token))2133            {2134                Build(context, token);2135                return 22;2136            }2137            if (Match_Comment(context, token))2138            {2139                Build(context, token);2140                return 24;2141            }2142            if (Match_BackgroundLine(context, token))2143            {2144                EndRule(context, RuleType.RuleHeader);2145                StartRule(context, RuleType.Background);2146                Build(context, token);2147                return 25;2148            }2149            if (Match_TagLine(context, token))2150            {2151                EndRule(context, RuleType.RuleHeader);2152                StartRule(context, RuleType.ScenarioDefinition);2153                StartRule(context, RuleType.Tags);2154                Build(context, token);2155                return 30;2156            }2157            if (Match_ScenarioLine(context, token))2158            {2159                EndRule(context, RuleType.RuleHeader);2160                StartRule(context, RuleType.ScenarioDefinition);2161                StartRule(context, RuleType.Scenario);2162                Build(context, token);2163                return 31;2164            }2165            if (Match_RuleLine(context, token))2166            {2167                EndRule(context, RuleType.RuleHeader);2168                EndRule(context, RuleType.Rule);2169                StartRule(context, RuleType.Rule);2170                StartRule(context, RuleType.RuleHeader);2171                Build(context, token);2172                return 22;2173            }2174            if (Match_Other(context, token))2175            {2176                StartRule(context, RuleType.Description);2177                Build(context, token);2178                return 23;2179            }2180            2181            const string stateComment = "State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:0";2182            token.Detach();2183            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};2184            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2185                : new UnexpectedTokenException(token, expectedTokens, stateComment);2186            if (StopAtFirstError)2187                throw error;2188            2189            AddError(context, error);2190            return 22;21912192        }2193        2194        2195        // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:02196        int MatchTokenAt_23(Token token, ParserContext context)2197        {2198            if (Match_EOF(context, token))2199            {2200                EndRule(context, RuleType.Description);2201                EndRule(context, RuleType.RuleHeader);2202                EndRule(context, RuleType.Rule);2203                EndRule(context, RuleType.Feature);2204                Build(context, token);2205                return 41;2206            }2207            if (Match_Comment(context, token))2208            {2209                EndRule(context, RuleType.Description);2210                Build(context, token);2211                return 24;2212            }2213            if (Match_BackgroundLine(context, token))2214            {2215                EndRule(context, RuleType.Description);2216                EndRule(context, RuleType.RuleHeader);2217                StartRule(context, RuleType.Background);2218                Build(context, token);2219                return 25;2220            }2221            if (Match_TagLine(context, token))2222            {2223                EndRule(context, RuleType.Description);2224                EndRule(context, RuleType.RuleHeader);2225                StartRule(context, RuleType.ScenarioDefinition);2226                StartRule(context, RuleType.Tags);2227                Build(context, token);2228                return 30;2229            }2230            if (Match_ScenarioLine(context, token))2231            {2232                EndRule(context, RuleType.Description);2233                EndRule(context, RuleType.RuleHeader);2234                StartRule(context, RuleType.ScenarioDefinition);2235                StartRule(context, RuleType.Scenario);2236                Build(context, token);2237                return 31;2238            }2239            if (Match_RuleLine(context, token))2240            {2241                EndRule(context, RuleType.Description);2242                EndRule(context, RuleType.RuleHeader);2243                EndRule(context, RuleType.Rule);2244                StartRule(context, RuleType.Rule);2245                StartRule(context, RuleType.RuleHeader);2246                Build(context, token);2247                return 22;2248            }2249            if (Match_Other(context, token))2250            {2251                Build(context, token);2252                return 23;2253            }2254            2255            const string stateComment = "State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:0";2256            token.Detach();2257            var expectedTokens = new string[] {"#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};2258            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2259                : new UnexpectedTokenException(token, expectedTokens, stateComment);2260            if (StopAtFirstError)2261                throw error;2262            2263            AddError(context, error);2264            return 23;22652266        }2267        2268        2269        // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:02270        int MatchTokenAt_24(Token token, ParserContext context)2271        {2272            if (Match_EOF(context, token))2273            {2274                EndRule(context, RuleType.RuleHeader);2275                EndRule(context, RuleType.Rule);2276                EndRule(context, RuleType.Feature);2277                Build(context, token);2278                return 41;2279            }2280            if (Match_Comment(context, token))2281            {2282                Build(context, token);2283                return 24;2284            }2285            if (Match_BackgroundLine(context, token))2286            {2287                EndRule(context, RuleType.RuleHeader);2288                StartRule(context, RuleType.Background);2289                Build(context, token);2290                return 25;2291            }2292            if (Match_TagLine(context, token))2293            {2294                EndRule(context, RuleType.RuleHeader);2295                StartRule(context, RuleType.ScenarioDefinition);2296                StartRule(context, RuleType.Tags);2297                Build(context, token);2298                return 30;2299            }2300            if (Match_ScenarioLine(context, token))2301            {2302                EndRule(context, RuleType.RuleHeader);2303                StartRule(context, RuleType.ScenarioDefinition);2304                StartRule(context, RuleType.Scenario);2305                Build(context, token);2306                return 31;2307            }2308            if (Match_RuleLine(context, token))2309            {2310                EndRule(context, RuleType.RuleHeader);2311                EndRule(context, RuleType.Rule);2312                StartRule(context, RuleType.Rule);2313                StartRule(context, RuleType.RuleHeader);2314                Build(context, token);2315                return 22;2316            }2317            if (Match_Empty(context, token))2318            {2319                Build(context, token);2320                return 24;2321            }2322            2323            const string stateComment = "State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:0";2324            token.Detach();2325            var expectedTokens = new string[] {"#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"};2326            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2327                : new UnexpectedTokenException(token, expectedTokens, stateComment);2328            if (StopAtFirstError)2329                throw error;2330            2331            AddError(context, error);2332            return 24;23332334        }2335        2336        2337        // GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:02338        int MatchTokenAt_25(Token token, ParserContext context)2339        {2340            if (Match_EOF(context, token))2341            {2342                EndRule(context, RuleType.Background);2343                EndRule(context, RuleType.Rule);2344                EndRule(context, RuleType.Feature);2345                Build(context, token);2346                return 41;2347            }2348            if (Match_Empty(context, token))2349            {2350                Build(context, token);2351                return 25;2352            }2353            if (Match_Comment(context, token))2354            {2355                Build(context, token);2356                return 27;2357            }2358            if (Match_StepLine(context, token))2359            {2360                StartRule(context, RuleType.Step);2361                Build(context, token);2362                return 28;2363            }2364            if (Match_TagLine(context, token))2365            {2366                EndRule(context, RuleType.Background);2367                StartRule(context, RuleType.ScenarioDefinition);2368                StartRule(context, RuleType.Tags);2369                Build(context, token);2370                return 30;2371            }2372            if (Match_ScenarioLine(context, token))2373            {2374                EndRule(context, RuleType.Background);2375                StartRule(context, RuleType.ScenarioDefinition);2376                StartRule(context, RuleType.Scenario);2377                Build(context, token);2378                return 31;2379            }2380            if (Match_RuleLine(context, token))2381            {2382                EndRule(context, RuleType.Background);2383                EndRule(context, RuleType.Rule);2384                StartRule(context, RuleType.Rule);2385                StartRule(context, RuleType.RuleHeader);2386                Build(context, token);2387                return 22;2388            }2389            if (Match_Other(context, token))2390            {2391                StartRule(context, RuleType.Description);2392                Build(context, token);2393                return 26;2394            }2395            2396            const string stateComment = "State: 25 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0";2397            token.Detach();2398            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};2399            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2400                : new UnexpectedTokenException(token, expectedTokens, stateComment);2401            if (StopAtFirstError)2402                throw error;2403            2404            AddError(context, error);2405            return 25;24062407        }2408        2409        2410        // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:02411        int MatchTokenAt_26(Token token, ParserContext context)2412        {2413            if (Match_EOF(context, token))2414            {2415                EndRule(context, RuleType.Description);2416                EndRule(context, RuleType.Background);2417                EndRule(context, RuleType.Rule);2418                EndRule(context, RuleType.Feature);2419                Build(context, token);2420                return 41;2421            }2422            if (Match_Comment(context, token))2423            {2424                EndRule(context, RuleType.Description);2425                Build(context, token);2426                return 27;2427            }2428            if (Match_StepLine(context, token))2429            {2430                EndRule(context, RuleType.Description);2431                StartRule(context, RuleType.Step);2432                Build(context, token);2433                return 28;2434            }2435            if (Match_TagLine(context, token))2436            {2437                EndRule(context, RuleType.Description);2438                EndRule(context, RuleType.Background);2439                StartRule(context, RuleType.ScenarioDefinition);2440                StartRule(context, RuleType.Tags);2441                Build(context, token);2442                return 30;2443            }2444            if (Match_ScenarioLine(context, token))2445            {2446                EndRule(context, RuleType.Description);2447                EndRule(context, RuleType.Background);2448                StartRule(context, RuleType.ScenarioDefinition);2449                StartRule(context, RuleType.Scenario);2450                Build(context, token);2451                return 31;2452            }2453            if (Match_RuleLine(context, token))2454            {2455                EndRule(context, RuleType.Description);2456                EndRule(context, RuleType.Background);2457                EndRule(context, RuleType.Rule);2458                StartRule(context, RuleType.Rule);2459                StartRule(context, RuleType.RuleHeader);2460                Build(context, token);2461                return 22;2462            }2463            if (Match_Other(context, token))2464            {2465                Build(context, token);2466                return 26;2467            }2468            2469            const string stateComment = "State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";2470            token.Detach();2471            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"};2472            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2473                : new UnexpectedTokenException(token, expectedTokens, stateComment);2474            if (StopAtFirstError)2475                throw error;2476            2477            AddError(context, error);2478            return 26;24792480        }2481        2482        2483        // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:02484        int MatchTokenAt_27(Token token, ParserContext context)2485        {2486            if (Match_EOF(context, token))2487            {2488                EndRule(context, RuleType.Background);2489                EndRule(context, RuleType.Rule);2490                EndRule(context, RuleType.Feature);2491                Build(context, token);2492                return 41;2493            }2494            if (Match_Comment(context, token))2495            {2496                Build(context, token);2497                return 27;2498            }2499            if (Match_StepLine(context, token))2500            {2501                StartRule(context, RuleType.Step);2502                Build(context, token);2503                return 28;2504            }2505            if (Match_TagLine(context, token))2506            {2507                EndRule(context, RuleType.Background);2508                StartRule(context, RuleType.ScenarioDefinition);2509                StartRule(context, RuleType.Tags);2510                Build(context, token);2511                return 30;2512            }2513            if (Match_ScenarioLine(context, token))2514            {2515                EndRule(context, RuleType.Background);2516                StartRule(context, RuleType.ScenarioDefinition);2517                StartRule(context, RuleType.Scenario);2518                Build(context, token);2519                return 31;2520            }2521            if (Match_RuleLine(context, token))2522            {2523                EndRule(context, RuleType.Background);2524                EndRule(context, RuleType.Rule);2525                StartRule(context, RuleType.Rule);2526                StartRule(context, RuleType.RuleHeader);2527                Build(context, token);2528                return 22;2529            }2530            if (Match_Empty(context, token))2531            {2532                Build(context, token);2533                return 27;2534            }2535            2536            const string stateComment = "State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0";2537            token.Detach();2538            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"};2539            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2540                : new UnexpectedTokenException(token, expectedTokens, stateComment);2541            if (StopAtFirstError)2542                throw error;2543            2544            AddError(context, error);2545            return 27;25462547        }2548        2549        2550        // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:02551        int MatchTokenAt_28(Token token, ParserContext context)2552        {2553            if (Match_EOF(context, token))2554            {2555                EndRule(context, RuleType.Step);2556                EndRule(context, RuleType.Background);2557                EndRule(context, RuleType.Rule);2558                EndRule(context, RuleType.Feature);2559                Build(context, token);2560                return 41;2561            }2562            if (Match_TableRow(context, token))2563            {2564                StartRule(context, RuleType.DataTable);2565                Build(context, token);2566                return 29;2567            }2568            if (Match_DocStringSeparator(context, token))2569            {2570                StartRule(context, RuleType.DocString);2571                Build(context, token);2572                return 44;2573            }2574            if (Match_StepLine(context, token))2575            {2576                EndRule(context, RuleType.Step);2577                StartRule(context, RuleType.Step);2578                Build(context, token);2579                return 28;2580            }2581            if (Match_TagLine(context, token))2582            {2583                EndRule(context, RuleType.Step);2584                EndRule(context, RuleType.Background);2585                StartRule(context, RuleType.ScenarioDefinition);2586                StartRule(context, RuleType.Tags);2587                Build(context, token);2588                return 30;2589            }2590            if (Match_ScenarioLine(context, token))2591            {2592                EndRule(context, RuleType.Step);2593                EndRule(context, RuleType.Background);2594                StartRule(context, RuleType.ScenarioDefinition);2595                StartRule(context, RuleType.Scenario);2596                Build(context, token);2597                return 31;2598            }2599            if (Match_RuleLine(context, token))2600            {2601                EndRule(context, RuleType.Step);2602                EndRule(context, RuleType.Background);2603                EndRule(context, RuleType.Rule);2604                StartRule(context, RuleType.Rule);2605                StartRule(context, RuleType.RuleHeader);2606                Build(context, token);2607                return 22;2608            }2609            if (Match_Comment(context, token))2610            {2611                Build(context, token);2612                return 28;2613            }2614            if (Match_Empty(context, token))2615            {2616                Build(context, token);2617                return 28;2618            }2619            2620            const string stateComment = "State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0";2621            token.Detach();2622            var expectedTokens = new string[] {"#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};2623            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2624                : new UnexpectedTokenException(token, expectedTokens, stateComment);2625            if (StopAtFirstError)2626                throw error;2627            2628            AddError(context, error);2629            return 28;26302631        }2632        2633        2634        // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02635        int MatchTokenAt_29(Token token, ParserContext context)2636        {2637            if (Match_EOF(context, token))2638            {2639                EndRule(context, RuleType.DataTable);2640                EndRule(context, RuleType.Step);2641                EndRule(context, RuleType.Background);2642                EndRule(context, RuleType.Rule);2643                EndRule(context, RuleType.Feature);2644                Build(context, token);2645                return 41;2646            }2647            if (Match_TableRow(context, token))2648            {2649                Build(context, token);2650                return 29;2651            }2652            if (Match_StepLine(context, token))2653            {2654                EndRule(context, RuleType.DataTable);2655                EndRule(context, RuleType.Step);2656                StartRule(context, RuleType.Step);2657                Build(context, token);2658                return 28;2659            }2660            if (Match_TagLine(context, token))2661            {2662                EndRule(context, RuleType.DataTable);2663                EndRule(context, RuleType.Step);2664                EndRule(context, RuleType.Background);2665                StartRule(context, RuleType.ScenarioDefinition);2666                StartRule(context, RuleType.Tags);2667                Build(context, token);2668                return 30;2669            }2670            if (Match_ScenarioLine(context, token))2671            {2672                EndRule(context, RuleType.DataTable);2673                EndRule(context, RuleType.Step);2674                EndRule(context, RuleType.Background);2675                StartRule(context, RuleType.ScenarioDefinition);2676                StartRule(context, RuleType.Scenario);2677                Build(context, token);2678                return 31;2679            }2680            if (Match_RuleLine(context, token))2681            {2682                EndRule(context, RuleType.DataTable);2683                EndRule(context, RuleType.Step);2684                EndRule(context, RuleType.Background);2685                EndRule(context, RuleType.Rule);2686                StartRule(context, RuleType.Rule);2687                StartRule(context, RuleType.RuleHeader);2688                Build(context, token);2689                return 22;2690            }2691            if (Match_Comment(context, token))2692            {2693                Build(context, token);2694                return 29;2695            }2696            if (Match_Empty(context, token))2697            {2698                Build(context, token);2699                return 29;2700            }2701            2702            const string stateComment = "State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2703            token.Detach();2704            var expectedTokens = new string[] {"#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};2705            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2706                : new UnexpectedTokenException(token, expectedTokens, stateComment);2707            if (StopAtFirstError)2708                throw error;2709            2710            AddError(context, error);2711            return 29;27122713        }2714        2715        2716        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:02717        int MatchTokenAt_30(Token token, ParserContext context)2718        {2719            if (Match_TagLine(context, token))2720            {2721                Build(context, token);2722                return 30;2723            }2724            if (Match_ScenarioLine(context, token))2725            {2726                EndRule(context, RuleType.Tags);2727                StartRule(context, RuleType.Scenario);2728                Build(context, token);2729                return 31;2730            }2731            if (Match_Comment(context, token))2732            {2733                Build(context, token);2734                return 30;2735            }2736            if (Match_Empty(context, token))2737            {2738                Build(context, token);2739                return 30;2740            }2741            2742            const string stateComment = "State: 30 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0";2743            token.Detach();2744            var expectedTokens = new string[] {"#TagLine", "#ScenarioLine", "#Comment", "#Empty"};2745            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2746                : new UnexpectedTokenException(token, expectedTokens, stateComment);2747            if (StopAtFirstError)2748                throw error;2749            2750            AddError(context, error);2751            return 30;27522753        }2754        2755        2756        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:02757        int MatchTokenAt_31(Token token, ParserContext context)2758        {2759            if (Match_EOF(context, token))2760            {2761                EndRule(context, RuleType.Scenario);2762                EndRule(context, RuleType.ScenarioDefinition);2763                EndRule(context, RuleType.Rule);2764                EndRule(context, RuleType.Feature);2765                Build(context, token);2766                return 41;2767            }2768            if (Match_Empty(context, token))2769            {2770                Build(context, token);2771                return 31;2772            }2773            if (Match_Comment(context, token))2774            {2775                Build(context, token);2776                return 33;2777            }2778            if (Match_StepLine(context, token))2779            {2780                StartRule(context, RuleType.Step);2781                Build(context, token);2782                return 34;2783            }2784            if (Match_TagLine(context, token))2785            {2786                if (LookAhead_0(context, token))2787                {2788                StartRule(context, RuleType.ExamplesDefinition);2789                StartRule(context, RuleType.Tags);2790                Build(context, token);2791                return 36;2792                }2793            }2794            if (Match_TagLine(context, token))2795            {2796                EndRule(context, RuleType.Scenario);2797                EndRule(context, RuleType.ScenarioDefinition);2798                StartRule(context, RuleType.ScenarioDefinition);2799                StartRule(context, RuleType.Tags);2800                Build(context, token);2801                return 30;2802            }2803            if (Match_ExamplesLine(context, token))2804            {2805                StartRule(context, RuleType.ExamplesDefinition);2806                StartRule(context, RuleType.Examples);2807                Build(context, token);2808                return 37;2809            }2810            if (Match_ScenarioLine(context, token))2811            {2812                EndRule(context, RuleType.Scenario);2813                EndRule(context, RuleType.ScenarioDefinition);2814                StartRule(context, RuleType.ScenarioDefinition);2815                StartRule(context, RuleType.Scenario);2816                Build(context, token);2817                return 31;2818            }2819            if (Match_RuleLine(context, token))2820            {2821                EndRule(context, RuleType.Scenario);2822                EndRule(context, RuleType.ScenarioDefinition);2823                EndRule(context, RuleType.Rule);2824                StartRule(context, RuleType.Rule);2825                StartRule(context, RuleType.RuleHeader);2826                Build(context, token);2827                return 22;2828            }2829            if (Match_Other(context, token))2830            {2831                StartRule(context, RuleType.Description);2832                Build(context, token);2833                return 32;2834            }2835            2836            const string stateComment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";2837            token.Detach();2838            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};2839            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2840                : new UnexpectedTokenException(token, expectedTokens, stateComment);2841            if (StopAtFirstError)2842                throw error;2843            2844            AddError(context, error);2845            return 31;28462847        }2848        2849        2850        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:02851        int MatchTokenAt_32(Token token, ParserContext context)2852        {2853            if (Match_EOF(context, token))2854            {2855                EndRule(context, RuleType.Description);2856                EndRule(context, RuleType.Scenario);2857                EndRule(context, RuleType.ScenarioDefinition);2858                EndRule(context, RuleType.Rule);2859                EndRule(context, RuleType.Feature);2860                Build(context, token);2861                return 41;2862            }2863            if (Match_Comment(context, token))2864            {2865                EndRule(context, RuleType.Description);2866                Build(context, token);2867                return 33;2868            }2869            if (Match_StepLine(context, token))2870            {2871                EndRule(context, RuleType.Description);2872                StartRule(context, RuleType.Step);2873                Build(context, token);2874                return 34;2875            }2876            if (Match_TagLine(context, token))2877            {2878                if (LookAhead_0(context, token))2879                {2880                EndRule(context, RuleType.Description);2881                StartRule(context, RuleType.ExamplesDefinition);2882                StartRule(context, RuleType.Tags);2883                Build(context, token);2884                return 36;2885                }2886            }2887            if (Match_TagLine(context, token))2888            {2889                EndRule(context, RuleType.Description);2890                EndRule(context, RuleType.Scenario);2891                EndRule(context, RuleType.ScenarioDefinition);2892                StartRule(context, RuleType.ScenarioDefinition);2893                StartRule(context, RuleType.Tags);2894                Build(context, token);2895                return 30;2896            }2897            if (Match_ExamplesLine(context, token))2898            {2899                EndRule(context, RuleType.Description);2900                StartRule(context, RuleType.ExamplesDefinition);2901                StartRule(context, RuleType.Examples);2902                Build(context, token);2903                return 37;2904            }2905            if (Match_ScenarioLine(context, token))2906            {2907                EndRule(context, RuleType.Description);2908                EndRule(context, RuleType.Scenario);2909                EndRule(context, RuleType.ScenarioDefinition);2910                StartRule(context, RuleType.ScenarioDefinition);2911                StartRule(context, RuleType.Scenario);2912                Build(context, token);2913                return 31;2914            }2915            if (Match_RuleLine(context, token))2916            {2917                EndRule(context, RuleType.Description);2918                EndRule(context, RuleType.Scenario);2919                EndRule(context, RuleType.ScenarioDefinition);2920                EndRule(context, RuleType.Rule);2921                StartRule(context, RuleType.Rule);2922                StartRule(context, RuleType.RuleHeader);2923                Build(context, token);2924                return 22;2925            }2926            if (Match_Other(context, token))2927            {2928                Build(context, token);2929                return 32;2930            }2931            2932            const string stateComment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";2933            token.Detach();2934            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};2935            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 2936                : new UnexpectedTokenException(token, expectedTokens, stateComment);2937            if (StopAtFirstError)2938                throw error;2939            2940            AddError(context, error);2941            return 32;29422943        }2944        2945        2946        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:02947        int MatchTokenAt_33(Token token, ParserContext context)2948        {2949            if (Match_EOF(context, token))2950            {2951                EndRule(context, RuleType.Scenario);2952                EndRule(context, RuleType.ScenarioDefinition);2953                EndRule(context, RuleType.Rule);2954                EndRule(context, RuleType.Feature);2955                Build(context, token);2956                return 41;2957            }2958            if (Match_Comment(context, token))2959            {2960                Build(context, token);2961                return 33;2962            }2963            if (Match_StepLine(context, token))2964            {2965                StartRule(context, RuleType.Step);2966                Build(context, token);2967                return 34;2968            }2969            if (Match_TagLine(context, token))2970            {2971                if (LookAhead_0(context, token))2972                {2973                StartRule(context, RuleType.ExamplesDefinition);2974                StartRule(context, RuleType.Tags);2975                Build(context, token);2976                return 36;2977                }2978            }2979            if (Match_TagLine(context, token))2980            {2981                EndRule(context, RuleType.Scenario);2982                EndRule(context, RuleType.ScenarioDefinition);2983                StartRule(context, RuleType.ScenarioDefinition);2984                StartRule(context, RuleType.Tags);2985                Build(context, token);2986                return 30;2987            }2988            if (Match_ExamplesLine(context, token))2989            {2990                StartRule(context, RuleType.ExamplesDefinition);2991                StartRule(context, RuleType.Examples);2992                Build(context, token);2993                return 37;2994            }2995            if (Match_ScenarioLine(context, token))2996            {2997                EndRule(context, RuleType.Scenario);2998                EndRule(context, RuleType.ScenarioDefinition);2999                StartRule(context, RuleType.ScenarioDefinition);3000                StartRule(context, RuleType.Scenario);3001                Build(context, token);3002                return 31;3003            }3004            if (Match_RuleLine(context, token))3005            {3006                EndRule(context, RuleType.Scenario);3007                EndRule(context, RuleType.ScenarioDefinition);3008                EndRule(context, RuleType.Rule);3009                StartRule(context, RuleType.Rule);3010                StartRule(context, RuleType.RuleHeader);3011                Build(context, token);3012                return 22;3013            }3014            if (Match_Empty(context, token))3015            {3016                Build(context, token);3017                return 33;3018            }3019            3020            const string stateComment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";3021            token.Detach();3022            var expectedTokens = new string[] {"#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"};3023            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3024                : new UnexpectedTokenException(token, expectedTokens, stateComment);3025            if (StopAtFirstError)3026                throw error;3027            3028            AddError(context, error);3029            return 33;30303031        }3032        3033        3034        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:03035        int MatchTokenAt_34(Token token, ParserContext context)3036        {3037            if (Match_EOF(context, token))3038            {3039                EndRule(context, RuleType.Step);3040                EndRule(context, RuleType.Scenario);3041                EndRule(context, RuleType.ScenarioDefinition);3042                EndRule(context, RuleType.Rule);3043                EndRule(context, RuleType.Feature);3044                Build(context, token);3045                return 41;3046            }3047            if (Match_TableRow(context, token))3048            {3049                StartRule(context, RuleType.DataTable);3050                Build(context, token);3051                return 35;3052            }3053            if (Match_DocStringSeparator(context, token))3054            {3055                StartRule(context, RuleType.DocString);3056                Build(context, token);3057                return 42;3058            }3059            if (Match_StepLine(context, token))3060            {3061                EndRule(context, RuleType.Step);3062                StartRule(context, RuleType.Step);3063                Build(context, token);3064                return 34;3065            }3066            if (Match_TagLine(context, token))3067            {3068                if (LookAhead_0(context, token))3069                {3070                EndRule(context, RuleType.Step);3071                StartRule(context, RuleType.ExamplesDefinition);3072                StartRule(context, RuleType.Tags);3073                Build(context, token);3074                return 36;3075                }3076            }3077            if (Match_TagLine(context, token))3078            {3079                EndRule(context, RuleType.Step);3080                EndRule(context, RuleType.Scenario);3081                EndRule(context, RuleType.ScenarioDefinition);3082                StartRule(context, RuleType.ScenarioDefinition);3083                StartRule(context, RuleType.Tags);3084                Build(context, token);3085                return 30;3086            }3087            if (Match_ExamplesLine(context, token))3088            {3089                EndRule(context, RuleType.Step);3090                StartRule(context, RuleType.ExamplesDefinition);3091                StartRule(context, RuleType.Examples);3092                Build(context, token);3093                return 37;3094            }3095            if (Match_ScenarioLine(context, token))3096            {3097                EndRule(context, RuleType.Step);3098                EndRule(context, RuleType.Scenario);3099                EndRule(context, RuleType.ScenarioDefinition);3100                StartRule(context, RuleType.ScenarioDefinition);3101                StartRule(context, RuleType.Scenario);3102                Build(context, token);3103                return 31;3104            }3105            if (Match_RuleLine(context, token))3106            {3107                EndRule(context, RuleType.Step);3108                EndRule(context, RuleType.Scenario);3109                EndRule(context, RuleType.ScenarioDefinition);3110                EndRule(context, RuleType.Rule);3111                StartRule(context, RuleType.Rule);3112                StartRule(context, RuleType.RuleHeader);3113                Build(context, token);3114                return 22;3115            }3116            if (Match_Comment(context, token))3117            {3118                Build(context, token);3119                return 34;3120            }3121            if (Match_Empty(context, token))3122            {3123                Build(context, token);3124                return 34;3125            }3126            3127            const string stateComment = "State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";3128            token.Detach();3129            var expectedTokens = new string[] {"#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};3130            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3131                : new UnexpectedTokenException(token, expectedTokens, stateComment);3132            if (StopAtFirstError)3133                throw error;3134            3135            AddError(context, error);3136            return 34;31373138        }3139        3140        3141        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:03142        int MatchTokenAt_35(Token token, ParserContext context)3143        {3144            if (Match_EOF(context, token))3145            {3146                EndRule(context, RuleType.DataTable);3147                EndRule(context, RuleType.Step);3148                EndRule(context, RuleType.Scenario);3149                EndRule(context, RuleType.ScenarioDefinition);3150                EndRule(context, RuleType.Rule);3151                EndRule(context, RuleType.Feature);3152                Build(context, token);3153                return 41;3154            }3155            if (Match_TableRow(context, token))3156            {3157                Build(context, token);3158                return 35;3159            }3160            if (Match_StepLine(context, token))3161            {3162                EndRule(context, RuleType.DataTable);3163                EndRule(context, RuleType.Step);3164                StartRule(context, RuleType.Step);3165                Build(context, token);3166                return 34;3167            }3168            if (Match_TagLine(context, token))3169            {3170                if (LookAhead_0(context, token))3171                {3172                EndRule(context, RuleType.DataTable);3173                EndRule(context, RuleType.Step);3174                StartRule(context, RuleType.ExamplesDefinition);3175                StartRule(context, RuleType.Tags);3176                Build(context, token);3177                return 36;3178                }3179            }3180            if (Match_TagLine(context, token))3181            {3182                EndRule(context, RuleType.DataTable);3183                EndRule(context, RuleType.Step);3184                EndRule(context, RuleType.Scenario);3185                EndRule(context, RuleType.ScenarioDefinition);3186                StartRule(context, RuleType.ScenarioDefinition);3187                StartRule(context, RuleType.Tags);3188                Build(context, token);3189                return 30;3190            }3191            if (Match_ExamplesLine(context, token))3192            {3193                EndRule(context, RuleType.DataTable);3194                EndRule(context, RuleType.Step);3195                StartRule(context, RuleType.ExamplesDefinition);3196                StartRule(context, RuleType.Examples);3197                Build(context, token);3198                return 37;3199            }3200            if (Match_ScenarioLine(context, token))3201            {3202                EndRule(context, RuleType.DataTable);3203                EndRule(context, RuleType.Step);3204                EndRule(context, RuleType.Scenario);3205                EndRule(context, RuleType.ScenarioDefinition);3206                StartRule(context, RuleType.ScenarioDefinition);3207                StartRule(context, RuleType.Scenario);3208                Build(context, token);3209                return 31;3210            }3211            if (Match_RuleLine(context, token))3212            {3213                EndRule(context, RuleType.DataTable);3214                EndRule(context, RuleType.Step);3215                EndRule(context, RuleType.Scenario);3216                EndRule(context, RuleType.ScenarioDefinition);3217                EndRule(context, RuleType.Rule);3218                StartRule(context, RuleType.Rule);3219                StartRule(context, RuleType.RuleHeader);3220                Build(context, token);3221                return 22;3222            }3223            if (Match_Comment(context, token))3224            {3225                Build(context, token);3226                return 35;3227            }3228            if (Match_Empty(context, token))3229            {3230                Build(context, token);3231                return 35;3232            }3233            3234            const string stateComment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";3235            token.Detach();3236            var expectedTokens = new string[] {"#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};3237            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3238                : new UnexpectedTokenException(token, expectedTokens, stateComment);3239            if (StopAtFirstError)3240                throw error;3241            3242            AddError(context, error);3243            return 35;32443245        }3246        3247        3248        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:03249        int MatchTokenAt_36(Token token, ParserContext context)3250        {3251            if (Match_TagLine(context, token))3252            {3253                Build(context, token);3254                return 36;3255            }3256            if (Match_ExamplesLine(context, token))3257            {3258                EndRule(context, RuleType.Tags);3259                StartRule(context, RuleType.Examples);3260                Build(context, token);3261                return 37;3262            }3263            if (Match_Comment(context, token))3264            {3265                Build(context, token);3266                return 36;3267            }3268            if (Match_Empty(context, token))3269            {3270                Build(context, token);3271                return 36;3272            }3273            3274            const string stateComment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";3275            token.Detach();3276            var expectedTokens = new string[] {"#TagLine", "#ExamplesLine", "#Comment", "#Empty"};3277            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3278                : new UnexpectedTokenException(token, expectedTokens, stateComment);3279            if (StopAtFirstError)3280                throw error;3281            3282            AddError(context, error);3283            return 36;32843285        }3286        3287        3288        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:03289        int MatchTokenAt_37(Token token, ParserContext context)3290        {3291            if (Match_EOF(context, token))3292            {3293                EndRule(context, RuleType.Examples);3294                EndRule(context, RuleType.ExamplesDefinition);3295                EndRule(context, RuleType.Scenario);3296                EndRule(context, RuleType.ScenarioDefinition);3297                EndRule(context, RuleType.Rule);3298                EndRule(context, RuleType.Feature);3299                Build(context, token);3300                return 41;3301            }3302            if (Match_Empty(context, token))3303            {3304                Build(context, token);3305                return 37;3306            }3307            if (Match_Comment(context, token))3308            {3309                Build(context, token);3310                return 39;3311            }3312            if (Match_TableRow(context, token))3313            {3314                StartRule(context, RuleType.ExamplesTable);3315                Build(context, token);3316                return 40;3317            }3318            if (Match_TagLine(context, token))3319            {3320                if (LookAhead_0(context, token))3321                {3322                EndRule(context, RuleType.Examples);3323                EndRule(context, RuleType.ExamplesDefinition);3324                StartRule(context, RuleType.ExamplesDefinition);3325                StartRule(context, RuleType.Tags);3326                Build(context, token);3327                return 36;3328                }3329            }3330            if (Match_TagLine(context, token))3331            {3332                EndRule(context, RuleType.Examples);3333                EndRule(context, RuleType.ExamplesDefinition);3334                EndRule(context, RuleType.Scenario);3335                EndRule(context, RuleType.ScenarioDefinition);3336                StartRule(context, RuleType.ScenarioDefinition);3337                StartRule(context, RuleType.Tags);3338                Build(context, token);3339                return 30;3340            }3341            if (Match_ExamplesLine(context, token))3342            {3343                EndRule(context, RuleType.Examples);3344                EndRule(context, RuleType.ExamplesDefinition);3345                StartRule(context, RuleType.ExamplesDefinition);3346                StartRule(context, RuleType.Examples);3347                Build(context, token);3348                return 37;3349            }3350            if (Match_ScenarioLine(context, token))3351            {3352                EndRule(context, RuleType.Examples);3353                EndRule(context, RuleType.ExamplesDefinition);3354                EndRule(context, RuleType.Scenario);3355                EndRule(context, RuleType.ScenarioDefinition);3356                StartRule(context, RuleType.ScenarioDefinition);3357                StartRule(context, RuleType.Scenario);3358                Build(context, token);3359                return 31;3360            }3361            if (Match_RuleLine(context, token))3362            {3363                EndRule(context, RuleType.Examples);3364                EndRule(context, RuleType.ExamplesDefinition);3365                EndRule(context, RuleType.Scenario);3366                EndRule(context, RuleType.ScenarioDefinition);3367                EndRule(context, RuleType.Rule);3368                StartRule(context, RuleType.Rule);3369                StartRule(context, RuleType.RuleHeader);3370                Build(context, token);3371                return 22;3372            }3373            if (Match_Other(context, token))3374            {3375                StartRule(context, RuleType.Description);3376                Build(context, token);3377                return 38;3378            }3379            3380            const string stateComment = "State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";3381            token.Detach();3382            var expectedTokens = new string[] {"#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};3383            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3384                : new UnexpectedTokenException(token, expectedTokens, stateComment);3385            if (StopAtFirstError)3386                throw error;3387            3388            AddError(context, error);3389            return 37;33903391        }3392        3393        3394        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:03395        int MatchTokenAt_38(Token token, ParserContext context)3396        {3397            if (Match_EOF(context, token))3398            {3399                EndRule(context, RuleType.Description);3400                EndRule(context, RuleType.Examples);3401                EndRule(context, RuleType.ExamplesDefinition);3402                EndRule(context, RuleType.Scenario);3403                EndRule(context, RuleType.ScenarioDefinition);3404                EndRule(context, RuleType.Rule);3405                EndRule(context, RuleType.Feature);3406                Build(context, token);3407                return 41;3408            }3409            if (Match_Comment(context, token))3410            {3411                EndRule(context, RuleType.Description);3412                Build(context, token);3413                return 39;3414            }3415            if (Match_TableRow(context, token))3416            {3417                EndRule(context, RuleType.Description);3418                StartRule(context, RuleType.ExamplesTable);3419                Build(context, token);3420                return 40;3421            }3422            if (Match_TagLine(context, token))3423            {3424                if (LookAhead_0(context, token))3425                {3426                EndRule(context, RuleType.Description);3427                EndRule(context, RuleType.Examples);3428                EndRule(context, RuleType.ExamplesDefinition);3429                StartRule(context, RuleType.ExamplesDefinition);3430                StartRule(context, RuleType.Tags);3431                Build(context, token);3432                return 36;3433                }3434            }3435            if (Match_TagLine(context, token))3436            {3437                EndRule(context, RuleType.Description);3438                EndRule(context, RuleType.Examples);3439                EndRule(context, RuleType.ExamplesDefinition);3440                EndRule(context, RuleType.Scenario);3441                EndRule(context, RuleType.ScenarioDefinition);3442                StartRule(context, RuleType.ScenarioDefinition);3443                StartRule(context, RuleType.Tags);3444                Build(context, token);3445                return 30;3446            }3447            if (Match_ExamplesLine(context, token))3448            {3449                EndRule(context, RuleType.Description);3450                EndRule(context, RuleType.Examples);3451                EndRule(context, RuleType.ExamplesDefinition);3452                StartRule(context, RuleType.ExamplesDefinition);3453                StartRule(context, RuleType.Examples);3454                Build(context, token);3455                return 37;3456            }3457            if (Match_ScenarioLine(context, token))3458            {3459                EndRule(context, RuleType.Description);3460                EndRule(context, RuleType.Examples);3461                EndRule(context, RuleType.ExamplesDefinition);3462                EndRule(context, RuleType.Scenario);3463                EndRule(context, RuleType.ScenarioDefinition);3464                StartRule(context, RuleType.ScenarioDefinition);3465                StartRule(context, RuleType.Scenario);3466                Build(context, token);3467                return 31;3468            }3469            if (Match_RuleLine(context, token))3470            {3471                EndRule(context, RuleType.Description);3472                EndRule(context, RuleType.Examples);3473                EndRule(context, RuleType.ExamplesDefinition);3474                EndRule(context, RuleType.Scenario);3475                EndRule(context, RuleType.ScenarioDefinition);3476                EndRule(context, RuleType.Rule);3477                StartRule(context, RuleType.Rule);3478                StartRule(context, RuleType.RuleHeader);3479                Build(context, token);3480                return 22;3481            }3482            if (Match_Other(context, token))3483            {3484                Build(context, token);3485                return 38;3486            }3487            3488            const string stateComment = "State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";3489            token.Detach();3490            var expectedTokens = new string[] {"#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"};3491            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3492                : new UnexpectedTokenException(token, expectedTokens, stateComment);3493            if (StopAtFirstError)3494                throw error;3495            3496            AddError(context, error);3497            return 38;34983499        }3500        3501        3502        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:03503        int MatchTokenAt_39(Token token, ParserContext context)3504        {3505            if (Match_EOF(context, token))3506            {3507                EndRule(context, RuleType.Examples);3508                EndRule(context, RuleType.ExamplesDefinition);3509                EndRule(context, RuleType.Scenario);3510                EndRule(context, RuleType.ScenarioDefinition);3511                EndRule(context, RuleType.Rule);3512                EndRule(context, RuleType.Feature);3513                Build(context, token);3514                return 41;3515            }3516            if (Match_Comment(context, token))3517            {3518                Build(context, token);3519                return 39;3520            }3521            if (Match_TableRow(context, token))3522            {3523                StartRule(context, RuleType.ExamplesTable);3524                Build(context, token);3525                return 40;3526            }3527            if (Match_TagLine(context, token))3528            {3529                if (LookAhead_0(context, token))3530                {3531                EndRule(context, RuleType.Examples);3532                EndRule(context, RuleType.ExamplesDefinition);3533                StartRule(context, RuleType.ExamplesDefinition);3534                StartRule(context, RuleType.Tags);3535                Build(context, token);3536                return 36;3537                }3538            }3539            if (Match_TagLine(context, token))3540            {3541                EndRule(context, RuleType.Examples);3542                EndRule(context, RuleType.ExamplesDefinition);3543                EndRule(context, RuleType.Scenario);3544                EndRule(context, RuleType.ScenarioDefinition);3545                StartRule(context, RuleType.ScenarioDefinition);3546                StartRule(context, RuleType.Tags);3547                Build(context, token);3548                return 30;3549            }3550            if (Match_ExamplesLine(context, token))3551            {3552                EndRule(context, RuleType.Examples);3553                EndRule(context, RuleType.ExamplesDefinition);3554                StartRule(context, RuleType.ExamplesDefinition);3555                StartRule(context, RuleType.Examples);3556                Build(context, token);3557                return 37;3558            }3559            if (Match_ScenarioLine(context, token))3560            {3561                EndRule(context, RuleType.Examples);3562                EndRule(context, RuleType.ExamplesDefinition);3563                EndRule(context, RuleType.Scenario);3564                EndRule(context, RuleType.ScenarioDefinition);3565                StartRule(context, RuleType.ScenarioDefinition);3566                StartRule(context, RuleType.Scenario);3567                Build(context, token);3568                return 31;3569            }3570            if (Match_RuleLine(context, token))3571            {3572                EndRule(context, RuleType.Examples);3573                EndRule(context, RuleType.ExamplesDefinition);3574                EndRule(context, RuleType.Scenario);3575                EndRule(context, RuleType.ScenarioDefinition);3576                EndRule(context, RuleType.Rule);3577                StartRule(context, RuleType.Rule);3578                StartRule(context, RuleType.RuleHeader);3579                Build(context, token);3580                return 22;3581            }3582            if (Match_Empty(context, token))3583            {3584                Build(context, token);3585                return 39;3586            }3587            3588            const string stateComment = "State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";3589            token.Detach();3590            var expectedTokens = new string[] {"#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"};3591            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3592                : new UnexpectedTokenException(token, expectedTokens, stateComment);3593            if (StopAtFirstError)3594                throw error;3595            3596            AddError(context, error);3597            return 39;35983599        }3600        3601        3602        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:03603        int MatchTokenAt_40(Token token, ParserContext context)3604        {3605            if (Match_EOF(context, token))3606            {3607                EndRule(context, RuleType.ExamplesTable);3608                EndRule(context, RuleType.Examples);3609                EndRule(context, RuleType.ExamplesDefinition);3610                EndRule(context, RuleType.Scenario);3611                EndRule(context, RuleType.ScenarioDefinition);3612                EndRule(context, RuleType.Rule);3613                EndRule(context, RuleType.Feature);3614                Build(context, token);3615                return 41;3616            }3617            if (Match_TableRow(context, token))3618            {3619                Build(context, token);3620                return 40;3621            }3622            if (Match_TagLine(context, token))3623            {3624                if (LookAhead_0(context, token))3625                {3626                EndRule(context, RuleType.ExamplesTable);3627                EndRule(context, RuleType.Examples);3628                EndRule(context, RuleType.ExamplesDefinition);3629                StartRule(context, RuleType.ExamplesDefinition);3630                StartRule(context, RuleType.Tags);3631                Build(context, token);3632                return 36;3633                }3634            }3635            if (Match_TagLine(context, token))3636            {3637                EndRule(context, RuleType.ExamplesTable);3638                EndRule(context, RuleType.Examples);3639                EndRule(context, RuleType.ExamplesDefinition);3640                EndRule(context, RuleType.Scenario);3641                EndRule(context, RuleType.ScenarioDefinition);3642                StartRule(context, RuleType.ScenarioDefinition);3643                StartRule(context, RuleType.Tags);3644                Build(context, token);3645                return 30;3646            }3647            if (Match_ExamplesLine(context, token))3648            {3649                EndRule(context, RuleType.ExamplesTable);3650                EndRule(context, RuleType.Examples);3651                EndRule(context, RuleType.ExamplesDefinition);3652                StartRule(context, RuleType.ExamplesDefinition);3653                StartRule(context, RuleType.Examples);3654                Build(context, token);3655                return 37;3656            }3657            if (Match_ScenarioLine(context, token))3658            {3659                EndRule(context, RuleType.ExamplesTable);3660                EndRule(context, RuleType.Examples);3661                EndRule(context, RuleType.ExamplesDefinition);3662                EndRule(context, RuleType.Scenario);3663                EndRule(context, RuleType.ScenarioDefinition);3664                StartRule(context, RuleType.ScenarioDefinition);3665                StartRule(context, RuleType.Scenario);3666                Build(context, token);3667                return 31;3668            }3669            if (Match_RuleLine(context, token))3670            {3671                EndRule(context, RuleType.ExamplesTable);3672                EndRule(context, RuleType.Examples);3673                EndRule(context, RuleType.ExamplesDefinition);3674                EndRule(context, RuleType.Scenario);3675                EndRule(context, RuleType.ScenarioDefinition);3676                EndRule(context, RuleType.Rule);3677                StartRule(context, RuleType.Rule);3678                StartRule(context, RuleType.RuleHeader);3679                Build(context, token);3680                return 22;3681            }3682            if (Match_Comment(context, token))3683            {3684                Build(context, token);3685                return 40;3686            }3687            if (Match_Empty(context, token))3688            {3689                Build(context, token);3690                return 40;3691            }3692            3693            const string stateComment = "State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";3694            token.Detach();3695            var expectedTokens = new string[] {"#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};3696            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3697                : new UnexpectedTokenException(token, expectedTokens, stateComment);3698            if (StopAtFirstError)3699                throw error;3700            3701            AddError(context, error);3702            return 40;37033704        }3705        3706        3707        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03708        int MatchTokenAt_42(Token token, ParserContext context)3709        {3710            if (Match_DocStringSeparator(context, token))3711            {3712                Build(context, token);3713                return 43;3714            }3715            if (Match_Other(context, token))3716            {3717                Build(context, token);3718                return 42;3719            }3720            3721            const string stateComment = "State: 42 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3722            token.Detach();3723            var expectedTokens = new string[] {"#DocStringSeparator", "#Other"};3724            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3725                : new UnexpectedTokenException(token, expectedTokens, stateComment);3726            if (StopAtFirstError)3727                throw error;3728            3729            AddError(context, error);3730            return 42;37313732        }3733        3734        3735        // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03736        int MatchTokenAt_43(Token token, ParserContext context)3737        {3738            if (Match_EOF(context, token))3739            {3740                EndRule(context, RuleType.DocString);3741                EndRule(context, RuleType.Step);3742                EndRule(context, RuleType.Scenario);3743                EndRule(context, RuleType.ScenarioDefinition);3744                EndRule(context, RuleType.Rule);3745                EndRule(context, RuleType.Feature);3746                Build(context, token);3747                return 41;3748            }3749            if (Match_StepLine(context, token))3750            {3751                EndRule(context, RuleType.DocString);3752                EndRule(context, RuleType.Step);3753                StartRule(context, RuleType.Step);3754                Build(context, token);3755                return 34;3756            }3757            if (Match_TagLine(context, token))3758            {3759                if (LookAhead_0(context, token))3760                {3761                EndRule(context, RuleType.DocString);3762                EndRule(context, RuleType.Step);3763                StartRule(context, RuleType.ExamplesDefinition);3764                StartRule(context, RuleType.Tags);3765                Build(context, token);3766                return 36;3767                }3768            }3769            if (Match_TagLine(context, token))3770            {3771                EndRule(context, RuleType.DocString);3772                EndRule(context, RuleType.Step);3773                EndRule(context, RuleType.Scenario);3774                EndRule(context, RuleType.ScenarioDefinition);3775                StartRule(context, RuleType.ScenarioDefinition);3776                StartRule(context, RuleType.Tags);3777                Build(context, token);3778                return 30;3779            }3780            if (Match_ExamplesLine(context, token))3781            {3782                EndRule(context, RuleType.DocString);3783                EndRule(context, RuleType.Step);3784                StartRule(context, RuleType.ExamplesDefinition);3785                StartRule(context, RuleType.Examples);3786                Build(context, token);3787                return 37;3788            }3789            if (Match_ScenarioLine(context, token))3790            {3791                EndRule(context, RuleType.DocString);3792                EndRule(context, RuleType.Step);3793                EndRule(context, RuleType.Scenario);3794                EndRule(context, RuleType.ScenarioDefinition);3795                StartRule(context, RuleType.ScenarioDefinition);3796                StartRule(context, RuleType.Scenario);3797                Build(context, token);3798                return 31;3799            }3800            if (Match_RuleLine(context, token))3801            {3802                EndRule(context, RuleType.DocString);3803                EndRule(context, RuleType.Step);3804                EndRule(context, RuleType.Scenario);3805                EndRule(context, RuleType.ScenarioDefinition);3806                EndRule(context, RuleType.Rule);3807                StartRule(context, RuleType.Rule);3808                StartRule(context, RuleType.RuleHeader);3809                Build(context, token);3810                return 22;3811            }3812            if (Match_Comment(context, token))3813            {3814                Build(context, token);3815                return 43;3816            }3817            if (Match_Empty(context, token))3818            {3819                Build(context, token);3820                return 43;3821            }3822            3823            const string stateComment = "State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3824            token.Detach();3825            var expectedTokens = new string[] {"#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};3826            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3827                : new UnexpectedTokenException(token, expectedTokens, stateComment);3828            if (StopAtFirstError)3829                throw error;3830            3831            AddError(context, error);3832            return 43;38333834        }3835        3836        3837        // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03838        int MatchTokenAt_44(Token token, ParserContext context)3839        {3840            if (Match_DocStringSeparator(context, token))3841            {3842                Build(context, token);3843                return 45;3844            }3845            if (Match_Other(context, token))3846            {3847                Build(context, token);3848                return 44;3849            }3850            3851            const string stateComment = "State: 44 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3852            token.Detach();3853            var expectedTokens = new string[] {"#DocStringSeparator", "#Other"};3854            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3855                : new UnexpectedTokenException(token, expectedTokens, stateComment);3856            if (StopAtFirstError)3857                throw error;3858            3859            AddError(context, error);3860            return 44;38613862        }3863        3864        3865        // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03866        int MatchTokenAt_45(Token token, ParserContext context)3867        {3868            if (Match_EOF(context, token))3869            {3870                EndRule(context, RuleType.DocString);3871                EndRule(context, RuleType.Step);3872                EndRule(context, RuleType.Background);3873                EndRule(context, RuleType.Rule);3874                EndRule(context, RuleType.Feature);3875                Build(context, token);3876                return 41;3877            }3878            if (Match_StepLine(context, token))3879            {3880                EndRule(context, RuleType.DocString);3881                EndRule(context, RuleType.Step);3882                StartRule(context, RuleType.Step);3883                Build(context, token);3884                return 28;3885            }3886            if (Match_TagLine(context, token))3887            {3888                EndRule(context, RuleType.DocString);3889                EndRule(context, RuleType.Step);3890                EndRule(context, RuleType.Background);3891                StartRule(context, RuleType.ScenarioDefinition);3892                StartRule(context, RuleType.Tags);3893                Build(context, token);3894                return 30;3895            }3896            if (Match_ScenarioLine(context, token))3897            {3898                EndRule(context, RuleType.DocString);3899                EndRule(context, RuleType.Step);3900                EndRule(context, RuleType.Background);3901                StartRule(context, RuleType.ScenarioDefinition);3902                StartRule(context, RuleType.Scenario);3903                Build(context, token);3904                return 31;3905            }3906            if (Match_RuleLine(context, token))3907            {3908                EndRule(context, RuleType.DocString);3909                EndRule(context, RuleType.Step);3910                EndRule(context, RuleType.Background);3911                EndRule(context, RuleType.Rule);3912                StartRule(context, RuleType.Rule);3913                StartRule(context, RuleType.RuleHeader);3914                Build(context, token);3915                return 22;3916            }3917            if (Match_Comment(context, token))3918            {3919                Build(context, token);3920                return 45;3921            }3922            if (Match_Empty(context, token))3923            {3924                Build(context, token);3925                return 45;3926            }3927            3928            const string stateComment = "State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3929            token.Detach();3930            var expectedTokens = new string[] {"#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};3931            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3932                : new UnexpectedTokenException(token, expectedTokens, stateComment);3933            if (StopAtFirstError)3934                throw error;3935            3936            AddError(context, error);3937            return 45;39383939        }3940        3941        3942        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03943        int MatchTokenAt_46(Token token, ParserContext context)3944        {3945            if (Match_DocStringSeparator(context, token))3946            {3947                Build(context, token);3948                return 47;3949            }3950            if (Match_Other(context, token))3951            {3952                Build(context, token);3953                return 46;3954            }3955            3956            const string stateComment = "State: 46 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3957            token.Detach();3958            var expectedTokens = new string[] {"#DocStringSeparator", "#Other"};3959            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 3960                : new UnexpectedTokenException(token, expectedTokens, stateComment);3961            if (StopAtFirstError)3962                throw error;3963            3964            AddError(context, error);3965            return 46;39663967        }3968        3969        3970        // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03971        int MatchTokenAt_47(Token token, ParserContext context)3972        {3973            if (Match_EOF(context, token))3974            {3975                EndRule(context, RuleType.DocString);3976                EndRule(context, RuleType.Step);3977                EndRule(context, RuleType.Scenario);3978                EndRule(context, RuleType.ScenarioDefinition);3979                EndRule(context, RuleType.Feature);3980                Build(context, token);3981                return 41;3982            }3983            if (Match_StepLine(context, token))3984            {3985                EndRule(context, RuleType.DocString);3986                EndRule(context, RuleType.Step);3987                StartRule(context, RuleType.Step);3988                Build(context, token);3989                return 15;3990            }3991            if (Match_TagLine(context, token))3992            {3993                if (LookAhead_0(context, token))3994                {3995                EndRule(context, RuleType.DocString);3996                EndRule(context, RuleType.Step);3997                StartRule(context, RuleType.ExamplesDefinition);3998                StartRule(context, RuleType.Tags);3999                Build(context, token);4000                return 17;4001                }4002            }4003            if (Match_TagLine(context, token))4004            {4005                EndRule(context, RuleType.DocString);4006                EndRule(context, RuleType.Step);4007                EndRule(context, RuleType.Scenario);4008                EndRule(context, RuleType.ScenarioDefinition);4009                StartRule(context, RuleType.ScenarioDefinition);4010                StartRule(context, RuleType.Tags);4011                Build(context, token);4012                return 11;4013            }4014            if (Match_ExamplesLine(context, token))4015            {4016                EndRule(context, RuleType.DocString);4017                EndRule(context, RuleType.Step);4018                StartRule(context, RuleType.ExamplesDefinition);4019                StartRule(context, RuleType.Examples);4020                Build(context, token);4021                return 18;4022            }4023            if (Match_ScenarioLine(context, token))4024            {4025                EndRule(context, RuleType.DocString);4026                EndRule(context, RuleType.Step);4027                EndRule(context, RuleType.Scenario);4028                EndRule(context, RuleType.ScenarioDefinition);4029                StartRule(context, RuleType.ScenarioDefinition);4030                StartRule(context, RuleType.Scenario);4031                Build(context, token);4032                return 12;4033            }4034            if (Match_RuleLine(context, token))4035            {4036                EndRule(context, RuleType.DocString);4037                EndRule(context, RuleType.Step);4038                EndRule(context, RuleType.Scenario);4039                EndRule(context, RuleType.ScenarioDefinition);4040                StartRule(context, RuleType.Rule);4041                StartRule(context, RuleType.RuleHeader);4042                Build(context, token);4043                return 22;4044            }4045            if (Match_Comment(context, token))4046            {4047                Build(context, token);4048                return 47;4049            }4050            if (Match_Empty(context, token))4051            {4052                Build(context, token);4053                return 47;4054            }4055            4056            const string stateComment = "State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";4057            token.Detach();4058            var expectedTokens = new string[] {"#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};4059            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 4060                : new UnexpectedTokenException(token, expectedTokens, stateComment);4061            if (StopAtFirstError)4062                throw error;4063            4064            AddError(context, error);4065            return 47;40664067        }4068        4069        4070        // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:04071        int MatchTokenAt_48(Token token, ParserContext context)4072        {4073            if (Match_DocStringSeparator(context, token))4074            {4075                Build(context, token);4076                return 49;4077            }4078            if (Match_Other(context, token))4079            {4080                Build(context, token);4081                return 48;4082            }4083            4084            const string stateComment = "State: 48 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";4085            token.Detach();4086            var expectedTokens = new string[] {"#DocStringSeparator", "#Other"};4087            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 4088                : new UnexpectedTokenException(token, expectedTokens, stateComment);4089            if (StopAtFirstError)4090                throw error;4091            4092            AddError(context, error);4093            return 48;40944095        }4096        4097        4098        // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:04099        int MatchTokenAt_49(Token token, ParserContext context)4100        {4101            if (Match_EOF(context, token))4102            {4103                EndRule(context, RuleType.DocString);4104                EndRule(context, RuleType.Step);4105                EndRule(context, RuleType.Background);4106                EndRule(context, RuleType.Feature);4107                Build(context, token);4108                return 41;4109            }4110            if (Match_StepLine(context, token))4111            {4112                EndRule(context, RuleType.DocString);4113                EndRule(context, RuleType.Step);4114                StartRule(context, RuleType.Step);4115                Build(context, token);4116                return 9;4117            }4118            if (Match_TagLine(context, token))4119            {4120                EndRule(context, RuleType.DocString);4121                EndRule(context, RuleType.Step);4122                EndRule(context, RuleType.Background);4123                StartRule(context, RuleType.ScenarioDefinition);4124                StartRule(context, RuleType.Tags);4125                Build(context, token);4126                return 11;4127            }4128            if (Match_ScenarioLine(context, token))4129            {4130                EndRule(context, RuleType.DocString);4131                EndRule(context, RuleType.Step);4132                EndRule(context, RuleType.Background);4133                StartRule(context, RuleType.ScenarioDefinition);4134                StartRule(context, RuleType.Scenario);4135                Build(context, token);4136                return 12;4137            }4138            if (Match_RuleLine(context, token))4139            {4140                EndRule(context, RuleType.DocString);4141                EndRule(context, RuleType.Step);4142                EndRule(context, RuleType.Background);4143                StartRule(context, RuleType.Rule);4144                StartRule(context, RuleType.RuleHeader);4145                Build(context, token);4146                return 22;4147            }4148            if (Match_Comment(context, token))4149            {4150                Build(context, token);4151                return 49;4152            }4153            if (Match_Empty(context, token))4154            {4155                Build(context, token);4156                return 49;4157            }4158            4159            const string stateComment = "State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";4160            token.Detach();4161            var expectedTokens = new string[] {"#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"};4162            var error = token.IsEOF ? (ParserException)new UnexpectedEOFException(token, expectedTokens, stateComment) 4163                : new UnexpectedTokenException(token, expectedTokens, stateComment);4164            if (StopAtFirstError)4165                throw error;4166            4167            AddError(context, error);4168            return 49;41694170        }4171        41724173        4174        bool LookAhead_0(ParserContext context, Token currentToken)4175        {4176            currentToken.Detach();4177            Token token;
...

Full Screen

Full Screen

ParserErrorSerializationTests.cs

Source:ParserErrorSerializationTests.cs Github

copy

Full Screen

...63            Assert.IsNull(deserializedException.Location);64        }6566        [Test]67        public void UnexpectedTokenExceptionShouldBeSerializableButOnlyMessageAndLocation()68        {69            var token = new Token(null, new Location(1, 2));70            var exception = new UnexpectedTokenException(token, new []{ "#T1", "#T2 "}, "state-comment");7172            var deserializedException = SerializeDeserialize(exception);7374            AssertMessageAndLocation(exception, deserializedException);7576            // the custom details are not serialized (yet?)77            Assert.IsNull(deserializedException.ReceivedToken);78            Assert.IsNull(deserializedException.ExpectedTokenTypes);79            Assert.IsNull(deserializedException.StateComment);80        }8182        [Test]83        public void UnexpectedEOFExceptionShouldBeSerializableButOnlyMessageAndLocation()84        {
...

Full Screen

Full Screen

ParserException.cs

Source:ParserException.cs Github

copy

Full Screen

...58        }5960    }6162    public class UnexpectedTokenException : TokenParserException63    {64        public string StateComment { get; private set; }6566        public Token ReceivedToken { get; private set; }67        public string[] ExpectedTokenTypes { get; private set; }6869        public UnexpectedTokenException(Token receivedToken, string[] expectedTokenTypes, string stateComment)70            : base(GetMessage(receivedToken, expectedTokenTypes), receivedToken)71        {72            if (receivedToken == null) throw new ArgumentNullException("receivedToken");73            if (expectedTokenTypes == null) throw new ArgumentNullException("expectedTokenTypes");7475            ReceivedToken = receivedToken;76            ExpectedTokenTypes = expectedTokenTypes;77            StateComment = stateComment;78        }7980        private static string GetMessage(Token receivedToken, string[] expectedTokenTypes)81        {82            return string.Format("expected: {0}, got '{1}'",83                string.Join(", ", expectedTokenTypes),
...

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin;2using Gherkin;3using Gherkin;4using Gherkin;5using Gherkin;6using Gherkin;7using Gherkin;8using Gherkin;9using Gherkin;10using Gherkin;11using Gherkin;12using Gherkin;13using Gherkin;14using Gherkin;15using Gherkin;16using Gherkin;17using Gherkin;18using Gherkin;19using Gherkin;20using Gherkin;21using Gherkin;22using Gherkin;23using Gherkin;

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin;2using Gherkin.Dialects;3using Gherkin.Ast;4using Gherkin.Parser;5using System;6using System.Collections.Generic;7using System.Linq;8using System.Text;9using System.Threading.Tasks;10{11    {12        static void Main(string[] args)13        {14            GherkinDialectProvider dialectProvider = new GherkinDialectProvider();15            GherkinDocument gherkinDocument = new GherkinDocument();16            Parser parser = new Parser();17            UnexpectedTokenException exception = new UnexpectedTokenException();18            {19                gherkinDocument = parser.Parse(@"Feature: Login20                    Then the result should be 100 on the screen");21            }22            catch (Exception ex)23            {24                Console.WriteLine(ex.Message);25            }26            Console.WriteLine(gherkinDocument.Feature.Name);27            Console.WriteLine(gherkinDocument.Feature.Children[0].Name);28            Console.WriteLine(gherkinDocument.Feature.Children[0].Steps[0].Text);29            Console.WriteLine(gherkinDocument.Feature.Children[0].Steps[0].Keyword);30            Console.ReadKey();31        }32    }33}

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin;2using Gherkin.Dialects;3using Gherkin.Dialects;4using Gherkin.Dialects;5using Gherkin.Dialects;6using Gherkin.Dialects;7using Gherkin.Dialects;8using Gherkin.Dialects;9using Gherkin.Dialects;10using Gherkin.Dialects;11using Gherkin.Dialects;12using Gherkin.Dialects;13using Gherkin.Dialects;14using Gherkin.Dialects;15using Gherkin.Dialects;16using Gherkin.Dialects;17using Gherkin.Dialects;18using Gherkin.Dialects;19using Gherkin.Dialects;20using Gherkin.Dialects;21using Gherkin.Dialects;

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin;2using Gherkin.Ast;3using System;4{5    {6        static void Main(string[] args)7        {8            {9                var parser = new Parser();10                var feature = parser.Parse(@"Feature: test11Given I have 10 cukes in my belly");12            }13            catch (UnexpectedTokenException ex)14            {15                Console.WriteLine(ex.Message);16            }17        }18    }19}

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin;2using Gherkin.Ast;3using Gherkin.Parser;4using Gherkin.TokenMatcher;5using Gherkin.TokenScanner;6{7    {8        private readonly ITokenScanner tokenScanner;9        private readonly ITokenMatcher tokenMatcher;10        private readonly ITokenMatcherBuilder tokenMatcherBuilder;11        public GherkinParser(ITokenScanner tokenScanner, ITokenMatcher tokenMatcher, ITokenMatcherBuilder tokenMatcherBuilder)12        {13            this.tokenScanner = tokenScanner;14            this.tokenMatcher = tokenMatcher;15            this.tokenMatcherBuilder = tokenMatcherBuilder;16        }17        public GherkinDocument Parse(string gherkinSource)18        {19            tokenScanner.Reset(gherkinSource);20            tokenScanner.Scan();21            var builder = new AstBuilder(tokenScanner, tokenMatcher, tokenMatcherBuilder);22            return builder.Build();23        }24    }25}26using System;27{28    {29        private readonly ITokenScanner tokenScanner;30        private readonly ITokenMatcher tokenMatcher;31        private readonly ITokenMatcherBuilder tokenMatcherBuilder;32        public AstBuilder(ITokenScanner tokenScanner, ITokenMatcher tokenMatcher, ITokenMatcherBuilder tokenMatcherBuilder)33        {34            this.tokenScanner = tokenScanner;35            this.tokenMatcher = tokenMatcher;36            this.tokenMatcherBuilder = tokenMatcherBuilder;37        }38        public GherkinDocument Build()39        {40            throw new NotImplementedException();41        }42    }43}44using System;45{46    {47        private readonly ITokenScanner tokenScanner;48        private readonly ITokenMatcher tokenMatcher;49        private readonly ITokenMatcherBuilder tokenMatcherBuilder;50        public AstBuilder(ITokenScanner tokenScanner, ITokenMatcher tokenMatcher, ITokenMatcherBuilder tokenMatcherBuilder)51        {52            this.tokenScanner = tokenScanner;53            this.tokenMatcher = tokenMatcher;54            this.tokenMatcherBuilder = tokenMatcherBuilder;55        }56        public GherkinDocument Build()57        {

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using Gherkin.Ast;7using Gherkin.Parser;8using Gherkin.Lexer;9{10    {11        static void Main(string[] args)12        {13            var parser = new Parser.Parser();14            var lexer = new Lexer.Lexer();15            var feature = parser.Parse(lexer.Tokenize("Feature: test16Given test"));17        }18    }19}20using System;21using System.Collections.Generic;22using System.Linq;23using System.Text;24using System.Threading.Tasks;25using Gherkin.Ast;26using Gherkin.Parser;27using Gherkin.Lexer;28{29    {30        static void Main(string[] args)31        {32            var parser = new Parser.Parser();33            var lexer = new Lexer.Lexer();34            var feature = parser.Parse(lexer.Tokenize("Feature: test35Given test"));36        }37    }38}39using System;40using System.Collections.Generic;41using System.Linq;42using System.Text;43using System.Threading.Tasks;44using Gherkin.Ast;45using Gherkin.Parser;46using Gherkin.Lexer;47{48    {49        static void Main(string[] args)50        {51            var parser = new Parser.Parser();52            var lexer = new Lexer.Lexer();53            var feature = parser.Parse(lexer.Tokenize("Feature: test54Given test"));55        }56    }57}58using System;59using System.Collections.Generic;60using System.Linq;61using System.Text;62using System.Threading.Tasks;63using Gherkin.Ast;64using Gherkin.Parser;65using Gherkin.Lexer;66{67    {68        static void Main(string[] args)69        {70            var parser = new Parser.Parser();71            var lexer = new Lexer.Lexer();72            var feature = parser.Parse(lexer.Tokenize("Feature: test73Given test"));74        }75    }76}

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin;2using Gherkin;3using Gherkin;4using Gherkin;5using Gherkin;6using Gherkin;7using Gherkin;8using Gherkin;9using Gherkin;10using Gherkin;11using Gherkin;12using Gherkin;13using Gherkin;14using Gherkin;15using Gherkin;16using Gherkin;17using Gherkin;18using Gherkin;19using Gherkin;20using Gherkin;

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using Gherkin;7using Gherkin.Ast;8{9    {10        static void Main(string[] args)11        {12            string path = @"C:\Users\Public\Documents\GherkinTest\sample.feature";13            Parser parser = new Parser();14            AstBuilder astBuilder = new AstBuilder();15            {16                parser.Parse(path, astBuilder);17            }18            catch (UnexpectedTokenException ex)19            {20                Console.WriteLine("Error: " + ex.Message);21            }22            Console.ReadKey();23        }24    }25}26Output: Error: (2:1): expected: #EOF, #TableRow, #StepLine, #TagLine, #Comment, #Empty, got 'Feature: Login'27The Gherkin library is now written in C# (was: Java)28The Gherkin parser is now a proper LL(k) parser (was: a hand-written recursive descent parser)29The Gherkin parser is now able to parse Gherkin documents with invalid UTF-8 (was: only valid UTF-8)30The Gherkin parser is now able to parse Gherkin documents with invalid Unicode characters (was: only valid Unicode characters)31The Gherkin parser is now able to parse Gherkin documents with invalid Unicode surrogate pairs (was: only valid Unicode surrogate pairs)32The Gherkin parser is now able to parse Gherkin documents with invalid Unicode escape sequences (was: only valid Unicode escape sequences)33The Gherkin parser is now able to parse Gherkin documents with invalid Unicode line separators (was: only valid Unicode line separators)34The Gherkin parser is now able to parse Gherkin documents with invalid Unicode line terminators (was: only valid Unicode line terminators)35The Gherkin parser is now able to parse Gherkin documents with invalid Unicode paragraph separators (was: only

Full Screen

Full Screen

UnexpectedTokenException

Using AI Code Generation

copy

Full Screen

1using Gherkin.Ast;2using TechTalk.SpecFlow;3{4    {5        [Given(@"I have entered (.*) into the calculator")]6        public void GivenIHaveEnteredIntoTheCalculator(int number)7        {8        }9        [When(@"I press add")]10        public void WhenIPressAdd()11        {12        }13        [Then(@"the result should be (.*) on the screen")]14        public void ThenTheResultShouldBeOnTheScreen(int result)15        {16        }17    }18}19using Gherkin.Ast;20using TechTalk.SpecFlow;21{22    {23        [Given(@"I have entered (.*) into the calculator")]24        public void GivenIHaveEnteredIntoTheCalculator(int number)25        {26        }27        [When(@"I press add")]28        public void WhenIPressAdd()29        {30        }31        [Then(@"the result should be (.*) on the screen")]32        public void ThenTheResultShouldBeOnTheScreen(int result)33        {34        }35    }36}37using Gherkin.Ast;

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Gherkin-dotnet automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in UnexpectedTokenException

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful