Best Gherkin-dotnet code snippet using Gherkin.Ast.TableRow
Parser.cs
Source:Parser.cs
...15ScenarioOutline,16Examples,17Step,18MultiLineArgument,19TableRow,20Other,21 }22 public enum RuleType23 {24 None,25_EOF, // #EOF26_Empty, // #Empty27_Comment, // #Comment28_TagLine, // #TagLine29_Feature, // #Feature30_Background, // #Background31_Scenario, // #Scenario32_ScenarioOutline, // #ScenarioOutline33_Examples, // #Examples34_Step, // #Step35_MultiLineArgument, // #MultiLineArgument36_TableRow, // #TableRow37_Other, // #Other38Feature_File, // Feature_File! := Feature_Def Background? Scenario_Base*39Feature_Def, // Feature_Def! := #TagLine* #Feature Feature_Description40Background, // Background! := #Background Background_Description Scenario_Step*41Scenario_Base, // Scenario_Base! := #TagLine* Scenario_Base_Body42Scenario_Base_Body, // Scenario_Base_Body := (Scenario | ScenarioOutline)43Scenario, // Scenario! := #Scenario Scenario_Description Scenario_Step*44ScenarioOutline, // ScenarioOutline! := #ScenarioOutline ScenarioOutline_Description ScenarioOutline_Step* Examples+45Examples, // Examples! := #TagLine[#Empty|#Comment|#TagLine->#Examples]* #Examples Examples_Description Examples_Table46Examples_Table, // Examples_Table! := #TableRow+47Scenario_Step, // Scenario_Step := Step48ScenarioOutline_Step, // ScenarioOutline_Step := Step49Step, // Step! := #Step Step_Arg?50Step_Arg, // Step_Arg := (Table_And_Multiline_Arg | Multiline_And_Table_Arg)51Table_And_Multiline_Arg, // Table_And_Multiline_Arg := Table_Arg Multiline_Arg?52Multiline_And_Table_Arg, // Multiline_And_Table_Arg := Multiline_Arg Table_Arg?53Table_Arg, // Table_Arg! := #TableRow+54Multiline_Arg, // Multiline_Arg! := #MultiLineArgument Multiline_Arg_Line* #MultiLineArgument55Multiline_Arg_Line, // Multiline_Arg_Line := (#Empty | #Other)56Feature_Description, // Feature_Description := Description_Helper57Background_Description, // Background_Description := Description_Helper58Scenario_Description, // Scenario_Description := Description_Helper59ScenarioOutline_Description, // ScenarioOutline_Description := Description_Helper60Examples_Description, // Examples_Description := Description_Helper61Description_Helper, // Description_Helper := Description? #Comment*62Description, // Description! := Description_Line+63Description_Line, // Description_Line := (#Empty | #Other)64 }65 public partial class ParserError66 {67 public string StateComment { get; private set; }68 public Token ReceivedToken { get; private set; }69 public string[] ExpectedTokenTypes { get; private set; }70 public ParserError(Token receivedToken, string[] expectedTokenTypes, string stateComment)71 {72 this.ReceivedToken = receivedToken;73 this.ExpectedTokenTypes = expectedTokenTypes;74 this.StateComment = stateComment;75 }76 }77 public partial class ParserException : Exception78 {79 private ParserError[] errors = new ParserError[0];80 public ParserError[] Errors { get { return errors; } }81 public ParserException() { }82 public ParserException(string message) : base(message) { }83 public ParserException(string message, Exception inner) : base(message, inner) { }84 public ParserException(ParserMessageProvider messageProvider, params ParserError[] errors) 85 : base(messageProvider.GetDefaultExceptionMessage(errors))86 {87 if (errors != null)88 this.errors = errors;89 }90 }91 public class Parser92 {93 public bool StopAtFirstError { get; set;}94 public ParserMessageProvider ParserMessageProvider { get; private set; }95 class ParserContext96 {97 public TokenScanner TokenScanner { get; set; }98 public TokenMatcher TokenMatcher { get; set; }99 public AstBuilder Builder { get; set; }100 public Queue<Token> TokenQueue { get; set; }101 public List<ParserError> Errors { get; set; }102 }103 public Parser() : this(new ParserMessageProvider())104 {105 }106 public object Parse(TokenScanner tokenScanner)107 {108 return Parse(tokenScanner, new TokenMatcher(), new AstBuilder());109 }110 public Parser(ParserMessageProvider parserMessageProvider)111 {112 this.ParserMessageProvider = parserMessageProvider;113 }114 public object Parse(TokenScanner tokenScanner, TokenMatcher tokenMatcher, AstBuilder astBuilder)115 {116 var context = new ParserContext117 {118 TokenScanner = tokenScanner,119 TokenMatcher = tokenMatcher,120 Builder = astBuilder,121 TokenQueue = new Queue<Token>(),122 Errors = new List<ParserError>()123 };124 StartRule(context, RuleType.Feature_File);125 int state = 0;126 Token token;127 do128 {129 token = ReadToken(context);130 state = MatchToken(state, token, context);131 } while(!token.IsEOF);132 if (context.Errors.Count > 0)133 {134 throw new ParserException(ParserMessageProvider, context.Errors.ToArray());135 }136 if (state != 32)137 {138 throw new InvalidOperationException("One of the grammar rules expected #EOF explicitly.");139 }140 EndRule(context, RuleType.Feature_File);141 return GetResult(context);142 }143 void Build(ParserContext context, Token token)144 {145 context.Builder.Build(token);146 }147 void StartRule(ParserContext context, RuleType ruleType)148 {149 context.Builder.StartRule(ruleType);150 }151 void EndRule(ParserContext context, RuleType ruleType)152 {153 context.Builder.EndRule(ruleType);154 }155 object GetResult(ParserContext context)156 {157 return context.Builder.GetResult();158 }159 Token ReadToken(ParserContext context)160 {161 return context.TokenQueue.Count > 0 ? context.TokenQueue.Dequeue() : context.TokenScanner.Read();162 }163 int MatchToken(int state, Token token, ParserContext context)164 {165 int newState;166 switch(state)167 {168 case 0:169 newState = MatchTokenAt_0(token, context);170 break;171 case 1:172 newState = MatchTokenAt_1(token, context);173 break;174 case 2:175 newState = MatchTokenAt_2(token, context);176 break;177 case 3:178 newState = MatchTokenAt_3(token, context);179 break;180 case 4:181 newState = MatchTokenAt_4(token, context);182 break;183 case 5:184 newState = MatchTokenAt_5(token, context);185 break;186 case 6:187 newState = MatchTokenAt_6(token, context);188 break;189 case 7:190 newState = MatchTokenAt_7(token, context);191 break;192 case 8:193 newState = MatchTokenAt_8(token, context);194 break;195 case 9:196 newState = MatchTokenAt_9(token, context);197 break;198 case 10:199 newState = MatchTokenAt_10(token, context);200 break;201 case 11:202 newState = MatchTokenAt_11(token, context);203 break;204 case 12:205 newState = MatchTokenAt_12(token, context);206 break;207 case 13:208 newState = MatchTokenAt_13(token, context);209 break;210 case 14:211 newState = MatchTokenAt_14(token, context);212 break;213 case 15:214 newState = MatchTokenAt_15(token, context);215 break;216 case 16:217 newState = MatchTokenAt_16(token, context);218 break;219 case 17:220 newState = MatchTokenAt_17(token, context);221 break;222 case 18:223 newState = MatchTokenAt_18(token, context);224 break;225 case 19:226 newState = MatchTokenAt_19(token, context);227 break;228 case 20:229 newState = MatchTokenAt_20(token, context);230 break;231 case 21:232 newState = MatchTokenAt_21(token, context);233 break;234 case 22:235 newState = MatchTokenAt_22(token, context);236 break;237 case 23:238 newState = MatchTokenAt_23(token, context);239 break;240 case 24:241 newState = MatchTokenAt_24(token, context);242 break;243 case 25:244 newState = MatchTokenAt_25(token, context);245 break;246 case 26:247 newState = MatchTokenAt_26(token, context);248 break;249 case 27:250 newState = MatchTokenAt_27(token, context);251 break;252 case 28:253 newState = MatchTokenAt_28(token, context);254 break;255 case 29:256 newState = MatchTokenAt_29(token, context);257 break;258 case 30:259 newState = MatchTokenAt_30(token, context);260 break;261 case 31:262 newState = MatchTokenAt_31(token, context);263 break;264 case 33:265 newState = MatchTokenAt_33(token, context);266 break;267 case 34:268 newState = MatchTokenAt_34(token, context);269 break;270 case 35:271 newState = MatchTokenAt_35(token, context);272 break;273 case 36:274 newState = MatchTokenAt_36(token, context);275 break;276 case 37:277 newState = MatchTokenAt_37(token, context);278 break;279 case 38:280 newState = MatchTokenAt_38(token, context);281 break;282 case 39:283 newState = MatchTokenAt_39(token, context);284 break;285 case 40:286 newState = MatchTokenAt_40(token, context);287 break;288 case 41:289 newState = MatchTokenAt_41(token, context);290 break;291 default:292 throw new InvalidOperationException("Unknown state: " + state);293 }294 return newState;295 }296 297 // Start298 int MatchTokenAt_0(Token token, ParserContext context)299 {300 if ( context.TokenMatcher.Match_TagLine(token)301)302 {303 StartRule(context, RuleType.Feature_Def);304 Build(context, token);305 return 1;306 }307 if ( context.TokenMatcher.Match_Feature(token)308)309 {310 StartRule(context, RuleType.Feature_Def);311 Build(context, token);312 return 2;313 }314 if ( context.TokenMatcher.Match_Comment(token)315)316 {317 Build(context, token);318 return 0;319 }320 if ( context.TokenMatcher.Match_Empty(token)321)322 {323 Build(context, token);324 return 0;325 }326 var error = new ParserError(token, new string[] {"#TagLine", "#Feature", "#Comment", "#Empty"}, "State: 0 - Start");327 if (StopAtFirstError)328 throw new ParserException(ParserMessageProvider, error);329 context.Errors.Add(error);330 return 0;331 }332 333 334 // Feature_File:0>Feature_Def:0>#TagLine:0335 int MatchTokenAt_1(Token token, ParserContext context)336 {337 if ( context.TokenMatcher.Match_TagLine(token)338)339 {340 Build(context, token);341 return 1;342 }343 if ( context.TokenMatcher.Match_Feature(token)344)345 {346 Build(context, token);347 return 2;348 }349 if ( context.TokenMatcher.Match_Comment(token)350)351 {352 Build(context, token);353 return 1;354 }355 if ( context.TokenMatcher.Match_Empty(token)356)357 {358 Build(context, token);359 return 1;360 }361 var error = new ParserError(token, new string[] {"#TagLine", "#Feature", "#Comment", "#Empty"}, "State: 1 - Feature_File:0>Feature_Def:0>#TagLine:0");362 if (StopAtFirstError)363 throw new ParserException(ParserMessageProvider, error);364 context.Errors.Add(error);365 return 1;366 }367 368 369 // Feature_File:0>Feature_Def:1>#Feature:0370 int MatchTokenAt_2(Token token, ParserContext context)371 {372 if ( context.TokenMatcher.Match_EOF(token)373)374 {375 EndRule(context, RuleType.Feature_Def);376 Build(context, token);377 return 32;378 }379 if ( context.TokenMatcher.Match_Empty(token)380)381 {382 StartRule(context, RuleType.Description);383 Build(context, token);384 return 3;385 }386 if ( context.TokenMatcher.Match_Comment(token)387)388 {389 Build(context, token);390 return 4;391 }392 if ( context.TokenMatcher.Match_Background(token)393)394 {395 EndRule(context, RuleType.Feature_Def);396 StartRule(context, RuleType.Background);397 Build(context, token);398 return 5;399 }400 if ( context.TokenMatcher.Match_TagLine(token)401)402 {403 EndRule(context, RuleType.Feature_Def);404 StartRule(context, RuleType.Scenario_Base);405 Build(context, token);406 return 12;407 }408 if ( context.TokenMatcher.Match_Scenario(token)409)410 {411 EndRule(context, RuleType.Feature_Def);412 StartRule(context, RuleType.Scenario_Base);413 StartRule(context, RuleType.Scenario);414 Build(context, token);415 return 13;416 }417 if ( context.TokenMatcher.Match_ScenarioOutline(token)418)419 {420 EndRule(context, RuleType.Feature_Def);421 StartRule(context, RuleType.Scenario_Base);422 StartRule(context, RuleType.ScenarioOutline);423 Build(context, token);424 return 20;425 }426 if ( context.TokenMatcher.Match_Other(token)427)428 {429 StartRule(context, RuleType.Description);430 Build(context, token);431 return 3;432 }433 var error = new ParserError(token, new string[] {"#EOF", "#Empty", "#Comment", "#Background", "#TagLine", "#Scenario", "#ScenarioOutline", "#Other"}, "State: 2 - Feature_File:0>Feature_Def:1>#Feature:0");434 if (StopAtFirstError)435 throw new ParserException(ParserMessageProvider, error);436 context.Errors.Add(error);437 return 2;438 }439 440 441 // Feature_File:0>Feature_Def:2>Feature_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0442 int MatchTokenAt_3(Token token, ParserContext context)443 {444 if ( context.TokenMatcher.Match_EOF(token)445)446 {447 EndRule(context, RuleType.Description);448 EndRule(context, RuleType.Feature_Def);449 Build(context, token);450 return 32;451 }452 if ( context.TokenMatcher.Match_Empty(token)453)454 {455 Build(context, token);456 return 3;457 }458 if ( context.TokenMatcher.Match_Comment(token)459)460 {461 EndRule(context, RuleType.Description);462 Build(context, token);463 return 4;464 }465 if ( context.TokenMatcher.Match_Background(token)466)467 {468 EndRule(context, RuleType.Description);469 EndRule(context, RuleType.Feature_Def);470 StartRule(context, RuleType.Background);471 Build(context, token);472 return 5;473 }474 if ( context.TokenMatcher.Match_TagLine(token)475)476 {477 EndRule(context, RuleType.Description);478 EndRule(context, RuleType.Feature_Def);479 StartRule(context, RuleType.Scenario_Base);480 Build(context, token);481 return 12;482 }483 if ( context.TokenMatcher.Match_Scenario(token)484)485 {486 EndRule(context, RuleType.Description);487 EndRule(context, RuleType.Feature_Def);488 StartRule(context, RuleType.Scenario_Base);489 StartRule(context, RuleType.Scenario);490 Build(context, token);491 return 13;492 }493 if ( context.TokenMatcher.Match_ScenarioOutline(token)494)495 {496 EndRule(context, RuleType.Description);497 EndRule(context, RuleType.Feature_Def);498 StartRule(context, RuleType.Scenario_Base);499 StartRule(context, RuleType.ScenarioOutline);500 Build(context, token);501 return 20;502 }503 if ( context.TokenMatcher.Match_Other(token)504)505 {506 Build(context, token);507 return 3;508 }509 var error = new ParserError(token, new string[] {"#EOF", "#Empty", "#Comment", "#Background", "#TagLine", "#Scenario", "#ScenarioOutline", "#Other"}, "State: 3 - Feature_File:0>Feature_Def:2>Feature_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0");510 if (StopAtFirstError)511 throw new ParserException(ParserMessageProvider, error);512 context.Errors.Add(error);513 return 3;514 }515 516 517 // Feature_File:0>Feature_Def:2>Feature_Description:0>Description_Helper:1>#Comment:0518 int MatchTokenAt_4(Token token, ParserContext context)519 {520 if ( context.TokenMatcher.Match_EOF(token)521)522 {523 EndRule(context, RuleType.Feature_Def);524 Build(context, token);525 return 32;526 }527 if ( context.TokenMatcher.Match_Comment(token)528)529 {530 Build(context, token);531 return 4;532 }533 if ( context.TokenMatcher.Match_Background(token)534)535 {536 EndRule(context, RuleType.Feature_Def);537 StartRule(context, RuleType.Background);538 Build(context, token);539 return 5;540 }541 if ( context.TokenMatcher.Match_TagLine(token)542)543 {544 EndRule(context, RuleType.Feature_Def);545 StartRule(context, RuleType.Scenario_Base);546 Build(context, token);547 return 12;548 }549 if ( context.TokenMatcher.Match_Scenario(token)550)551 {552 EndRule(context, RuleType.Feature_Def);553 StartRule(context, RuleType.Scenario_Base);554 StartRule(context, RuleType.Scenario);555 Build(context, token);556 return 13;557 }558 if ( context.TokenMatcher.Match_ScenarioOutline(token)559)560 {561 EndRule(context, RuleType.Feature_Def);562 StartRule(context, RuleType.Scenario_Base);563 StartRule(context, RuleType.ScenarioOutline);564 Build(context, token);565 return 20;566 }567 if ( context.TokenMatcher.Match_Empty(token)568)569 {570 Build(context, token);571 return 4;572 }573 var error = new ParserError(token, new string[] {"#EOF", "#Comment", "#Background", "#TagLine", "#Scenario", "#ScenarioOutline", "#Empty"}, "State: 4 - Feature_File:0>Feature_Def:2>Feature_Description:0>Description_Helper:1>#Comment:0");574 if (StopAtFirstError)575 throw new ParserException(ParserMessageProvider, error);576 context.Errors.Add(error);577 return 4;578 }579 580 581 // Feature_File:1>Background:0>#Background:0582 int MatchTokenAt_5(Token token, ParserContext context)583 {584 if ( context.TokenMatcher.Match_EOF(token)585)586 {587 EndRule(context, RuleType.Background);588 Build(context, token);589 return 32;590 }591 if ( context.TokenMatcher.Match_Empty(token)592)593 {594 StartRule(context, RuleType.Description);595 Build(context, token);596 return 6;597 }598 if ( context.TokenMatcher.Match_Comment(token)599)600 {601 Build(context, token);602 return 7;603 }604 if ( context.TokenMatcher.Match_Step(token)605)606 {607 StartRule(context, RuleType.Step);608 Build(context, token);609 return 8;610 }611 if ( context.TokenMatcher.Match_TagLine(token)612)613 {614 EndRule(context, RuleType.Background);615 StartRule(context, RuleType.Scenario_Base);616 Build(context, token);617 return 12;618 }619 if ( context.TokenMatcher.Match_Scenario(token)620)621 {622 EndRule(context, RuleType.Background);623 StartRule(context, RuleType.Scenario_Base);624 StartRule(context, RuleType.Scenario);625 Build(context, token);626 return 13;627 }628 if ( context.TokenMatcher.Match_ScenarioOutline(token)629)630 {631 EndRule(context, RuleType.Background);632 StartRule(context, RuleType.Scenario_Base);633 StartRule(context, RuleType.ScenarioOutline);634 Build(context, token);635 return 20;636 }637 if ( context.TokenMatcher.Match_Other(token)638)639 {640 StartRule(context, RuleType.Description);641 Build(context, token);642 return 6;643 }644 var error = new ParserError(token, new string[] {"#EOF", "#Empty", "#Comment", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Other"}, "State: 5 - Feature_File:1>Background:0>#Background:0");645 if (StopAtFirstError)646 throw new ParserException(ParserMessageProvider, error);647 context.Errors.Add(error);648 return 5;649 }650 651 652 // Feature_File:1>Background:1>Background_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0653 int MatchTokenAt_6(Token token, ParserContext context)654 {655 if ( context.TokenMatcher.Match_EOF(token)656)657 {658 EndRule(context, RuleType.Description);659 EndRule(context, RuleType.Background);660 Build(context, token);661 return 32;662 }663 if ( context.TokenMatcher.Match_Empty(token)664)665 {666 Build(context, token);667 return 6;668 }669 if ( context.TokenMatcher.Match_Comment(token)670)671 {672 EndRule(context, RuleType.Description);673 Build(context, token);674 return 7;675 }676 if ( context.TokenMatcher.Match_Step(token)677)678 {679 EndRule(context, RuleType.Description);680 StartRule(context, RuleType.Step);681 Build(context, token);682 return 8;683 }684 if ( context.TokenMatcher.Match_TagLine(token)685)686 {687 EndRule(context, RuleType.Description);688 EndRule(context, RuleType.Background);689 StartRule(context, RuleType.Scenario_Base);690 Build(context, token);691 return 12;692 }693 if ( context.TokenMatcher.Match_Scenario(token)694)695 {696 EndRule(context, RuleType.Description);697 EndRule(context, RuleType.Background);698 StartRule(context, RuleType.Scenario_Base);699 StartRule(context, RuleType.Scenario);700 Build(context, token);701 return 13;702 }703 if ( context.TokenMatcher.Match_ScenarioOutline(token)704)705 {706 EndRule(context, RuleType.Description);707 EndRule(context, RuleType.Background);708 StartRule(context, RuleType.Scenario_Base);709 StartRule(context, RuleType.ScenarioOutline);710 Build(context, token);711 return 20;712 }713 if ( context.TokenMatcher.Match_Other(token)714)715 {716 Build(context, token);717 return 6;718 }719 var error = new ParserError(token, new string[] {"#EOF", "#Empty", "#Comment", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Other"}, "State: 6 - Feature_File:1>Background:1>Background_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0");720 if (StopAtFirstError)721 throw new ParserException(ParserMessageProvider, error);722 context.Errors.Add(error);723 return 6;724 }725 726 727 // Feature_File:1>Background:1>Background_Description:0>Description_Helper:1>#Comment:0728 int MatchTokenAt_7(Token token, ParserContext context)729 {730 if ( context.TokenMatcher.Match_EOF(token)731)732 {733 EndRule(context, RuleType.Background);734 Build(context, token);735 return 32;736 }737 if ( context.TokenMatcher.Match_Comment(token)738)739 {740 Build(context, token);741 return 7;742 }743 if ( context.TokenMatcher.Match_Step(token)744)745 {746 StartRule(context, RuleType.Step);747 Build(context, token);748 return 8;749 }750 if ( context.TokenMatcher.Match_TagLine(token)751)752 {753 EndRule(context, RuleType.Background);754 StartRule(context, RuleType.Scenario_Base);755 Build(context, token);756 return 12;757 }758 if ( context.TokenMatcher.Match_Scenario(token)759)760 {761 EndRule(context, RuleType.Background);762 StartRule(context, RuleType.Scenario_Base);763 StartRule(context, RuleType.Scenario);764 Build(context, token);765 return 13;766 }767 if ( context.TokenMatcher.Match_ScenarioOutline(token)768)769 {770 EndRule(context, RuleType.Background);771 StartRule(context, RuleType.Scenario_Base);772 StartRule(context, RuleType.ScenarioOutline);773 Build(context, token);774 return 20;775 }776 if ( context.TokenMatcher.Match_Empty(token)777)778 {779 Build(context, token);780 return 7;781 }782 var error = new ParserError(token, new string[] {"#EOF", "#Comment", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Empty"}, "State: 7 - Feature_File:1>Background:1>Background_Description:0>Description_Helper:1>#Comment:0");783 if (StopAtFirstError)784 throw new ParserException(ParserMessageProvider, error);785 context.Errors.Add(error);786 return 7;787 }788 789 790 // Feature_File:1>Background:2>Scenario_Step:0>Step:0>#Step:0791 int MatchTokenAt_8(Token token, ParserContext context)792 {793 if ( context.TokenMatcher.Match_EOF(token)794)795 {796 EndRule(context, RuleType.Step);797 EndRule(context, RuleType.Background);798 Build(context, token);799 return 32;800 }801 if ( context.TokenMatcher.Match_TableRow(token)802)803 {804 StartRule(context, RuleType.Table_Arg);805 Build(context, token);806 return 9;807 }808 if ( context.TokenMatcher.Match_MultiLineArgument(token)809)810 {811 StartRule(context, RuleType.Multiline_Arg);812 Build(context, token);813 return 39;814 }815 if ( context.TokenMatcher.Match_Step(token)816)817 {818 EndRule(context, RuleType.Step);819 StartRule(context, RuleType.Step);820 Build(context, token);821 return 8;822 }823 if ( context.TokenMatcher.Match_TagLine(token)824)825 {826 EndRule(context, RuleType.Step);827 EndRule(context, RuleType.Background);828 StartRule(context, RuleType.Scenario_Base);829 Build(context, token);830 return 12;831 }832 if ( context.TokenMatcher.Match_Scenario(token)833)834 {835 EndRule(context, RuleType.Step);836 EndRule(context, RuleType.Background);837 StartRule(context, RuleType.Scenario_Base);838 StartRule(context, RuleType.Scenario);839 Build(context, token);840 return 13;841 }842 if ( context.TokenMatcher.Match_ScenarioOutline(token)843)844 {845 EndRule(context, RuleType.Step);846 EndRule(context, RuleType.Background);847 StartRule(context, RuleType.Scenario_Base);848 StartRule(context, RuleType.ScenarioOutline);849 Build(context, token);850 return 20;851 }852 if ( context.TokenMatcher.Match_Comment(token)853)854 {855 Build(context, token);856 return 8;857 }858 if ( context.TokenMatcher.Match_Empty(token)859)860 {861 Build(context, token);862 return 8;863 }864 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#MultiLineArgument", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 8 - Feature_File:1>Background:2>Scenario_Step:0>Step:0>#Step:0");865 if (StopAtFirstError)866 throw new ParserException(ParserMessageProvider, error);867 context.Errors.Add(error);868 return 8;869 }870 871 872 // Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:0>Table_Arg:0>#TableRow:0873 int MatchTokenAt_9(Token token, ParserContext context)874 {875 if ( context.TokenMatcher.Match_EOF(token)876)877 {878 EndRule(context, RuleType.Table_Arg);879 EndRule(context, RuleType.Step);880 EndRule(context, RuleType.Background);881 Build(context, token);882 return 32;883 }884 if ( context.TokenMatcher.Match_TableRow(token)885)886 {887 Build(context, token);888 return 9;889 }890 if ( context.TokenMatcher.Match_MultiLineArgument(token)891)892 {893 EndRule(context, RuleType.Table_Arg);894 StartRule(context, RuleType.Multiline_Arg);895 Build(context, token);896 return 10;897 }898 if ( context.TokenMatcher.Match_Step(token)899)900 {901 EndRule(context, RuleType.Table_Arg);902 EndRule(context, RuleType.Step);903 StartRule(context, RuleType.Step);904 Build(context, token);905 return 8;906 }907 if ( context.TokenMatcher.Match_TagLine(token)908)909 {910 EndRule(context, RuleType.Table_Arg);911 EndRule(context, RuleType.Step);912 EndRule(context, RuleType.Background);913 StartRule(context, RuleType.Scenario_Base);914 Build(context, token);915 return 12;916 }917 if ( context.TokenMatcher.Match_Scenario(token)918)919 {920 EndRule(context, RuleType.Table_Arg);921 EndRule(context, RuleType.Step);922 EndRule(context, RuleType.Background);923 StartRule(context, RuleType.Scenario_Base);924 StartRule(context, RuleType.Scenario);925 Build(context, token);926 return 13;927 }928 if ( context.TokenMatcher.Match_ScenarioOutline(token)929)930 {931 EndRule(context, RuleType.Table_Arg);932 EndRule(context, RuleType.Step);933 EndRule(context, RuleType.Background);934 StartRule(context, RuleType.Scenario_Base);935 StartRule(context, RuleType.ScenarioOutline);936 Build(context, token);937 return 20;938 }939 if ( context.TokenMatcher.Match_Comment(token)940)941 {942 Build(context, token);943 return 9;944 }945 if ( context.TokenMatcher.Match_Empty(token)946)947 {948 Build(context, token);949 return 9;950 }951 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#MultiLineArgument", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 9 - Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:0>Table_Arg:0>#TableRow:0");952 if (StopAtFirstError)953 throw new ParserException(ParserMessageProvider, error);954 context.Errors.Add(error);955 return 9;956 }957 958 959 // Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:0>#MultiLineArgument:0960 int MatchTokenAt_10(Token token, ParserContext context)961 {962 if ( context.TokenMatcher.Match_Empty(token)963)964 {965 Build(context, token);966 return 10;967 }968 if ( context.TokenMatcher.Match_MultiLineArgument(token)969)970 {971 Build(context, token);972 return 11;973 }974 if ( context.TokenMatcher.Match_Other(token)975)976 {977 Build(context, token);978 return 10;979 }980 var error = new ParserError(token, new string[] {"#Empty", "#MultiLineArgument", "#Other"}, "State: 10 - Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:0>#MultiLineArgument:0");981 if (StopAtFirstError)982 throw new ParserException(ParserMessageProvider, error);983 context.Errors.Add(error);984 return 10;985 }986 987 988 // Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:2>#MultiLineArgument:0989 int MatchTokenAt_11(Token token, ParserContext context)990 {991 if ( context.TokenMatcher.Match_EOF(token)992)993 {994 EndRule(context, RuleType.Multiline_Arg);995 EndRule(context, RuleType.Step);996 EndRule(context, RuleType.Background);997 Build(context, token);998 return 32;999 }1000 if ( context.TokenMatcher.Match_Step(token)1001)1002 {1003 EndRule(context, RuleType.Multiline_Arg);1004 EndRule(context, RuleType.Step);1005 StartRule(context, RuleType.Step);1006 Build(context, token);1007 return 8;1008 }1009 if ( context.TokenMatcher.Match_TagLine(token)1010)1011 {1012 EndRule(context, RuleType.Multiline_Arg);1013 EndRule(context, RuleType.Step);1014 EndRule(context, RuleType.Background);1015 StartRule(context, RuleType.Scenario_Base);1016 Build(context, token);1017 return 12;1018 }1019 if ( context.TokenMatcher.Match_Scenario(token)1020)1021 {1022 EndRule(context, RuleType.Multiline_Arg);1023 EndRule(context, RuleType.Step);1024 EndRule(context, RuleType.Background);1025 StartRule(context, RuleType.Scenario_Base);1026 StartRule(context, RuleType.Scenario);1027 Build(context, token);1028 return 13;1029 }1030 if ( context.TokenMatcher.Match_ScenarioOutline(token)1031)1032 {1033 EndRule(context, RuleType.Multiline_Arg);1034 EndRule(context, RuleType.Step);1035 EndRule(context, RuleType.Background);1036 StartRule(context, RuleType.Scenario_Base);1037 StartRule(context, RuleType.ScenarioOutline);1038 Build(context, token);1039 return 20;1040 }1041 if ( context.TokenMatcher.Match_Comment(token)1042)1043 {1044 Build(context, token);1045 return 11;1046 }1047 if ( context.TokenMatcher.Match_Empty(token)1048)1049 {1050 Build(context, token);1051 return 11;1052 }1053 var error = new ParserError(token, new string[] {"#EOF", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 11 - Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:2>#MultiLineArgument:0");1054 if (StopAtFirstError)1055 throw new ParserException(ParserMessageProvider, error);1056 context.Errors.Add(error);1057 return 11;1058 }1059 1060 1061 // Feature_File:2>Scenario_Base:0>#TagLine:01062 int MatchTokenAt_12(Token token, ParserContext context)1063 {1064 if ( context.TokenMatcher.Match_TagLine(token)1065)1066 {1067 Build(context, token);1068 return 12;1069 }1070 if ( context.TokenMatcher.Match_Scenario(token)1071)1072 {1073 StartRule(context, RuleType.Scenario);1074 Build(context, token);1075 return 13;1076 }1077 if ( context.TokenMatcher.Match_ScenarioOutline(token)1078)1079 {1080 StartRule(context, RuleType.ScenarioOutline);1081 Build(context, token);1082 return 20;1083 }1084 if ( context.TokenMatcher.Match_Comment(token)1085)1086 {1087 Build(context, token);1088 return 12;1089 }1090 if ( context.TokenMatcher.Match_Empty(token)1091)1092 {1093 Build(context, token);1094 return 12;1095 }1096 var error = new ParserError(token, new string[] {"#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 12 - Feature_File:2>Scenario_Base:0>#TagLine:0");1097 if (StopAtFirstError)1098 throw new ParserException(ParserMessageProvider, error);1099 context.Errors.Add(error);1100 return 12;1101 }1102 1103 1104 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:0>#Scenario:01105 int MatchTokenAt_13(Token token, ParserContext context)1106 {1107 if ( context.TokenMatcher.Match_EOF(token)1108)1109 {1110 EndRule(context, RuleType.Scenario);1111 EndRule(context, RuleType.Scenario_Base);1112 Build(context, token);1113 return 32;1114 }1115 if ( context.TokenMatcher.Match_Empty(token)1116)1117 {1118 StartRule(context, RuleType.Description);1119 Build(context, token);1120 return 14;1121 }1122 if ( context.TokenMatcher.Match_Comment(token)1123)1124 {1125 Build(context, token);1126 return 15;1127 }1128 if ( context.TokenMatcher.Match_Step(token)1129)1130 {1131 StartRule(context, RuleType.Step);1132 Build(context, token);1133 return 16;1134 }1135 if ( context.TokenMatcher.Match_TagLine(token)1136)1137 {1138 EndRule(context, RuleType.Scenario);1139 EndRule(context, RuleType.Scenario_Base);1140 StartRule(context, RuleType.Scenario_Base);1141 Build(context, token);1142 return 12;1143 }1144 if ( context.TokenMatcher.Match_Scenario(token)1145)1146 {1147 EndRule(context, RuleType.Scenario);1148 EndRule(context, RuleType.Scenario_Base);1149 StartRule(context, RuleType.Scenario_Base);1150 StartRule(context, RuleType.Scenario);1151 Build(context, token);1152 return 13;1153 }1154 if ( context.TokenMatcher.Match_ScenarioOutline(token)1155)1156 {1157 EndRule(context, RuleType.Scenario);1158 EndRule(context, RuleType.Scenario_Base);1159 StartRule(context, RuleType.Scenario_Base);1160 StartRule(context, RuleType.ScenarioOutline);1161 Build(context, token);1162 return 20;1163 }1164 if ( context.TokenMatcher.Match_Other(token)1165)1166 {1167 StartRule(context, RuleType.Description);1168 Build(context, token);1169 return 14;1170 }1171 var error = new ParserError(token, new string[] {"#EOF", "#Empty", "#Comment", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Other"}, "State: 13 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:0>#Scenario:0");1172 if (StopAtFirstError)1173 throw new ParserException(ParserMessageProvider, error);1174 context.Errors.Add(error);1175 return 13;1176 }1177 1178 1179 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:01180 int MatchTokenAt_14(Token token, ParserContext context)1181 {1182 if ( context.TokenMatcher.Match_EOF(token)1183)1184 {1185 EndRule(context, RuleType.Description);1186 EndRule(context, RuleType.Scenario);1187 EndRule(context, RuleType.Scenario_Base);1188 Build(context, token);1189 return 32;1190 }1191 if ( context.TokenMatcher.Match_Empty(token)1192)1193 {1194 Build(context, token);1195 return 14;1196 }1197 if ( context.TokenMatcher.Match_Comment(token)1198)1199 {1200 EndRule(context, RuleType.Description);1201 Build(context, token);1202 return 15;1203 }1204 if ( context.TokenMatcher.Match_Step(token)1205)1206 {1207 EndRule(context, RuleType.Description);1208 StartRule(context, RuleType.Step);1209 Build(context, token);1210 return 16;1211 }1212 if ( context.TokenMatcher.Match_TagLine(token)1213)1214 {1215 EndRule(context, RuleType.Description);1216 EndRule(context, RuleType.Scenario);1217 EndRule(context, RuleType.Scenario_Base);1218 StartRule(context, RuleType.Scenario_Base);1219 Build(context, token);1220 return 12;1221 }1222 if ( context.TokenMatcher.Match_Scenario(token)1223)1224 {1225 EndRule(context, RuleType.Description);1226 EndRule(context, RuleType.Scenario);1227 EndRule(context, RuleType.Scenario_Base);1228 StartRule(context, RuleType.Scenario_Base);1229 StartRule(context, RuleType.Scenario);1230 Build(context, token);1231 return 13;1232 }1233 if ( context.TokenMatcher.Match_ScenarioOutline(token)1234)1235 {1236 EndRule(context, RuleType.Description);1237 EndRule(context, RuleType.Scenario);1238 EndRule(context, RuleType.Scenario_Base);1239 StartRule(context, RuleType.Scenario_Base);1240 StartRule(context, RuleType.ScenarioOutline);1241 Build(context, token);1242 return 20;1243 }1244 if ( context.TokenMatcher.Match_Other(token)1245)1246 {1247 Build(context, token);1248 return 14;1249 }1250 var error = new ParserError(token, new string[] {"#EOF", "#Empty", "#Comment", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Other"}, "State: 14 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0");1251 if (StopAtFirstError)1252 throw new ParserException(ParserMessageProvider, error);1253 context.Errors.Add(error);1254 return 14;1255 }1256 1257 1258 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>#Comment:01259 int MatchTokenAt_15(Token token, ParserContext context)1260 {1261 if ( context.TokenMatcher.Match_EOF(token)1262)1263 {1264 EndRule(context, RuleType.Scenario);1265 EndRule(context, RuleType.Scenario_Base);1266 Build(context, token);1267 return 32;1268 }1269 if ( context.TokenMatcher.Match_Comment(token)1270)1271 {1272 Build(context, token);1273 return 15;1274 }1275 if ( context.TokenMatcher.Match_Step(token)1276)1277 {1278 StartRule(context, RuleType.Step);1279 Build(context, token);1280 return 16;1281 }1282 if ( context.TokenMatcher.Match_TagLine(token)1283)1284 {1285 EndRule(context, RuleType.Scenario);1286 EndRule(context, RuleType.Scenario_Base);1287 StartRule(context, RuleType.Scenario_Base);1288 Build(context, token);1289 return 12;1290 }1291 if ( context.TokenMatcher.Match_Scenario(token)1292)1293 {1294 EndRule(context, RuleType.Scenario);1295 EndRule(context, RuleType.Scenario_Base);1296 StartRule(context, RuleType.Scenario_Base);1297 StartRule(context, RuleType.Scenario);1298 Build(context, token);1299 return 13;1300 }1301 if ( context.TokenMatcher.Match_ScenarioOutline(token)1302)1303 {1304 EndRule(context, RuleType.Scenario);1305 EndRule(context, RuleType.Scenario_Base);1306 StartRule(context, RuleType.Scenario_Base);1307 StartRule(context, RuleType.ScenarioOutline);1308 Build(context, token);1309 return 20;1310 }1311 if ( context.TokenMatcher.Match_Empty(token)1312)1313 {1314 Build(context, token);1315 return 15;1316 }1317 var error = new ParserError(token, new string[] {"#EOF", "#Comment", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Empty"}, "State: 15 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>#Comment:0");1318 if (StopAtFirstError)1319 throw new ParserException(ParserMessageProvider, error);1320 context.Errors.Add(error);1321 return 15;1322 }1323 1324 1325 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#Step:01326 int MatchTokenAt_16(Token token, ParserContext context)1327 {1328 if ( context.TokenMatcher.Match_EOF(token)1329)1330 {1331 EndRule(context, RuleType.Step);1332 EndRule(context, RuleType.Scenario);1333 EndRule(context, RuleType.Scenario_Base);1334 Build(context, token);1335 return 32;1336 }1337 if ( context.TokenMatcher.Match_TableRow(token)1338)1339 {1340 StartRule(context, RuleType.Table_Arg);1341 Build(context, token);1342 return 17;1343 }1344 if ( context.TokenMatcher.Match_MultiLineArgument(token)1345)1346 {1347 StartRule(context, RuleType.Multiline_Arg);1348 Build(context, token);1349 return 36;1350 }1351 if ( context.TokenMatcher.Match_Step(token)1352)1353 {1354 EndRule(context, RuleType.Step);1355 StartRule(context, RuleType.Step);1356 Build(context, token);1357 return 16;1358 }1359 if ( context.TokenMatcher.Match_TagLine(token)1360)1361 {1362 EndRule(context, RuleType.Step);1363 EndRule(context, RuleType.Scenario);1364 EndRule(context, RuleType.Scenario_Base);1365 StartRule(context, RuleType.Scenario_Base);1366 Build(context, token);1367 return 12;1368 }1369 if ( context.TokenMatcher.Match_Scenario(token)1370)1371 {1372 EndRule(context, RuleType.Step);1373 EndRule(context, RuleType.Scenario);1374 EndRule(context, RuleType.Scenario_Base);1375 StartRule(context, RuleType.Scenario_Base);1376 StartRule(context, RuleType.Scenario);1377 Build(context, token);1378 return 13;1379 }1380 if ( context.TokenMatcher.Match_ScenarioOutline(token)1381)1382 {1383 EndRule(context, RuleType.Step);1384 EndRule(context, RuleType.Scenario);1385 EndRule(context, RuleType.Scenario_Base);1386 StartRule(context, RuleType.Scenario_Base);1387 StartRule(context, RuleType.ScenarioOutline);1388 Build(context, token);1389 return 20;1390 }1391 if ( context.TokenMatcher.Match_Comment(token)1392)1393 {1394 Build(context, token);1395 return 16;1396 }1397 if ( context.TokenMatcher.Match_Empty(token)1398)1399 {1400 Build(context, token);1401 return 16;1402 }1403 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#MultiLineArgument", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 16 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#Step:0");1404 if (StopAtFirstError)1405 throw new ParserException(ParserMessageProvider, error);1406 context.Errors.Add(error);1407 return 16;1408 }1409 1410 1411 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:0>Table_Arg:0>#TableRow:01412 int MatchTokenAt_17(Token token, ParserContext context)1413 {1414 if ( context.TokenMatcher.Match_EOF(token)1415)1416 {1417 EndRule(context, RuleType.Table_Arg);1418 EndRule(context, RuleType.Step);1419 EndRule(context, RuleType.Scenario);1420 EndRule(context, RuleType.Scenario_Base);1421 Build(context, token);1422 return 32;1423 }1424 if ( context.TokenMatcher.Match_TableRow(token)1425)1426 {1427 Build(context, token);1428 return 17;1429 }1430 if ( context.TokenMatcher.Match_MultiLineArgument(token)1431)1432 {1433 EndRule(context, RuleType.Table_Arg);1434 StartRule(context, RuleType.Multiline_Arg);1435 Build(context, token);1436 return 18;1437 }1438 if ( context.TokenMatcher.Match_Step(token)1439)1440 {1441 EndRule(context, RuleType.Table_Arg);1442 EndRule(context, RuleType.Step);1443 StartRule(context, RuleType.Step);1444 Build(context, token);1445 return 16;1446 }1447 if ( context.TokenMatcher.Match_TagLine(token)1448)1449 {1450 EndRule(context, RuleType.Table_Arg);1451 EndRule(context, RuleType.Step);1452 EndRule(context, RuleType.Scenario);1453 EndRule(context, RuleType.Scenario_Base);1454 StartRule(context, RuleType.Scenario_Base);1455 Build(context, token);1456 return 12;1457 }1458 if ( context.TokenMatcher.Match_Scenario(token)1459)1460 {1461 EndRule(context, RuleType.Table_Arg);1462 EndRule(context, RuleType.Step);1463 EndRule(context, RuleType.Scenario);1464 EndRule(context, RuleType.Scenario_Base);1465 StartRule(context, RuleType.Scenario_Base);1466 StartRule(context, RuleType.Scenario);1467 Build(context, token);1468 return 13;1469 }1470 if ( context.TokenMatcher.Match_ScenarioOutline(token)1471)1472 {1473 EndRule(context, RuleType.Table_Arg);1474 EndRule(context, RuleType.Step);1475 EndRule(context, RuleType.Scenario);1476 EndRule(context, RuleType.Scenario_Base);1477 StartRule(context, RuleType.Scenario_Base);1478 StartRule(context, RuleType.ScenarioOutline);1479 Build(context, token);1480 return 20;1481 }1482 if ( context.TokenMatcher.Match_Comment(token)1483)1484 {1485 Build(context, token);1486 return 17;1487 }1488 if ( context.TokenMatcher.Match_Empty(token)1489)1490 {1491 Build(context, token);1492 return 17;1493 }1494 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#MultiLineArgument", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 17 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:0>Table_Arg:0>#TableRow:0");1495 if (StopAtFirstError)1496 throw new ParserException(ParserMessageProvider, error);1497 context.Errors.Add(error);1498 return 17;1499 }1500 1501 1502 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:0>#MultiLineArgument:01503 int MatchTokenAt_18(Token token, ParserContext context)1504 {1505 if ( context.TokenMatcher.Match_Empty(token)1506)1507 {1508 Build(context, token);1509 return 18;1510 }1511 if ( context.TokenMatcher.Match_MultiLineArgument(token)1512)1513 {1514 Build(context, token);1515 return 19;1516 }1517 if ( context.TokenMatcher.Match_Other(token)1518)1519 {1520 Build(context, token);1521 return 18;1522 }1523 var error = new ParserError(token, new string[] {"#Empty", "#MultiLineArgument", "#Other"}, "State: 18 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:0>#MultiLineArgument:0");1524 if (StopAtFirstError)1525 throw new ParserException(ParserMessageProvider, error);1526 context.Errors.Add(error);1527 return 18;1528 }1529 1530 1531 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:2>#MultiLineArgument:01532 int MatchTokenAt_19(Token token, ParserContext context)1533 {1534 if ( context.TokenMatcher.Match_EOF(token)1535)1536 {1537 EndRule(context, RuleType.Multiline_Arg);1538 EndRule(context, RuleType.Step);1539 EndRule(context, RuleType.Scenario);1540 EndRule(context, RuleType.Scenario_Base);1541 Build(context, token);1542 return 32;1543 }1544 if ( context.TokenMatcher.Match_Step(token)1545)1546 {1547 EndRule(context, RuleType.Multiline_Arg);1548 EndRule(context, RuleType.Step);1549 StartRule(context, RuleType.Step);1550 Build(context, token);1551 return 16;1552 }1553 if ( context.TokenMatcher.Match_TagLine(token)1554)1555 {1556 EndRule(context, RuleType.Multiline_Arg);1557 EndRule(context, RuleType.Step);1558 EndRule(context, RuleType.Scenario);1559 EndRule(context, RuleType.Scenario_Base);1560 StartRule(context, RuleType.Scenario_Base);1561 Build(context, token);1562 return 12;1563 }1564 if ( context.TokenMatcher.Match_Scenario(token)1565)1566 {1567 EndRule(context, RuleType.Multiline_Arg);1568 EndRule(context, RuleType.Step);1569 EndRule(context, RuleType.Scenario);1570 EndRule(context, RuleType.Scenario_Base);1571 StartRule(context, RuleType.Scenario_Base);1572 StartRule(context, RuleType.Scenario);1573 Build(context, token);1574 return 13;1575 }1576 if ( context.TokenMatcher.Match_ScenarioOutline(token)1577)1578 {1579 EndRule(context, RuleType.Multiline_Arg);1580 EndRule(context, RuleType.Step);1581 EndRule(context, RuleType.Scenario);1582 EndRule(context, RuleType.Scenario_Base);1583 StartRule(context, RuleType.Scenario_Base);1584 StartRule(context, RuleType.ScenarioOutline);1585 Build(context, token);1586 return 20;1587 }1588 if ( context.TokenMatcher.Match_Comment(token)1589)1590 {1591 Build(context, token);1592 return 19;1593 }1594 if ( context.TokenMatcher.Match_Empty(token)1595)1596 {1597 Build(context, token);1598 return 19;1599 }1600 var error = new ParserError(token, new string[] {"#EOF", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 19 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:2>#MultiLineArgument:0");1601 if (StopAtFirstError)1602 throw new ParserException(ParserMessageProvider, error);1603 context.Errors.Add(error);1604 return 19;1605 }1606 1607 1608 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:0>#ScenarioOutline:01609 int MatchTokenAt_20(Token token, ParserContext context)1610 {1611 if ( context.TokenMatcher.Match_Empty(token)1612)1613 {1614 StartRule(context, RuleType.Description);1615 Build(context, token);1616 return 21;1617 }1618 if ( context.TokenMatcher.Match_Comment(token)1619)1620 {1621 Build(context, token);1622 return 22;1623 }1624 if ( context.TokenMatcher.Match_Step(token)1625)1626 {1627 StartRule(context, RuleType.Step);1628 Build(context, token);1629 return 23;1630 }1631 if ( context.TokenMatcher.Match_TagLine(token)1632)1633 {1634 StartRule(context, RuleType.Examples);1635 Build(context, token);1636 return 27;1637 }1638 if ( context.TokenMatcher.Match_Examples(token)1639)1640 {1641 StartRule(context, RuleType.Examples);1642 Build(context, token);1643 return 28;1644 }1645 if ( context.TokenMatcher.Match_Other(token)1646)1647 {1648 StartRule(context, RuleType.Description);1649 Build(context, token);1650 return 21;1651 }1652 var error = new ParserError(token, new string[] {"#Empty", "#Comment", "#Step", "#TagLine", "#Examples", "#Other"}, "State: 20 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:0>#ScenarioOutline:0");1653 if (StopAtFirstError)1654 throw new ParserException(ParserMessageProvider, error);1655 context.Errors.Add(error);1656 return 20;1657 }1658 1659 1660 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:01661 int MatchTokenAt_21(Token token, ParserContext context)1662 {1663 if ( context.TokenMatcher.Match_Empty(token)1664)1665 {1666 Build(context, token);1667 return 21;1668 }1669 if ( context.TokenMatcher.Match_Comment(token)1670)1671 {1672 EndRule(context, RuleType.Description);1673 Build(context, token);1674 return 22;1675 }1676 if ( context.TokenMatcher.Match_Step(token)1677)1678 {1679 EndRule(context, RuleType.Description);1680 StartRule(context, RuleType.Step);1681 Build(context, token);1682 return 23;1683 }1684 if ( context.TokenMatcher.Match_TagLine(token)1685)1686 {1687 EndRule(context, RuleType.Description);1688 StartRule(context, RuleType.Examples);1689 Build(context, token);1690 return 27;1691 }1692 if ( context.TokenMatcher.Match_Examples(token)1693)1694 {1695 EndRule(context, RuleType.Description);1696 StartRule(context, RuleType.Examples);1697 Build(context, token);1698 return 28;1699 }1700 if ( context.TokenMatcher.Match_Other(token)1701)1702 {1703 Build(context, token);1704 return 21;1705 }1706 var error = new ParserError(token, new string[] {"#Empty", "#Comment", "#Step", "#TagLine", "#Examples", "#Other"}, "State: 21 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0");1707 if (StopAtFirstError)1708 throw new ParserException(ParserMessageProvider, error);1709 context.Errors.Add(error);1710 return 21;1711 }1712 1713 1714 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>#Comment:01715 int MatchTokenAt_22(Token token, ParserContext context)1716 {1717 if ( context.TokenMatcher.Match_Comment(token)1718)1719 {1720 Build(context, token);1721 return 22;1722 }1723 if ( context.TokenMatcher.Match_Step(token)1724)1725 {1726 StartRule(context, RuleType.Step);1727 Build(context, token);1728 return 23;1729 }1730 if ( context.TokenMatcher.Match_TagLine(token)1731)1732 {1733 StartRule(context, RuleType.Examples);1734 Build(context, token);1735 return 27;1736 }1737 if ( context.TokenMatcher.Match_Examples(token)1738)1739 {1740 StartRule(context, RuleType.Examples);1741 Build(context, token);1742 return 28;1743 }1744 if ( context.TokenMatcher.Match_Empty(token)1745)1746 {1747 Build(context, token);1748 return 22;1749 }1750 var error = new ParserError(token, new string[] {"#Comment", "#Step", "#TagLine", "#Examples", "#Empty"}, "State: 22 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>#Comment:0");1751 if (StopAtFirstError)1752 throw new ParserException(ParserMessageProvider, error);1753 context.Errors.Add(error);1754 return 22;1755 }1756 1757 1758 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#Step:01759 int MatchTokenAt_23(Token token, ParserContext context)1760 {1761 if ( context.TokenMatcher.Match_TableRow(token)1762)1763 {1764 StartRule(context, RuleType.Table_Arg);1765 Build(context, token);1766 return 24;1767 }1768 if ( context.TokenMatcher.Match_MultiLineArgument(token)1769)1770 {1771 StartRule(context, RuleType.Multiline_Arg);1772 Build(context, token);1773 return 33;1774 }1775 if ( context.TokenMatcher.Match_Step(token)1776)1777 {1778 EndRule(context, RuleType.Step);1779 StartRule(context, RuleType.Step);1780 Build(context, token);1781 return 23;1782 }1783 if ( context.TokenMatcher.Match_TagLine(token)1784)1785 {1786 EndRule(context, RuleType.Step);1787 StartRule(context, RuleType.Examples);1788 Build(context, token);1789 return 27;1790 }1791 if ( context.TokenMatcher.Match_Examples(token)1792)1793 {1794 EndRule(context, RuleType.Step);1795 StartRule(context, RuleType.Examples);1796 Build(context, token);1797 return 28;1798 }1799 if ( context.TokenMatcher.Match_Comment(token)1800)1801 {1802 Build(context, token);1803 return 23;1804 }1805 if ( context.TokenMatcher.Match_Empty(token)1806)1807 {1808 Build(context, token);1809 return 23;1810 }1811 var error = new ParserError(token, new string[] {"#TableRow", "#MultiLineArgument", "#Step", "#TagLine", "#Examples", "#Comment", "#Empty"}, "State: 23 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#Step:0");1812 if (StopAtFirstError)1813 throw new ParserException(ParserMessageProvider, error);1814 context.Errors.Add(error);1815 return 23;1816 }1817 1818 1819 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:0>Table_Arg:0>#TableRow:01820 int MatchTokenAt_24(Token token, ParserContext context)1821 {1822 if ( context.TokenMatcher.Match_TableRow(token)1823)1824 {1825 Build(context, token);1826 return 24;1827 }1828 if ( context.TokenMatcher.Match_MultiLineArgument(token)1829)1830 {1831 EndRule(context, RuleType.Table_Arg);1832 StartRule(context, RuleType.Multiline_Arg);1833 Build(context, token);1834 return 25;1835 }1836 if ( context.TokenMatcher.Match_Step(token)1837)1838 {1839 EndRule(context, RuleType.Table_Arg);1840 EndRule(context, RuleType.Step);1841 StartRule(context, RuleType.Step);1842 Build(context, token);1843 return 23;1844 }1845 if ( context.TokenMatcher.Match_TagLine(token)1846)1847 {1848 EndRule(context, RuleType.Table_Arg);1849 EndRule(context, RuleType.Step);1850 StartRule(context, RuleType.Examples);1851 Build(context, token);1852 return 27;1853 }1854 if ( context.TokenMatcher.Match_Examples(token)1855)1856 {1857 EndRule(context, RuleType.Table_Arg);1858 EndRule(context, RuleType.Step);1859 StartRule(context, RuleType.Examples);1860 Build(context, token);1861 return 28;1862 }1863 if ( context.TokenMatcher.Match_Comment(token)1864)1865 {1866 Build(context, token);1867 return 24;1868 }1869 if ( context.TokenMatcher.Match_Empty(token)1870)1871 {1872 Build(context, token);1873 return 24;1874 }1875 var error = new ParserError(token, new string[] {"#TableRow", "#MultiLineArgument", "#Step", "#TagLine", "#Examples", "#Comment", "#Empty"}, "State: 24 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:0>Table_Arg:0>#TableRow:0");1876 if (StopAtFirstError)1877 throw new ParserException(ParserMessageProvider, error);1878 context.Errors.Add(error);1879 return 24;1880 }1881 1882 1883 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:0>#MultiLineArgument:01884 int MatchTokenAt_25(Token token, ParserContext context)1885 {1886 if ( context.TokenMatcher.Match_Empty(token)1887)1888 {1889 Build(context, token);1890 return 25;1891 }1892 if ( context.TokenMatcher.Match_MultiLineArgument(token)1893)1894 {1895 Build(context, token);1896 return 26;1897 }1898 if ( context.TokenMatcher.Match_Other(token)1899)1900 {1901 Build(context, token);1902 return 25;1903 }1904 var error = new ParserError(token, new string[] {"#Empty", "#MultiLineArgument", "#Other"}, "State: 25 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:0>#MultiLineArgument:0");1905 if (StopAtFirstError)1906 throw new ParserException(ParserMessageProvider, error);1907 context.Errors.Add(error);1908 return 25;1909 }1910 1911 1912 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:2>#MultiLineArgument:01913 int MatchTokenAt_26(Token token, ParserContext context)1914 {1915 if ( context.TokenMatcher.Match_Step(token)1916)1917 {1918 EndRule(context, RuleType.Multiline_Arg);1919 EndRule(context, RuleType.Step);1920 StartRule(context, RuleType.Step);1921 Build(context, token);1922 return 23;1923 }1924 if ( context.TokenMatcher.Match_TagLine(token)1925)1926 {1927 EndRule(context, RuleType.Multiline_Arg);1928 EndRule(context, RuleType.Step);1929 StartRule(context, RuleType.Examples);1930 Build(context, token);1931 return 27;1932 }1933 if ( context.TokenMatcher.Match_Examples(token)1934)1935 {1936 EndRule(context, RuleType.Multiline_Arg);1937 EndRule(context, RuleType.Step);1938 StartRule(context, RuleType.Examples);1939 Build(context, token);1940 return 28;1941 }1942 if ( context.TokenMatcher.Match_Comment(token)1943)1944 {1945 Build(context, token);1946 return 26;1947 }1948 if ( context.TokenMatcher.Match_Empty(token)1949)1950 {1951 Build(context, token);1952 return 26;1953 }1954 var error = new ParserError(token, new string[] {"#Step", "#TagLine", "#Examples", "#Comment", "#Empty"}, "State: 26 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>Table_And_Multiline_Arg:1>Multiline_Arg:2>#MultiLineArgument:0");1955 if (StopAtFirstError)1956 throw new ParserException(ParserMessageProvider, error);1957 context.Errors.Add(error);1958 return 26;1959 }1960 1961 1962 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:0>#TagLine:01963 int MatchTokenAt_27(Token token, ParserContext context)1964 {1965 if ( context.TokenMatcher.Match_TagLine(token)1966)1967 {1968 Build(context, token);1969 return 27;1970 }1971 if ( context.TokenMatcher.Match_Examples(token)1972)1973 {1974 Build(context, token);1975 return 28;1976 }1977 if ( context.TokenMatcher.Match_Comment(token)1978)1979 {1980 Build(context, token);1981 return 27;1982 }1983 if ( context.TokenMatcher.Match_Empty(token)1984)1985 {1986 Build(context, token);1987 return 27;1988 }1989 var error = new ParserError(token, new string[] {"#TagLine", "#Examples", "#Comment", "#Empty"}, "State: 27 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:0>#TagLine:0");1990 if (StopAtFirstError)1991 throw new ParserException(ParserMessageProvider, error);1992 context.Errors.Add(error);1993 return 27;1994 }1995 1996 1997 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:1>#Examples:01998 int MatchTokenAt_28(Token token, ParserContext context)1999 {2000 if ( context.TokenMatcher.Match_Empty(token)2001)2002 {2003 StartRule(context, RuleType.Description);2004 Build(context, token);2005 return 29;2006 }2007 if ( context.TokenMatcher.Match_Comment(token)2008)2009 {2010 Build(context, token);2011 return 30;2012 }2013 if ( context.TokenMatcher.Match_TableRow(token)2014)2015 {2016 StartRule(context, RuleType.Examples_Table);2017 Build(context, token);2018 return 31;2019 }2020 if ( context.TokenMatcher.Match_Other(token)2021)2022 {2023 StartRule(context, RuleType.Description);2024 Build(context, token);2025 return 29;2026 }2027 var error = new ParserError(token, new string[] {"#Empty", "#Comment", "#TableRow", "#Other"}, "State: 28 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:1>#Examples:0");2028 if (StopAtFirstError)2029 throw new ParserException(ParserMessageProvider, error);2030 context.Errors.Add(error);2031 return 28;2032 }2033 2034 2035 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:02036 int MatchTokenAt_29(Token token, ParserContext context)2037 {2038 if ( context.TokenMatcher.Match_Empty(token)2039)2040 {2041 Build(context, token);2042 return 29;2043 }2044 if ( context.TokenMatcher.Match_Comment(token)2045)2046 {2047 EndRule(context, RuleType.Description);2048 Build(context, token);2049 return 30;2050 }2051 if ( context.TokenMatcher.Match_TableRow(token)2052)2053 {2054 EndRule(context, RuleType.Description);2055 StartRule(context, RuleType.Examples_Table);2056 Build(context, token);2057 return 31;2058 }2059 if ( context.TokenMatcher.Match_Other(token)2060)2061 {2062 Build(context, token);2063 return 29;2064 }2065 var error = new ParserError(token, new string[] {"#Empty", "#Comment", "#TableRow", "#Other"}, "State: 29 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:0>Description:0>Description_Line:0>__alt3:0>#Empty:0");2066 if (StopAtFirstError)2067 throw new ParserException(ParserMessageProvider, error);2068 context.Errors.Add(error);2069 return 29;2070 }2071 2072 2073 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:1>#Comment:02074 int MatchTokenAt_30(Token token, ParserContext context)2075 {2076 if ( context.TokenMatcher.Match_Comment(token)2077)2078 {2079 Build(context, token);2080 return 30;2081 }2082 if ( context.TokenMatcher.Match_TableRow(token)2083)2084 {2085 StartRule(context, RuleType.Examples_Table);2086 Build(context, token);2087 return 31;2088 }2089 if ( context.TokenMatcher.Match_Empty(token)2090)2091 {2092 Build(context, token);2093 return 30;2094 }2095 var error = new ParserError(token, new string[] {"#Comment", "#TableRow", "#Empty"}, "State: 30 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:1>#Comment:0");2096 if (StopAtFirstError)2097 throw new ParserException(ParserMessageProvider, error);2098 context.Errors.Add(error);2099 return 30;2100 }2101 2102 2103 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:3>Examples_Table:0>#TableRow:02104 int MatchTokenAt_31(Token token, ParserContext context)2105 {2106 if ( context.TokenMatcher.Match_EOF(token)2107)2108 {2109 EndRule(context, RuleType.Examples_Table);2110 EndRule(context, RuleType.Examples);2111 EndRule(context, RuleType.ScenarioOutline);2112 EndRule(context, RuleType.Scenario_Base);2113 Build(context, token);2114 return 32;2115 }2116 if ( context.TokenMatcher.Match_TableRow(token)2117)2118 {2119 Build(context, token);2120 return 31;2121 }2122 if ( context.TokenMatcher.Match_TagLine(token)2123)2124 {2125 if (LookAhead_0(context, token))2126 {2127 EndRule(context, RuleType.Examples_Table);2128 EndRule(context, RuleType.Examples);2129 StartRule(context, RuleType.Examples);2130 Build(context, token);2131 return 27;2132 }2133 }2134 if ( context.TokenMatcher.Match_TagLine(token)2135)2136 {2137 EndRule(context, RuleType.Examples_Table);2138 EndRule(context, RuleType.Examples);2139 EndRule(context, RuleType.ScenarioOutline);2140 EndRule(context, RuleType.Scenario_Base);2141 StartRule(context, RuleType.Scenario_Base);2142 Build(context, token);2143 return 12;2144 }2145 if ( context.TokenMatcher.Match_Examples(token)2146)2147 {2148 EndRule(context, RuleType.Examples_Table);2149 EndRule(context, RuleType.Examples);2150 StartRule(context, RuleType.Examples);2151 Build(context, token);2152 return 28;2153 }2154 if ( context.TokenMatcher.Match_Scenario(token)2155)2156 {2157 EndRule(context, RuleType.Examples_Table);2158 EndRule(context, RuleType.Examples);2159 EndRule(context, RuleType.ScenarioOutline);2160 EndRule(context, RuleType.Scenario_Base);2161 StartRule(context, RuleType.Scenario_Base);2162 StartRule(context, RuleType.Scenario);2163 Build(context, token);2164 return 13;2165 }2166 if ( context.TokenMatcher.Match_ScenarioOutline(token)2167)2168 {2169 EndRule(context, RuleType.Examples_Table);2170 EndRule(context, RuleType.Examples);2171 EndRule(context, RuleType.ScenarioOutline);2172 EndRule(context, RuleType.Scenario_Base);2173 StartRule(context, RuleType.Scenario_Base);2174 StartRule(context, RuleType.ScenarioOutline);2175 Build(context, token);2176 return 20;2177 }2178 if ( context.TokenMatcher.Match_Comment(token)2179)2180 {2181 Build(context, token);2182 return 31;2183 }2184 if ( context.TokenMatcher.Match_Empty(token)2185)2186 {2187 Build(context, token);2188 return 31;2189 }2190 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#TagLine", "#Examples", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 31 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:3>Examples:3>Examples_Table:0>#TableRow:0");2191 if (StopAtFirstError)2192 throw new ParserException(ParserMessageProvider, error);2193 context.Errors.Add(error);2194 return 31;2195 }2196 2197 2198 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:0>#MultiLineArgument:02199 int MatchTokenAt_33(Token token, ParserContext context)2200 {2201 if ( context.TokenMatcher.Match_Empty(token)2202)2203 {2204 Build(context, token);2205 return 33;2206 }2207 if ( context.TokenMatcher.Match_MultiLineArgument(token)2208)2209 {2210 Build(context, token);2211 return 34;2212 }2213 if ( context.TokenMatcher.Match_Other(token)2214)2215 {2216 Build(context, token);2217 return 33;2218 }2219 var error = new ParserError(token, new string[] {"#Empty", "#MultiLineArgument", "#Other"}, "State: 33 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:0>#MultiLineArgument:0");2220 if (StopAtFirstError)2221 throw new ParserException(ParserMessageProvider, error);2222 context.Errors.Add(error);2223 return 33;2224 }2225 2226 2227 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:2>#MultiLineArgument:02228 int MatchTokenAt_34(Token token, ParserContext context)2229 {2230 if ( context.TokenMatcher.Match_TableRow(token)2231)2232 {2233 EndRule(context, RuleType.Multiline_Arg);2234 StartRule(context, RuleType.Table_Arg);2235 Build(context, token);2236 return 35;2237 }2238 if ( context.TokenMatcher.Match_Step(token)2239)2240 {2241 EndRule(context, RuleType.Multiline_Arg);2242 EndRule(context, RuleType.Step);2243 StartRule(context, RuleType.Step);2244 Build(context, token);2245 return 23;2246 }2247 if ( context.TokenMatcher.Match_TagLine(token)2248)2249 {2250 EndRule(context, RuleType.Multiline_Arg);2251 EndRule(context, RuleType.Step);2252 StartRule(context, RuleType.Examples);2253 Build(context, token);2254 return 27;2255 }2256 if ( context.TokenMatcher.Match_Examples(token)2257)2258 {2259 EndRule(context, RuleType.Multiline_Arg);2260 EndRule(context, RuleType.Step);2261 StartRule(context, RuleType.Examples);2262 Build(context, token);2263 return 28;2264 }2265 if ( context.TokenMatcher.Match_Comment(token)2266)2267 {2268 Build(context, token);2269 return 34;2270 }2271 if ( context.TokenMatcher.Match_Empty(token)2272)2273 {2274 Build(context, token);2275 return 34;2276 }2277 var error = new ParserError(token, new string[] {"#TableRow", "#Step", "#TagLine", "#Examples", "#Comment", "#Empty"}, "State: 34 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:2>#MultiLineArgument:0");2278 if (StopAtFirstError)2279 throw new ParserException(ParserMessageProvider, error);2280 context.Errors.Add(error);2281 return 34;2282 }2283 2284 2285 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:1>Table_Arg:0>#TableRow:02286 int MatchTokenAt_35(Token token, ParserContext context)2287 {2288 if ( context.TokenMatcher.Match_TableRow(token)2289)2290 {2291 Build(context, token);2292 return 35;2293 }2294 if ( context.TokenMatcher.Match_Step(token)2295)2296 {2297 EndRule(context, RuleType.Table_Arg);2298 EndRule(context, RuleType.Step);2299 StartRule(context, RuleType.Step);2300 Build(context, token);2301 return 23;2302 }2303 if ( context.TokenMatcher.Match_TagLine(token)2304)2305 {2306 EndRule(context, RuleType.Table_Arg);2307 EndRule(context, RuleType.Step);2308 StartRule(context, RuleType.Examples);2309 Build(context, token);2310 return 27;2311 }2312 if ( context.TokenMatcher.Match_Examples(token)2313)2314 {2315 EndRule(context, RuleType.Table_Arg);2316 EndRule(context, RuleType.Step);2317 StartRule(context, RuleType.Examples);2318 Build(context, token);2319 return 28;2320 }2321 if ( context.TokenMatcher.Match_Comment(token)2322)2323 {2324 Build(context, token);2325 return 35;2326 }2327 if ( context.TokenMatcher.Match_Empty(token)2328)2329 {2330 Build(context, token);2331 return 35;2332 }2333 var error = new ParserError(token, new string[] {"#TableRow", "#Step", "#TagLine", "#Examples", "#Comment", "#Empty"}, "State: 35 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:1>Table_Arg:0>#TableRow:0");2334 if (StopAtFirstError)2335 throw new ParserException(ParserMessageProvider, error);2336 context.Errors.Add(error);2337 return 35;2338 }2339 2340 2341 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:0>#MultiLineArgument:02342 int MatchTokenAt_36(Token token, ParserContext context)2343 {2344 if ( context.TokenMatcher.Match_Empty(token)2345)2346 {2347 Build(context, token);2348 return 36;2349 }2350 if ( context.TokenMatcher.Match_MultiLineArgument(token)2351)2352 {2353 Build(context, token);2354 return 37;2355 }2356 if ( context.TokenMatcher.Match_Other(token)2357)2358 {2359 Build(context, token);2360 return 36;2361 }2362 var error = new ParserError(token, new string[] {"#Empty", "#MultiLineArgument", "#Other"}, "State: 36 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:0>#MultiLineArgument:0");2363 if (StopAtFirstError)2364 throw new ParserException(ParserMessageProvider, error);2365 context.Errors.Add(error);2366 return 36;2367 }2368 2369 2370 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:2>#MultiLineArgument:02371 int MatchTokenAt_37(Token token, ParserContext context)2372 {2373 if ( context.TokenMatcher.Match_EOF(token)2374)2375 {2376 EndRule(context, RuleType.Multiline_Arg);2377 EndRule(context, RuleType.Step);2378 EndRule(context, RuleType.Scenario);2379 EndRule(context, RuleType.Scenario_Base);2380 Build(context, token);2381 return 32;2382 }2383 if ( context.TokenMatcher.Match_TableRow(token)2384)2385 {2386 EndRule(context, RuleType.Multiline_Arg);2387 StartRule(context, RuleType.Table_Arg);2388 Build(context, token);2389 return 38;2390 }2391 if ( context.TokenMatcher.Match_Step(token)2392)2393 {2394 EndRule(context, RuleType.Multiline_Arg);2395 EndRule(context, RuleType.Step);2396 StartRule(context, RuleType.Step);2397 Build(context, token);2398 return 16;2399 }2400 if ( context.TokenMatcher.Match_TagLine(token)2401)2402 {2403 EndRule(context, RuleType.Multiline_Arg);2404 EndRule(context, RuleType.Step);2405 EndRule(context, RuleType.Scenario);2406 EndRule(context, RuleType.Scenario_Base);2407 StartRule(context, RuleType.Scenario_Base);2408 Build(context, token);2409 return 12;2410 }2411 if ( context.TokenMatcher.Match_Scenario(token)2412)2413 {2414 EndRule(context, RuleType.Multiline_Arg);2415 EndRule(context, RuleType.Step);2416 EndRule(context, RuleType.Scenario);2417 EndRule(context, RuleType.Scenario_Base);2418 StartRule(context, RuleType.Scenario_Base);2419 StartRule(context, RuleType.Scenario);2420 Build(context, token);2421 return 13;2422 }2423 if ( context.TokenMatcher.Match_ScenarioOutline(token)2424)2425 {2426 EndRule(context, RuleType.Multiline_Arg);2427 EndRule(context, RuleType.Step);2428 EndRule(context, RuleType.Scenario);2429 EndRule(context, RuleType.Scenario_Base);2430 StartRule(context, RuleType.Scenario_Base);2431 StartRule(context, RuleType.ScenarioOutline);2432 Build(context, token);2433 return 20;2434 }2435 if ( context.TokenMatcher.Match_Comment(token)2436)2437 {2438 Build(context, token);2439 return 37;2440 }2441 if ( context.TokenMatcher.Match_Empty(token)2442)2443 {2444 Build(context, token);2445 return 37;2446 }2447 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 37 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:2>#MultiLineArgument:0");2448 if (StopAtFirstError)2449 throw new ParserException(ParserMessageProvider, error);2450 context.Errors.Add(error);2451 return 37;2452 }2453 2454 2455 // Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:1>Table_Arg:0>#TableRow:02456 int MatchTokenAt_38(Token token, ParserContext context)2457 {2458 if ( context.TokenMatcher.Match_EOF(token)2459)2460 {2461 EndRule(context, RuleType.Table_Arg);2462 EndRule(context, RuleType.Step);2463 EndRule(context, RuleType.Scenario);2464 EndRule(context, RuleType.Scenario_Base);2465 Build(context, token);2466 return 32;2467 }2468 if ( context.TokenMatcher.Match_TableRow(token)2469)2470 {2471 Build(context, token);2472 return 38;2473 }2474 if ( context.TokenMatcher.Match_Step(token)2475)2476 {2477 EndRule(context, RuleType.Table_Arg);2478 EndRule(context, RuleType.Step);2479 StartRule(context, RuleType.Step);2480 Build(context, token);2481 return 16;2482 }2483 if ( context.TokenMatcher.Match_TagLine(token)2484)2485 {2486 EndRule(context, RuleType.Table_Arg);2487 EndRule(context, RuleType.Step);2488 EndRule(context, RuleType.Scenario);2489 EndRule(context, RuleType.Scenario_Base);2490 StartRule(context, RuleType.Scenario_Base);2491 Build(context, token);2492 return 12;2493 }2494 if ( context.TokenMatcher.Match_Scenario(token)2495)2496 {2497 EndRule(context, RuleType.Table_Arg);2498 EndRule(context, RuleType.Step);2499 EndRule(context, RuleType.Scenario);2500 EndRule(context, RuleType.Scenario_Base);2501 StartRule(context, RuleType.Scenario_Base);2502 StartRule(context, RuleType.Scenario);2503 Build(context, token);2504 return 13;2505 }2506 if ( context.TokenMatcher.Match_ScenarioOutline(token)2507)2508 {2509 EndRule(context, RuleType.Table_Arg);2510 EndRule(context, RuleType.Step);2511 EndRule(context, RuleType.Scenario);2512 EndRule(context, RuleType.Scenario_Base);2513 StartRule(context, RuleType.Scenario_Base);2514 StartRule(context, RuleType.ScenarioOutline);2515 Build(context, token);2516 return 20;2517 }2518 if ( context.TokenMatcher.Match_Comment(token)2519)2520 {2521 Build(context, token);2522 return 38;2523 }2524 if ( context.TokenMatcher.Match_Empty(token)2525)2526 {2527 Build(context, token);2528 return 38;2529 }2530 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 38 - Feature_File:2>Scenario_Base:1>Scenario_Base_Body:0>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:1>Table_Arg:0>#TableRow:0");2531 if (StopAtFirstError)2532 throw new ParserException(ParserMessageProvider, error);2533 context.Errors.Add(error);2534 return 38;2535 }2536 2537 2538 // Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:0>#MultiLineArgument:02539 int MatchTokenAt_39(Token token, ParserContext context)2540 {2541 if ( context.TokenMatcher.Match_Empty(token)2542)2543 {2544 Build(context, token);2545 return 39;2546 }2547 if ( context.TokenMatcher.Match_MultiLineArgument(token)2548)2549 {2550 Build(context, token);2551 return 40;2552 }2553 if ( context.TokenMatcher.Match_Other(token)2554)2555 {2556 Build(context, token);2557 return 39;2558 }2559 var error = new ParserError(token, new string[] {"#Empty", "#MultiLineArgument", "#Other"}, "State: 39 - Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:0>#MultiLineArgument:0");2560 if (StopAtFirstError)2561 throw new ParserException(ParserMessageProvider, error);2562 context.Errors.Add(error);2563 return 39;2564 }2565 2566 2567 // Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:2>#MultiLineArgument:02568 int MatchTokenAt_40(Token token, ParserContext context)2569 {2570 if ( context.TokenMatcher.Match_EOF(token)2571)2572 {2573 EndRule(context, RuleType.Multiline_Arg);2574 EndRule(context, RuleType.Step);2575 EndRule(context, RuleType.Background);2576 Build(context, token);2577 return 32;2578 }2579 if ( context.TokenMatcher.Match_TableRow(token)2580)2581 {2582 EndRule(context, RuleType.Multiline_Arg);2583 StartRule(context, RuleType.Table_Arg);2584 Build(context, token);2585 return 41;2586 }2587 if ( context.TokenMatcher.Match_Step(token)2588)2589 {2590 EndRule(context, RuleType.Multiline_Arg);2591 EndRule(context, RuleType.Step);2592 StartRule(context, RuleType.Step);2593 Build(context, token);2594 return 8;2595 }2596 if ( context.TokenMatcher.Match_TagLine(token)2597)2598 {2599 EndRule(context, RuleType.Multiline_Arg);2600 EndRule(context, RuleType.Step);2601 EndRule(context, RuleType.Background);2602 StartRule(context, RuleType.Scenario_Base);2603 Build(context, token);2604 return 12;2605 }2606 if ( context.TokenMatcher.Match_Scenario(token)2607)2608 {2609 EndRule(context, RuleType.Multiline_Arg);2610 EndRule(context, RuleType.Step);2611 EndRule(context, RuleType.Background);2612 StartRule(context, RuleType.Scenario_Base);2613 StartRule(context, RuleType.Scenario);2614 Build(context, token);2615 return 13;2616 }2617 if ( context.TokenMatcher.Match_ScenarioOutline(token)2618)2619 {2620 EndRule(context, RuleType.Multiline_Arg);2621 EndRule(context, RuleType.Step);2622 EndRule(context, RuleType.Background);2623 StartRule(context, RuleType.Scenario_Base);2624 StartRule(context, RuleType.ScenarioOutline);2625 Build(context, token);2626 return 20;2627 }2628 if ( context.TokenMatcher.Match_Comment(token)2629)2630 {2631 Build(context, token);2632 return 40;2633 }2634 if ( context.TokenMatcher.Match_Empty(token)2635)2636 {2637 Build(context, token);2638 return 40;2639 }2640 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 40 - Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:0>Multiline_Arg:2>#MultiLineArgument:0");2641 if (StopAtFirstError)2642 throw new ParserException(ParserMessageProvider, error);2643 context.Errors.Add(error);2644 return 40;2645 }2646 2647 2648 // Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:1>Table_Arg:0>#TableRow:02649 int MatchTokenAt_41(Token token, ParserContext context)2650 {2651 if ( context.TokenMatcher.Match_EOF(token)2652)2653 {2654 EndRule(context, RuleType.Table_Arg);2655 EndRule(context, RuleType.Step);2656 EndRule(context, RuleType.Background);2657 Build(context, token);2658 return 32;2659 }2660 if ( context.TokenMatcher.Match_TableRow(token)2661)2662 {2663 Build(context, token);2664 return 41;2665 }2666 if ( context.TokenMatcher.Match_Step(token)2667)2668 {2669 EndRule(context, RuleType.Table_Arg);2670 EndRule(context, RuleType.Step);2671 StartRule(context, RuleType.Step);2672 Build(context, token);2673 return 8;2674 }2675 if ( context.TokenMatcher.Match_TagLine(token)2676)2677 {2678 EndRule(context, RuleType.Table_Arg);2679 EndRule(context, RuleType.Step);2680 EndRule(context, RuleType.Background);2681 StartRule(context, RuleType.Scenario_Base);2682 Build(context, token);2683 return 12;2684 }2685 if ( context.TokenMatcher.Match_Scenario(token)2686)2687 {2688 EndRule(context, RuleType.Table_Arg);2689 EndRule(context, RuleType.Step);2690 EndRule(context, RuleType.Background);2691 StartRule(context, RuleType.Scenario_Base);2692 StartRule(context, RuleType.Scenario);2693 Build(context, token);2694 return 13;2695 }2696 if ( context.TokenMatcher.Match_ScenarioOutline(token)2697)2698 {2699 EndRule(context, RuleType.Table_Arg);2700 EndRule(context, RuleType.Step);2701 EndRule(context, RuleType.Background);2702 StartRule(context, RuleType.Scenario_Base);2703 StartRule(context, RuleType.ScenarioOutline);2704 Build(context, token);2705 return 20;2706 }2707 if ( context.TokenMatcher.Match_Comment(token)2708)2709 {2710 Build(context, token);2711 return 41;2712 }2713 if ( context.TokenMatcher.Match_Empty(token)2714)2715 {2716 Build(context, token);2717 return 41;2718 }2719 var error = new ParserError(token, new string[] {"#EOF", "#TableRow", "#Step", "#TagLine", "#Scenario", "#ScenarioOutline", "#Comment", "#Empty"}, "State: 41 - Feature_File:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>Multiline_And_Table_Arg:1>Table_Arg:0>#TableRow:0");2720 if (StopAtFirstError)2721 throw new ParserException(ParserMessageProvider, error);2722 context.Errors.Add(error);2723 return 41;2724 }2725 2726 2727 bool LookAhead_0(ParserContext context, Token currentToken)2728 {2729 currentToken.Detach();2730 Token token;2731 var queue = new Queue<Token>();2732 bool match = false;2733 do...
DomBuilder.cs
Source:DomBuilder.cs
...16 {17 yield return new Tag(item);18 }19 break;20 case TokenType.TableRow:21 yield return new GherkinTableRow(token.Items.Select(cv => new GherkinTableCell(cv)).ToArray());22 break;23 default:24 yield return token;25 break;26 }27 }28 public object BuildFromNode(ASTNode astNode)29 {30 switch (astNode.Node)31 {32 case RuleType.Description:33 return string.Join(Environment.NewLine, astNode.GetAllSubNodes().Cast<Token>().Select(t => t.Text));34 case RuleType.Multiline_Arg:35 {36 int indent = astNode.GetSubNodesOf(RuleType._MultiLineArgument).Cast<Token>().First().Indent; //TODO: use indent37 return string.Join(Environment.NewLine, astNode.GetAllSubNodes().Cast<Token>().Where(t => t.MatchedType != TokenType.MultiLineArgument).Select(t => t.Text)); //TODO: indent38 }39 case RuleType.Table_Arg:40 case RuleType.Examples_Table:41 {42 var rows = astNode.GetSubNodesOf(RuleType._TableRow).Cast<GherkinTableRow>().ToArray();43 var header = rows.First();44 return new GherkinTable(header, rows.Skip(1).ToArray());45 }46 case RuleType.Step:47 {48 var stepToken = astNode.GetSubNodesOf(RuleType._Step).Cast<Token>().First();49 var step = CreateStep(stepToken.MatchedKeyword, StepKeyword.Given, stepToken.Text, null, ScenarioBlock.Given); //TODO: G/W/T50 step.MultiLineTextArgument = astNode.GetSubNodesOf(RuleType.Multiline_Arg).Cast<string>().FirstOrDefault();51 step.TableArg = astNode.GetSubNodesOf(RuleType.Table_Arg).Cast<GherkinTable>().FirstOrDefault();52 return step;53 }54 case RuleType.Background:55 {56 var backgroundToken = astNode.GetSubNodesOf(RuleType._Background).Cast<Token>().First();...
ParserHelper.cs
Source:ParserHelper.cs
...29 {30 tags = tags ?? new string[0];31 var scenario1 = new ScenarioOutline(GetTags(scenarioOutlineTags), null, "Scenario Outline", "scenario outline1 title", "", new Step[0], new []32 {33 new Examples(GetTags(examplesTags), null, "Examples", "examples name", "", new Gherkin.Ast.TableRow(null, new []{ new TableCell(null, "col1"), }), new Gherkin.Ast.TableRow[0])34 });35 var specFlowFeature = new SpecFlowFeature(GetTags(tags), null, "en", "feature", "title", "desc", new StepsContainer[] {scenario1});36 return new SpecFlowDocument(specFlowFeature, new Comment[0], null);37 }38 }39}
TableRow
Using AI Code Generation
1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using Gherkin.Ast;7{8 {9 static void Main(string[] args)10 {11 TableRow r = new TableRow(new List<TableCell> { new TableCell(new List<Gherkin.Ast.Node> { new Gherkin.Ast.Text("a") }) });12 }13 }14}15using System;16using System.Collections.Generic;17using System.Linq;18using System.Text;19using System.Threading.Tasks;20using Gherkin.Ast;21{22 {23 static void Main(string[] args)24 {25 Gherkin.Ast.TableRow r = new Gherkin.Ast.TableRow(new List<TableCell> { new TableCell(new List<Gherkin.Ast.Node> { new Gherkin.Ast.Text("a") }) });26 }27 }28}
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using Gherkin.Ast;3using Gherkin.Ast;4using Gherkin.Ast;5using Gherkin.Ast;6using Gherkin.Ast;7using Gherkin.Ast;8using System;9using System.Collections.Generic;10using System.Linq;11using System.Text;12using System.Threading.Tasks;13using TechTalk.SpecFlow;14{15 {16 [Given(@"I have entered (.*) into the calculator")]17 public void GivenIHaveEnteredIntoTheCalculator(int p0)18 {19 ScenarioContext.Current.Pending();20 }21 [Given(@"I have entered (.*) into the calculator")]22 public void GivenIHaveEnteredIntoTheCalculator(int p0)23 {24 ScenarioContext.Current.Pending();25 }26 [When(@"I press add")]27 public void WhenIPressAdd()28 {29 ScenarioContext.Current.Pending();30 }31 [Then(@"the result should be (.*) on the screen")]32 public void ThenTheResultShouldBeOnTheScreen(int p0)33 {34 ScenarioContext.Current.Pending();35 }36 }37}38using System;39using TechTalk.SpecFlow;40{41 {42 [Given(@"I have entered (.*) into the calculator")]43 public void GivenIHaveEnteredIntoTheCalculator(int p0)44 {45 ScenarioContext.Current.Pending();46 }47 [When(@"I press add")]48 public void WhenIPressAdd()49 {
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using Gherkin.Ast;3using Gherkin.Ast;4using Gherkin.Ast;5using Gherkin.Ast;6using Gherkin.Ast;7using Gherkin.Ast;8using Gherkin.Ast;9using Gherkin.Ast;10using Gherkin.Ast;11using Gherkin.Ast;12using Gherkin.Ast;13using Gherkin.Ast;14using Gherkin.Ast;15using Gherkin.Ast;16using Gherkin.Ast;17using Gherkin.Ast;18using Gherkin.Ast;19using Gherkin.Ast;20using Gherkin.Ast;21using Gherkin.Ast;22using Gherkin.Ast;23using Gherkin.Ast;24using Gherkin.Ast;
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using System;3using System.Collections.Generic;4using System.Linq;5using System.Text;6using System.Threading.Tasks;7{8 {9 static void Main(string[] args)10 {11 |Test2|Fail|";12 var parser = new Parser();13 var gherkinDocument = parser.Parse(feature);14 var featureNode = gherkinDocument.Feature;15 var scenarioNode = featureNode.Children.First() as ScenarioDefinition;16 var stepNode = scenarioNode.Steps.First() as Step;17 var tableNode = stepNode.Argument as DataTable;18 var headerNode = tableNode.Rows.First() as TableRow;19 var rowNode = tableNode.Rows.Last() as TableRow;20 Console.WriteLine("Feature Name: " + featureNode.Name);21 Console.WriteLine("Scenario Name: " + scenarioNode.Name);22 Console.WriteLine("Step Name: " + stepNode.Text);23 Console.WriteLine("Table Header: " + headerNode.Cells.First().Value);24 Console.WriteLine("Table Row: " + rowNode.Cells.First().Value);25 Console.ReadLine();26 }27 }28}
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using Gherkin.Ast;3using Gherkin.Ast;4using Gherkin.Ast;5using Gherkin.Ast;6using Gherkin.Ast;7using Gherkin.Ast;8using Gherkin.Ast;9using Gherkin.Ast;10using Gherkin.Ast;11using Gherkin.Ast;12using Gherkin.Ast;13using Gherkin.Ast;14using Gherkin.Ast;15using Gherkin.Ast;16using Gherkin.Ast;17using Gherkin.Ast;18using Gherkin.Ast;19using Gherkin.Ast;20using Gherkin.Ast;21using Gherkin.Ast;22using Gherkin.Ast;23using Gherkin.Ast;
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using System;3using System.Collections.Generic;4using System.Linq;5using System.Text;6using System.Threading.Tasks;7{8 {9 static void Main(string[] args)10 {11 TableRow tableRow = new TableRow(new List<TableCell>() {12 new TableCell(new List<Gherkin.Ast.Node>() { new Gherkin.Ast.Text("col1") }),13 new TableCell(new List<Gherkin.Ast.Node>() { new Gherkin.Ast.Text("col2") }),14 new TableCell(new List<Gherkin.Ast.Node>() { new Gherkin.Ast.Text("col3") })15 });
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using System;3using System.Collections.Generic;4using System.Linq;5using System.Text;6using System.Threading.Tasks;7{8 {9 static void Main(string[] args)10 {11 var parser = new Gherkin.Parser();12 var featureFile = System.IO.File.ReadAllText(@"C:\Users\GherkinDemo\GherkinDemo\Feature1.feature");13 var feature = parser.Parse(featureFile);14 var scenarios = feature.Children.OfType<Scenario>();15 foreach (var scenario in scenarios)16 {17 Console.WriteLine("Scenario: " + scenario.Name);18 var steps = scenario.Steps;19 foreach (var step in steps)20 {21 Console.WriteLine("Step: " + step.Keyword + " " + step.Text);22 var tableRows = step.Argument.OfType<TableRow>();23 foreach (var tableRow in tableRows)24 {25 var tableCells = tableRow.Cells;26 foreach (var tableCell in tableCells)27 {28 Console.WriteLine("Table Cell: " + tableCell.Value);29 }30 }31 }32 }33 Console.WriteLine("Press any key to exit.");34 Console.ReadKey();35 }36 }37}
TableRow
Using AI Code Generation
1using Gherkin.Ast;2using Gherkin;3using Gherkin.Ast;4using Gherkin;5using Gherkin.Ast;6using Gherkin;7using Gherkin.Ast;8using Gherkin;9using Gherkin.Ast;10using Gherkin;11using Gherkin.Ast;12using Gherkin;13using Gherkin.Ast;14using Gherkin;15using Gherkin.Ast;16using Gherkin;17using Gherkin.Ast;18using Gherkin;19using Gherkin.Ast;20using Gherkin;21using Gherkin.Ast;22using Gherkin;23using Gherkin.Ast;24using Gherkin;25using Gherkin.Ast;
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!