How to use matchTokenAt_34 method in Cucumber-gherkin

Best JavaScript code snippet using cucumber-gherkin

parser.js

Source:parser.js Github

copy

Full Screen

...181 return matchTokenAt_32(token, context);182 case 33:183 return matchTokenAt_33(token, context);184 case 34:185 return matchTokenAt_34(token, context);186 default:187 throw new Error("Unknown state: " + state);188 }189 }190 // Start191 function matchTokenAt_0(token, context) {192 if(match_Language(context, token)) {193 startRule(context, 'Feature_Header');194 build(context, token);195 return 1;196 }197 if(match_TagLine(context, token)) {198 startRule(context, 'Feature_Header');199 startRule(context, 'Tags');200 build(context, token);201 return 2;202 }203 if(match_FeatureLine(context, token)) {204 startRule(context, 'Feature_Header');205 build(context, token);206 return 3;207 }208 if(match_Comment(context, token)) {209 build(context, token);210 return 0;211 }212 if(match_Empty(context, token)) {213 build(context, token);214 return 0;215 }216 217 var stateComment = "State: 0 - Start";218 token.detach();219 var expectedTokens = ["#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"];220 var error = token.isEof ?221 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :222 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);223 if (this.stopAtFirstError) throw error;224 addError(context, error);225 return 0;226 }227 // Feature:0>Feature_Header:0>#Language:0228 function matchTokenAt_1(token, context) {229 if(match_TagLine(context, token)) {230 startRule(context, 'Tags');231 build(context, token);232 return 2;233 }234 if(match_FeatureLine(context, token)) {235 build(context, token);236 return 3;237 }238 if(match_Comment(context, token)) {239 build(context, token);240 return 1;241 }242 if(match_Empty(context, token)) {243 build(context, token);244 return 1;245 }246 247 var stateComment = "State: 1 - Feature:0>Feature_Header:0>#Language:0";248 token.detach();249 var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];250 var error = token.isEof ?251 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :252 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);253 if (this.stopAtFirstError) throw error;254 addError(context, error);255 return 1;256 }257 // Feature:0>Feature_Header:1>Tags:0>#TagLine:0258 function matchTokenAt_2(token, context) {259 if(match_TagLine(context, token)) {260 build(context, token);261 return 2;262 }263 if(match_FeatureLine(context, token)) {264 endRule(context, 'Tags');265 build(context, token);266 return 3;267 }268 if(match_Comment(context, token)) {269 build(context, token);270 return 2;271 }272 if(match_Empty(context, token)) {273 build(context, token);274 return 2;275 }276 277 var stateComment = "State: 2 - Feature:0>Feature_Header:1>Tags:0>#TagLine:0";278 token.detach();279 var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];280 var error = token.isEof ?281 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :282 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);283 if (this.stopAtFirstError) throw error;284 addError(context, error);285 return 2;286 }287 // Feature:0>Feature_Header:2>#FeatureLine:0288 function matchTokenAt_3(token, context) {289 if(match_EOF(context, token)) {290 endRule(context, 'Feature_Header');291 build(context, token);292 return 28;293 }294 if(match_Empty(context, token)) {295 build(context, token);296 return 3;297 }298 if(match_Comment(context, token)) {299 build(context, token);300 return 5;301 }302 if(match_BackgroundLine(context, token)) {303 endRule(context, 'Feature_Header');304 startRule(context, 'Background');305 build(context, token);306 return 6;307 }308 if(match_TagLine(context, token)) {309 endRule(context, 'Feature_Header');310 startRule(context, 'Scenario_Definition');311 startRule(context, 'Tags');312 build(context, token);313 return 11;314 }315 if(match_ScenarioLine(context, token)) {316 endRule(context, 'Feature_Header');317 startRule(context, 'Scenario_Definition');318 startRule(context, 'Scenario');319 build(context, token);320 return 12;321 }322 if(match_ScenarioOutlineLine(context, token)) {323 endRule(context, 'Feature_Header');324 startRule(context, 'Scenario_Definition');325 startRule(context, 'ScenarioOutline');326 build(context, token);327 return 17;328 }329 if(match_Other(context, token)) {330 startRule(context, 'Description');331 build(context, token);332 return 4;333 }334 335 var stateComment = "State: 3 - Feature:0>Feature_Header:2>#FeatureLine:0";336 token.detach();337 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];338 var error = token.isEof ?339 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :340 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);341 if (this.stopAtFirstError) throw error;342 addError(context, error);343 return 3;344 }345 // Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0346 function matchTokenAt_4(token, context) {347 if(match_EOF(context, token)) {348 endRule(context, 'Description');349 endRule(context, 'Feature_Header');350 build(context, token);351 return 28;352 }353 if(match_Comment(context, token)) {354 endRule(context, 'Description');355 build(context, token);356 return 5;357 }358 if(match_BackgroundLine(context, token)) {359 endRule(context, 'Description');360 endRule(context, 'Feature_Header');361 startRule(context, 'Background');362 build(context, token);363 return 6;364 }365 if(match_TagLine(context, token)) {366 endRule(context, 'Description');367 endRule(context, 'Feature_Header');368 startRule(context, 'Scenario_Definition');369 startRule(context, 'Tags');370 build(context, token);371 return 11;372 }373 if(match_ScenarioLine(context, token)) {374 endRule(context, 'Description');375 endRule(context, 'Feature_Header');376 startRule(context, 'Scenario_Definition');377 startRule(context, 'Scenario');378 build(context, token);379 return 12;380 }381 if(match_ScenarioOutlineLine(context, token)) {382 endRule(context, 'Description');383 endRule(context, 'Feature_Header');384 startRule(context, 'Scenario_Definition');385 startRule(context, 'ScenarioOutline');386 build(context, token);387 return 17;388 }389 if(match_Other(context, token)) {390 build(context, token);391 return 4;392 }393 394 var stateComment = "State: 4 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0";395 token.detach();396 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];397 var error = token.isEof ?398 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :399 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);400 if (this.stopAtFirstError) throw error;401 addError(context, error);402 return 4;403 }404 // Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0405 function matchTokenAt_5(token, context) {406 if(match_EOF(context, token)) {407 endRule(context, 'Feature_Header');408 build(context, token);409 return 28;410 }411 if(match_Comment(context, token)) {412 build(context, token);413 return 5;414 }415 if(match_BackgroundLine(context, token)) {416 endRule(context, 'Feature_Header');417 startRule(context, 'Background');418 build(context, token);419 return 6;420 }421 if(match_TagLine(context, token)) {422 endRule(context, 'Feature_Header');423 startRule(context, 'Scenario_Definition');424 startRule(context, 'Tags');425 build(context, token);426 return 11;427 }428 if(match_ScenarioLine(context, token)) {429 endRule(context, 'Feature_Header');430 startRule(context, 'Scenario_Definition');431 startRule(context, 'Scenario');432 build(context, token);433 return 12;434 }435 if(match_ScenarioOutlineLine(context, token)) {436 endRule(context, 'Feature_Header');437 startRule(context, 'Scenario_Definition');438 startRule(context, 'ScenarioOutline');439 build(context, token);440 return 17;441 }442 if(match_Empty(context, token)) {443 build(context, token);444 return 5;445 }446 447 var stateComment = "State: 5 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0";448 token.detach();449 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];450 var error = token.isEof ?451 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :452 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);453 if (this.stopAtFirstError) throw error;454 addError(context, error);455 return 5;456 }457 // Feature:1>Background:0>#BackgroundLine:0458 function matchTokenAt_6(token, context) {459 if(match_EOF(context, token)) {460 endRule(context, 'Background');461 build(context, token);462 return 28;463 }464 if(match_Empty(context, token)) {465 build(context, token);466 return 6;467 }468 if(match_Comment(context, token)) {469 build(context, token);470 return 8;471 }472 if(match_StepLine(context, token)) {473 startRule(context, 'Step');474 build(context, token);475 return 9;476 }477 if(match_TagLine(context, token)) {478 endRule(context, 'Background');479 startRule(context, 'Scenario_Definition');480 startRule(context, 'Tags');481 build(context, token);482 return 11;483 }484 if(match_ScenarioLine(context, token)) {485 endRule(context, 'Background');486 startRule(context, 'Scenario_Definition');487 startRule(context, 'Scenario');488 build(context, token);489 return 12;490 }491 if(match_ScenarioOutlineLine(context, token)) {492 endRule(context, 'Background');493 startRule(context, 'Scenario_Definition');494 startRule(context, 'ScenarioOutline');495 build(context, token);496 return 17;497 }498 if(match_Other(context, token)) {499 startRule(context, 'Description');500 build(context, token);501 return 7;502 }503 504 var stateComment = "State: 6 - Feature:1>Background:0>#BackgroundLine:0";505 token.detach();506 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];507 var error = token.isEof ?508 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :509 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);510 if (this.stopAtFirstError) throw error;511 addError(context, error);512 return 6;513 }514 // Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0515 function matchTokenAt_7(token, context) {516 if(match_EOF(context, token)) {517 endRule(context, 'Description');518 endRule(context, 'Background');519 build(context, token);520 return 28;521 }522 if(match_Comment(context, token)) {523 endRule(context, 'Description');524 build(context, token);525 return 8;526 }527 if(match_StepLine(context, token)) {528 endRule(context, 'Description');529 startRule(context, 'Step');530 build(context, token);531 return 9;532 }533 if(match_TagLine(context, token)) {534 endRule(context, 'Description');535 endRule(context, 'Background');536 startRule(context, 'Scenario_Definition');537 startRule(context, 'Tags');538 build(context, token);539 return 11;540 }541 if(match_ScenarioLine(context, token)) {542 endRule(context, 'Description');543 endRule(context, 'Background');544 startRule(context, 'Scenario_Definition');545 startRule(context, 'Scenario');546 build(context, token);547 return 12;548 }549 if(match_ScenarioOutlineLine(context, token)) {550 endRule(context, 'Description');551 endRule(context, 'Background');552 startRule(context, 'Scenario_Definition');553 startRule(context, 'ScenarioOutline');554 build(context, token);555 return 17;556 }557 if(match_Other(context, token)) {558 build(context, token);559 return 7;560 }561 562 var stateComment = "State: 7 - Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0";563 token.detach();564 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];565 var error = token.isEof ?566 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :567 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);568 if (this.stopAtFirstError) throw error;569 addError(context, error);570 return 7;571 }572 // Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0573 function matchTokenAt_8(token, context) {574 if(match_EOF(context, token)) {575 endRule(context, 'Background');576 build(context, token);577 return 28;578 }579 if(match_Comment(context, token)) {580 build(context, token);581 return 8;582 }583 if(match_StepLine(context, token)) {584 startRule(context, 'Step');585 build(context, token);586 return 9;587 }588 if(match_TagLine(context, token)) {589 endRule(context, 'Background');590 startRule(context, 'Scenario_Definition');591 startRule(context, 'Tags');592 build(context, token);593 return 11;594 }595 if(match_ScenarioLine(context, token)) {596 endRule(context, 'Background');597 startRule(context, 'Scenario_Definition');598 startRule(context, 'Scenario');599 build(context, token);600 return 12;601 }602 if(match_ScenarioOutlineLine(context, token)) {603 endRule(context, 'Background');604 startRule(context, 'Scenario_Definition');605 startRule(context, 'ScenarioOutline');606 build(context, token);607 return 17;608 }609 if(match_Empty(context, token)) {610 build(context, token);611 return 8;612 }613 614 var stateComment = "State: 8 - Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0";615 token.detach();616 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];617 var error = token.isEof ?618 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :619 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);620 if (this.stopAtFirstError) throw error;621 addError(context, error);622 return 8;623 }624 // Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0625 function matchTokenAt_9(token, context) {626 if(match_EOF(context, token)) {627 endRule(context, 'Step');628 endRule(context, 'Background');629 build(context, token);630 return 28;631 }632 if(match_TableRow(context, token)) {633 startRule(context, 'DataTable');634 build(context, token);635 return 10;636 }637 if(match_DocStringSeparator(context, token)) {638 startRule(context, 'DocString');639 build(context, token);640 return 33;641 }642 if(match_StepLine(context, token)) {643 endRule(context, 'Step');644 startRule(context, 'Step');645 build(context, token);646 return 9;647 }648 if(match_TagLine(context, token)) {649 endRule(context, 'Step');650 endRule(context, 'Background');651 startRule(context, 'Scenario_Definition');652 startRule(context, 'Tags');653 build(context, token);654 return 11;655 }656 if(match_ScenarioLine(context, token)) {657 endRule(context, 'Step');658 endRule(context, 'Background');659 startRule(context, 'Scenario_Definition');660 startRule(context, 'Scenario');661 build(context, token);662 return 12;663 }664 if(match_ScenarioOutlineLine(context, token)) {665 endRule(context, 'Step');666 endRule(context, 'Background');667 startRule(context, 'Scenario_Definition');668 startRule(context, 'ScenarioOutline');669 build(context, token);670 return 17;671 }672 if(match_Comment(context, token)) {673 build(context, token);674 return 9;675 }676 if(match_Empty(context, token)) {677 build(context, token);678 return 9;679 }680 681 var stateComment = "State: 9 - Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0";682 token.detach();683 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];684 var error = token.isEof ?685 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :686 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);687 if (this.stopAtFirstError) throw error;688 addError(context, error);689 return 9;690 }691 // Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0692 function matchTokenAt_10(token, context) {693 if(match_EOF(context, token)) {694 endRule(context, 'DataTable');695 endRule(context, 'Step');696 endRule(context, 'Background');697 build(context, token);698 return 28;699 }700 if(match_TableRow(context, token)) {701 build(context, token);702 return 10;703 }704 if(match_StepLine(context, token)) {705 endRule(context, 'DataTable');706 endRule(context, 'Step');707 startRule(context, 'Step');708 build(context, token);709 return 9;710 }711 if(match_TagLine(context, token)) {712 endRule(context, 'DataTable');713 endRule(context, 'Step');714 endRule(context, 'Background');715 startRule(context, 'Scenario_Definition');716 startRule(context, 'Tags');717 build(context, token);718 return 11;719 }720 if(match_ScenarioLine(context, token)) {721 endRule(context, 'DataTable');722 endRule(context, 'Step');723 endRule(context, 'Background');724 startRule(context, 'Scenario_Definition');725 startRule(context, 'Scenario');726 build(context, token);727 return 12;728 }729 if(match_ScenarioOutlineLine(context, token)) {730 endRule(context, 'DataTable');731 endRule(context, 'Step');732 endRule(context, 'Background');733 startRule(context, 'Scenario_Definition');734 startRule(context, 'ScenarioOutline');735 build(context, token);736 return 17;737 }738 if(match_Comment(context, token)) {739 build(context, token);740 return 10;741 }742 if(match_Empty(context, token)) {743 build(context, token);744 return 10;745 }746 747 var stateComment = "State: 10 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";748 token.detach();749 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];750 var error = token.isEof ?751 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :752 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);753 if (this.stopAtFirstError) throw error;754 addError(context, error);755 return 10;756 }757 // Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0758 function matchTokenAt_11(token, context) {759 if(match_TagLine(context, token)) {760 build(context, token);761 return 11;762 }763 if(match_ScenarioLine(context, token)) {764 endRule(context, 'Tags');765 startRule(context, 'Scenario');766 build(context, token);767 return 12;768 }769 if(match_ScenarioOutlineLine(context, token)) {770 endRule(context, 'Tags');771 startRule(context, 'ScenarioOutline');772 build(context, token);773 return 17;774 }775 if(match_Comment(context, token)) {776 build(context, token);777 return 11;778 }779 if(match_Empty(context, token)) {780 build(context, token);781 return 11;782 }783 784 var stateComment = "State: 11 - Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0";785 token.detach();786 var expectedTokens = ["#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];787 var error = token.isEof ?788 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :789 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);790 if (this.stopAtFirstError) throw error;791 addError(context, error);792 return 11;793 }794 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0795 function matchTokenAt_12(token, context) {796 if(match_EOF(context, token)) {797 endRule(context, 'Scenario');798 endRule(context, 'Scenario_Definition');799 build(context, token);800 return 28;801 }802 if(match_Empty(context, token)) {803 build(context, token);804 return 12;805 }806 if(match_Comment(context, token)) {807 build(context, token);808 return 14;809 }810 if(match_StepLine(context, token)) {811 startRule(context, 'Step');812 build(context, token);813 return 15;814 }815 if(match_TagLine(context, token)) {816 endRule(context, 'Scenario');817 endRule(context, 'Scenario_Definition');818 startRule(context, 'Scenario_Definition');819 startRule(context, 'Tags');820 build(context, token);821 return 11;822 }823 if(match_ScenarioLine(context, token)) {824 endRule(context, 'Scenario');825 endRule(context, 'Scenario_Definition');826 startRule(context, 'Scenario_Definition');827 startRule(context, 'Scenario');828 build(context, token);829 return 12;830 }831 if(match_ScenarioOutlineLine(context, token)) {832 endRule(context, 'Scenario');833 endRule(context, 'Scenario_Definition');834 startRule(context, 'Scenario_Definition');835 startRule(context, 'ScenarioOutline');836 build(context, token);837 return 17;838 }839 if(match_Other(context, token)) {840 startRule(context, 'Description');841 build(context, token);842 return 13;843 }844 845 var stateComment = "State: 12 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0";846 token.detach();847 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];848 var error = token.isEof ?849 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :850 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);851 if (this.stopAtFirstError) throw error;852 addError(context, error);853 return 12;854 }855 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0856 function matchTokenAt_13(token, context) {857 if(match_EOF(context, token)) {858 endRule(context, 'Description');859 endRule(context, 'Scenario');860 endRule(context, 'Scenario_Definition');861 build(context, token);862 return 28;863 }864 if(match_Comment(context, token)) {865 endRule(context, 'Description');866 build(context, token);867 return 14;868 }869 if(match_StepLine(context, token)) {870 endRule(context, 'Description');871 startRule(context, 'Step');872 build(context, token);873 return 15;874 }875 if(match_TagLine(context, token)) {876 endRule(context, 'Description');877 endRule(context, 'Scenario');878 endRule(context, 'Scenario_Definition');879 startRule(context, 'Scenario_Definition');880 startRule(context, 'Tags');881 build(context, token);882 return 11;883 }884 if(match_ScenarioLine(context, token)) {885 endRule(context, 'Description');886 endRule(context, 'Scenario');887 endRule(context, 'Scenario_Definition');888 startRule(context, 'Scenario_Definition');889 startRule(context, 'Scenario');890 build(context, token);891 return 12;892 }893 if(match_ScenarioOutlineLine(context, token)) {894 endRule(context, 'Description');895 endRule(context, 'Scenario');896 endRule(context, 'Scenario_Definition');897 startRule(context, 'Scenario_Definition');898 startRule(context, 'ScenarioOutline');899 build(context, token);900 return 17;901 }902 if(match_Other(context, token)) {903 build(context, token);904 return 13;905 }906 907 var stateComment = "State: 13 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0";908 token.detach();909 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];910 var error = token.isEof ?911 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :912 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);913 if (this.stopAtFirstError) throw error;914 addError(context, error);915 return 13;916 }917 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0918 function matchTokenAt_14(token, context) {919 if(match_EOF(context, token)) {920 endRule(context, 'Scenario');921 endRule(context, 'Scenario_Definition');922 build(context, token);923 return 28;924 }925 if(match_Comment(context, token)) {926 build(context, token);927 return 14;928 }929 if(match_StepLine(context, token)) {930 startRule(context, 'Step');931 build(context, token);932 return 15;933 }934 if(match_TagLine(context, token)) {935 endRule(context, 'Scenario');936 endRule(context, 'Scenario_Definition');937 startRule(context, 'Scenario_Definition');938 startRule(context, 'Tags');939 build(context, token);940 return 11;941 }942 if(match_ScenarioLine(context, token)) {943 endRule(context, 'Scenario');944 endRule(context, 'Scenario_Definition');945 startRule(context, 'Scenario_Definition');946 startRule(context, 'Scenario');947 build(context, token);948 return 12;949 }950 if(match_ScenarioOutlineLine(context, token)) {951 endRule(context, 'Scenario');952 endRule(context, 'Scenario_Definition');953 startRule(context, 'Scenario_Definition');954 startRule(context, 'ScenarioOutline');955 build(context, token);956 return 17;957 }958 if(match_Empty(context, token)) {959 build(context, token);960 return 14;961 }962 963 var stateComment = "State: 14 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0";964 token.detach();965 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];966 var error = token.isEof ?967 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :968 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);969 if (this.stopAtFirstError) throw error;970 addError(context, error);971 return 14;972 }973 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0974 function matchTokenAt_15(token, context) {975 if(match_EOF(context, token)) {976 endRule(context, 'Step');977 endRule(context, 'Scenario');978 endRule(context, 'Scenario_Definition');979 build(context, token);980 return 28;981 }982 if(match_TableRow(context, token)) {983 startRule(context, 'DataTable');984 build(context, token);985 return 16;986 }987 if(match_DocStringSeparator(context, token)) {988 startRule(context, 'DocString');989 build(context, token);990 return 31;991 }992 if(match_StepLine(context, token)) {993 endRule(context, 'Step');994 startRule(context, 'Step');995 build(context, token);996 return 15;997 }998 if(match_TagLine(context, token)) {999 endRule(context, 'Step');1000 endRule(context, 'Scenario');1001 endRule(context, 'Scenario_Definition');1002 startRule(context, 'Scenario_Definition');1003 startRule(context, 'Tags');1004 build(context, token);1005 return 11;1006 }1007 if(match_ScenarioLine(context, token)) {1008 endRule(context, 'Step');1009 endRule(context, 'Scenario');1010 endRule(context, 'Scenario_Definition');1011 startRule(context, 'Scenario_Definition');1012 startRule(context, 'Scenario');1013 build(context, token);1014 return 12;1015 }1016 if(match_ScenarioOutlineLine(context, token)) {1017 endRule(context, 'Step');1018 endRule(context, 'Scenario');1019 endRule(context, 'Scenario_Definition');1020 startRule(context, 'Scenario_Definition');1021 startRule(context, 'ScenarioOutline');1022 build(context, token);1023 return 17;1024 }1025 if(match_Comment(context, token)) {1026 build(context, token);1027 return 15;1028 }1029 if(match_Empty(context, token)) {1030 build(context, token);1031 return 15;1032 }1033 1034 var stateComment = "State: 15 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0";1035 token.detach();1036 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];1037 var error = token.isEof ?1038 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1039 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1040 if (this.stopAtFirstError) throw error;1041 addError(context, error);1042 return 15;1043 }1044 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:01045 function matchTokenAt_16(token, context) {1046 if(match_EOF(context, token)) {1047 endRule(context, 'DataTable');1048 endRule(context, 'Step');1049 endRule(context, 'Scenario');1050 endRule(context, 'Scenario_Definition');1051 build(context, token);1052 return 28;1053 }1054 if(match_TableRow(context, token)) {1055 build(context, token);1056 return 16;1057 }1058 if(match_StepLine(context, token)) {1059 endRule(context, 'DataTable');1060 endRule(context, 'Step');1061 startRule(context, 'Step');1062 build(context, token);1063 return 15;1064 }1065 if(match_TagLine(context, token)) {1066 endRule(context, 'DataTable');1067 endRule(context, 'Step');1068 endRule(context, 'Scenario');1069 endRule(context, 'Scenario_Definition');1070 startRule(context, 'Scenario_Definition');1071 startRule(context, 'Tags');1072 build(context, token);1073 return 11;1074 }1075 if(match_ScenarioLine(context, token)) {1076 endRule(context, 'DataTable');1077 endRule(context, 'Step');1078 endRule(context, 'Scenario');1079 endRule(context, 'Scenario_Definition');1080 startRule(context, 'Scenario_Definition');1081 startRule(context, 'Scenario');1082 build(context, token);1083 return 12;1084 }1085 if(match_ScenarioOutlineLine(context, token)) {1086 endRule(context, 'DataTable');1087 endRule(context, 'Step');1088 endRule(context, 'Scenario');1089 endRule(context, 'Scenario_Definition');1090 startRule(context, 'Scenario_Definition');1091 startRule(context, 'ScenarioOutline');1092 build(context, token);1093 return 17;1094 }1095 if(match_Comment(context, token)) {1096 build(context, token);1097 return 16;1098 }1099 if(match_Empty(context, token)) {1100 build(context, token);1101 return 16;1102 }1103 1104 var stateComment = "State: 16 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";1105 token.detach();1106 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];1107 var error = token.isEof ?1108 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1109 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1110 if (this.stopAtFirstError) throw error;1111 addError(context, error);1112 return 16;1113 }1114 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:01115 function matchTokenAt_17(token, context) {1116 if(match_Empty(context, token)) {1117 build(context, token);1118 return 17;1119 }1120 if(match_Comment(context, token)) {1121 build(context, token);1122 return 19;1123 }1124 if(match_StepLine(context, token)) {1125 startRule(context, 'Step');1126 build(context, token);1127 return 20;1128 }1129 if(match_TagLine(context, token)) {1130 startRule(context, 'Examples');1131 startRule(context, 'Tags');1132 build(context, token);1133 return 22;1134 }1135 if(match_ExamplesLine(context, token)) {1136 startRule(context, 'Examples');1137 build(context, token);1138 return 23;1139 }1140 if(match_Other(context, token)) {1141 startRule(context, 'Description');1142 build(context, token);1143 return 18;1144 }1145 1146 var stateComment = "State: 17 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0";1147 token.detach();1148 var expectedTokens = ["#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Other"];1149 var error = token.isEof ?1150 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1151 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1152 if (this.stopAtFirstError) throw error;1153 addError(context, error);1154 return 17;1155 }1156 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:01157 function matchTokenAt_18(token, context) {1158 if(match_Comment(context, token)) {1159 endRule(context, 'Description');1160 build(context, token);1161 return 19;1162 }1163 if(match_StepLine(context, token)) {1164 endRule(context, 'Description');1165 startRule(context, 'Step');1166 build(context, token);1167 return 20;1168 }1169 if(match_TagLine(context, token)) {1170 endRule(context, 'Description');1171 startRule(context, 'Examples');1172 startRule(context, 'Tags');1173 build(context, token);1174 return 22;1175 }1176 if(match_ExamplesLine(context, token)) {1177 endRule(context, 'Description');1178 startRule(context, 'Examples');1179 build(context, token);1180 return 23;1181 }1182 if(match_Other(context, token)) {1183 build(context, token);1184 return 18;1185 }1186 1187 var stateComment = "State: 18 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0";1188 token.detach();1189 var expectedTokens = ["#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Other"];1190 var error = token.isEof ?1191 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1192 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1193 if (this.stopAtFirstError) throw error;1194 addError(context, error);1195 return 18;1196 }1197 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:01198 function matchTokenAt_19(token, context) {1199 if(match_Comment(context, token)) {1200 build(context, token);1201 return 19;1202 }1203 if(match_StepLine(context, token)) {1204 startRule(context, 'Step');1205 build(context, token);1206 return 20;1207 }1208 if(match_TagLine(context, token)) {1209 startRule(context, 'Examples');1210 startRule(context, 'Tags');1211 build(context, token);1212 return 22;1213 }1214 if(match_ExamplesLine(context, token)) {1215 startRule(context, 'Examples');1216 build(context, token);1217 return 23;1218 }1219 if(match_Empty(context, token)) {1220 build(context, token);1221 return 19;1222 }1223 1224 var stateComment = "State: 19 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0";1225 token.detach();1226 var expectedTokens = ["#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Empty"];1227 var error = token.isEof ?1228 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1229 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1230 if (this.stopAtFirstError) throw error;1231 addError(context, error);1232 return 19;1233 }1234 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:01235 function matchTokenAt_20(token, context) {1236 if(match_TableRow(context, token)) {1237 startRule(context, 'DataTable');1238 build(context, token);1239 return 21;1240 }1241 if(match_DocStringSeparator(context, token)) {1242 startRule(context, 'DocString');1243 build(context, token);1244 return 29;1245 }1246 if(match_StepLine(context, token)) {1247 endRule(context, 'Step');1248 startRule(context, 'Step');1249 build(context, token);1250 return 20;1251 }1252 if(match_TagLine(context, token)) {1253 endRule(context, 'Step');1254 startRule(context, 'Examples');1255 startRule(context, 'Tags');1256 build(context, token);1257 return 22;1258 }1259 if(match_ExamplesLine(context, token)) {1260 endRule(context, 'Step');1261 startRule(context, 'Examples');1262 build(context, token);1263 return 23;1264 }1265 if(match_Comment(context, token)) {1266 build(context, token);1267 return 20;1268 }1269 if(match_Empty(context, token)) {1270 build(context, token);1271 return 20;1272 }1273 1274 var stateComment = "State: 20 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0";1275 token.detach();1276 var expectedTokens = ["#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1277 var error = token.isEof ?1278 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1279 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1280 if (this.stopAtFirstError) throw error;1281 addError(context, error);1282 return 20;1283 }1284 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:01285 function matchTokenAt_21(token, context) {1286 if(match_TableRow(context, token)) {1287 build(context, token);1288 return 21;1289 }1290 if(match_StepLine(context, token)) {1291 endRule(context, 'DataTable');1292 endRule(context, 'Step');1293 startRule(context, 'Step');1294 build(context, token);1295 return 20;1296 }1297 if(match_TagLine(context, token)) {1298 endRule(context, 'DataTable');1299 endRule(context, 'Step');1300 startRule(context, 'Examples');1301 startRule(context, 'Tags');1302 build(context, token);1303 return 22;1304 }1305 if(match_ExamplesLine(context, token)) {1306 endRule(context, 'DataTable');1307 endRule(context, 'Step');1308 startRule(context, 'Examples');1309 build(context, token);1310 return 23;1311 }1312 if(match_Comment(context, token)) {1313 build(context, token);1314 return 21;1315 }1316 if(match_Empty(context, token)) {1317 build(context, token);1318 return 21;1319 }1320 1321 var stateComment = "State: 21 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";1322 token.detach();1323 var expectedTokens = ["#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1324 var error = token.isEof ?1325 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1326 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1327 if (this.stopAtFirstError) throw error;1328 addError(context, error);1329 return 21;1330 }1331 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:0>Tags:0>#TagLine:01332 function matchTokenAt_22(token, context) {1333 if(match_TagLine(context, token)) {1334 build(context, token);1335 return 22;1336 }1337 if(match_ExamplesLine(context, token)) {1338 endRule(context, 'Tags');1339 build(context, token);1340 return 23;1341 }1342 if(match_Comment(context, token)) {1343 build(context, token);1344 return 22;1345 }1346 if(match_Empty(context, token)) {1347 build(context, token);1348 return 22;1349 }1350 1351 var stateComment = "State: 22 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:0>Tags:0>#TagLine:0";1352 token.detach();1353 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1354 var error = token.isEof ?1355 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1356 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1357 if (this.stopAtFirstError) throw error;1358 addError(context, error);1359 return 22;1360 }1361 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:1>#ExamplesLine:01362 function matchTokenAt_23(token, context) {1363 if(match_Empty(context, token)) {1364 build(context, token);1365 return 23;1366 }1367 if(match_Comment(context, token)) {1368 build(context, token);1369 return 25;1370 }1371 if(match_TableRow(context, token)) {1372 build(context, token);1373 return 26;1374 }1375 if(match_Other(context, token)) {1376 startRule(context, 'Description');1377 build(context, token);1378 return 24;1379 }1380 1381 var stateComment = "State: 23 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:1>#ExamplesLine:0";1382 token.detach();1383 var expectedTokens = ["#Empty", "#Comment", "#TableRow", "#Other"];1384 var error = token.isEof ?1385 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1386 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1387 if (this.stopAtFirstError) throw error;1388 addError(context, error);1389 return 23;1390 }1391 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:1>Description:0>#Other:01392 function matchTokenAt_24(token, context) {1393 if(match_Comment(context, token)) {1394 endRule(context, 'Description');1395 build(context, token);1396 return 25;1397 }1398 if(match_TableRow(context, token)) {1399 endRule(context, 'Description');1400 build(context, token);1401 return 26;1402 }1403 if(match_Other(context, token)) {1404 build(context, token);1405 return 24;1406 }1407 1408 var stateComment = "State: 24 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:1>Description:0>#Other:0";1409 token.detach();1410 var expectedTokens = ["#Comment", "#TableRow", "#Other"];1411 var error = token.isEof ?1412 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1413 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1414 if (this.stopAtFirstError) throw error;1415 addError(context, error);1416 return 24;1417 }1418 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:2>#Comment:01419 function matchTokenAt_25(token, context) {1420 if(match_Comment(context, token)) {1421 build(context, token);1422 return 25;1423 }1424 if(match_TableRow(context, token)) {1425 build(context, token);1426 return 26;1427 }1428 if(match_Empty(context, token)) {1429 build(context, token);1430 return 25;1431 }1432 1433 var stateComment = "State: 25 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:2>Examples_Description:0>Description_Helper:2>#Comment:0";1434 token.detach();1435 var expectedTokens = ["#Comment", "#TableRow", "#Empty"];1436 var error = token.isEof ?1437 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1438 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1439 if (this.stopAtFirstError) throw error;1440 addError(context, error);1441 return 25;1442 }1443 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:3>#TableRow:01444 function matchTokenAt_26(token, context) {1445 if(match_TableRow(context, token)) {1446 build(context, token);1447 return 27;1448 }1449 if(match_Comment(context, token)) {1450 build(context, token);1451 return 26;1452 }1453 if(match_Empty(context, token)) {1454 build(context, token);1455 return 26;1456 }1457 1458 var stateComment = "State: 26 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:3>#TableRow:0";1459 token.detach();1460 var expectedTokens = ["#TableRow", "#Comment", "#Empty"];1461 var error = token.isEof ?1462 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1463 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1464 if (this.stopAtFirstError) throw error;1465 addError(context, error);1466 return 26;1467 }1468 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:4>#TableRow:01469 function matchTokenAt_27(token, context) {1470 if(match_EOF(context, token)) {1471 endRule(context, 'Examples');1472 endRule(context, 'ScenarioOutline');1473 endRule(context, 'Scenario_Definition');1474 build(context, token);1475 return 28;1476 }1477 if(match_TableRow(context, token)) {1478 build(context, token);1479 return 27;1480 }1481 if(match_TagLine(context, token)) {1482 if(lookahead_0(context, token)) {1483 endRule(context, 'Examples');1484 startRule(context, 'Examples');1485 startRule(context, 'Tags');1486 build(context, token);1487 return 22;1488 }1489 }1490 if(match_TagLine(context, token)) {1491 endRule(context, 'Examples');1492 endRule(context, 'ScenarioOutline');1493 endRule(context, 'Scenario_Definition');1494 startRule(context, 'Scenario_Definition');1495 startRule(context, 'Tags');1496 build(context, token);1497 return 11;1498 }1499 if(match_ExamplesLine(context, token)) {1500 endRule(context, 'Examples');1501 startRule(context, 'Examples');1502 build(context, token);1503 return 23;1504 }1505 if(match_ScenarioLine(context, token)) {1506 endRule(context, 'Examples');1507 endRule(context, 'ScenarioOutline');1508 endRule(context, 'Scenario_Definition');1509 startRule(context, 'Scenario_Definition');1510 startRule(context, 'Scenario');1511 build(context, token);1512 return 12;1513 }1514 if(match_ScenarioOutlineLine(context, token)) {1515 endRule(context, 'Examples');1516 endRule(context, 'ScenarioOutline');1517 endRule(context, 'Scenario_Definition');1518 startRule(context, 'Scenario_Definition');1519 startRule(context, 'ScenarioOutline');1520 build(context, token);1521 return 17;1522 }1523 if(match_Comment(context, token)) {1524 build(context, token);1525 return 27;1526 }1527 if(match_Empty(context, token)) {1528 build(context, token);1529 return 27;1530 }1531 1532 var stateComment = "State: 27 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples:4>#TableRow:0";1533 token.detach();1534 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];1535 var error = token.isEof ?1536 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1537 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1538 if (this.stopAtFirstError) throw error;1539 addError(context, error);1540 return 27;1541 }1542 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:01543 function matchTokenAt_29(token, context) {1544 if(match_DocStringSeparator(context, token)) {1545 build(context, token);1546 return 30;1547 }1548 if(match_Other(context, token)) {1549 build(context, token);1550 return 29;1551 }1552 1553 var stateComment = "State: 29 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";1554 token.detach();1555 var expectedTokens = ["#DocStringSeparator", "#Other"];1556 var error = token.isEof ?1557 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1558 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1559 if (this.stopAtFirstError) throw error;1560 addError(context, error);1561 return 29;1562 }1563 // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:01564 function matchTokenAt_30(token, context) {1565 if(match_StepLine(context, token)) {1566 endRule(context, 'DocString');1567 endRule(context, 'Step');1568 startRule(context, 'Step');1569 build(context, token);1570 return 20;1571 }1572 if(match_TagLine(context, token)) {1573 endRule(context, 'DocString');1574 endRule(context, 'Step');1575 startRule(context, 'Examples');1576 startRule(context, 'Tags');1577 build(context, token);1578 return 22;1579 }1580 if(match_ExamplesLine(context, token)) {1581 endRule(context, 'DocString');1582 endRule(context, 'Step');1583 startRule(context, 'Examples');1584 build(context, token);1585 return 23;1586 }1587 if(match_Comment(context, token)) {1588 build(context, token);1589 return 30;1590 }1591 if(match_Empty(context, token)) {1592 build(context, token);1593 return 30;1594 }1595 1596 var stateComment = "State: 30 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";1597 token.detach();1598 var expectedTokens = ["#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1599 var error = token.isEof ?1600 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1601 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1602 if (this.stopAtFirstError) throw error;1603 addError(context, error);1604 return 30;1605 }1606 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:01607 function matchTokenAt_31(token, context) {1608 if(match_DocStringSeparator(context, token)) {1609 build(context, token);1610 return 32;1611 }1612 if(match_Other(context, token)) {1613 build(context, token);1614 return 31;1615 }1616 1617 var stateComment = "State: 31 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";1618 token.detach();1619 var expectedTokens = ["#DocStringSeparator", "#Other"];1620 var error = token.isEof ?1621 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1622 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1623 if (this.stopAtFirstError) throw error;1624 addError(context, error);1625 return 31;1626 }1627 // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:01628 function matchTokenAt_32(token, context) {1629 if(match_EOF(context, token)) {1630 endRule(context, 'DocString');1631 endRule(context, 'Step');1632 endRule(context, 'Scenario');1633 endRule(context, 'Scenario_Definition');1634 build(context, token);1635 return 28;1636 }1637 if(match_StepLine(context, token)) {1638 endRule(context, 'DocString');1639 endRule(context, 'Step');1640 startRule(context, 'Step');1641 build(context, token);1642 return 15;1643 }1644 if(match_TagLine(context, token)) {1645 endRule(context, 'DocString');1646 endRule(context, 'Step');1647 endRule(context, 'Scenario');1648 endRule(context, 'Scenario_Definition');1649 startRule(context, 'Scenario_Definition');1650 startRule(context, 'Tags');1651 build(context, token);1652 return 11;1653 }1654 if(match_ScenarioLine(context, token)) {1655 endRule(context, 'DocString');1656 endRule(context, 'Step');1657 endRule(context, 'Scenario');1658 endRule(context, 'Scenario_Definition');1659 startRule(context, 'Scenario_Definition');1660 startRule(context, 'Scenario');1661 build(context, token);1662 return 12;1663 }1664 if(match_ScenarioOutlineLine(context, token)) {1665 endRule(context, 'DocString');1666 endRule(context, 'Step');1667 endRule(context, 'Scenario');1668 endRule(context, 'Scenario_Definition');1669 startRule(context, 'Scenario_Definition');1670 startRule(context, 'ScenarioOutline');1671 build(context, token);1672 return 17;1673 }1674 if(match_Comment(context, token)) {1675 build(context, token);1676 return 32;1677 }1678 if(match_Empty(context, token)) {1679 build(context, token);1680 return 32;1681 }1682 1683 var stateComment = "State: 32 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";1684 token.detach();1685 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];1686 var error = token.isEof ?1687 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1688 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1689 if (this.stopAtFirstError) throw error;1690 addError(context, error);1691 return 32;1692 }1693 // Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:01694 function matchTokenAt_33(token, context) {1695 if(match_DocStringSeparator(context, token)) {1696 build(context, token);1697 return 34;1698 }1699 if(match_Other(context, token)) {1700 build(context, token);1701 return 33;1702 }1703 1704 var stateComment = "State: 33 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";1705 token.detach();1706 var expectedTokens = ["#DocStringSeparator", "#Other"];1707 var error = token.isEof ?1708 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1709 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1710 if (this.stopAtFirstError) throw error;1711 addError(context, error);1712 return 33;1713 }1714 // Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:01715 function matchTokenAt_34(token, context) {1716 if(match_EOF(context, token)) {1717 endRule(context, 'DocString');1718 endRule(context, 'Step');1719 endRule(context, 'Background');1720 build(context, token);1721 return 28;1722 }1723 if(match_StepLine(context, token)) {1724 endRule(context, 'DocString');1725 endRule(context, 'Step');1726 startRule(context, 'Step');1727 build(context, token);1728 return 9;1729 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('cucumber-gherkin');2var fs = require('fs');3var gherkinSource = fs.readFileSync('test.feature', 'utf8');4var tokenMatcher = new gherkin.TokenMatcher();5var tokenScanner = new gherkin.TokenScanner(gherkinSource);6var token = tokenScanner.peek();7var match = tokenMatcher.matchTokenAt_34(token, 0);8console.log(match);

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var gherkin = Cucumber.Gherkin;3var tokenMatcher = new gherkin.TokenMatcher();4var lexer = new gherkin.Lexer(tokenMatcher);5var tokenScanner = new gherkin.TokenScanner(lexer);6tokenScanner.scan('Feature: test');7var token = tokenScanner.peek(1);8var match = tokenMatcher.matchTokenAt_34(token, 1);9console.log(match);10I am trying to use cucumber-gherkin module in nodejs to match a token. I am able to use the matchTokenAt_34 method of Cucumber-gherkin module. But I am not able to get the value of the token. I tried using the getValue() method of token, but it is not working. Can anyone help me with this?11I am trying to use cucumber-gherkin module in nodejs to match a token. I am able to use the matchTokenAt_34 method of Cucumber-gherkin module. But I am not able to get the value of the token. I tried using the getValue() method of token, but it is not working. Can anyone help me with this?12I am trying to use cucumber-gherkin module in nodejs to match a token. I am able to use the matchTokenAt_34 method of Cucumber-gherkin module. But I am not able to get the value of the token. I tried using the getValue() method of token, but it is not working. Can anyone help me with this?13I am trying to use cucumber-gherkin module in nodejs to match a token. I am able to use the matchTokenAt_34 method of Cucumber-gherkin module. But I am not able to get the value of the token. I tried using the getValue() method of token, but it is not working. Can anyone help me with this?14I am trying to use cucumber-gherkin module in nodejs to match a token. I am able to use the matchTokenAt_34 method of Cucumber-gherkin module. But I am not able to get the value of the token. I tried using the getValue() method of token, but it is not working. Can anyone

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('cucumber-gherkin');2var fs = require('fs');3var gherkinSource = fs.readFileSync('test.feature', 'utf8');4var tokenMatcher = new gherkin.TokenMatcher();5var tokenScanner = new gherkin.TokenScanner(gherkinSource);6var token = tokenScanner.read();7while (token) {8 if (tokenMatcher.matchTokenAt_34(token, 0)) {9 console.log('Matched');10 }11 token = tokenScanner.read();12}13var gherkin = require('cucumber-gherkin');14var fs = require('fs');15var gherkinSource = fs.readFileSync('test.feature', 'utf8');16var tokenMatcher = new gherkin.TokenMatcher();17var tokenScanner = new gherkin.TokenScanner(gherkinSource);18var token = tokenScanner.read();19while (token) {20 if (tokenMatcher.matchTokenAt_34(token, 0)) {21 console.log('Matched');22 }23 token = tokenScanner.read();24}

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var gherkin = Cucumber.Gherkin();3var lexer = new gherkin.Lexer('en');4var tokenMatcher = new Cucumber.TokenMatcher();5var token = lexer.matchTokenAt_34('Given I am on the homepage', 0, tokenMatcher);6console.log(token);7var Cucumber = require('../../cucumber');8var Gherkin = Cucumber.Gherkin;9var Lexer = Gherkin.Lexer;10Lexer.prototype.matchTokenAt_34 = function matchTokenAt_34(lineText, offset, tokenMatcher) {11 var token = tokenMatcher.match_33(lineText, offset);12 if (token) {13 this.lastToken = token;14 return token;15 }16 else {17 var errorMessage = "Lexing error: could not match text starting at " + offset + ": " + lineText;18 throw new Error(errorMessage);19 }20};

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('gherkin');2var parser = new gherkin.Parser();3var lexer = new gherkin.Lexer();4var feature = parser.parse(lexer.lex('Feature: Test Feature'));5var token = feature.getFeatureChildren()[0].getTokens()[0];6console.log(token.matchTokenAt_34(0, 0, 0, 0));7{ keyword: 'Feature',8 type: 'FeatureLine' }

Full Screen

Cucumber Tutorial:

LambdaTest offers a detailed Cucumber testing tutorial, explaining its features, importance, best practices, and more to help you get started with running your automation testing scripts.

Cucumber Tutorial Chapters:

Here are the detailed Cucumber testing chapters to help you get started:

  • Importance of Cucumber - Learn why Cucumber is important in Selenium automation testing during the development phase to identify bugs and errors.
  • Setting Up Cucumber in Eclipse and IntelliJ - Learn how to set up Cucumber in Eclipse and IntelliJ.
  • Running First Cucumber.js Test Script - After successfully setting up your Cucumber in Eclipse or IntelliJ, this chapter will help you get started with Selenium Cucumber testing in no time.
  • Annotations in Cucumber - To handle multiple feature files and the multiple scenarios in each file, you need to use functionality to execute these scenarios. This chapter will help you learn about a handful of Cucumber annotations ranging from tags, Cucumber hooks, and more to ease the maintenance of the framework.
  • Automation Testing With Cucumber And Nightwatch JS - Learn how to build a robust BDD framework setup for performing Selenium automation testing by integrating Cucumber into the Nightwatch.js framework.
  • Automation Testing With Selenium, Cucumber & TestNG - Learn how to perform Selenium automation testing by integrating Cucumber with the TestNG framework.
  • Integrate Cucumber With Jenkins - By using Cucumber with Jenkins integration, you can schedule test case executions remotely and take advantage of the benefits of Jenkins. Learn how to integrate Cucumber with Jenkins with this detailed chapter.
  • Cucumber Best Practices For Selenium Automation - Take a deep dive into the advanced use cases, such as creating a feature file, separating feature files, and more for Cucumber testing.

Run Cucumber-gherkin automation tests on LambdaTest cloud grid

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

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful