How to use endRule method in Cucumber-gherkin

Best JavaScript code snippet using cucumber-gherkin

gherkin.js

Source:gherkin.js Github

copy

Full Screen

...3558 token = readToken(context);3559 state = matchToken(state, token, context);3560 if(token.isEof) break;3561 }3562 endRule(context, "GherkinDocument");3563 if(context.errors.length > 0) {3564 throw Errors.CompositeParserException.create(context.errors);3565 }3566 return getResult();3567 };3568 function addError(context, error) {3569 context.errors.push(error);3570 if (context.errors.length > 10)3571 throw Errors.CompositeParserException.create(context.errors);3572 }3573 function startRule(context, ruleType) {3574 handleAstError(context, function () {3575 builder.startRule(ruleType);3576 });3577 }3578 function endRule(context, ruleType) {3579 handleAstError(context, function () {3580 builder.endRule(ruleType);3581 });3582 }3583 function build(context, token) {3584 handleAstError(context, function () {3585 builder.build(token);3586 });3587 }3588 function getResult() {3589 return builder.getResult();3590 }3591 function handleAstError(context, action) {3592 handleExternalError(context, true, action)3593 }3594 function handleExternalError(context, defaultValue, action) {3595 if(self.stopAtFirstError) return action();3596 try {3597 return action();3598 } catch (e) {3599 if(e instanceof Errors.CompositeParserException) {3600 e.errors.forEach(function (error) {3601 addError(context, error);3602 });3603 } else if(3604 e instanceof Errors.ParserException ||3605 e instanceof Errors.AstBuilderException ||3606 e instanceof Errors.UnexpectedTokenException ||3607 e instanceof Errors.NoSuchLanguageException3608 ) {3609 addError(context, e);3610 } else {3611 throw e;3612 }3613 }3614 return defaultValue;3615 }3616 function readToken(context) {3617 return context.tokenQueue.length > 0 ?3618 context.tokenQueue.shift() :3619 context.tokenScanner.read();3620 }3621 function matchToken(state, token, context) {3622 switch(state) {3623 case 0:3624 return matchTokenAt_0(token, context);3625 case 1:3626 return matchTokenAt_1(token, context);3627 case 2:3628 return matchTokenAt_2(token, context);3629 case 3:3630 return matchTokenAt_3(token, context);3631 case 4:3632 return matchTokenAt_4(token, context);3633 case 5:3634 return matchTokenAt_5(token, context);3635 case 6:3636 return matchTokenAt_6(token, context);3637 case 7:3638 return matchTokenAt_7(token, context);3639 case 8:3640 return matchTokenAt_8(token, context);3641 case 9:3642 return matchTokenAt_9(token, context);3643 case 10:3644 return matchTokenAt_10(token, context);3645 case 11:3646 return matchTokenAt_11(token, context);3647 case 12:3648 return matchTokenAt_12(token, context);3649 case 13:3650 return matchTokenAt_13(token, context);3651 case 14:3652 return matchTokenAt_14(token, context);3653 case 15:3654 return matchTokenAt_15(token, context);3655 case 16:3656 return matchTokenAt_16(token, context);3657 case 17:3658 return matchTokenAt_17(token, context);3659 case 18:3660 return matchTokenAt_18(token, context);3661 case 19:3662 return matchTokenAt_19(token, context);3663 case 20:3664 return matchTokenAt_20(token, context);3665 case 21:3666 return matchTokenAt_21(token, context);3667 case 22:3668 return matchTokenAt_22(token, context);3669 case 23:3670 return matchTokenAt_23(token, context);3671 case 24:3672 return matchTokenAt_24(token, context);3673 case 25:3674 return matchTokenAt_25(token, context);3675 case 26:3676 return matchTokenAt_26(token, context);3677 case 28:3678 return matchTokenAt_28(token, context);3679 case 29:3680 return matchTokenAt_29(token, context);3681 case 30:3682 return matchTokenAt_30(token, context);3683 case 31:3684 return matchTokenAt_31(token, context);3685 case 32:3686 return matchTokenAt_32(token, context);3687 case 33:3688 return matchTokenAt_33(token, context);3689 default:3690 throw new Error("Unknown state: " + state);3691 }3692 }3693 // Start3694 function matchTokenAt_0(token, context) {3695 if(match_EOF(context, token)) {3696 build(context, token);3697 return 27;3698 }3699 if(match_Language(context, token)) {3700 startRule(context, 'Feature');3701 startRule(context, 'Feature_Header');3702 build(context, token);3703 return 1;3704 }3705 if(match_TagLine(context, token)) {3706 startRule(context, 'Feature');3707 startRule(context, 'Feature_Header');3708 startRule(context, 'Tags');3709 build(context, token);3710 return 2;3711 }3712 if(match_FeatureLine(context, token)) {3713 startRule(context, 'Feature');3714 startRule(context, 'Feature_Header');3715 build(context, token);3716 return 3;3717 }3718 if(match_Comment(context, token)) {3719 build(context, token);3720 return 0;3721 }3722 if(match_Empty(context, token)) {3723 build(context, token);3724 return 0;3725 }3726 3727 var stateComment = "State: 0 - Start";3728 token.detach();3729 var expectedTokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"];3730 var error = token.isEof ?3731 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3732 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3733 if (self.stopAtFirstError) throw error;3734 addError(context, error);3735 return 0;3736 }3737 // GherkinDocument:0>Feature:0>Feature_Header:0>#Language:03738 function matchTokenAt_1(token, context) {3739 if(match_TagLine(context, token)) {3740 startRule(context, 'Tags');3741 build(context, token);3742 return 2;3743 }3744 if(match_FeatureLine(context, token)) {3745 build(context, token);3746 return 3;3747 }3748 if(match_Comment(context, token)) {3749 build(context, token);3750 return 1;3751 }3752 if(match_Empty(context, token)) {3753 build(context, token);3754 return 1;3755 }3756 3757 var stateComment = "State: 1 - GherkinDocument:0>Feature:0>Feature_Header:0>#Language:0";3758 token.detach();3759 var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];3760 var error = token.isEof ?3761 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3762 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3763 if (self.stopAtFirstError) throw error;3764 addError(context, error);3765 return 1;3766 }3767 // GherkinDocument:0>Feature:0>Feature_Header:1>Tags:0>#TagLine:03768 function matchTokenAt_2(token, context) {3769 if(match_TagLine(context, token)) {3770 build(context, token);3771 return 2;3772 }3773 if(match_FeatureLine(context, token)) {3774 endRule(context, 'Tags');3775 build(context, token);3776 return 3;3777 }3778 if(match_Comment(context, token)) {3779 build(context, token);3780 return 2;3781 }3782 if(match_Empty(context, token)) {3783 build(context, token);3784 return 2;3785 }3786 3787 var stateComment = "State: 2 - GherkinDocument:0>Feature:0>Feature_Header:1>Tags:0>#TagLine:0";3788 token.detach();3789 var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];3790 var error = token.isEof ?3791 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3792 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3793 if (self.stopAtFirstError) throw error;3794 addError(context, error);3795 return 2;3796 }3797 // GherkinDocument:0>Feature:0>Feature_Header:2>#FeatureLine:03798 function matchTokenAt_3(token, context) {3799 if(match_EOF(context, token)) {3800 endRule(context, 'Feature_Header');3801 endRule(context, 'Feature');3802 build(context, token);3803 return 27;3804 }3805 if(match_Empty(context, token)) {3806 build(context, token);3807 return 3;3808 }3809 if(match_Comment(context, token)) {3810 build(context, token);3811 return 5;3812 }3813 if(match_BackgroundLine(context, token)) {3814 endRule(context, 'Feature_Header');3815 startRule(context, 'Background');3816 build(context, token);3817 return 6;3818 }3819 if(match_TagLine(context, token)) {3820 endRule(context, 'Feature_Header');3821 startRule(context, 'Scenario_Definition');3822 startRule(context, 'Tags');3823 build(context, token);3824 return 11;3825 }3826 if(match_ScenarioLine(context, token)) {3827 endRule(context, 'Feature_Header');3828 startRule(context, 'Scenario_Definition');3829 startRule(context, 'Scenario');3830 build(context, token);3831 return 12;3832 }3833 if(match_ScenarioOutlineLine(context, token)) {3834 endRule(context, 'Feature_Header');3835 startRule(context, 'Scenario_Definition');3836 startRule(context, 'ScenarioOutline');3837 build(context, token);3838 return 17;3839 }3840 if(match_Other(context, token)) {3841 startRule(context, 'Description');3842 build(context, token);3843 return 4;3844 }3845 3846 var stateComment = "State: 3 - GherkinDocument:0>Feature:0>Feature_Header:2>#FeatureLine:0";3847 token.detach();3848 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];3849 var error = token.isEof ?3850 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3851 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3852 if (self.stopAtFirstError) throw error;3853 addError(context, error);3854 return 3;3855 }3856 // GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:03857 function matchTokenAt_4(token, context) {3858 if(match_EOF(context, token)) {3859 endRule(context, 'Description');3860 endRule(context, 'Feature_Header');3861 endRule(context, 'Feature');3862 build(context, token);3863 return 27;3864 }3865 if(match_Comment(context, token)) {3866 endRule(context, 'Description');3867 build(context, token);3868 return 5;3869 }3870 if(match_BackgroundLine(context, token)) {3871 endRule(context, 'Description');3872 endRule(context, 'Feature_Header');3873 startRule(context, 'Background');3874 build(context, token);3875 return 6;3876 }3877 if(match_TagLine(context, token)) {3878 endRule(context, 'Description');3879 endRule(context, 'Feature_Header');3880 startRule(context, 'Scenario_Definition');3881 startRule(context, 'Tags');3882 build(context, token);3883 return 11;3884 }3885 if(match_ScenarioLine(context, token)) {3886 endRule(context, 'Description');3887 endRule(context, 'Feature_Header');3888 startRule(context, 'Scenario_Definition');3889 startRule(context, 'Scenario');3890 build(context, token);3891 return 12;3892 }3893 if(match_ScenarioOutlineLine(context, token)) {3894 endRule(context, 'Description');3895 endRule(context, 'Feature_Header');3896 startRule(context, 'Scenario_Definition');3897 startRule(context, 'ScenarioOutline');3898 build(context, token);3899 return 17;3900 }3901 if(match_Other(context, token)) {3902 build(context, token);3903 return 4;3904 }3905 3906 var stateComment = "State: 4 - GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0";3907 token.detach();3908 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];3909 var error = token.isEof ?3910 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3911 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3912 if (self.stopAtFirstError) throw error;3913 addError(context, error);3914 return 4;3915 }3916 // GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:03917 function matchTokenAt_5(token, context) {3918 if(match_EOF(context, token)) {3919 endRule(context, 'Feature_Header');3920 endRule(context, 'Feature');3921 build(context, token);3922 return 27;3923 }3924 if(match_Comment(context, token)) {3925 build(context, token);3926 return 5;3927 }3928 if(match_BackgroundLine(context, token)) {3929 endRule(context, 'Feature_Header');3930 startRule(context, 'Background');3931 build(context, token);3932 return 6;3933 }3934 if(match_TagLine(context, token)) {3935 endRule(context, 'Feature_Header');3936 startRule(context, 'Scenario_Definition');3937 startRule(context, 'Tags');3938 build(context, token);3939 return 11;3940 }3941 if(match_ScenarioLine(context, token)) {3942 endRule(context, 'Feature_Header');3943 startRule(context, 'Scenario_Definition');3944 startRule(context, 'Scenario');3945 build(context, token);3946 return 12;3947 }3948 if(match_ScenarioOutlineLine(context, token)) {3949 endRule(context, 'Feature_Header');3950 startRule(context, 'Scenario_Definition');3951 startRule(context, 'ScenarioOutline');3952 build(context, token);3953 return 17;3954 }3955 if(match_Empty(context, token)) {3956 build(context, token);3957 return 5;3958 }3959 3960 var stateComment = "State: 5 - GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0";3961 token.detach();3962 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];3963 var error = token.isEof ?3964 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3965 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3966 if (self.stopAtFirstError) throw error;3967 addError(context, error);3968 return 5;3969 }3970 // GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:03971 function matchTokenAt_6(token, context) {3972 if(match_EOF(context, token)) {3973 endRule(context, 'Background');3974 endRule(context, 'Feature');3975 build(context, token);3976 return 27;3977 }3978 if(match_Empty(context, token)) {3979 build(context, token);3980 return 6;3981 }3982 if(match_Comment(context, token)) {3983 build(context, token);3984 return 8;3985 }3986 if(match_StepLine(context, token)) {3987 startRule(context, 'Step');3988 build(context, token);3989 return 9;3990 }3991 if(match_TagLine(context, token)) {3992 endRule(context, 'Background');3993 startRule(context, 'Scenario_Definition');3994 startRule(context, 'Tags');3995 build(context, token);3996 return 11;3997 }3998 if(match_ScenarioLine(context, token)) {3999 endRule(context, 'Background');4000 startRule(context, 'Scenario_Definition');4001 startRule(context, 'Scenario');4002 build(context, token);4003 return 12;4004 }4005 if(match_ScenarioOutlineLine(context, token)) {4006 endRule(context, 'Background');4007 startRule(context, 'Scenario_Definition');4008 startRule(context, 'ScenarioOutline');4009 build(context, token);4010 return 17;4011 }4012 if(match_Other(context, token)) {4013 startRule(context, 'Description');4014 build(context, token);4015 return 7;4016 }4017 4018 var stateComment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0";4019 token.detach();4020 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4021 var error = token.isEof ?4022 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4023 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4024 if (self.stopAtFirstError) throw error;4025 addError(context, error);4026 return 6;4027 }4028 // GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:04029 function matchTokenAt_7(token, context) {4030 if(match_EOF(context, token)) {4031 endRule(context, 'Description');4032 endRule(context, 'Background');4033 endRule(context, 'Feature');4034 build(context, token);4035 return 27;4036 }4037 if(match_Comment(context, token)) {4038 endRule(context, 'Description');4039 build(context, token);4040 return 8;4041 }4042 if(match_StepLine(context, token)) {4043 endRule(context, 'Description');4044 startRule(context, 'Step');4045 build(context, token);4046 return 9;4047 }4048 if(match_TagLine(context, token)) {4049 endRule(context, 'Description');4050 endRule(context, 'Background');4051 startRule(context, 'Scenario_Definition');4052 startRule(context, 'Tags');4053 build(context, token);4054 return 11;4055 }4056 if(match_ScenarioLine(context, token)) {4057 endRule(context, 'Description');4058 endRule(context, 'Background');4059 startRule(context, 'Scenario_Definition');4060 startRule(context, 'Scenario');4061 build(context, token);4062 return 12;4063 }4064 if(match_ScenarioOutlineLine(context, token)) {4065 endRule(context, 'Description');4066 endRule(context, 'Background');4067 startRule(context, 'Scenario_Definition');4068 startRule(context, 'ScenarioOutline');4069 build(context, token);4070 return 17;4071 }4072 if(match_Other(context, token)) {4073 build(context, token);4074 return 7;4075 }4076 4077 var stateComment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0";4078 token.detach();4079 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4080 var error = token.isEof ?4081 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4082 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4083 if (self.stopAtFirstError) throw error;4084 addError(context, error);4085 return 7;4086 }4087 // GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:04088 function matchTokenAt_8(token, context) {4089 if(match_EOF(context, token)) {4090 endRule(context, 'Background');4091 endRule(context, 'Feature');4092 build(context, token);4093 return 27;4094 }4095 if(match_Comment(context, token)) {4096 build(context, token);4097 return 8;4098 }4099 if(match_StepLine(context, token)) {4100 startRule(context, 'Step');4101 build(context, token);4102 return 9;4103 }4104 if(match_TagLine(context, token)) {4105 endRule(context, 'Background');4106 startRule(context, 'Scenario_Definition');4107 startRule(context, 'Tags');4108 build(context, token);4109 return 11;4110 }4111 if(match_ScenarioLine(context, token)) {4112 endRule(context, 'Background');4113 startRule(context, 'Scenario_Definition');4114 startRule(context, 'Scenario');4115 build(context, token);4116 return 12;4117 }4118 if(match_ScenarioOutlineLine(context, token)) {4119 endRule(context, 'Background');4120 startRule(context, 'Scenario_Definition');4121 startRule(context, 'ScenarioOutline');4122 build(context, token);4123 return 17;4124 }4125 if(match_Empty(context, token)) {4126 build(context, token);4127 return 8;4128 }4129 4130 var stateComment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0";4131 token.detach();4132 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];4133 var error = token.isEof ?4134 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4135 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4136 if (self.stopAtFirstError) throw error;4137 addError(context, error);4138 return 8;4139 }4140 // GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:04141 function matchTokenAt_9(token, context) {4142 if(match_EOF(context, token)) {4143 endRule(context, 'Step');4144 endRule(context, 'Background');4145 endRule(context, 'Feature');4146 build(context, token);4147 return 27;4148 }4149 if(match_TableRow(context, token)) {4150 startRule(context, 'DataTable');4151 build(context, token);4152 return 10;4153 }4154 if(match_DocStringSeparator(context, token)) {4155 startRule(context, 'DocString');4156 build(context, token);4157 return 32;4158 }4159 if(match_StepLine(context, token)) {4160 endRule(context, 'Step');4161 startRule(context, 'Step');4162 build(context, token);4163 return 9;4164 }4165 if(match_TagLine(context, token)) {4166 endRule(context, 'Step');4167 endRule(context, 'Background');4168 startRule(context, 'Scenario_Definition');4169 startRule(context, 'Tags');4170 build(context, token);4171 return 11;4172 }4173 if(match_ScenarioLine(context, token)) {4174 endRule(context, 'Step');4175 endRule(context, 'Background');4176 startRule(context, 'Scenario_Definition');4177 startRule(context, 'Scenario');4178 build(context, token);4179 return 12;4180 }4181 if(match_ScenarioOutlineLine(context, token)) {4182 endRule(context, 'Step');4183 endRule(context, 'Background');4184 startRule(context, 'Scenario_Definition');4185 startRule(context, 'ScenarioOutline');4186 build(context, token);4187 return 17;4188 }4189 if(match_Comment(context, token)) {4190 build(context, token);4191 return 9;4192 }4193 if(match_Empty(context, token)) {4194 build(context, token);4195 return 9;4196 }4197 4198 var stateComment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0";4199 token.detach();4200 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4201 var error = token.isEof ?4202 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4203 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4204 if (self.stopAtFirstError) throw error;4205 addError(context, error);4206 return 9;4207 }4208 // GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:04209 function matchTokenAt_10(token, context) {4210 if(match_EOF(context, token)) {4211 endRule(context, 'DataTable');4212 endRule(context, 'Step');4213 endRule(context, 'Background');4214 endRule(context, 'Feature');4215 build(context, token);4216 return 27;4217 }4218 if(match_TableRow(context, token)) {4219 build(context, token);4220 return 10;4221 }4222 if(match_StepLine(context, token)) {4223 endRule(context, 'DataTable');4224 endRule(context, 'Step');4225 startRule(context, 'Step');4226 build(context, token);4227 return 9;4228 }4229 if(match_TagLine(context, token)) {4230 endRule(context, 'DataTable');4231 endRule(context, 'Step');4232 endRule(context, 'Background');4233 startRule(context, 'Scenario_Definition');4234 startRule(context, 'Tags');4235 build(context, token);4236 return 11;4237 }4238 if(match_ScenarioLine(context, token)) {4239 endRule(context, 'DataTable');4240 endRule(context, 'Step');4241 endRule(context, 'Background');4242 startRule(context, 'Scenario_Definition');4243 startRule(context, 'Scenario');4244 build(context, token);4245 return 12;4246 }4247 if(match_ScenarioOutlineLine(context, token)) {4248 endRule(context, 'DataTable');4249 endRule(context, 'Step');4250 endRule(context, 'Background');4251 startRule(context, 'Scenario_Definition');4252 startRule(context, 'ScenarioOutline');4253 build(context, token);4254 return 17;4255 }4256 if(match_Comment(context, token)) {4257 build(context, token);4258 return 10;4259 }4260 if(match_Empty(context, token)) {4261 build(context, token);4262 return 10;4263 }4264 4265 var stateComment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";4266 token.detach();4267 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4268 var error = token.isEof ?4269 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4270 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4271 if (self.stopAtFirstError) throw error;4272 addError(context, error);4273 return 10;4274 }4275 // GherkinDocument:0>Feature:2>Scenario_Definition:0>Tags:0>#TagLine:04276 function matchTokenAt_11(token, context) {4277 if(match_TagLine(context, token)) {4278 build(context, token);4279 return 11;4280 }4281 if(match_ScenarioLine(context, token)) {4282 endRule(context, 'Tags');4283 startRule(context, 'Scenario');4284 build(context, token);4285 return 12;4286 }4287 if(match_ScenarioOutlineLine(context, token)) {4288 endRule(context, 'Tags');4289 startRule(context, 'ScenarioOutline');4290 build(context, token);4291 return 17;4292 }4293 if(match_Comment(context, token)) {4294 build(context, token);4295 return 11;4296 }4297 if(match_Empty(context, token)) {4298 build(context, token);4299 return 11;4300 }4301 4302 var stateComment = "State: 11 - GherkinDocument:0>Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0";4303 token.detach();4304 var expectedTokens = ["#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4305 var error = token.isEof ?4306 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4307 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4308 if (self.stopAtFirstError) throw error;4309 addError(context, error);4310 return 11;4311 }4312 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:04313 function matchTokenAt_12(token, context) {4314 if(match_EOF(context, token)) {4315 endRule(context, 'Scenario');4316 endRule(context, 'Scenario_Definition');4317 endRule(context, 'Feature');4318 build(context, token);4319 return 27;4320 }4321 if(match_Empty(context, token)) {4322 build(context, token);4323 return 12;4324 }4325 if(match_Comment(context, token)) {4326 build(context, token);4327 return 14;4328 }4329 if(match_StepLine(context, token)) {4330 startRule(context, 'Step');4331 build(context, token);4332 return 15;4333 }4334 if(match_TagLine(context, token)) {4335 endRule(context, 'Scenario');4336 endRule(context, 'Scenario_Definition');4337 startRule(context, 'Scenario_Definition');4338 startRule(context, 'Tags');4339 build(context, token);4340 return 11;4341 }4342 if(match_ScenarioLine(context, token)) {4343 endRule(context, 'Scenario');4344 endRule(context, 'Scenario_Definition');4345 startRule(context, 'Scenario_Definition');4346 startRule(context, 'Scenario');4347 build(context, token);4348 return 12;4349 }4350 if(match_ScenarioOutlineLine(context, token)) {4351 endRule(context, 'Scenario');4352 endRule(context, 'Scenario_Definition');4353 startRule(context, 'Scenario_Definition');4354 startRule(context, 'ScenarioOutline');4355 build(context, token);4356 return 17;4357 }4358 if(match_Other(context, token)) {4359 startRule(context, 'Description');4360 build(context, token);4361 return 13;4362 }4363 4364 var stateComment = "State: 12 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0";4365 token.detach();4366 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4367 var error = token.isEof ?4368 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4369 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4370 if (self.stopAtFirstError) throw error;4371 addError(context, error);4372 return 12;4373 }4374 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:04375 function matchTokenAt_13(token, context) {4376 if(match_EOF(context, token)) {4377 endRule(context, 'Description');4378 endRule(context, 'Scenario');4379 endRule(context, 'Scenario_Definition');4380 endRule(context, 'Feature');4381 build(context, token);4382 return 27;4383 }4384 if(match_Comment(context, token)) {4385 endRule(context, 'Description');4386 build(context, token);4387 return 14;4388 }4389 if(match_StepLine(context, token)) {4390 endRule(context, 'Description');4391 startRule(context, 'Step');4392 build(context, token);4393 return 15;4394 }4395 if(match_TagLine(context, token)) {4396 endRule(context, 'Description');4397 endRule(context, 'Scenario');4398 endRule(context, 'Scenario_Definition');4399 startRule(context, 'Scenario_Definition');4400 startRule(context, 'Tags');4401 build(context, token);4402 return 11;4403 }4404 if(match_ScenarioLine(context, token)) {4405 endRule(context, 'Description');4406 endRule(context, 'Scenario');4407 endRule(context, 'Scenario_Definition');4408 startRule(context, 'Scenario_Definition');4409 startRule(context, 'Scenario');4410 build(context, token);4411 return 12;4412 }4413 if(match_ScenarioOutlineLine(context, token)) {4414 endRule(context, 'Description');4415 endRule(context, 'Scenario');4416 endRule(context, 'Scenario_Definition');4417 startRule(context, 'Scenario_Definition');4418 startRule(context, 'ScenarioOutline');4419 build(context, token);4420 return 17;4421 }4422 if(match_Other(context, token)) {4423 build(context, token);4424 return 13;4425 }4426 4427 var stateComment = "State: 13 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0";4428 token.detach();4429 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4430 var error = token.isEof ?4431 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4432 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4433 if (self.stopAtFirstError) throw error;4434 addError(context, error);4435 return 13;4436 }4437 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:04438 function matchTokenAt_14(token, context) {4439 if(match_EOF(context, token)) {4440 endRule(context, 'Scenario');4441 endRule(context, 'Scenario_Definition');4442 endRule(context, 'Feature');4443 build(context, token);4444 return 27;4445 }4446 if(match_Comment(context, token)) {4447 build(context, token);4448 return 14;4449 }4450 if(match_StepLine(context, token)) {4451 startRule(context, 'Step');4452 build(context, token);4453 return 15;4454 }4455 if(match_TagLine(context, token)) {4456 endRule(context, 'Scenario');4457 endRule(context, 'Scenario_Definition');4458 startRule(context, 'Scenario_Definition');4459 startRule(context, 'Tags');4460 build(context, token);4461 return 11;4462 }4463 if(match_ScenarioLine(context, token)) {4464 endRule(context, 'Scenario');4465 endRule(context, 'Scenario_Definition');4466 startRule(context, 'Scenario_Definition');4467 startRule(context, 'Scenario');4468 build(context, token);4469 return 12;4470 }4471 if(match_ScenarioOutlineLine(context, token)) {4472 endRule(context, 'Scenario');4473 endRule(context, 'Scenario_Definition');4474 startRule(context, 'Scenario_Definition');4475 startRule(context, 'ScenarioOutline');4476 build(context, token);4477 return 17;4478 }4479 if(match_Empty(context, token)) {4480 build(context, token);4481 return 14;4482 }4483 4484 var stateComment = "State: 14 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0";4485 token.detach();4486 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];4487 var error = token.isEof ?4488 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4489 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4490 if (self.stopAtFirstError) throw error;4491 addError(context, error);4492 return 14;4493 }4494 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:04495 function matchTokenAt_15(token, context) {4496 if(match_EOF(context, token)) {4497 endRule(context, 'Step');4498 endRule(context, 'Scenario');4499 endRule(context, 'Scenario_Definition');4500 endRule(context, 'Feature');4501 build(context, token);4502 return 27;4503 }4504 if(match_TableRow(context, token)) {4505 startRule(context, 'DataTable');4506 build(context, token);4507 return 16;4508 }4509 if(match_DocStringSeparator(context, token)) {4510 startRule(context, 'DocString');4511 build(context, token);4512 return 30;4513 }4514 if(match_StepLine(context, token)) {4515 endRule(context, 'Step');4516 startRule(context, 'Step');4517 build(context, token);4518 return 15;4519 }4520 if(match_TagLine(context, token)) {4521 endRule(context, 'Step');4522 endRule(context, 'Scenario');4523 endRule(context, 'Scenario_Definition');4524 startRule(context, 'Scenario_Definition');4525 startRule(context, 'Tags');4526 build(context, token);4527 return 11;4528 }4529 if(match_ScenarioLine(context, token)) {4530 endRule(context, 'Step');4531 endRule(context, 'Scenario');4532 endRule(context, 'Scenario_Definition');4533 startRule(context, 'Scenario_Definition');4534 startRule(context, 'Scenario');4535 build(context, token);4536 return 12;4537 }4538 if(match_ScenarioOutlineLine(context, token)) {4539 endRule(context, 'Step');4540 endRule(context, 'Scenario');4541 endRule(context, 'Scenario_Definition');4542 startRule(context, 'Scenario_Definition');4543 startRule(context, 'ScenarioOutline');4544 build(context, token);4545 return 17;4546 }4547 if(match_Comment(context, token)) {4548 build(context, token);4549 return 15;4550 }4551 if(match_Empty(context, token)) {4552 build(context, token);4553 return 15;4554 }4555 4556 var stateComment = "State: 15 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0";4557 token.detach();4558 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4559 var error = token.isEof ?4560 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4561 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4562 if (self.stopAtFirstError) throw error;4563 addError(context, error);4564 return 15;4565 }4566 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:04567 function matchTokenAt_16(token, context) {4568 if(match_EOF(context, token)) {4569 endRule(context, 'DataTable');4570 endRule(context, 'Step');4571 endRule(context, 'Scenario');4572 endRule(context, 'Scenario_Definition');4573 endRule(context, 'Feature');4574 build(context, token);4575 return 27;4576 }4577 if(match_TableRow(context, token)) {4578 build(context, token);4579 return 16;4580 }4581 if(match_StepLine(context, token)) {4582 endRule(context, 'DataTable');4583 endRule(context, 'Step');4584 startRule(context, 'Step');4585 build(context, token);4586 return 15;4587 }4588 if(match_TagLine(context, token)) {4589 endRule(context, 'DataTable');4590 endRule(context, 'Step');4591 endRule(context, 'Scenario');4592 endRule(context, 'Scenario_Definition');4593 startRule(context, 'Scenario_Definition');4594 startRule(context, 'Tags');4595 build(context, token);4596 return 11;4597 }4598 if(match_ScenarioLine(context, token)) {4599 endRule(context, 'DataTable');4600 endRule(context, 'Step');4601 endRule(context, 'Scenario');4602 endRule(context, 'Scenario_Definition');4603 startRule(context, 'Scenario_Definition');4604 startRule(context, 'Scenario');4605 build(context, token);4606 return 12;4607 }4608 if(match_ScenarioOutlineLine(context, token)) {4609 endRule(context, 'DataTable');4610 endRule(context, 'Step');4611 endRule(context, 'Scenario');4612 endRule(context, 'Scenario_Definition');4613 startRule(context, 'Scenario_Definition');4614 startRule(context, 'ScenarioOutline');4615 build(context, token);4616 return 17;4617 }4618 if(match_Comment(context, token)) {4619 build(context, token);4620 return 16;4621 }4622 if(match_Empty(context, token)) {4623 build(context, token);4624 return 16;4625 }4626 4627 var stateComment = "State: 16 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";4628 token.detach();4629 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4630 var error = token.isEof ?4631 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4632 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4633 if (self.stopAtFirstError) throw error;4634 addError(context, error);4635 return 16;4636 }4637 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:04638 function matchTokenAt_17(token, context) {4639 if(match_EOF(context, token)) {4640 endRule(context, 'ScenarioOutline');4641 endRule(context, 'Scenario_Definition');4642 endRule(context, 'Feature');4643 build(context, token);4644 return 27;4645 }4646 if(match_Empty(context, token)) {4647 build(context, token);4648 return 17;4649 }4650 if(match_Comment(context, token)) {4651 build(context, token);4652 return 19;4653 }4654 if(match_StepLine(context, token)) {4655 startRule(context, 'Step');4656 build(context, token);4657 return 20;4658 }4659 if(match_TagLine(context, token)) {4660 if(lookahead_0(context, token)) {4661 startRule(context, 'Examples_Definition');4662 startRule(context, 'Tags');4663 build(context, token);4664 return 22;4665 }4666 }4667 if(match_TagLine(context, token)) {4668 endRule(context, 'ScenarioOutline');4669 endRule(context, 'Scenario_Definition');4670 startRule(context, 'Scenario_Definition');4671 startRule(context, 'Tags');4672 build(context, token);4673 return 11;4674 }4675 if(match_ExamplesLine(context, token)) {4676 startRule(context, 'Examples_Definition');4677 startRule(context, 'Examples');4678 build(context, token);4679 return 23;4680 }4681 if(match_ScenarioLine(context, token)) {4682 endRule(context, 'ScenarioOutline');4683 endRule(context, 'Scenario_Definition');4684 startRule(context, 'Scenario_Definition');4685 startRule(context, 'Scenario');4686 build(context, token);4687 return 12;4688 }4689 if(match_ScenarioOutlineLine(context, token)) {4690 endRule(context, 'ScenarioOutline');4691 endRule(context, 'Scenario_Definition');4692 startRule(context, 'Scenario_Definition');4693 startRule(context, 'ScenarioOutline');4694 build(context, token);4695 return 17;4696 }4697 if(match_Other(context, token)) {4698 startRule(context, 'Description');4699 build(context, token);4700 return 18;4701 }4702 4703 var stateComment = "State: 17 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0";4704 token.detach();4705 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4706 var error = token.isEof ?4707 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4708 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4709 if (self.stopAtFirstError) throw error;4710 addError(context, error);4711 return 17;4712 }4713 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:04714 function matchTokenAt_18(token, context) {4715 if(match_EOF(context, token)) {4716 endRule(context, 'Description');4717 endRule(context, 'ScenarioOutline');4718 endRule(context, 'Scenario_Definition');4719 endRule(context, 'Feature');4720 build(context, token);4721 return 27;4722 }4723 if(match_Comment(context, token)) {4724 endRule(context, 'Description');4725 build(context, token);4726 return 19;4727 }4728 if(match_StepLine(context, token)) {4729 endRule(context, 'Description');4730 startRule(context, 'Step');4731 build(context, token);4732 return 20;4733 }4734 if(match_TagLine(context, token)) {4735 if(lookahead_0(context, token)) {4736 endRule(context, 'Description');4737 startRule(context, 'Examples_Definition');4738 startRule(context, 'Tags');4739 build(context, token);4740 return 22;4741 }4742 }4743 if(match_TagLine(context, token)) {4744 endRule(context, 'Description');4745 endRule(context, 'ScenarioOutline');4746 endRule(context, 'Scenario_Definition');4747 startRule(context, 'Scenario_Definition');4748 startRule(context, 'Tags');4749 build(context, token);4750 return 11;4751 }4752 if(match_ExamplesLine(context, token)) {4753 endRule(context, 'Description');4754 startRule(context, 'Examples_Definition');4755 startRule(context, 'Examples');4756 build(context, token);4757 return 23;4758 }4759 if(match_ScenarioLine(context, token)) {4760 endRule(context, 'Description');4761 endRule(context, 'ScenarioOutline');4762 endRule(context, 'Scenario_Definition');4763 startRule(context, 'Scenario_Definition');4764 startRule(context, 'Scenario');4765 build(context, token);4766 return 12;4767 }4768 if(match_ScenarioOutlineLine(context, token)) {4769 endRule(context, 'Description');4770 endRule(context, 'ScenarioOutline');4771 endRule(context, 'Scenario_Definition');4772 startRule(context, 'Scenario_Definition');4773 startRule(context, 'ScenarioOutline');4774 build(context, token);4775 return 17;4776 }4777 if(match_Other(context, token)) {4778 build(context, token);4779 return 18;4780 }4781 4782 var stateComment = "State: 18 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0";4783 token.detach();4784 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4785 var error = token.isEof ?4786 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4787 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4788 if (self.stopAtFirstError) throw error;4789 addError(context, error);4790 return 18;4791 }4792 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:04793 function matchTokenAt_19(token, context) {4794 if(match_EOF(context, token)) {4795 endRule(context, 'ScenarioOutline');4796 endRule(context, 'Scenario_Definition');4797 endRule(context, 'Feature');4798 build(context, token);4799 return 27;4800 }4801 if(match_Comment(context, token)) {4802 build(context, token);4803 return 19;4804 }4805 if(match_StepLine(context, token)) {4806 startRule(context, 'Step');4807 build(context, token);4808 return 20;4809 }4810 if(match_TagLine(context, token)) {4811 if(lookahead_0(context, token)) {4812 startRule(context, 'Examples_Definition');4813 startRule(context, 'Tags');4814 build(context, token);4815 return 22;4816 }4817 }4818 if(match_TagLine(context, token)) {4819 endRule(context, 'ScenarioOutline');4820 endRule(context, 'Scenario_Definition');4821 startRule(context, 'Scenario_Definition');4822 startRule(context, 'Tags');4823 build(context, token);4824 return 11;4825 }4826 if(match_ExamplesLine(context, token)) {4827 startRule(context, 'Examples_Definition');4828 startRule(context, 'Examples');4829 build(context, token);4830 return 23;4831 }4832 if(match_ScenarioLine(context, token)) {4833 endRule(context, 'ScenarioOutline');4834 endRule(context, 'Scenario_Definition');4835 startRule(context, 'Scenario_Definition');4836 startRule(context, 'Scenario');4837 build(context, token);4838 return 12;4839 }4840 if(match_ScenarioOutlineLine(context, token)) {4841 endRule(context, 'ScenarioOutline');4842 endRule(context, 'Scenario_Definition');4843 startRule(context, 'Scenario_Definition');4844 startRule(context, 'ScenarioOutline');4845 build(context, token);4846 return 17;4847 }4848 if(match_Empty(context, token)) {4849 build(context, token);4850 return 19;4851 }4852 4853 var stateComment = "State: 19 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0";4854 token.detach();4855 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];4856 var error = token.isEof ?4857 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4858 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4859 if (self.stopAtFirstError) throw error;4860 addError(context, error);4861 return 19;4862 }4863 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:04864 function matchTokenAt_20(token, context) {4865 if(match_EOF(context, token)) {4866 endRule(context, 'Step');4867 endRule(context, 'ScenarioOutline');4868 endRule(context, 'Scenario_Definition');4869 endRule(context, 'Feature');4870 build(context, token);4871 return 27;4872 }4873 if(match_TableRow(context, token)) {4874 startRule(context, 'DataTable');4875 build(context, token);4876 return 21;4877 }4878 if(match_DocStringSeparator(context, token)) {4879 startRule(context, 'DocString');4880 build(context, token);4881 return 28;4882 }4883 if(match_StepLine(context, token)) {4884 endRule(context, 'Step');4885 startRule(context, 'Step');4886 build(context, token);4887 return 20;4888 }4889 if(match_TagLine(context, token)) {4890 if(lookahead_0(context, token)) {4891 endRule(context, 'Step');4892 startRule(context, 'Examples_Definition');4893 startRule(context, 'Tags');4894 build(context, token);4895 return 22;4896 }4897 }4898 if(match_TagLine(context, token)) {4899 endRule(context, 'Step');4900 endRule(context, 'ScenarioOutline');4901 endRule(context, 'Scenario_Definition');4902 startRule(context, 'Scenario_Definition');4903 startRule(context, 'Tags');4904 build(context, token);4905 return 11;4906 }4907 if(match_ExamplesLine(context, token)) {4908 endRule(context, 'Step');4909 startRule(context, 'Examples_Definition');4910 startRule(context, 'Examples');4911 build(context, token);4912 return 23;4913 }4914 if(match_ScenarioLine(context, token)) {4915 endRule(context, 'Step');4916 endRule(context, 'ScenarioOutline');4917 endRule(context, 'Scenario_Definition');4918 startRule(context, 'Scenario_Definition');4919 startRule(context, 'Scenario');4920 build(context, token);4921 return 12;4922 }4923 if(match_ScenarioOutlineLine(context, token)) {4924 endRule(context, 'Step');4925 endRule(context, 'ScenarioOutline');4926 endRule(context, 'Scenario_Definition');4927 startRule(context, 'Scenario_Definition');4928 startRule(context, 'ScenarioOutline');4929 build(context, token);4930 return 17;4931 }4932 if(match_Comment(context, token)) {4933 build(context, token);4934 return 20;4935 }4936 if(match_Empty(context, token)) {4937 build(context, token);4938 return 20;4939 }4940 4941 var stateComment = "State: 20 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0";4942 token.detach();4943 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4944 var error = token.isEof ?4945 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4946 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4947 if (self.stopAtFirstError) throw error;4948 addError(context, error);4949 return 20;4950 }4951 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:04952 function matchTokenAt_21(token, context) {4953 if(match_EOF(context, token)) {4954 endRule(context, 'DataTable');4955 endRule(context, 'Step');4956 endRule(context, 'ScenarioOutline');4957 endRule(context, 'Scenario_Definition');4958 endRule(context, 'Feature');4959 build(context, token);4960 return 27;4961 }4962 if(match_TableRow(context, token)) {4963 build(context, token);4964 return 21;4965 }4966 if(match_StepLine(context, token)) {4967 endRule(context, 'DataTable');4968 endRule(context, 'Step');4969 startRule(context, 'Step');4970 build(context, token);4971 return 20;4972 }4973 if(match_TagLine(context, token)) {4974 if(lookahead_0(context, token)) {4975 endRule(context, 'DataTable');4976 endRule(context, 'Step');4977 startRule(context, 'Examples_Definition');4978 startRule(context, 'Tags');4979 build(context, token);4980 return 22;4981 }4982 }4983 if(match_TagLine(context, token)) {4984 endRule(context, 'DataTable');4985 endRule(context, 'Step');4986 endRule(context, 'ScenarioOutline');4987 endRule(context, 'Scenario_Definition');4988 startRule(context, 'Scenario_Definition');4989 startRule(context, 'Tags');4990 build(context, token);4991 return 11;4992 }4993 if(match_ExamplesLine(context, token)) {4994 endRule(context, 'DataTable');4995 endRule(context, 'Step');4996 startRule(context, 'Examples_Definition');4997 startRule(context, 'Examples');4998 build(context, token);4999 return 23;5000 }5001 if(match_ScenarioLine(context, token)) {5002 endRule(context, 'DataTable');5003 endRule(context, 'Step');5004 endRule(context, 'ScenarioOutline');5005 endRule(context, 'Scenario_Definition');5006 startRule(context, 'Scenario_Definition');5007 startRule(context, 'Scenario');5008 build(context, token);5009 return 12;5010 }5011 if(match_ScenarioOutlineLine(context, token)) {5012 endRule(context, 'DataTable');5013 endRule(context, 'Step');5014 endRule(context, 'ScenarioOutline');5015 endRule(context, 'Scenario_Definition');5016 startRule(context, 'Scenario_Definition');5017 startRule(context, 'ScenarioOutline');5018 build(context, token);5019 return 17;5020 }5021 if(match_Comment(context, token)) {5022 build(context, token);5023 return 21;5024 }5025 if(match_Empty(context, token)) {5026 build(context, token);5027 return 21;5028 }5029 5030 var stateComment = "State: 21 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";5031 token.detach();5032 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5033 var error = token.isEof ?5034 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5035 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5036 if (self.stopAtFirstError) throw error;5037 addError(context, error);5038 return 21;5039 }5040 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:05041 function matchTokenAt_22(token, context) {5042 if(match_TagLine(context, token)) {5043 build(context, token);5044 return 22;5045 }5046 if(match_ExamplesLine(context, token)) {5047 endRule(context, 'Tags');5048 startRule(context, 'Examples');5049 build(context, token);5050 return 23;5051 }5052 if(match_Comment(context, token)) {5053 build(context, token);5054 return 22;5055 }5056 if(match_Empty(context, token)) {5057 build(context, token);5058 return 22;5059 }5060 5061 var stateComment = "State: 22 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0";5062 token.detach();5063 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];5064 var error = token.isEof ?5065 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5066 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5067 if (self.stopAtFirstError) throw error;5068 addError(context, error);5069 return 22;5070 }5071 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:05072 function matchTokenAt_23(token, context) {5073 if(match_EOF(context, token)) {5074 endRule(context, 'Examples');5075 endRule(context, 'Examples_Definition');5076 endRule(context, 'ScenarioOutline');5077 endRule(context, 'Scenario_Definition');5078 endRule(context, 'Feature');5079 build(context, token);5080 return 27;5081 }5082 if(match_Empty(context, token)) {5083 build(context, token);5084 return 23;5085 }5086 if(match_Comment(context, token)) {5087 build(context, token);5088 return 25;5089 }5090 if(match_TableRow(context, token)) {5091 startRule(context, 'Examples_Table');5092 build(context, token);5093 return 26;5094 }5095 if(match_TagLine(context, token)) {5096 if(lookahead_0(context, token)) {5097 endRule(context, 'Examples');5098 endRule(context, 'Examples_Definition');5099 startRule(context, 'Examples_Definition');5100 startRule(context, 'Tags');5101 build(context, token);5102 return 22;5103 }5104 }5105 if(match_TagLine(context, token)) {5106 endRule(context, 'Examples');5107 endRule(context, 'Examples_Definition');5108 endRule(context, 'ScenarioOutline');5109 endRule(context, 'Scenario_Definition');5110 startRule(context, 'Scenario_Definition');5111 startRule(context, 'Tags');5112 build(context, token);5113 return 11;5114 }5115 if(match_ExamplesLine(context, token)) {5116 endRule(context, 'Examples');5117 endRule(context, 'Examples_Definition');5118 startRule(context, 'Examples_Definition');5119 startRule(context, 'Examples');5120 build(context, token);5121 return 23;5122 }5123 if(match_ScenarioLine(context, token)) {5124 endRule(context, 'Examples');5125 endRule(context, 'Examples_Definition');5126 endRule(context, 'ScenarioOutline');5127 endRule(context, 'Scenario_Definition');5128 startRule(context, 'Scenario_Definition');5129 startRule(context, 'Scenario');5130 build(context, token);5131 return 12;5132 }5133 if(match_ScenarioOutlineLine(context, token)) {5134 endRule(context, 'Examples');5135 endRule(context, 'Examples_Definition');5136 endRule(context, 'ScenarioOutline');5137 endRule(context, 'Scenario_Definition');5138 startRule(context, 'Scenario_Definition');5139 startRule(context, 'ScenarioOutline');5140 build(context, token);5141 return 17;5142 }5143 if(match_Other(context, token)) {5144 startRule(context, 'Description');5145 build(context, token);5146 return 24;5147 }5148 5149 var stateComment = "State: 23 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0";5150 token.detach();5151 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];5152 var error = token.isEof ?5153 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5154 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5155 if (self.stopAtFirstError) throw error;5156 addError(context, error);5157 return 23;5158 }5159 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:05160 function matchTokenAt_24(token, context) {5161 if(match_EOF(context, token)) {5162 endRule(context, 'Description');5163 endRule(context, 'Examples');5164 endRule(context, 'Examples_Definition');5165 endRule(context, 'ScenarioOutline');5166 endRule(context, 'Scenario_Definition');5167 endRule(context, 'Feature');5168 build(context, token);5169 return 27;5170 }5171 if(match_Comment(context, token)) {5172 endRule(context, 'Description');5173 build(context, token);5174 return 25;5175 }5176 if(match_TableRow(context, token)) {5177 endRule(context, 'Description');5178 startRule(context, 'Examples_Table');5179 build(context, token);5180 return 26;5181 }5182 if(match_TagLine(context, token)) {5183 if(lookahead_0(context, token)) {5184 endRule(context, 'Description');5185 endRule(context, 'Examples');5186 endRule(context, 'Examples_Definition');5187 startRule(context, 'Examples_Definition');5188 startRule(context, 'Tags');5189 build(context, token);5190 return 22;5191 }5192 }5193 if(match_TagLine(context, token)) {5194 endRule(context, 'Description');5195 endRule(context, 'Examples');5196 endRule(context, 'Examples_Definition');5197 endRule(context, 'ScenarioOutline');5198 endRule(context, 'Scenario_Definition');5199 startRule(context, 'Scenario_Definition');5200 startRule(context, 'Tags');5201 build(context, token);5202 return 11;5203 }5204 if(match_ExamplesLine(context, token)) {5205 endRule(context, 'Description');5206 endRule(context, 'Examples');5207 endRule(context, 'Examples_Definition');5208 startRule(context, 'Examples_Definition');5209 startRule(context, 'Examples');5210 build(context, token);5211 return 23;5212 }5213 if(match_ScenarioLine(context, token)) {5214 endRule(context, 'Description');5215 endRule(context, 'Examples');5216 endRule(context, 'Examples_Definition');5217 endRule(context, 'ScenarioOutline');5218 endRule(context, 'Scenario_Definition');5219 startRule(context, 'Scenario_Definition');5220 startRule(context, 'Scenario');5221 build(context, token);5222 return 12;5223 }5224 if(match_ScenarioOutlineLine(context, token)) {5225 endRule(context, 'Description');5226 endRule(context, 'Examples');5227 endRule(context, 'Examples_Definition');5228 endRule(context, 'ScenarioOutline');5229 endRule(context, 'Scenario_Definition');5230 startRule(context, 'Scenario_Definition');5231 startRule(context, 'ScenarioOutline');5232 build(context, token);5233 return 17;5234 }5235 if(match_Other(context, token)) {5236 build(context, token);5237 return 24;5238 }5239 5240 var stateComment = "State: 24 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:0";5241 token.detach();5242 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];5243 var error = token.isEof ?5244 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5245 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5246 if (self.stopAtFirstError) throw error;5247 addError(context, error);5248 return 24;5249 }5250 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:05251 function matchTokenAt_25(token, context) {5252 if(match_EOF(context, token)) {5253 endRule(context, 'Examples');5254 endRule(context, 'Examples_Definition');5255 endRule(context, 'ScenarioOutline');5256 endRule(context, 'Scenario_Definition');5257 endRule(context, 'Feature');5258 build(context, token);5259 return 27;5260 }5261 if(match_Comment(context, token)) {5262 build(context, token);5263 return 25;5264 }5265 if(match_TableRow(context, token)) {5266 startRule(context, 'Examples_Table');5267 build(context, token);5268 return 26;5269 }5270 if(match_TagLine(context, token)) {5271 if(lookahead_0(context, token)) {5272 endRule(context, 'Examples');5273 endRule(context, 'Examples_Definition');5274 startRule(context, 'Examples_Definition');5275 startRule(context, 'Tags');5276 build(context, token);5277 return 22;5278 }5279 }5280 if(match_TagLine(context, token)) {5281 endRule(context, 'Examples');5282 endRule(context, 'Examples_Definition');5283 endRule(context, 'ScenarioOutline');5284 endRule(context, 'Scenario_Definition');5285 startRule(context, 'Scenario_Definition');5286 startRule(context, 'Tags');5287 build(context, token);5288 return 11;5289 }5290 if(match_ExamplesLine(context, token)) {5291 endRule(context, 'Examples');5292 endRule(context, 'Examples_Definition');5293 startRule(context, 'Examples_Definition');5294 startRule(context, 'Examples');5295 build(context, token);5296 return 23;5297 }5298 if(match_ScenarioLine(context, token)) {5299 endRule(context, 'Examples');5300 endRule(context, 'Examples_Definition');5301 endRule(context, 'ScenarioOutline');5302 endRule(context, 'Scenario_Definition');5303 startRule(context, 'Scenario_Definition');5304 startRule(context, 'Scenario');5305 build(context, token);5306 return 12;5307 }5308 if(match_ScenarioOutlineLine(context, token)) {5309 endRule(context, 'Examples');5310 endRule(context, 'Examples_Definition');5311 endRule(context, 'ScenarioOutline');5312 endRule(context, 'Scenario_Definition');5313 startRule(context, 'Scenario_Definition');5314 startRule(context, 'ScenarioOutline');5315 build(context, token);5316 return 17;5317 }5318 if(match_Empty(context, token)) {5319 build(context, token);5320 return 25;5321 }5322 5323 var stateComment = "State: 25 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:0";5324 token.detach();5325 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];5326 var error = token.isEof ?5327 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5328 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5329 if (self.stopAtFirstError) throw error;5330 addError(context, error);5331 return 25;5332 }5333 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:05334 function matchTokenAt_26(token, context) {5335 if(match_EOF(context, token)) {5336 endRule(context, 'Examples_Table');5337 endRule(context, 'Examples');5338 endRule(context, 'Examples_Definition');5339 endRule(context, 'ScenarioOutline');5340 endRule(context, 'Scenario_Definition');5341 endRule(context, 'Feature');5342 build(context, token);5343 return 27;5344 }5345 if(match_TableRow(context, token)) {5346 build(context, token);5347 return 26;5348 }5349 if(match_TagLine(context, token)) {5350 if(lookahead_0(context, token)) {5351 endRule(context, 'Examples_Table');5352 endRule(context, 'Examples');5353 endRule(context, 'Examples_Definition');5354 startRule(context, 'Examples_Definition');5355 startRule(context, 'Tags');5356 build(context, token);5357 return 22;5358 }5359 }5360 if(match_TagLine(context, token)) {5361 endRule(context, 'Examples_Table');5362 endRule(context, 'Examples');5363 endRule(context, 'Examples_Definition');5364 endRule(context, 'ScenarioOutline');5365 endRule(context, 'Scenario_Definition');5366 startRule(context, 'Scenario_Definition');5367 startRule(context, 'Tags');5368 build(context, token);5369 return 11;5370 }5371 if(match_ExamplesLine(context, token)) {5372 endRule(context, 'Examples_Table');5373 endRule(context, 'Examples');5374 endRule(context, 'Examples_Definition');5375 startRule(context, 'Examples_Definition');5376 startRule(context, 'Examples');5377 build(context, token);5378 return 23;5379 }5380 if(match_ScenarioLine(context, token)) {5381 endRule(context, 'Examples_Table');5382 endRule(context, 'Examples');5383 endRule(context, 'Examples_Definition');5384 endRule(context, 'ScenarioOutline');5385 endRule(context, 'Scenario_Definition');5386 startRule(context, 'Scenario_Definition');5387 startRule(context, 'Scenario');5388 build(context, token);5389 return 12;5390 }5391 if(match_ScenarioOutlineLine(context, token)) {5392 endRule(context, 'Examples_Table');5393 endRule(context, 'Examples');5394 endRule(context, 'Examples_Definition');5395 endRule(context, 'ScenarioOutline');5396 endRule(context, 'Scenario_Definition');5397 startRule(context, 'Scenario_Definition');5398 startRule(context, 'ScenarioOutline');5399 build(context, token);5400 return 17;5401 }5402 if(match_Comment(context, token)) {5403 build(context, token);5404 return 26;5405 }5406 if(match_Empty(context, token)) {5407 build(context, token);5408 return 26;5409 }5410 5411 var stateComment = "State: 26 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:0";5412 token.detach();5413 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5414 var error = token.isEof ?5415 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5416 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5417 if (self.stopAtFirstError) throw error;5418 addError(context, error);5419 return 26;5420 }5421 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:05422 function matchTokenAt_28(token, context) {5423 if(match_DocStringSeparator(context, token)) {5424 build(context, token);5425 return 29;5426 }5427 if(match_Other(context, token)) {5428 build(context, token);5429 return 28;5430 }5431 5432 var stateComment = "State: 28 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";5433 token.detach();5434 var expectedTokens = ["#DocStringSeparator", "#Other"];5435 var error = token.isEof ?5436 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5437 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5438 if (self.stopAtFirstError) throw error;5439 addError(context, error);5440 return 28;5441 }5442 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:05443 function matchTokenAt_29(token, context) {5444 if(match_EOF(context, token)) {5445 endRule(context, 'DocString');5446 endRule(context, 'Step');5447 endRule(context, 'ScenarioOutline');5448 endRule(context, 'Scenario_Definition');5449 endRule(context, 'Feature');5450 build(context, token);5451 return 27;5452 }5453 if(match_StepLine(context, token)) {5454 endRule(context, 'DocString');5455 endRule(context, 'Step');5456 startRule(context, 'Step');5457 build(context, token);5458 return 20;5459 }5460 if(match_TagLine(context, token)) {5461 if(lookahead_0(context, token)) {5462 endRule(context, 'DocString');5463 endRule(context, 'Step');5464 startRule(context, 'Examples_Definition');5465 startRule(context, 'Tags');5466 build(context, token);5467 return 22;5468 }5469 }5470 if(match_TagLine(context, token)) {5471 endRule(context, 'DocString');5472 endRule(context, 'Step');5473 endRule(context, 'ScenarioOutline');5474 endRule(context, 'Scenario_Definition');5475 startRule(context, 'Scenario_Definition');5476 startRule(context, 'Tags');5477 build(context, token);5478 return 11;5479 }5480 if(match_ExamplesLine(context, token)) {5481 endRule(context, 'DocString');5482 endRule(context, 'Step');5483 startRule(context, 'Examples_Definition');5484 startRule(context, 'Examples');5485 build(context, token);5486 return 23;5487 }5488 if(match_ScenarioLine(context, token)) {5489 endRule(context, 'DocString');5490 endRule(context, 'Step');5491 endRule(context, 'ScenarioOutline');5492 endRule(context, 'Scenario_Definition');5493 startRule(context, 'Scenario_Definition');5494 startRule(context, 'Scenario');5495 build(context, token);5496 return 12;5497 }5498 if(match_ScenarioOutlineLine(context, token)) {5499 endRule(context, 'DocString');5500 endRule(context, 'Step');5501 endRule(context, 'ScenarioOutline');5502 endRule(context, 'Scenario_Definition');5503 startRule(context, 'Scenario_Definition');5504 startRule(context, 'ScenarioOutline');5505 build(context, token);5506 return 17;5507 }5508 if(match_Comment(context, token)) {5509 build(context, token);5510 return 29;5511 }5512 if(match_Empty(context, token)) {5513 build(context, token);5514 return 29;5515 }5516 5517 var stateComment = "State: 29 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";5518 token.detach();5519 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5520 var error = token.isEof ?5521 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5522 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5523 if (self.stopAtFirstError) throw error;5524 addError(context, error);5525 return 29;5526 }5527 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:05528 function matchTokenAt_30(token, context) {5529 if(match_DocStringSeparator(context, token)) {5530 build(context, token);5531 return 31;5532 }5533 if(match_Other(context, token)) {5534 build(context, token);5535 return 30;5536 }5537 5538 var stateComment = "State: 30 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";5539 token.detach();5540 var expectedTokens = ["#DocStringSeparator", "#Other"];5541 var error = token.isEof ?5542 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5543 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5544 if (self.stopAtFirstError) throw error;5545 addError(context, error);5546 return 30;5547 }5548 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:05549 function matchTokenAt_31(token, context) {5550 if(match_EOF(context, token)) {5551 endRule(context, 'DocString');5552 endRule(context, 'Step');5553 endRule(context, 'Scenario');5554 endRule(context, 'Scenario_Definition');5555 endRule(context, 'Feature');5556 build(context, token);5557 return 27;5558 }5559 if(match_StepLine(context, token)) {5560 endRule(context, 'DocString');5561 endRule(context, 'Step');5562 startRule(context, 'Step');5563 build(context, token);5564 return 15;5565 }5566 if(match_TagLine(context, token)) {5567 endRule(context, 'DocString');5568 endRule(context, 'Step');5569 endRule(context, 'Scenario');5570 endRule(context, 'Scenario_Definition');5571 startRule(context, 'Scenario_Definition');5572 startRule(context, 'Tags');5573 build(context, token);5574 return 11;5575 }5576 if(match_ScenarioLine(context, token)) {5577 endRule(context, 'DocString');5578 endRule(context, 'Step');5579 endRule(context, 'Scenario');5580 endRule(context, 'Scenario_Definition');5581 startRule(context, 'Scenario_Definition');5582 startRule(context, 'Scenario');5583 build(context, token);5584 return 12;5585 }5586 if(match_ScenarioOutlineLine(context, token)) {5587 endRule(context, 'DocString');5588 endRule(context, 'Step');5589 endRule(context, 'Scenario');5590 endRule(context, 'Scenario_Definition');5591 startRule(context, 'Scenario_Definition');5592 startRule(context, 'ScenarioOutline');5593 build(context, token);5594 return 17;5595 }5596 if(match_Comment(context, token)) {5597 build(context, token);5598 return 31;5599 }5600 if(match_Empty(context, token)) {5601 build(context, token);5602 return 31;5603 }5604 5605 var stateComment = "State: 31 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";5606 token.detach();5607 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5608 var error = token.isEof ?5609 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5610 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5611 if (self.stopAtFirstError) throw error;5612 addError(context, error);5613 return 31;5614 }5615 // GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:05616 function matchTokenAt_32(token, context) {5617 if(match_DocStringSeparator(context, token)) {5618 build(context, token);5619 return 33;5620 }5621 if(match_Other(context, token)) {5622 build(context, token);5623 return 32;5624 }5625 5626 var stateComment = "State: 32 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";5627 token.detach();5628 var expectedTokens = ["#DocStringSeparator", "#Other"];5629 var error = token.isEof ?5630 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5631 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5632 if (self.stopAtFirstError) throw error;5633 addError(context, error);5634 return 32;5635 }5636 // GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:05637 function matchTokenAt_33(token, context) {5638 if(match_EOF(context, token)) {5639 endRule(context, 'DocString');5640 endRule(context, 'Step');5641 endRule(context, 'Background');5642 endRule(context, 'Feature');5643 build(context, token);5644 return 27;5645 }5646 if(match_StepLine(context, token)) {5647 endRule(context, 'DocString');5648 endRule(context, 'Step');5649 startRule(context, 'Step');5650 build(context, token);5651 return 9;5652 }5653 if(match_TagLine(context, token)) {5654 endRule(context, 'DocString');5655 endRule(context, 'Step');5656 endRule(context, 'Background');5657 startRule(context, 'Scenario_Definition');5658 startRule(context, 'Tags');5659 build(context, token);5660 return 11;5661 }5662 if(match_ScenarioLine(context, token)) {5663 endRule(context, 'DocString');5664 endRule(context, 'Step');5665 endRule(context, 'Background');5666 startRule(context, 'Scenario_Definition');5667 startRule(context, 'Scenario');5668 build(context, token);5669 return 12;5670 }5671 if(match_ScenarioOutlineLine(context, token)) {5672 endRule(context, 'DocString');5673 endRule(context, 'Step');5674 endRule(context, 'Background');5675 startRule(context, 'Scenario_Definition');5676 startRule(context, 'ScenarioOutline');5677 build(context, token);5678 return 17;5679 }5680 if(match_Comment(context, token)) {5681 build(context, token);5682 return 33;5683 }5684 if(match_Empty(context, token)) {5685 build(context, token);5686 return 33;5687 }5688 ...

Full Screen

Full Screen

parser.js

Source:parser.js Github

copy

Full Screen

...65 token = readToken(context);66 state = matchToken(state, token, context);67 if(token.isEof) break;68 }69 endRule(context, "GherkinDocument");70 if(context.errors.length > 0) {71 throw Errors.CompositeParserException.create(context.errors);72 }73 return getResult();74 };75 function addError(context, error) {76 context.errors.push(error);77 if (context.errors.length > 10)78 throw Errors.CompositeParserException.create(context.errors);79 }80 function startRule(context, ruleType) {81 handleAstError(context, function () {82 builder.startRule(ruleType);83 });84 }85 function endRule(context, ruleType) {86 handleAstError(context, function () {87 builder.endRule(ruleType);88 });89 }90 function build(context, token) {91 handleAstError(context, function () {92 builder.build(token);93 });94 }95 function getResult() {96 return builder.getResult();97 }98 function handleAstError(context, action) {99 handleExternalError(context, true, action)100 }101 function handleExternalError(context, defaultValue, action) {102 if(self.stopAtFirstError) return action();103 try {104 return action();105 } catch (e) {106 if(e instanceof Errors.CompositeParserException) {107 e.errors.forEach(function (error) {108 addError(context, error);109 });110 } else if(111 e instanceof Errors.ParserException ||112 e instanceof Errors.GherkinDocumentBuilderException ||113 e instanceof Errors.UnexpectedTokenException ||114 e instanceof Errors.NoSuchLanguageException115 ) {116 addError(context, e);117 } else {118 throw e;119 }120 }121 return defaultValue;122 }123 function readToken(context) {124 return context.tokenQueue.length > 0 ?125 context.tokenQueue.shift() :126 context.tokenScanner.read();127 }128 function matchToken(state, token, context) {129 switch(state) {130 case 0:131 return matchTokenAt_0(token, context);132 case 1:133 return matchTokenAt_1(token, context);134 case 2:135 return matchTokenAt_2(token, context);136 case 3:137 return matchTokenAt_3(token, context);138 case 4:139 return matchTokenAt_4(token, context);140 case 5:141 return matchTokenAt_5(token, context);142 case 6:143 return matchTokenAt_6(token, context);144 case 7:145 return matchTokenAt_7(token, context);146 case 8:147 return matchTokenAt_8(token, context);148 case 9:149 return matchTokenAt_9(token, context);150 case 10:151 return matchTokenAt_10(token, context);152 case 11:153 return matchTokenAt_11(token, context);154 case 12:155 return matchTokenAt_12(token, context);156 case 13:157 return matchTokenAt_13(token, context);158 case 14:159 return matchTokenAt_14(token, context);160 case 15:161 return matchTokenAt_15(token, context);162 case 16:163 return matchTokenAt_16(token, context);164 case 17:165 return matchTokenAt_17(token, context);166 case 18:167 return matchTokenAt_18(token, context);168 case 19:169 return matchTokenAt_19(token, context);170 case 20:171 return matchTokenAt_20(token, context);172 case 21:173 return matchTokenAt_21(token, context);174 case 22:175 return matchTokenAt_22(token, context);176 case 23:177 return matchTokenAt_23(token, context);178 case 24:179 return matchTokenAt_24(token, context);180 case 25:181 return matchTokenAt_25(token, context);182 case 26:183 return matchTokenAt_26(token, context);184 case 27:185 return matchTokenAt_27(token, context);186 case 28:187 return matchTokenAt_28(token, context);188 case 29:189 return matchTokenAt_29(token, context);190 case 30:191 return matchTokenAt_30(token, context);192 case 31:193 return matchTokenAt_31(token, context);194 case 32:195 return matchTokenAt_32(token, context);196 case 33:197 return matchTokenAt_33(token, context);198 case 34:199 return matchTokenAt_34(token, context);200 case 35:201 return matchTokenAt_35(token, context);202 case 36:203 return matchTokenAt_36(token, context);204 case 37:205 return matchTokenAt_37(token, context);206 case 38:207 return matchTokenAt_38(token, context);208 case 39:209 return matchTokenAt_39(token, context);210 case 40:211 return matchTokenAt_40(token, context);212 case 42:213 return matchTokenAt_42(token, context);214 case 43:215 return matchTokenAt_43(token, context);216 case 44:217 return matchTokenAt_44(token, context);218 case 45:219 return matchTokenAt_45(token, context);220 case 46:221 return matchTokenAt_46(token, context);222 case 47:223 return matchTokenAt_47(token, context);224 case 48:225 return matchTokenAt_48(token, context);226 case 49:227 return matchTokenAt_49(token, context);228 default:229 throw new Error("Unknown state: " + state);230 }231 }232 // Start233 function matchTokenAt_0(token, context) {234 if(match_EOF(context, token)) {235 build(context, token);236 return 41;237 }238 if(match_Language(context, token)) {239 startRule(context, 'Feature');240 startRule(context, 'FeatureHeader');241 build(context, token);242 return 1;243 }244 if(match_TagLine(context, token)) {245 startRule(context, 'Feature');246 startRule(context, 'FeatureHeader');247 startRule(context, 'Tags');248 build(context, token);249 return 2;250 }251 if(match_FeatureLine(context, token)) {252 startRule(context, 'Feature');253 startRule(context, 'FeatureHeader');254 build(context, token);255 return 3;256 }257 if(match_Comment(context, token)) {258 build(context, token);259 return 0;260 }261 if(match_Empty(context, token)) {262 build(context, token);263 return 0;264 }265 266 var stateComment = "State: 0 - Start";267 token.detach();268 var expectedTokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"];269 var error = token.isEof ?270 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :271 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);272 if (self.stopAtFirstError) throw error;273 addError(context, error);274 return 0;275 }276 // GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0277 function matchTokenAt_1(token, context) {278 if(match_TagLine(context, token)) {279 startRule(context, 'Tags');280 build(context, token);281 return 2;282 }283 if(match_FeatureLine(context, token)) {284 build(context, token);285 return 3;286 }287 if(match_Comment(context, token)) {288 build(context, token);289 return 1;290 }291 if(match_Empty(context, token)) {292 build(context, token);293 return 1;294 }295 296 var stateComment = "State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0";297 token.detach();298 var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];299 var error = token.isEof ?300 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :301 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);302 if (self.stopAtFirstError) throw error;303 addError(context, error);304 return 1;305 }306 // GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0307 function matchTokenAt_2(token, context) {308 if(match_TagLine(context, token)) {309 build(context, token);310 return 2;311 }312 if(match_FeatureLine(context, token)) {313 endRule(context, 'Tags');314 build(context, token);315 return 3;316 }317 if(match_Comment(context, token)) {318 build(context, token);319 return 2;320 }321 if(match_Empty(context, token)) {322 build(context, token);323 return 2;324 }325 326 var stateComment = "State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0";327 token.detach();328 var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];329 var error = token.isEof ?330 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :331 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);332 if (self.stopAtFirstError) throw error;333 addError(context, error);334 return 2;335 }336 // GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0337 function matchTokenAt_3(token, context) {338 if(match_EOF(context, token)) {339 endRule(context, 'FeatureHeader');340 endRule(context, 'Feature');341 build(context, token);342 return 41;343 }344 if(match_Empty(context, token)) {345 build(context, token);346 return 3;347 }348 if(match_Comment(context, token)) {349 build(context, token);350 return 5;351 }352 if(match_BackgroundLine(context, token)) {353 endRule(context, 'FeatureHeader');354 startRule(context, 'Background');355 build(context, token);356 return 6;357 }358 if(match_TagLine(context, token)) {359 endRule(context, 'FeatureHeader');360 startRule(context, 'ScenarioDefinition');361 startRule(context, 'Tags');362 build(context, token);363 return 11;364 }365 if(match_ScenarioLine(context, token)) {366 endRule(context, 'FeatureHeader');367 startRule(context, 'ScenarioDefinition');368 startRule(context, 'Scenario');369 build(context, token);370 return 12;371 }372 if(match_RuleLine(context, token)) {373 endRule(context, 'FeatureHeader');374 startRule(context, 'Rule');375 startRule(context, 'RuleHeader');376 build(context, token);377 return 22;378 }379 if(match_Other(context, token)) {380 startRule(context, 'Description');381 build(context, token);382 return 4;383 }384 385 var stateComment = "State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0";386 token.detach();387 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];388 var error = token.isEof ?389 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :390 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);391 if (self.stopAtFirstError) throw error;392 addError(context, error);393 return 3;394 }395 // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0396 function matchTokenAt_4(token, context) {397 if(match_EOF(context, token)) {398 endRule(context, 'Description');399 endRule(context, 'FeatureHeader');400 endRule(context, 'Feature');401 build(context, token);402 return 41;403 }404 if(match_Comment(context, token)) {405 endRule(context, 'Description');406 build(context, token);407 return 5;408 }409 if(match_BackgroundLine(context, token)) {410 endRule(context, 'Description');411 endRule(context, 'FeatureHeader');412 startRule(context, 'Background');413 build(context, token);414 return 6;415 }416 if(match_TagLine(context, token)) {417 endRule(context, 'Description');418 endRule(context, 'FeatureHeader');419 startRule(context, 'ScenarioDefinition');420 startRule(context, 'Tags');421 build(context, token);422 return 11;423 }424 if(match_ScenarioLine(context, token)) {425 endRule(context, 'Description');426 endRule(context, 'FeatureHeader');427 startRule(context, 'ScenarioDefinition');428 startRule(context, 'Scenario');429 build(context, token);430 return 12;431 }432 if(match_RuleLine(context, token)) {433 endRule(context, 'Description');434 endRule(context, 'FeatureHeader');435 startRule(context, 'Rule');436 startRule(context, 'RuleHeader');437 build(context, token);438 return 22;439 }440 if(match_Other(context, token)) {441 build(context, token);442 return 4;443 }444 445 var stateComment = "State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0";446 token.detach();447 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];448 var error = token.isEof ?449 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :450 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);451 if (self.stopAtFirstError) throw error;452 addError(context, error);453 return 4;454 }455 // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0456 function matchTokenAt_5(token, context) {457 if(match_EOF(context, token)) {458 endRule(context, 'FeatureHeader');459 endRule(context, 'Feature');460 build(context, token);461 return 41;462 }463 if(match_Comment(context, token)) {464 build(context, token);465 return 5;466 }467 if(match_BackgroundLine(context, token)) {468 endRule(context, 'FeatureHeader');469 startRule(context, 'Background');470 build(context, token);471 return 6;472 }473 if(match_TagLine(context, token)) {474 endRule(context, 'FeatureHeader');475 startRule(context, 'ScenarioDefinition');476 startRule(context, 'Tags');477 build(context, token);478 return 11;479 }480 if(match_ScenarioLine(context, token)) {481 endRule(context, 'FeatureHeader');482 startRule(context, 'ScenarioDefinition');483 startRule(context, 'Scenario');484 build(context, token);485 return 12;486 }487 if(match_RuleLine(context, token)) {488 endRule(context, 'FeatureHeader');489 startRule(context, 'Rule');490 startRule(context, 'RuleHeader');491 build(context, token);492 return 22;493 }494 if(match_Empty(context, token)) {495 build(context, token);496 return 5;497 }498 499 var stateComment = "State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0";500 token.detach();501 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];502 var error = token.isEof ?503 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :504 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);505 if (self.stopAtFirstError) throw error;506 addError(context, error);507 return 5;508 }509 // GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0510 function matchTokenAt_6(token, context) {511 if(match_EOF(context, token)) {512 endRule(context, 'Background');513 endRule(context, 'Feature');514 build(context, token);515 return 41;516 }517 if(match_Empty(context, token)) {518 build(context, token);519 return 6;520 }521 if(match_Comment(context, token)) {522 build(context, token);523 return 8;524 }525 if(match_StepLine(context, token)) {526 startRule(context, 'Step');527 build(context, token);528 return 9;529 }530 if(match_TagLine(context, token)) {531 endRule(context, 'Background');532 startRule(context, 'ScenarioDefinition');533 startRule(context, 'Tags');534 build(context, token);535 return 11;536 }537 if(match_ScenarioLine(context, token)) {538 endRule(context, 'Background');539 startRule(context, 'ScenarioDefinition');540 startRule(context, 'Scenario');541 build(context, token);542 return 12;543 }544 if(match_RuleLine(context, token)) {545 endRule(context, 'Background');546 startRule(context, 'Rule');547 startRule(context, 'RuleHeader');548 build(context, token);549 return 22;550 }551 if(match_Other(context, token)) {552 startRule(context, 'Description');553 build(context, token);554 return 7;555 }556 557 var stateComment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0";558 token.detach();559 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];560 var error = token.isEof ?561 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :562 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);563 if (self.stopAtFirstError) throw error;564 addError(context, error);565 return 6;566 }567 // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0568 function matchTokenAt_7(token, context) {569 if(match_EOF(context, token)) {570 endRule(context, 'Description');571 endRule(context, 'Background');572 endRule(context, 'Feature');573 build(context, token);574 return 41;575 }576 if(match_Comment(context, token)) {577 endRule(context, 'Description');578 build(context, token);579 return 8;580 }581 if(match_StepLine(context, token)) {582 endRule(context, 'Description');583 startRule(context, 'Step');584 build(context, token);585 return 9;586 }587 if(match_TagLine(context, token)) {588 endRule(context, 'Description');589 endRule(context, 'Background');590 startRule(context, 'ScenarioDefinition');591 startRule(context, 'Tags');592 build(context, token);593 return 11;594 }595 if(match_ScenarioLine(context, token)) {596 endRule(context, 'Description');597 endRule(context, 'Background');598 startRule(context, 'ScenarioDefinition');599 startRule(context, 'Scenario');600 build(context, token);601 return 12;602 }603 if(match_RuleLine(context, token)) {604 endRule(context, 'Description');605 endRule(context, 'Background');606 startRule(context, 'Rule');607 startRule(context, 'RuleHeader');608 build(context, token);609 return 22;610 }611 if(match_Other(context, token)) {612 build(context, token);613 return 7;614 }615 616 var stateComment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";617 token.detach();618 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];619 var error = token.isEof ?620 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :621 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);622 if (self.stopAtFirstError) throw error;623 addError(context, error);624 return 7;625 }626 // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0627 function matchTokenAt_8(token, context) {628 if(match_EOF(context, token)) {629 endRule(context, 'Background');630 endRule(context, 'Feature');631 build(context, token);632 return 41;633 }634 if(match_Comment(context, token)) {635 build(context, token);636 return 8;637 }638 if(match_StepLine(context, token)) {639 startRule(context, 'Step');640 build(context, token);641 return 9;642 }643 if(match_TagLine(context, token)) {644 endRule(context, 'Background');645 startRule(context, 'ScenarioDefinition');646 startRule(context, 'Tags');647 build(context, token);648 return 11;649 }650 if(match_ScenarioLine(context, token)) {651 endRule(context, 'Background');652 startRule(context, 'ScenarioDefinition');653 startRule(context, 'Scenario');654 build(context, token);655 return 12;656 }657 if(match_RuleLine(context, token)) {658 endRule(context, 'Background');659 startRule(context, 'Rule');660 startRule(context, 'RuleHeader');661 build(context, token);662 return 22;663 }664 if(match_Empty(context, token)) {665 build(context, token);666 return 8;667 }668 669 var stateComment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0";670 token.detach();671 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];672 var error = token.isEof ?673 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :674 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);675 if (self.stopAtFirstError) throw error;676 addError(context, error);677 return 8;678 }679 // GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0680 function matchTokenAt_9(token, context) {681 if(match_EOF(context, token)) {682 endRule(context, 'Step');683 endRule(context, 'Background');684 endRule(context, 'Feature');685 build(context, token);686 return 41;687 }688 if(match_TableRow(context, token)) {689 startRule(context, 'DataTable');690 build(context, token);691 return 10;692 }693 if(match_DocStringSeparator(context, token)) {694 startRule(context, 'DocString');695 build(context, token);696 return 48;697 }698 if(match_StepLine(context, token)) {699 endRule(context, 'Step');700 startRule(context, 'Step');701 build(context, token);702 return 9;703 }704 if(match_TagLine(context, token)) {705 endRule(context, 'Step');706 endRule(context, 'Background');707 startRule(context, 'ScenarioDefinition');708 startRule(context, 'Tags');709 build(context, token);710 return 11;711 }712 if(match_ScenarioLine(context, token)) {713 endRule(context, 'Step');714 endRule(context, 'Background');715 startRule(context, 'ScenarioDefinition');716 startRule(context, 'Scenario');717 build(context, token);718 return 12;719 }720 if(match_RuleLine(context, token)) {721 endRule(context, 'Step');722 endRule(context, 'Background');723 startRule(context, 'Rule');724 startRule(context, 'RuleHeader');725 build(context, token);726 return 22;727 }728 if(match_Comment(context, token)) {729 build(context, token);730 return 9;731 }732 if(match_Empty(context, token)) {733 build(context, token);734 return 9;735 }736 737 var stateComment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0";738 token.detach();739 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];740 var error = token.isEof ?741 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :742 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);743 if (self.stopAtFirstError) throw error;744 addError(context, error);745 return 9;746 }747 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0748 function matchTokenAt_10(token, context) {749 if(match_EOF(context, token)) {750 endRule(context, 'DataTable');751 endRule(context, 'Step');752 endRule(context, 'Background');753 endRule(context, 'Feature');754 build(context, token);755 return 41;756 }757 if(match_TableRow(context, token)) {758 build(context, token);759 return 10;760 }761 if(match_StepLine(context, token)) {762 endRule(context, 'DataTable');763 endRule(context, 'Step');764 startRule(context, 'Step');765 build(context, token);766 return 9;767 }768 if(match_TagLine(context, token)) {769 endRule(context, 'DataTable');770 endRule(context, 'Step');771 endRule(context, 'Background');772 startRule(context, 'ScenarioDefinition');773 startRule(context, 'Tags');774 build(context, token);775 return 11;776 }777 if(match_ScenarioLine(context, token)) {778 endRule(context, 'DataTable');779 endRule(context, 'Step');780 endRule(context, 'Background');781 startRule(context, 'ScenarioDefinition');782 startRule(context, 'Scenario');783 build(context, token);784 return 12;785 }786 if(match_RuleLine(context, token)) {787 endRule(context, 'DataTable');788 endRule(context, 'Step');789 endRule(context, 'Background');790 startRule(context, 'Rule');791 startRule(context, 'RuleHeader');792 build(context, token);793 return 22;794 }795 if(match_Comment(context, token)) {796 build(context, token);797 return 10;798 }799 if(match_Empty(context, token)) {800 build(context, token);801 return 10;802 }803 804 var stateComment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";805 token.detach();806 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];807 var error = token.isEof ?808 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :809 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);810 if (self.stopAtFirstError) throw error;811 addError(context, error);812 return 10;813 }814 // GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0815 function matchTokenAt_11(token, context) {816 if(match_TagLine(context, token)) {817 build(context, token);818 return 11;819 }820 if(match_ScenarioLine(context, token)) {821 endRule(context, 'Tags');822 startRule(context, 'Scenario');823 build(context, token);824 return 12;825 }826 if(match_Comment(context, token)) {827 build(context, token);828 return 11;829 }830 if(match_Empty(context, token)) {831 build(context, token);832 return 11;833 }834 835 var stateComment = "State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0";836 token.detach();837 var expectedTokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"];838 var error = token.isEof ?839 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :840 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);841 if (self.stopAtFirstError) throw error;842 addError(context, error);843 return 11;844 }845 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0846 function matchTokenAt_12(token, context) {847 if(match_EOF(context, token)) {848 endRule(context, 'Scenario');849 endRule(context, 'ScenarioDefinition');850 endRule(context, 'Feature');851 build(context, token);852 return 41;853 }854 if(match_Empty(context, token)) {855 build(context, token);856 return 12;857 }858 if(match_Comment(context, token)) {859 build(context, token);860 return 14;861 }862 if(match_StepLine(context, token)) {863 startRule(context, 'Step');864 build(context, token);865 return 15;866 }867 if(match_TagLine(context, token)) {868 if(lookahead_0(context, token)) {869 startRule(context, 'ExamplesDefinition');870 startRule(context, 'Tags');871 build(context, token);872 return 17;873 }874 }875 if(match_TagLine(context, token)) {876 endRule(context, 'Scenario');877 endRule(context, 'ScenarioDefinition');878 startRule(context, 'ScenarioDefinition');879 startRule(context, 'Tags');880 build(context, token);881 return 11;882 }883 if(match_ExamplesLine(context, token)) {884 startRule(context, 'ExamplesDefinition');885 startRule(context, 'Examples');886 build(context, token);887 return 18;888 }889 if(match_ScenarioLine(context, token)) {890 endRule(context, 'Scenario');891 endRule(context, 'ScenarioDefinition');892 startRule(context, 'ScenarioDefinition');893 startRule(context, 'Scenario');894 build(context, token);895 return 12;896 }897 if(match_RuleLine(context, token)) {898 endRule(context, 'Scenario');899 endRule(context, 'ScenarioDefinition');900 startRule(context, 'Rule');901 startRule(context, 'RuleHeader');902 build(context, token);903 return 22;904 }905 if(match_Other(context, token)) {906 startRule(context, 'Description');907 build(context, token);908 return 13;909 }910 911 var stateComment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";912 token.detach();913 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];914 var error = token.isEof ?915 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :916 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);917 if (self.stopAtFirstError) throw error;918 addError(context, error);919 return 12;920 }921 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0922 function matchTokenAt_13(token, context) {923 if(match_EOF(context, token)) {924 endRule(context, 'Description');925 endRule(context, 'Scenario');926 endRule(context, 'ScenarioDefinition');927 endRule(context, 'Feature');928 build(context, token);929 return 41;930 }931 if(match_Comment(context, token)) {932 endRule(context, 'Description');933 build(context, token);934 return 14;935 }936 if(match_StepLine(context, token)) {937 endRule(context, 'Description');938 startRule(context, 'Step');939 build(context, token);940 return 15;941 }942 if(match_TagLine(context, token)) {943 if(lookahead_0(context, token)) {944 endRule(context, 'Description');945 startRule(context, 'ExamplesDefinition');946 startRule(context, 'Tags');947 build(context, token);948 return 17;949 }950 }951 if(match_TagLine(context, token)) {952 endRule(context, 'Description');953 endRule(context, 'Scenario');954 endRule(context, 'ScenarioDefinition');955 startRule(context, 'ScenarioDefinition');956 startRule(context, 'Tags');957 build(context, token);958 return 11;959 }960 if(match_ExamplesLine(context, token)) {961 endRule(context, 'Description');962 startRule(context, 'ExamplesDefinition');963 startRule(context, 'Examples');964 build(context, token);965 return 18;966 }967 if(match_ScenarioLine(context, token)) {968 endRule(context, 'Description');969 endRule(context, 'Scenario');970 endRule(context, 'ScenarioDefinition');971 startRule(context, 'ScenarioDefinition');972 startRule(context, 'Scenario');973 build(context, token);974 return 12;975 }976 if(match_RuleLine(context, token)) {977 endRule(context, 'Description');978 endRule(context, 'Scenario');979 endRule(context, 'ScenarioDefinition');980 startRule(context, 'Rule');981 startRule(context, 'RuleHeader');982 build(context, token);983 return 22;984 }985 if(match_Other(context, token)) {986 build(context, token);987 return 13;988 }989 990 var stateComment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";991 token.detach();992 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];993 var error = token.isEof ?994 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :995 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);996 if (self.stopAtFirstError) throw error;997 addError(context, error);998 return 13;999 }1000 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:01001 function matchTokenAt_14(token, context) {1002 if(match_EOF(context, token)) {1003 endRule(context, 'Scenario');1004 endRule(context, 'ScenarioDefinition');1005 endRule(context, 'Feature');1006 build(context, token);1007 return 41;1008 }1009 if(match_Comment(context, token)) {1010 build(context, token);1011 return 14;1012 }1013 if(match_StepLine(context, token)) {1014 startRule(context, 'Step');1015 build(context, token);1016 return 15;1017 }1018 if(match_TagLine(context, token)) {1019 if(lookahead_0(context, token)) {1020 startRule(context, 'ExamplesDefinition');1021 startRule(context, 'Tags');1022 build(context, token);1023 return 17;1024 }1025 }1026 if(match_TagLine(context, token)) {1027 endRule(context, 'Scenario');1028 endRule(context, 'ScenarioDefinition');1029 startRule(context, 'ScenarioDefinition');1030 startRule(context, 'Tags');1031 build(context, token);1032 return 11;1033 }1034 if(match_ExamplesLine(context, token)) {1035 startRule(context, 'ExamplesDefinition');1036 startRule(context, 'Examples');1037 build(context, token);1038 return 18;1039 }1040 if(match_ScenarioLine(context, token)) {1041 endRule(context, 'Scenario');1042 endRule(context, 'ScenarioDefinition');1043 startRule(context, 'ScenarioDefinition');1044 startRule(context, 'Scenario');1045 build(context, token);1046 return 12;1047 }1048 if(match_RuleLine(context, token)) {1049 endRule(context, 'Scenario');1050 endRule(context, 'ScenarioDefinition');1051 startRule(context, 'Rule');1052 startRule(context, 'RuleHeader');1053 build(context, token);1054 return 22;1055 }1056 if(match_Empty(context, token)) {1057 build(context, token);1058 return 14;1059 }1060 1061 var stateComment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";1062 token.detach();1063 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];1064 var error = token.isEof ?1065 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1066 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1067 if (self.stopAtFirstError) throw error;1068 addError(context, error);1069 return 14;1070 }1071 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:01072 function matchTokenAt_15(token, context) {1073 if(match_EOF(context, token)) {1074 endRule(context, 'Step');1075 endRule(context, 'Scenario');1076 endRule(context, 'ScenarioDefinition');1077 endRule(context, 'Feature');1078 build(context, token);1079 return 41;1080 }1081 if(match_TableRow(context, token)) {1082 startRule(context, 'DataTable');1083 build(context, token);1084 return 16;1085 }1086 if(match_DocStringSeparator(context, token)) {1087 startRule(context, 'DocString');1088 build(context, token);1089 return 46;1090 }1091 if(match_StepLine(context, token)) {1092 endRule(context, 'Step');1093 startRule(context, 'Step');1094 build(context, token);1095 return 15;1096 }1097 if(match_TagLine(context, token)) {1098 if(lookahead_0(context, token)) {1099 endRule(context, 'Step');1100 startRule(context, 'ExamplesDefinition');1101 startRule(context, 'Tags');1102 build(context, token);1103 return 17;1104 }1105 }1106 if(match_TagLine(context, token)) {1107 endRule(context, 'Step');1108 endRule(context, 'Scenario');1109 endRule(context, 'ScenarioDefinition');1110 startRule(context, 'ScenarioDefinition');1111 startRule(context, 'Tags');1112 build(context, token);1113 return 11;1114 }1115 if(match_ExamplesLine(context, token)) {1116 endRule(context, 'Step');1117 startRule(context, 'ExamplesDefinition');1118 startRule(context, 'Examples');1119 build(context, token);1120 return 18;1121 }1122 if(match_ScenarioLine(context, token)) {1123 endRule(context, 'Step');1124 endRule(context, 'Scenario');1125 endRule(context, 'ScenarioDefinition');1126 startRule(context, 'ScenarioDefinition');1127 startRule(context, 'Scenario');1128 build(context, token);1129 return 12;1130 }1131 if(match_RuleLine(context, token)) {1132 endRule(context, 'Step');1133 endRule(context, 'Scenario');1134 endRule(context, 'ScenarioDefinition');1135 startRule(context, 'Rule');1136 startRule(context, 'RuleHeader');1137 build(context, token);1138 return 22;1139 }1140 if(match_Comment(context, token)) {1141 build(context, token);1142 return 15;1143 }1144 if(match_Empty(context, token)) {1145 build(context, token);1146 return 15;1147 }1148 1149 var stateComment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";1150 token.detach();1151 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1152 var error = token.isEof ?1153 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1154 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1155 if (self.stopAtFirstError) throw error;1156 addError(context, error);1157 return 15;1158 }1159 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:01160 function matchTokenAt_16(token, context) {1161 if(match_EOF(context, token)) {1162 endRule(context, 'DataTable');1163 endRule(context, 'Step');1164 endRule(context, 'Scenario');1165 endRule(context, 'ScenarioDefinition');1166 endRule(context, 'Feature');1167 build(context, token);1168 return 41;1169 }1170 if(match_TableRow(context, token)) {1171 build(context, token);1172 return 16;1173 }1174 if(match_StepLine(context, token)) {1175 endRule(context, 'DataTable');1176 endRule(context, 'Step');1177 startRule(context, 'Step');1178 build(context, token);1179 return 15;1180 }1181 if(match_TagLine(context, token)) {1182 if(lookahead_0(context, token)) {1183 endRule(context, 'DataTable');1184 endRule(context, 'Step');1185 startRule(context, 'ExamplesDefinition');1186 startRule(context, 'Tags');1187 build(context, token);1188 return 17;1189 }1190 }1191 if(match_TagLine(context, token)) {1192 endRule(context, 'DataTable');1193 endRule(context, 'Step');1194 endRule(context, 'Scenario');1195 endRule(context, 'ScenarioDefinition');1196 startRule(context, 'ScenarioDefinition');1197 startRule(context, 'Tags');1198 build(context, token);1199 return 11;1200 }1201 if(match_ExamplesLine(context, token)) {1202 endRule(context, 'DataTable');1203 endRule(context, 'Step');1204 startRule(context, 'ExamplesDefinition');1205 startRule(context, 'Examples');1206 build(context, token);1207 return 18;1208 }1209 if(match_ScenarioLine(context, token)) {1210 endRule(context, 'DataTable');1211 endRule(context, 'Step');1212 endRule(context, 'Scenario');1213 endRule(context, 'ScenarioDefinition');1214 startRule(context, 'ScenarioDefinition');1215 startRule(context, 'Scenario');1216 build(context, token);1217 return 12;1218 }1219 if(match_RuleLine(context, token)) {1220 endRule(context, 'DataTable');1221 endRule(context, 'Step');1222 endRule(context, 'Scenario');1223 endRule(context, 'ScenarioDefinition');1224 startRule(context, 'Rule');1225 startRule(context, 'RuleHeader');1226 build(context, token);1227 return 22;1228 }1229 if(match_Comment(context, token)) {1230 build(context, token);1231 return 16;1232 }1233 if(match_Empty(context, token)) {1234 build(context, token);1235 return 16;1236 }1237 1238 var stateComment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";1239 token.detach();1240 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1241 var error = token.isEof ?1242 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1243 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1244 if (self.stopAtFirstError) throw error;1245 addError(context, error);1246 return 16;1247 }1248 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:01249 function matchTokenAt_17(token, context) {1250 if(match_TagLine(context, token)) {1251 build(context, token);1252 return 17;1253 }1254 if(match_ExamplesLine(context, token)) {1255 endRule(context, 'Tags');1256 startRule(context, 'Examples');1257 build(context, token);1258 return 18;1259 }1260 if(match_Comment(context, token)) {1261 build(context, token);1262 return 17;1263 }1264 if(match_Empty(context, token)) {1265 build(context, token);1266 return 17;1267 }1268 1269 var stateComment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";1270 token.detach();1271 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1272 var error = token.isEof ?1273 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1274 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1275 if (self.stopAtFirstError) throw error;1276 addError(context, error);1277 return 17;1278 }1279 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:01280 function matchTokenAt_18(token, context) {1281 if(match_EOF(context, token)) {1282 endRule(context, 'Examples');1283 endRule(context, 'ExamplesDefinition');1284 endRule(context, 'Scenario');1285 endRule(context, 'ScenarioDefinition');1286 endRule(context, 'Feature');1287 build(context, token);1288 return 41;1289 }1290 if(match_Empty(context, token)) {1291 build(context, token);1292 return 18;1293 }1294 if(match_Comment(context, token)) {1295 build(context, token);1296 return 20;1297 }1298 if(match_TableRow(context, token)) {1299 startRule(context, 'ExamplesTable');1300 build(context, token);1301 return 21;1302 }1303 if(match_TagLine(context, token)) {1304 if(lookahead_0(context, token)) {1305 endRule(context, 'Examples');1306 endRule(context, 'ExamplesDefinition');1307 startRule(context, 'ExamplesDefinition');1308 startRule(context, 'Tags');1309 build(context, token);1310 return 17;1311 }1312 }1313 if(match_TagLine(context, token)) {1314 endRule(context, 'Examples');1315 endRule(context, 'ExamplesDefinition');1316 endRule(context, 'Scenario');1317 endRule(context, 'ScenarioDefinition');1318 startRule(context, 'ScenarioDefinition');1319 startRule(context, 'Tags');1320 build(context, token);1321 return 11;1322 }1323 if(match_ExamplesLine(context, token)) {1324 endRule(context, 'Examples');1325 endRule(context, 'ExamplesDefinition');1326 startRule(context, 'ExamplesDefinition');1327 startRule(context, 'Examples');1328 build(context, token);1329 return 18;1330 }1331 if(match_ScenarioLine(context, token)) {1332 endRule(context, 'Examples');1333 endRule(context, 'ExamplesDefinition');1334 endRule(context, 'Scenario');1335 endRule(context, 'ScenarioDefinition');1336 startRule(context, 'ScenarioDefinition');1337 startRule(context, 'Scenario');1338 build(context, token);1339 return 12;1340 }1341 if(match_RuleLine(context, token)) {1342 endRule(context, 'Examples');1343 endRule(context, 'ExamplesDefinition');1344 endRule(context, 'Scenario');1345 endRule(context, 'ScenarioDefinition');1346 startRule(context, 'Rule');1347 startRule(context, 'RuleHeader');1348 build(context, token);1349 return 22;1350 }1351 if(match_Other(context, token)) {1352 startRule(context, 'Description');1353 build(context, token);1354 return 19;1355 }1356 1357 var stateComment = "State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";1358 token.detach();1359 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1360 var error = token.isEof ?1361 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1362 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1363 if (self.stopAtFirstError) throw error;1364 addError(context, error);1365 return 18;1366 }1367 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:01368 function matchTokenAt_19(token, context) {1369 if(match_EOF(context, token)) {1370 endRule(context, 'Description');1371 endRule(context, 'Examples');1372 endRule(context, 'ExamplesDefinition');1373 endRule(context, 'Scenario');1374 endRule(context, 'ScenarioDefinition');1375 endRule(context, 'Feature');1376 build(context, token);1377 return 41;1378 }1379 if(match_Comment(context, token)) {1380 endRule(context, 'Description');1381 build(context, token);1382 return 20;1383 }1384 if(match_TableRow(context, token)) {1385 endRule(context, 'Description');1386 startRule(context, 'ExamplesTable');1387 build(context, token);1388 return 21;1389 }1390 if(match_TagLine(context, token)) {1391 if(lookahead_0(context, token)) {1392 endRule(context, 'Description');1393 endRule(context, 'Examples');1394 endRule(context, 'ExamplesDefinition');1395 startRule(context, 'ExamplesDefinition');1396 startRule(context, 'Tags');1397 build(context, token);1398 return 17;1399 }1400 }1401 if(match_TagLine(context, token)) {1402 endRule(context, 'Description');1403 endRule(context, 'Examples');1404 endRule(context, 'ExamplesDefinition');1405 endRule(context, 'Scenario');1406 endRule(context, 'ScenarioDefinition');1407 startRule(context, 'ScenarioDefinition');1408 startRule(context, 'Tags');1409 build(context, token);1410 return 11;1411 }1412 if(match_ExamplesLine(context, token)) {1413 endRule(context, 'Description');1414 endRule(context, 'Examples');1415 endRule(context, 'ExamplesDefinition');1416 startRule(context, 'ExamplesDefinition');1417 startRule(context, 'Examples');1418 build(context, token);1419 return 18;1420 }1421 if(match_ScenarioLine(context, token)) {1422 endRule(context, 'Description');1423 endRule(context, 'Examples');1424 endRule(context, 'ExamplesDefinition');1425 endRule(context, 'Scenario');1426 endRule(context, 'ScenarioDefinition');1427 startRule(context, 'ScenarioDefinition');1428 startRule(context, 'Scenario');1429 build(context, token);1430 return 12;1431 }1432 if(match_RuleLine(context, token)) {1433 endRule(context, 'Description');1434 endRule(context, 'Examples');1435 endRule(context, 'ExamplesDefinition');1436 endRule(context, 'Scenario');1437 endRule(context, 'ScenarioDefinition');1438 startRule(context, 'Rule');1439 startRule(context, 'RuleHeader');1440 build(context, token);1441 return 22;1442 }1443 if(match_Other(context, token)) {1444 build(context, token);1445 return 19;1446 }1447 1448 var stateComment = "State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";1449 token.detach();1450 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1451 var error = token.isEof ?1452 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1453 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1454 if (self.stopAtFirstError) throw error;1455 addError(context, error);1456 return 19;1457 }1458 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:01459 function matchTokenAt_20(token, context) {1460 if(match_EOF(context, token)) {1461 endRule(context, 'Examples');1462 endRule(context, 'ExamplesDefinition');1463 endRule(context, 'Scenario');1464 endRule(context, 'ScenarioDefinition');1465 endRule(context, 'Feature');1466 build(context, token);1467 return 41;1468 }1469 if(match_Comment(context, token)) {1470 build(context, token);1471 return 20;1472 }1473 if(match_TableRow(context, token)) {1474 startRule(context, 'ExamplesTable');1475 build(context, token);1476 return 21;1477 }1478 if(match_TagLine(context, token)) {1479 if(lookahead_0(context, token)) {1480 endRule(context, 'Examples');1481 endRule(context, 'ExamplesDefinition');1482 startRule(context, 'ExamplesDefinition');1483 startRule(context, 'Tags');1484 build(context, token);1485 return 17;1486 }1487 }1488 if(match_TagLine(context, token)) {1489 endRule(context, 'Examples');1490 endRule(context, 'ExamplesDefinition');1491 endRule(context, 'Scenario');1492 endRule(context, 'ScenarioDefinition');1493 startRule(context, 'ScenarioDefinition');1494 startRule(context, 'Tags');1495 build(context, token);1496 return 11;1497 }1498 if(match_ExamplesLine(context, token)) {1499 endRule(context, 'Examples');1500 endRule(context, 'ExamplesDefinition');1501 startRule(context, 'ExamplesDefinition');1502 startRule(context, 'Examples');1503 build(context, token);1504 return 18;1505 }1506 if(match_ScenarioLine(context, token)) {1507 endRule(context, 'Examples');1508 endRule(context, 'ExamplesDefinition');1509 endRule(context, 'Scenario');1510 endRule(context, 'ScenarioDefinition');1511 startRule(context, 'ScenarioDefinition');1512 startRule(context, 'Scenario');1513 build(context, token);1514 return 12;1515 }1516 if(match_RuleLine(context, token)) {1517 endRule(context, 'Examples');1518 endRule(context, 'ExamplesDefinition');1519 endRule(context, 'Scenario');1520 endRule(context, 'ScenarioDefinition');1521 startRule(context, 'Rule');1522 startRule(context, 'RuleHeader');1523 build(context, token);1524 return 22;1525 }1526 if(match_Empty(context, token)) {1527 build(context, token);1528 return 20;1529 }1530 1531 var stateComment = "State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";1532 token.detach();1533 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];1534 var error = token.isEof ?1535 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1536 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1537 if (self.stopAtFirstError) throw error;1538 addError(context, error);1539 return 20;1540 }1541 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:01542 function matchTokenAt_21(token, context) {1543 if(match_EOF(context, token)) {1544 endRule(context, 'ExamplesTable');1545 endRule(context, 'Examples');1546 endRule(context, 'ExamplesDefinition');1547 endRule(context, 'Scenario');1548 endRule(context, 'ScenarioDefinition');1549 endRule(context, 'Feature');1550 build(context, token);1551 return 41;1552 }1553 if(match_TableRow(context, token)) {1554 build(context, token);1555 return 21;1556 }1557 if(match_TagLine(context, token)) {1558 if(lookahead_0(context, token)) {1559 endRule(context, 'ExamplesTable');1560 endRule(context, 'Examples');1561 endRule(context, 'ExamplesDefinition');1562 startRule(context, 'ExamplesDefinition');1563 startRule(context, 'Tags');1564 build(context, token);1565 return 17;1566 }1567 }1568 if(match_TagLine(context, token)) {1569 endRule(context, 'ExamplesTable');1570 endRule(context, 'Examples');1571 endRule(context, 'ExamplesDefinition');1572 endRule(context, 'Scenario');1573 endRule(context, 'ScenarioDefinition');1574 startRule(context, 'ScenarioDefinition');1575 startRule(context, 'Tags');1576 build(context, token);1577 return 11;1578 }1579 if(match_ExamplesLine(context, token)) {1580 endRule(context, 'ExamplesTable');1581 endRule(context, 'Examples');1582 endRule(context, 'ExamplesDefinition');1583 startRule(context, 'ExamplesDefinition');1584 startRule(context, 'Examples');1585 build(context, token);1586 return 18;1587 }1588 if(match_ScenarioLine(context, token)) {1589 endRule(context, 'ExamplesTable');1590 endRule(context, 'Examples');1591 endRule(context, 'ExamplesDefinition');1592 endRule(context, 'Scenario');1593 endRule(context, 'ScenarioDefinition');1594 startRule(context, 'ScenarioDefinition');1595 startRule(context, 'Scenario');1596 build(context, token);1597 return 12;1598 }1599 if(match_RuleLine(context, token)) {1600 endRule(context, 'ExamplesTable');1601 endRule(context, 'Examples');1602 endRule(context, 'ExamplesDefinition');1603 endRule(context, 'Scenario');1604 endRule(context, 'ScenarioDefinition');1605 startRule(context, 'Rule');1606 startRule(context, 'RuleHeader');1607 build(context, token);1608 return 22;1609 }1610 if(match_Comment(context, token)) {1611 build(context, token);1612 return 21;1613 }1614 if(match_Empty(context, token)) {1615 build(context, token);1616 return 21;1617 }1618 1619 var stateComment = "State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";1620 token.detach();1621 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1622 var error = token.isEof ?1623 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1624 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1625 if (self.stopAtFirstError) throw error;1626 addError(context, error);1627 return 21;1628 }1629 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:01630 function matchTokenAt_22(token, context) {1631 if(match_EOF(context, token)) {1632 endRule(context, 'RuleHeader');1633 endRule(context, 'Rule');1634 endRule(context, 'Feature');1635 build(context, token);1636 return 41;1637 }1638 if(match_Empty(context, token)) {1639 build(context, token);1640 return 22;1641 }1642 if(match_Comment(context, token)) {1643 build(context, token);1644 return 24;1645 }1646 if(match_BackgroundLine(context, token)) {1647 endRule(context, 'RuleHeader');1648 startRule(context, 'Background');1649 build(context, token);1650 return 25;1651 }1652 if(match_TagLine(context, token)) {1653 endRule(context, 'RuleHeader');1654 startRule(context, 'ScenarioDefinition');1655 startRule(context, 'Tags');1656 build(context, token);1657 return 30;1658 }1659 if(match_ScenarioLine(context, token)) {1660 endRule(context, 'RuleHeader');1661 startRule(context, 'ScenarioDefinition');1662 startRule(context, 'Scenario');1663 build(context, token);1664 return 31;1665 }1666 if(match_RuleLine(context, token)) {1667 endRule(context, 'RuleHeader');1668 endRule(context, 'Rule');1669 startRule(context, 'Rule');1670 startRule(context, 'RuleHeader');1671 build(context, token);1672 return 22;1673 }1674 if(match_Other(context, token)) {1675 startRule(context, 'Description');1676 build(context, token);1677 return 23;1678 }1679 1680 var stateComment = "State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:0";1681 token.detach();1682 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1683 var error = token.isEof ?1684 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1685 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1686 if (self.stopAtFirstError) throw error;1687 addError(context, error);1688 return 22;1689 }1690 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:01691 function matchTokenAt_23(token, context) {1692 if(match_EOF(context, token)) {1693 endRule(context, 'Description');1694 endRule(context, 'RuleHeader');1695 endRule(context, 'Rule');1696 endRule(context, 'Feature');1697 build(context, token);1698 return 41;1699 }1700 if(match_Comment(context, token)) {1701 endRule(context, 'Description');1702 build(context, token);1703 return 24;1704 }1705 if(match_BackgroundLine(context, token)) {1706 endRule(context, 'Description');1707 endRule(context, 'RuleHeader');1708 startRule(context, 'Background');1709 build(context, token);1710 return 25;1711 }1712 if(match_TagLine(context, token)) {1713 endRule(context, 'Description');1714 endRule(context, 'RuleHeader');1715 startRule(context, 'ScenarioDefinition');1716 startRule(context, 'Tags');1717 build(context, token);1718 return 30;1719 }1720 if(match_ScenarioLine(context, token)) {1721 endRule(context, 'Description');1722 endRule(context, 'RuleHeader');1723 startRule(context, 'ScenarioDefinition');1724 startRule(context, 'Scenario');1725 build(context, token);1726 return 31;1727 }1728 if(match_RuleLine(context, token)) {1729 endRule(context, 'Description');1730 endRule(context, 'RuleHeader');1731 endRule(context, 'Rule');1732 startRule(context, 'Rule');1733 startRule(context, 'RuleHeader');1734 build(context, token);1735 return 22;1736 }1737 if(match_Other(context, token)) {1738 build(context, token);1739 return 23;1740 }1741 1742 var stateComment = "State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:0";1743 token.detach();1744 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1745 var error = token.isEof ?1746 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1747 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1748 if (self.stopAtFirstError) throw error;1749 addError(context, error);1750 return 23;1751 }1752 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:01753 function matchTokenAt_24(token, context) {1754 if(match_EOF(context, token)) {1755 endRule(context, 'RuleHeader');1756 endRule(context, 'Rule');1757 endRule(context, 'Feature');1758 build(context, token);1759 return 41;1760 }1761 if(match_Comment(context, token)) {1762 build(context, token);1763 return 24;1764 }1765 if(match_BackgroundLine(context, token)) {1766 endRule(context, 'RuleHeader');1767 startRule(context, 'Background');1768 build(context, token);1769 return 25;1770 }1771 if(match_TagLine(context, token)) {1772 endRule(context, 'RuleHeader');1773 startRule(context, 'ScenarioDefinition');1774 startRule(context, 'Tags');1775 build(context, token);1776 return 30;1777 }1778 if(match_ScenarioLine(context, token)) {1779 endRule(context, 'RuleHeader');1780 startRule(context, 'ScenarioDefinition');1781 startRule(context, 'Scenario');1782 build(context, token);1783 return 31;1784 }1785 if(match_RuleLine(context, token)) {1786 endRule(context, 'RuleHeader');1787 endRule(context, 'Rule');1788 startRule(context, 'Rule');1789 startRule(context, 'RuleHeader');1790 build(context, token);1791 return 22;1792 }1793 if(match_Empty(context, token)) {1794 build(context, token);1795 return 24;1796 }1797 1798 var stateComment = "State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:0";1799 token.detach();1800 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];1801 var error = token.isEof ?1802 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1803 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1804 if (self.stopAtFirstError) throw error;1805 addError(context, error);1806 return 24;1807 }1808 // GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:01809 function matchTokenAt_25(token, context) {1810 if(match_EOF(context, token)) {1811 endRule(context, 'Background');1812 endRule(context, 'Rule');1813 endRule(context, 'Feature');1814 build(context, token);1815 return 41;1816 }1817 if(match_Empty(context, token)) {1818 build(context, token);1819 return 25;1820 }1821 if(match_Comment(context, token)) {1822 build(context, token);1823 return 27;1824 }1825 if(match_StepLine(context, token)) {1826 startRule(context, 'Step');1827 build(context, token);1828 return 28;1829 }1830 if(match_TagLine(context, token)) {1831 endRule(context, 'Background');1832 startRule(context, 'ScenarioDefinition');1833 startRule(context, 'Tags');1834 build(context, token);1835 return 30;1836 }1837 if(match_ScenarioLine(context, token)) {1838 endRule(context, 'Background');1839 startRule(context, 'ScenarioDefinition');1840 startRule(context, 'Scenario');1841 build(context, token);1842 return 31;1843 }1844 if(match_RuleLine(context, token)) {1845 endRule(context, 'Background');1846 endRule(context, 'Rule');1847 startRule(context, 'Rule');1848 startRule(context, 'RuleHeader');1849 build(context, token);1850 return 22;1851 }1852 if(match_Other(context, token)) {1853 startRule(context, 'Description');1854 build(context, token);1855 return 26;1856 }1857 1858 var stateComment = "State: 25 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0";1859 token.detach();1860 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1861 var error = token.isEof ?1862 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1863 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1864 if (self.stopAtFirstError) throw error;1865 addError(context, error);1866 return 25;1867 }1868 // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:01869 function matchTokenAt_26(token, context) {1870 if(match_EOF(context, token)) {1871 endRule(context, 'Description');1872 endRule(context, 'Background');1873 endRule(context, 'Rule');1874 endRule(context, 'Feature');1875 build(context, token);1876 return 41;1877 }1878 if(match_Comment(context, token)) {1879 endRule(context, 'Description');1880 build(context, token);1881 return 27;1882 }1883 if(match_StepLine(context, token)) {1884 endRule(context, 'Description');1885 startRule(context, 'Step');1886 build(context, token);1887 return 28;1888 }1889 if(match_TagLine(context, token)) {1890 endRule(context, 'Description');1891 endRule(context, 'Background');1892 startRule(context, 'ScenarioDefinition');1893 startRule(context, 'Tags');1894 build(context, token);1895 return 30;1896 }1897 if(match_ScenarioLine(context, token)) {1898 endRule(context, 'Description');1899 endRule(context, 'Background');1900 startRule(context, 'ScenarioDefinition');1901 startRule(context, 'Scenario');1902 build(context, token);1903 return 31;1904 }1905 if(match_RuleLine(context, token)) {1906 endRule(context, 'Description');1907 endRule(context, 'Background');1908 endRule(context, 'Rule');1909 startRule(context, 'Rule');1910 startRule(context, 'RuleHeader');1911 build(context, token);1912 return 22;1913 }1914 if(match_Other(context, token)) {1915 build(context, token);1916 return 26;1917 }1918 1919 var stateComment = "State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";1920 token.detach();1921 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1922 var error = token.isEof ?1923 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1924 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1925 if (self.stopAtFirstError) throw error;1926 addError(context, error);1927 return 26;1928 }1929 // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:01930 function matchTokenAt_27(token, context) {1931 if(match_EOF(context, token)) {1932 endRule(context, 'Background');1933 endRule(context, 'Rule');1934 endRule(context, 'Feature');1935 build(context, token);1936 return 41;1937 }1938 if(match_Comment(context, token)) {1939 build(context, token);1940 return 27;1941 }1942 if(match_StepLine(context, token)) {1943 startRule(context, 'Step');1944 build(context, token);1945 return 28;1946 }1947 if(match_TagLine(context, token)) {1948 endRule(context, 'Background');1949 startRule(context, 'ScenarioDefinition');1950 startRule(context, 'Tags');1951 build(context, token);1952 return 30;1953 }1954 if(match_ScenarioLine(context, token)) {1955 endRule(context, 'Background');1956 startRule(context, 'ScenarioDefinition');1957 startRule(context, 'Scenario');1958 build(context, token);1959 return 31;1960 }1961 if(match_RuleLine(context, token)) {1962 endRule(context, 'Background');1963 endRule(context, 'Rule');1964 startRule(context, 'Rule');1965 startRule(context, 'RuleHeader');1966 build(context, token);1967 return 22;1968 }1969 if(match_Empty(context, token)) {1970 build(context, token);1971 return 27;1972 }1973 1974 var stateComment = "State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0";1975 token.detach();1976 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];1977 var error = token.isEof ?1978 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1979 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1980 if (self.stopAtFirstError) throw error;1981 addError(context, error);1982 return 27;1983 }1984 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:01985 function matchTokenAt_28(token, context) {1986 if(match_EOF(context, token)) {1987 endRule(context, 'Step');1988 endRule(context, 'Background');1989 endRule(context, 'Rule');1990 endRule(context, 'Feature');1991 build(context, token);1992 return 41;1993 }1994 if(match_TableRow(context, token)) {1995 startRule(context, 'DataTable');1996 build(context, token);1997 return 29;1998 }1999 if(match_DocStringSeparator(context, token)) {2000 startRule(context, 'DocString');2001 build(context, token);2002 return 44;2003 }2004 if(match_StepLine(context, token)) {2005 endRule(context, 'Step');2006 startRule(context, 'Step');2007 build(context, token);2008 return 28;2009 }2010 if(match_TagLine(context, token)) {2011 endRule(context, 'Step');2012 endRule(context, 'Background');2013 startRule(context, 'ScenarioDefinition');2014 startRule(context, 'Tags');2015 build(context, token);2016 return 30;2017 }2018 if(match_ScenarioLine(context, token)) {2019 endRule(context, 'Step');2020 endRule(context, 'Background');2021 startRule(context, 'ScenarioDefinition');2022 startRule(context, 'Scenario');2023 build(context, token);2024 return 31;2025 }2026 if(match_RuleLine(context, token)) {2027 endRule(context, 'Step');2028 endRule(context, 'Background');2029 endRule(context, 'Rule');2030 startRule(context, 'Rule');2031 startRule(context, 'RuleHeader');2032 build(context, token);2033 return 22;2034 }2035 if(match_Comment(context, token)) {2036 build(context, token);2037 return 28;2038 }2039 if(match_Empty(context, token)) {2040 build(context, token);2041 return 28;2042 }2043 2044 var stateComment = "State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0";2045 token.detach();2046 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2047 var error = token.isEof ?2048 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2049 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2050 if (self.stopAtFirstError) throw error;2051 addError(context, error);2052 return 28;2053 }2054 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02055 function matchTokenAt_29(token, context) {2056 if(match_EOF(context, token)) {2057 endRule(context, 'DataTable');2058 endRule(context, 'Step');2059 endRule(context, 'Background');2060 endRule(context, 'Rule');2061 endRule(context, 'Feature');2062 build(context, token);2063 return 41;2064 }2065 if(match_TableRow(context, token)) {2066 build(context, token);2067 return 29;2068 }2069 if(match_StepLine(context, token)) {2070 endRule(context, 'DataTable');2071 endRule(context, 'Step');2072 startRule(context, 'Step');2073 build(context, token);2074 return 28;2075 }2076 if(match_TagLine(context, token)) {2077 endRule(context, 'DataTable');2078 endRule(context, 'Step');2079 endRule(context, 'Background');2080 startRule(context, 'ScenarioDefinition');2081 startRule(context, 'Tags');2082 build(context, token);2083 return 30;2084 }2085 if(match_ScenarioLine(context, token)) {2086 endRule(context, 'DataTable');2087 endRule(context, 'Step');2088 endRule(context, 'Background');2089 startRule(context, 'ScenarioDefinition');2090 startRule(context, 'Scenario');2091 build(context, token);2092 return 31;2093 }2094 if(match_RuleLine(context, token)) {2095 endRule(context, 'DataTable');2096 endRule(context, 'Step');2097 endRule(context, 'Background');2098 endRule(context, 'Rule');2099 startRule(context, 'Rule');2100 startRule(context, 'RuleHeader');2101 build(context, token);2102 return 22;2103 }2104 if(match_Comment(context, token)) {2105 build(context, token);2106 return 29;2107 }2108 if(match_Empty(context, token)) {2109 build(context, token);2110 return 29;2111 }2112 2113 var stateComment = "State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2114 token.detach();2115 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2116 var error = token.isEof ?2117 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2118 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2119 if (self.stopAtFirstError) throw error;2120 addError(context, error);2121 return 29;2122 }2123 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:02124 function matchTokenAt_30(token, context) {2125 if(match_TagLine(context, token)) {2126 build(context, token);2127 return 30;2128 }2129 if(match_ScenarioLine(context, token)) {2130 endRule(context, 'Tags');2131 startRule(context, 'Scenario');2132 build(context, token);2133 return 31;2134 }2135 if(match_Comment(context, token)) {2136 build(context, token);2137 return 30;2138 }2139 if(match_Empty(context, token)) {2140 build(context, token);2141 return 30;2142 }2143 2144 var stateComment = "State: 30 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0";2145 token.detach();2146 var expectedTokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"];2147 var error = token.isEof ?2148 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2149 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2150 if (self.stopAtFirstError) throw error;2151 addError(context, error);2152 return 30;2153 }2154 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:02155 function matchTokenAt_31(token, context) {2156 if(match_EOF(context, token)) {2157 endRule(context, 'Scenario');2158 endRule(context, 'ScenarioDefinition');2159 endRule(context, 'Rule');2160 endRule(context, 'Feature');2161 build(context, token);2162 return 41;2163 }2164 if(match_Empty(context, token)) {2165 build(context, token);2166 return 31;2167 }2168 if(match_Comment(context, token)) {2169 build(context, token);2170 return 33;2171 }2172 if(match_StepLine(context, token)) {2173 startRule(context, 'Step');2174 build(context, token);2175 return 34;2176 }2177 if(match_TagLine(context, token)) {2178 if(lookahead_0(context, token)) {2179 startRule(context, 'ExamplesDefinition');2180 startRule(context, 'Tags');2181 build(context, token);2182 return 36;2183 }2184 }2185 if(match_TagLine(context, token)) {2186 endRule(context, 'Scenario');2187 endRule(context, 'ScenarioDefinition');2188 startRule(context, 'ScenarioDefinition');2189 startRule(context, 'Tags');2190 build(context, token);2191 return 30;2192 }2193 if(match_ExamplesLine(context, token)) {2194 startRule(context, 'ExamplesDefinition');2195 startRule(context, 'Examples');2196 build(context, token);2197 return 37;2198 }2199 if(match_ScenarioLine(context, token)) {2200 endRule(context, 'Scenario');2201 endRule(context, 'ScenarioDefinition');2202 startRule(context, 'ScenarioDefinition');2203 startRule(context, 'Scenario');2204 build(context, token);2205 return 31;2206 }2207 if(match_RuleLine(context, token)) {2208 endRule(context, 'Scenario');2209 endRule(context, 'ScenarioDefinition');2210 endRule(context, 'Rule');2211 startRule(context, 'Rule');2212 startRule(context, 'RuleHeader');2213 build(context, token);2214 return 22;2215 }2216 if(match_Other(context, token)) {2217 startRule(context, 'Description');2218 build(context, token);2219 return 32;2220 }2221 2222 var stateComment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";2223 token.detach();2224 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2225 var error = token.isEof ?2226 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2227 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2228 if (self.stopAtFirstError) throw error;2229 addError(context, error);2230 return 31;2231 }2232 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:02233 function matchTokenAt_32(token, context) {2234 if(match_EOF(context, token)) {2235 endRule(context, 'Description');2236 endRule(context, 'Scenario');2237 endRule(context, 'ScenarioDefinition');2238 endRule(context, 'Rule');2239 endRule(context, 'Feature');2240 build(context, token);2241 return 41;2242 }2243 if(match_Comment(context, token)) {2244 endRule(context, 'Description');2245 build(context, token);2246 return 33;2247 }2248 if(match_StepLine(context, token)) {2249 endRule(context, 'Description');2250 startRule(context, 'Step');2251 build(context, token);2252 return 34;2253 }2254 if(match_TagLine(context, token)) {2255 if(lookahead_0(context, token)) {2256 endRule(context, 'Description');2257 startRule(context, 'ExamplesDefinition');2258 startRule(context, 'Tags');2259 build(context, token);2260 return 36;2261 }2262 }2263 if(match_TagLine(context, token)) {2264 endRule(context, 'Description');2265 endRule(context, 'Scenario');2266 endRule(context, 'ScenarioDefinition');2267 startRule(context, 'ScenarioDefinition');2268 startRule(context, 'Tags');2269 build(context, token);2270 return 30;2271 }2272 if(match_ExamplesLine(context, token)) {2273 endRule(context, 'Description');2274 startRule(context, 'ExamplesDefinition');2275 startRule(context, 'Examples');2276 build(context, token);2277 return 37;2278 }2279 if(match_ScenarioLine(context, token)) {2280 endRule(context, 'Description');2281 endRule(context, 'Scenario');2282 endRule(context, 'ScenarioDefinition');2283 startRule(context, 'ScenarioDefinition');2284 startRule(context, 'Scenario');2285 build(context, token);2286 return 31;2287 }2288 if(match_RuleLine(context, token)) {2289 endRule(context, 'Description');2290 endRule(context, 'Scenario');2291 endRule(context, 'ScenarioDefinition');2292 endRule(context, 'Rule');2293 startRule(context, 'Rule');2294 startRule(context, 'RuleHeader');2295 build(context, token);2296 return 22;2297 }2298 if(match_Other(context, token)) {2299 build(context, token);2300 return 32;2301 }2302 2303 var stateComment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";2304 token.detach();2305 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2306 var error = token.isEof ?2307 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2308 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2309 if (self.stopAtFirstError) throw error;2310 addError(context, error);2311 return 32;2312 }2313 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:02314 function matchTokenAt_33(token, context) {2315 if(match_EOF(context, token)) {2316 endRule(context, 'Scenario');2317 endRule(context, 'ScenarioDefinition');2318 endRule(context, 'Rule');2319 endRule(context, 'Feature');2320 build(context, token);2321 return 41;2322 }2323 if(match_Comment(context, token)) {2324 build(context, token);2325 return 33;2326 }2327 if(match_StepLine(context, token)) {2328 startRule(context, 'Step');2329 build(context, token);2330 return 34;2331 }2332 if(match_TagLine(context, token)) {2333 if(lookahead_0(context, token)) {2334 startRule(context, 'ExamplesDefinition');2335 startRule(context, 'Tags');2336 build(context, token);2337 return 36;2338 }2339 }2340 if(match_TagLine(context, token)) {2341 endRule(context, 'Scenario');2342 endRule(context, 'ScenarioDefinition');2343 startRule(context, 'ScenarioDefinition');2344 startRule(context, 'Tags');2345 build(context, token);2346 return 30;2347 }2348 if(match_ExamplesLine(context, token)) {2349 startRule(context, 'ExamplesDefinition');2350 startRule(context, 'Examples');2351 build(context, token);2352 return 37;2353 }2354 if(match_ScenarioLine(context, token)) {2355 endRule(context, 'Scenario');2356 endRule(context, 'ScenarioDefinition');2357 startRule(context, 'ScenarioDefinition');2358 startRule(context, 'Scenario');2359 build(context, token);2360 return 31;2361 }2362 if(match_RuleLine(context, token)) {2363 endRule(context, 'Scenario');2364 endRule(context, 'ScenarioDefinition');2365 endRule(context, 'Rule');2366 startRule(context, 'Rule');2367 startRule(context, 'RuleHeader');2368 build(context, token);2369 return 22;2370 }2371 if(match_Empty(context, token)) {2372 build(context, token);2373 return 33;2374 }2375 2376 var stateComment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";2377 token.detach();2378 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];2379 var error = token.isEof ?2380 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2381 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2382 if (self.stopAtFirstError) throw error;2383 addError(context, error);2384 return 33;2385 }2386 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:02387 function matchTokenAt_34(token, context) {2388 if(match_EOF(context, token)) {2389 endRule(context, 'Step');2390 endRule(context, 'Scenario');2391 endRule(context, 'ScenarioDefinition');2392 endRule(context, 'Rule');2393 endRule(context, 'Feature');2394 build(context, token);2395 return 41;2396 }2397 if(match_TableRow(context, token)) {2398 startRule(context, 'DataTable');2399 build(context, token);2400 return 35;2401 }2402 if(match_DocStringSeparator(context, token)) {2403 startRule(context, 'DocString');2404 build(context, token);2405 return 42;2406 }2407 if(match_StepLine(context, token)) {2408 endRule(context, 'Step');2409 startRule(context, 'Step');2410 build(context, token);2411 return 34;2412 }2413 if(match_TagLine(context, token)) {2414 if(lookahead_0(context, token)) {2415 endRule(context, 'Step');2416 startRule(context, 'ExamplesDefinition');2417 startRule(context, 'Tags');2418 build(context, token);2419 return 36;2420 }2421 }2422 if(match_TagLine(context, token)) {2423 endRule(context, 'Step');2424 endRule(context, 'Scenario');2425 endRule(context, 'ScenarioDefinition');2426 startRule(context, 'ScenarioDefinition');2427 startRule(context, 'Tags');2428 build(context, token);2429 return 30;2430 }2431 if(match_ExamplesLine(context, token)) {2432 endRule(context, 'Step');2433 startRule(context, 'ExamplesDefinition');2434 startRule(context, 'Examples');2435 build(context, token);2436 return 37;2437 }2438 if(match_ScenarioLine(context, token)) {2439 endRule(context, 'Step');2440 endRule(context, 'Scenario');2441 endRule(context, 'ScenarioDefinition');2442 startRule(context, 'ScenarioDefinition');2443 startRule(context, 'Scenario');2444 build(context, token);2445 return 31;2446 }2447 if(match_RuleLine(context, token)) {2448 endRule(context, 'Step');2449 endRule(context, 'Scenario');2450 endRule(context, 'ScenarioDefinition');2451 endRule(context, 'Rule');2452 startRule(context, 'Rule');2453 startRule(context, 'RuleHeader');2454 build(context, token);2455 return 22;2456 }2457 if(match_Comment(context, token)) {2458 build(context, token);2459 return 34;2460 }2461 if(match_Empty(context, token)) {2462 build(context, token);2463 return 34;2464 }2465 2466 var stateComment = "State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";2467 token.detach();2468 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2469 var error = token.isEof ?2470 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2471 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2472 if (self.stopAtFirstError) throw error;2473 addError(context, error);2474 return 34;2475 }2476 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02477 function matchTokenAt_35(token, context) {2478 if(match_EOF(context, token)) {2479 endRule(context, 'DataTable');2480 endRule(context, 'Step');2481 endRule(context, 'Scenario');2482 endRule(context, 'ScenarioDefinition');2483 endRule(context, 'Rule');2484 endRule(context, 'Feature');2485 build(context, token);2486 return 41;2487 }2488 if(match_TableRow(context, token)) {2489 build(context, token);2490 return 35;2491 }2492 if(match_StepLine(context, token)) {2493 endRule(context, 'DataTable');2494 endRule(context, 'Step');2495 startRule(context, 'Step');2496 build(context, token);2497 return 34;2498 }2499 if(match_TagLine(context, token)) {2500 if(lookahead_0(context, token)) {2501 endRule(context, 'DataTable');2502 endRule(context, 'Step');2503 startRule(context, 'ExamplesDefinition');2504 startRule(context, 'Tags');2505 build(context, token);2506 return 36;2507 }2508 }2509 if(match_TagLine(context, token)) {2510 endRule(context, 'DataTable');2511 endRule(context, 'Step');2512 endRule(context, 'Scenario');2513 endRule(context, 'ScenarioDefinition');2514 startRule(context, 'ScenarioDefinition');2515 startRule(context, 'Tags');2516 build(context, token);2517 return 30;2518 }2519 if(match_ExamplesLine(context, token)) {2520 endRule(context, 'DataTable');2521 endRule(context, 'Step');2522 startRule(context, 'ExamplesDefinition');2523 startRule(context, 'Examples');2524 build(context, token);2525 return 37;2526 }2527 if(match_ScenarioLine(context, token)) {2528 endRule(context, 'DataTable');2529 endRule(context, 'Step');2530 endRule(context, 'Scenario');2531 endRule(context, 'ScenarioDefinition');2532 startRule(context, 'ScenarioDefinition');2533 startRule(context, 'Scenario');2534 build(context, token);2535 return 31;2536 }2537 if(match_RuleLine(context, token)) {2538 endRule(context, 'DataTable');2539 endRule(context, 'Step');2540 endRule(context, 'Scenario');2541 endRule(context, 'ScenarioDefinition');2542 endRule(context, 'Rule');2543 startRule(context, 'Rule');2544 startRule(context, 'RuleHeader');2545 build(context, token);2546 return 22;2547 }2548 if(match_Comment(context, token)) {2549 build(context, token);2550 return 35;2551 }2552 if(match_Empty(context, token)) {2553 build(context, token);2554 return 35;2555 }2556 2557 var stateComment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2558 token.detach();2559 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2560 var error = token.isEof ?2561 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2562 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2563 if (self.stopAtFirstError) throw error;2564 addError(context, error);2565 return 35;2566 }2567 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:02568 function matchTokenAt_36(token, context) {2569 if(match_TagLine(context, token)) {2570 build(context, token);2571 return 36;2572 }2573 if(match_ExamplesLine(context, token)) {2574 endRule(context, 'Tags');2575 startRule(context, 'Examples');2576 build(context, token);2577 return 37;2578 }2579 if(match_Comment(context, token)) {2580 build(context, token);2581 return 36;2582 }2583 if(match_Empty(context, token)) {2584 build(context, token);2585 return 36;2586 }2587 2588 var stateComment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";2589 token.detach();2590 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];2591 var error = token.isEof ?2592 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2593 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2594 if (self.stopAtFirstError) throw error;2595 addError(context, error);2596 return 36;2597 }2598 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:02599 function matchTokenAt_37(token, context) {2600 if(match_EOF(context, token)) {2601 endRule(context, 'Examples');2602 endRule(context, 'ExamplesDefinition');2603 endRule(context, 'Scenario');2604 endRule(context, 'ScenarioDefinition');2605 endRule(context, 'Rule');2606 endRule(context, 'Feature');2607 build(context, token);2608 return 41;2609 }2610 if(match_Empty(context, token)) {2611 build(context, token);2612 return 37;2613 }2614 if(match_Comment(context, token)) {2615 build(context, token);2616 return 39;2617 }2618 if(match_TableRow(context, token)) {2619 startRule(context, 'ExamplesTable');2620 build(context, token);2621 return 40;2622 }2623 if(match_TagLine(context, token)) {2624 if(lookahead_0(context, token)) {2625 endRule(context, 'Examples');2626 endRule(context, 'ExamplesDefinition');2627 startRule(context, 'ExamplesDefinition');2628 startRule(context, 'Tags');2629 build(context, token);2630 return 36;2631 }2632 }2633 if(match_TagLine(context, token)) {2634 endRule(context, 'Examples');2635 endRule(context, 'ExamplesDefinition');2636 endRule(context, 'Scenario');2637 endRule(context, 'ScenarioDefinition');2638 startRule(context, 'ScenarioDefinition');2639 startRule(context, 'Tags');2640 build(context, token);2641 return 30;2642 }2643 if(match_ExamplesLine(context, token)) {2644 endRule(context, 'Examples');2645 endRule(context, 'ExamplesDefinition');2646 startRule(context, 'ExamplesDefinition');2647 startRule(context, 'Examples');2648 build(context, token);2649 return 37;2650 }2651 if(match_ScenarioLine(context, token)) {2652 endRule(context, 'Examples');2653 endRule(context, 'ExamplesDefinition');2654 endRule(context, 'Scenario');2655 endRule(context, 'ScenarioDefinition');2656 startRule(context, 'ScenarioDefinition');2657 startRule(context, 'Scenario');2658 build(context, token);2659 return 31;2660 }2661 if(match_RuleLine(context, token)) {2662 endRule(context, 'Examples');2663 endRule(context, 'ExamplesDefinition');2664 endRule(context, 'Scenario');2665 endRule(context, 'ScenarioDefinition');2666 endRule(context, 'Rule');2667 startRule(context, 'Rule');2668 startRule(context, 'RuleHeader');2669 build(context, token);2670 return 22;2671 }2672 if(match_Other(context, token)) {2673 startRule(context, 'Description');2674 build(context, token);2675 return 38;2676 }2677 2678 var stateComment = "State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";2679 token.detach();2680 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2681 var error = token.isEof ?2682 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2683 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2684 if (self.stopAtFirstError) throw error;2685 addError(context, error);2686 return 37;2687 }2688 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:02689 function matchTokenAt_38(token, context) {2690 if(match_EOF(context, token)) {2691 endRule(context, 'Description');2692 endRule(context, 'Examples');2693 endRule(context, 'ExamplesDefinition');2694 endRule(context, 'Scenario');2695 endRule(context, 'ScenarioDefinition');2696 endRule(context, 'Rule');2697 endRule(context, 'Feature');2698 build(context, token);2699 return 41;2700 }2701 if(match_Comment(context, token)) {2702 endRule(context, 'Description');2703 build(context, token);2704 return 39;2705 }2706 if(match_TableRow(context, token)) {2707 endRule(context, 'Description');2708 startRule(context, 'ExamplesTable');2709 build(context, token);2710 return 40;2711 }2712 if(match_TagLine(context, token)) {2713 if(lookahead_0(context, token)) {2714 endRule(context, 'Description');2715 endRule(context, 'Examples');2716 endRule(context, 'ExamplesDefinition');2717 startRule(context, 'ExamplesDefinition');2718 startRule(context, 'Tags');2719 build(context, token);2720 return 36;2721 }2722 }2723 if(match_TagLine(context, token)) {2724 endRule(context, 'Description');2725 endRule(context, 'Examples');2726 endRule(context, 'ExamplesDefinition');2727 endRule(context, 'Scenario');2728 endRule(context, 'ScenarioDefinition');2729 startRule(context, 'ScenarioDefinition');2730 startRule(context, 'Tags');2731 build(context, token);2732 return 30;2733 }2734 if(match_ExamplesLine(context, token)) {2735 endRule(context, 'Description');2736 endRule(context, 'Examples');2737 endRule(context, 'ExamplesDefinition');2738 startRule(context, 'ExamplesDefinition');2739 startRule(context, 'Examples');2740 build(context, token);2741 return 37;2742 }2743 if(match_ScenarioLine(context, token)) {2744 endRule(context, 'Description');2745 endRule(context, 'Examples');2746 endRule(context, 'ExamplesDefinition');2747 endRule(context, 'Scenario');2748 endRule(context, 'ScenarioDefinition');2749 startRule(context, 'ScenarioDefinition');2750 startRule(context, 'Scenario');2751 build(context, token);2752 return 31;2753 }2754 if(match_RuleLine(context, token)) {2755 endRule(context, 'Description');2756 endRule(context, 'Examples');2757 endRule(context, 'ExamplesDefinition');2758 endRule(context, 'Scenario');2759 endRule(context, 'ScenarioDefinition');2760 endRule(context, 'Rule');2761 startRule(context, 'Rule');2762 startRule(context, 'RuleHeader');2763 build(context, token);2764 return 22;2765 }2766 if(match_Other(context, token)) {2767 build(context, token);2768 return 38;2769 }2770 2771 var stateComment = "State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";2772 token.detach();2773 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2774 var error = token.isEof ?2775 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2776 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2777 if (self.stopAtFirstError) throw error;2778 addError(context, error);2779 return 38;2780 }2781 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:02782 function matchTokenAt_39(token, context) {2783 if(match_EOF(context, token)) {2784 endRule(context, 'Examples');2785 endRule(context, 'ExamplesDefinition');2786 endRule(context, 'Scenario');2787 endRule(context, 'ScenarioDefinition');2788 endRule(context, 'Rule');2789 endRule(context, 'Feature');2790 build(context, token);2791 return 41;2792 }2793 if(match_Comment(context, token)) {2794 build(context, token);2795 return 39;2796 }2797 if(match_TableRow(context, token)) {2798 startRule(context, 'ExamplesTable');2799 build(context, token);2800 return 40;2801 }2802 if(match_TagLine(context, token)) {2803 if(lookahead_0(context, token)) {2804 endRule(context, 'Examples');2805 endRule(context, 'ExamplesDefinition');2806 startRule(context, 'ExamplesDefinition');2807 startRule(context, 'Tags');2808 build(context, token);2809 return 36;2810 }2811 }2812 if(match_TagLine(context, token)) {2813 endRule(context, 'Examples');2814 endRule(context, 'ExamplesDefinition');2815 endRule(context, 'Scenario');2816 endRule(context, 'ScenarioDefinition');2817 startRule(context, 'ScenarioDefinition');2818 startRule(context, 'Tags');2819 build(context, token);2820 return 30;2821 }2822 if(match_ExamplesLine(context, token)) {2823 endRule(context, 'Examples');2824 endRule(context, 'ExamplesDefinition');2825 startRule(context, 'ExamplesDefinition');2826 startRule(context, 'Examples');2827 build(context, token);2828 return 37;2829 }2830 if(match_ScenarioLine(context, token)) {2831 endRule(context, 'Examples');2832 endRule(context, 'ExamplesDefinition');2833 endRule(context, 'Scenario');2834 endRule(context, 'ScenarioDefinition');2835 startRule(context, 'ScenarioDefinition');2836 startRule(context, 'Scenario');2837 build(context, token);2838 return 31;2839 }2840 if(match_RuleLine(context, token)) {2841 endRule(context, 'Examples');2842 endRule(context, 'ExamplesDefinition');2843 endRule(context, 'Scenario');2844 endRule(context, 'ScenarioDefinition');2845 endRule(context, 'Rule');2846 startRule(context, 'Rule');2847 startRule(context, 'RuleHeader');2848 build(context, token);2849 return 22;2850 }2851 if(match_Empty(context, token)) {2852 build(context, token);2853 return 39;2854 }2855 2856 var stateComment = "State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";2857 token.detach();2858 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];2859 var error = token.isEof ?2860 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2861 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2862 if (self.stopAtFirstError) throw error;2863 addError(context, error);2864 return 39;2865 }2866 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:02867 function matchTokenAt_40(token, context) {2868 if(match_EOF(context, token)) {2869 endRule(context, 'ExamplesTable');2870 endRule(context, 'Examples');2871 endRule(context, 'ExamplesDefinition');2872 endRule(context, 'Scenario');2873 endRule(context, 'ScenarioDefinition');2874 endRule(context, 'Rule');2875 endRule(context, 'Feature');2876 build(context, token);2877 return 41;2878 }2879 if(match_TableRow(context, token)) {2880 build(context, token);2881 return 40;2882 }2883 if(match_TagLine(context, token)) {2884 if(lookahead_0(context, token)) {2885 endRule(context, 'ExamplesTable');2886 endRule(context, 'Examples');2887 endRule(context, 'ExamplesDefinition');2888 startRule(context, 'ExamplesDefinition');2889 startRule(context, 'Tags');2890 build(context, token);2891 return 36;2892 }2893 }2894 if(match_TagLine(context, token)) {2895 endRule(context, 'ExamplesTable');2896 endRule(context, 'Examples');2897 endRule(context, 'ExamplesDefinition');2898 endRule(context, 'Scenario');2899 endRule(context, 'ScenarioDefinition');2900 startRule(context, 'ScenarioDefinition');2901 startRule(context, 'Tags');2902 build(context, token);2903 return 30;2904 }2905 if(match_ExamplesLine(context, token)) {2906 endRule(context, 'ExamplesTable');2907 endRule(context, 'Examples');2908 endRule(context, 'ExamplesDefinition');2909 startRule(context, 'ExamplesDefinition');2910 startRule(context, 'Examples');2911 build(context, token);2912 return 37;2913 }2914 if(match_ScenarioLine(context, token)) {2915 endRule(context, 'ExamplesTable');2916 endRule(context, 'Examples');2917 endRule(context, 'ExamplesDefinition');2918 endRule(context, 'Scenario');2919 endRule(context, 'ScenarioDefinition');2920 startRule(context, 'ScenarioDefinition');2921 startRule(context, 'Scenario');2922 build(context, token);2923 return 31;2924 }2925 if(match_RuleLine(context, token)) {2926 endRule(context, 'ExamplesTable');2927 endRule(context, 'Examples');2928 endRule(context, 'ExamplesDefinition');2929 endRule(context, 'Scenario');2930 endRule(context, 'ScenarioDefinition');2931 endRule(context, 'Rule');2932 startRule(context, 'Rule');2933 startRule(context, 'RuleHeader');2934 build(context, token);2935 return 22;2936 }2937 if(match_Comment(context, token)) {2938 build(context, token);2939 return 40;2940 }2941 if(match_Empty(context, token)) {2942 build(context, token);2943 return 40;2944 }2945 2946 var stateComment = "State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";2947 token.detach();2948 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2949 var error = token.isEof ?2950 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2951 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2952 if (self.stopAtFirstError) throw error;2953 addError(context, error);2954 return 40;2955 }2956 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:02957 function matchTokenAt_42(token, context) {2958 if(match_DocStringSeparator(context, token)) {2959 build(context, token);2960 return 43;2961 }2962 if(match_Other(context, token)) {2963 build(context, token);2964 return 42;2965 }2966 2967 var stateComment = "State: 42 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";2968 token.detach();2969 var expectedTokens = ["#DocStringSeparator", "#Other"];2970 var error = token.isEof ?2971 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2972 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2973 if (self.stopAtFirstError) throw error;2974 addError(context, error);2975 return 42;2976 }2977 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:02978 function matchTokenAt_43(token, context) {2979 if(match_EOF(context, token)) {2980 endRule(context, 'DocString');2981 endRule(context, 'Step');2982 endRule(context, 'Scenario');2983 endRule(context, 'ScenarioDefinition');2984 endRule(context, 'Rule');2985 endRule(context, 'Feature');2986 build(context, token);2987 return 41;2988 }2989 if(match_StepLine(context, token)) {2990 endRule(context, 'DocString');2991 endRule(context, 'Step');2992 startRule(context, 'Step');2993 build(context, token);2994 return 34;2995 }2996 if(match_TagLine(context, token)) {2997 if(lookahead_0(context, token)) {2998 endRule(context, 'DocString');2999 endRule(context, 'Step');3000 startRule(context, 'ExamplesDefinition');3001 startRule(context, 'Tags');3002 build(context, token);3003 return 36;3004 }3005 }3006 if(match_TagLine(context, token)) {3007 endRule(context, 'DocString');3008 endRule(context, 'Step');3009 endRule(context, 'Scenario');3010 endRule(context, 'ScenarioDefinition');3011 startRule(context, 'ScenarioDefinition');3012 startRule(context, 'Tags');3013 build(context, token);3014 return 30;3015 }3016 if(match_ExamplesLine(context, token)) {3017 endRule(context, 'DocString');3018 endRule(context, 'Step');3019 startRule(context, 'ExamplesDefinition');3020 startRule(context, 'Examples');3021 build(context, token);3022 return 37;3023 }3024 if(match_ScenarioLine(context, token)) {3025 endRule(context, 'DocString');3026 endRule(context, 'Step');3027 endRule(context, 'Scenario');3028 endRule(context, 'ScenarioDefinition');3029 startRule(context, 'ScenarioDefinition');3030 startRule(context, 'Scenario');3031 build(context, token);3032 return 31;3033 }3034 if(match_RuleLine(context, token)) {3035 endRule(context, 'DocString');3036 endRule(context, 'Step');3037 endRule(context, 'Scenario');3038 endRule(context, 'ScenarioDefinition');3039 endRule(context, 'Rule');3040 startRule(context, 'Rule');3041 startRule(context, 'RuleHeader');3042 build(context, token);3043 return 22;3044 }3045 if(match_Comment(context, token)) {3046 build(context, token);3047 return 43;3048 }3049 if(match_Empty(context, token)) {3050 build(context, token);3051 return 43;3052 }3053 3054 var stateComment = "State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3055 token.detach();3056 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3057 var error = token.isEof ?3058 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3059 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3060 if (self.stopAtFirstError) throw error;3061 addError(context, error);3062 return 43;3063 }3064 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03065 function matchTokenAt_44(token, context) {3066 if(match_DocStringSeparator(context, token)) {3067 build(context, token);3068 return 45;3069 }3070 if(match_Other(context, token)) {3071 build(context, token);3072 return 44;3073 }3074 3075 var stateComment = "State: 44 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3076 token.detach();3077 var expectedTokens = ["#DocStringSeparator", "#Other"];3078 var error = token.isEof ?3079 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3080 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3081 if (self.stopAtFirstError) throw error;3082 addError(context, error);3083 return 44;3084 }3085 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03086 function matchTokenAt_45(token, context) {3087 if(match_EOF(context, token)) {3088 endRule(context, 'DocString');3089 endRule(context, 'Step');3090 endRule(context, 'Background');3091 endRule(context, 'Rule');3092 endRule(context, 'Feature');3093 build(context, token);3094 return 41;3095 }3096 if(match_StepLine(context, token)) {3097 endRule(context, 'DocString');3098 endRule(context, 'Step');3099 startRule(context, 'Step');3100 build(context, token);3101 return 28;3102 }3103 if(match_TagLine(context, token)) {3104 endRule(context, 'DocString');3105 endRule(context, 'Step');3106 endRule(context, 'Background');3107 startRule(context, 'ScenarioDefinition');3108 startRule(context, 'Tags');3109 build(context, token);3110 return 30;3111 }3112 if(match_ScenarioLine(context, token)) {3113 endRule(context, 'DocString');3114 endRule(context, 'Step');3115 endRule(context, 'Background');3116 startRule(context, 'ScenarioDefinition');3117 startRule(context, 'Scenario');3118 build(context, token);3119 return 31;3120 }3121 if(match_RuleLine(context, token)) {3122 endRule(context, 'DocString');3123 endRule(context, 'Step');3124 endRule(context, 'Background');3125 endRule(context, 'Rule');3126 startRule(context, 'Rule');3127 startRule(context, 'RuleHeader');3128 build(context, token);3129 return 22;3130 }3131 if(match_Comment(context, token)) {3132 build(context, token);3133 return 45;3134 }3135 if(match_Empty(context, token)) {3136 build(context, token);3137 return 45;3138 }3139 3140 var stateComment = "State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3141 token.detach();3142 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3143 var error = token.isEof ?3144 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3145 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3146 if (self.stopAtFirstError) throw error;3147 addError(context, error);3148 return 45;3149 }3150 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03151 function matchTokenAt_46(token, context) {3152 if(match_DocStringSeparator(context, token)) {3153 build(context, token);3154 return 47;3155 }3156 if(match_Other(context, token)) {3157 build(context, token);3158 return 46;3159 }3160 3161 var stateComment = "State: 46 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3162 token.detach();3163 var expectedTokens = ["#DocStringSeparator", "#Other"];3164 var error = token.isEof ?3165 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3166 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3167 if (self.stopAtFirstError) throw error;3168 addError(context, error);3169 return 46;3170 }3171 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03172 function matchTokenAt_47(token, context) {3173 if(match_EOF(context, token)) {3174 endRule(context, 'DocString');3175 endRule(context, 'Step');3176 endRule(context, 'Scenario');3177 endRule(context, 'ScenarioDefinition');3178 endRule(context, 'Feature');3179 build(context, token);3180 return 41;3181 }3182 if(match_StepLine(context, token)) {3183 endRule(context, 'DocString');3184 endRule(context, 'Step');3185 startRule(context, 'Step');3186 build(context, token);3187 return 15;3188 }3189 if(match_TagLine(context, token)) {3190 if(lookahead_0(context, token)) {3191 endRule(context, 'DocString');3192 endRule(context, 'Step');3193 startRule(context, 'ExamplesDefinition');3194 startRule(context, 'Tags');3195 build(context, token);3196 return 17;3197 }3198 }3199 if(match_TagLine(context, token)) {3200 endRule(context, 'DocString');3201 endRule(context, 'Step');3202 endRule(context, 'Scenario');3203 endRule(context, 'ScenarioDefinition');3204 startRule(context, 'ScenarioDefinition');3205 startRule(context, 'Tags');3206 build(context, token);3207 return 11;3208 }3209 if(match_ExamplesLine(context, token)) {3210 endRule(context, 'DocString');3211 endRule(context, 'Step');3212 startRule(context, 'ExamplesDefinition');3213 startRule(context, 'Examples');3214 build(context, token);3215 return 18;3216 }3217 if(match_ScenarioLine(context, token)) {3218 endRule(context, 'DocString');3219 endRule(context, 'Step');3220 endRule(context, 'Scenario');3221 endRule(context, 'ScenarioDefinition');3222 startRule(context, 'ScenarioDefinition');3223 startRule(context, 'Scenario');3224 build(context, token);3225 return 12;3226 }3227 if(match_RuleLine(context, token)) {3228 endRule(context, 'DocString');3229 endRule(context, 'Step');3230 endRule(context, 'Scenario');3231 endRule(context, 'ScenarioDefinition');3232 startRule(context, 'Rule');3233 startRule(context, 'RuleHeader');3234 build(context, token);3235 return 22;3236 }3237 if(match_Comment(context, token)) {3238 build(context, token);3239 return 47;3240 }3241 if(match_Empty(context, token)) {3242 build(context, token);3243 return 47;3244 }3245 3246 var stateComment = "State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3247 token.detach();3248 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3249 var error = token.isEof ?3250 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3251 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3252 if (self.stopAtFirstError) throw error;3253 addError(context, error);3254 return 47;3255 }3256 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03257 function matchTokenAt_48(token, context) {3258 if(match_DocStringSeparator(context, token)) {3259 build(context, token);3260 return 49;3261 }3262 if(match_Other(context, token)) {3263 build(context, token);3264 return 48;3265 }3266 3267 var stateComment = "State: 48 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3268 token.detach();3269 var expectedTokens = ["#DocStringSeparator", "#Other"];3270 var error = token.isEof ?3271 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3272 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3273 if (self.stopAtFirstError) throw error;3274 addError(context, error);3275 return 48;3276 }3277 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03278 function matchTokenAt_49(token, context) {3279 if(match_EOF(context, token)) {3280 endRule(context, 'DocString');3281 endRule(context, 'Step');3282 endRule(context, 'Background');3283 endRule(context, 'Feature');3284 build(context, token);3285 return 41;3286 }3287 if(match_StepLine(context, token)) {3288 endRule(context, 'DocString');3289 endRule(context, 'Step');3290 startRule(context, 'Step');3291 build(context, token);3292 return 9;3293 }3294 if(match_TagLine(context, token)) {3295 endRule(context, 'DocString');3296 endRule(context, 'Step');3297 endRule(context, 'Background');3298 startRule(context, 'ScenarioDefinition');3299 startRule(context, 'Tags');3300 build(context, token);3301 return 11;3302 }3303 if(match_ScenarioLine(context, token)) {3304 endRule(context, 'DocString');3305 endRule(context, 'Step');3306 endRule(context, 'Background');3307 startRule(context, 'ScenarioDefinition');3308 startRule(context, 'Scenario');3309 build(context, token);3310 return 12;3311 }3312 if(match_RuleLine(context, token)) {3313 endRule(context, 'DocString');3314 endRule(context, 'Step');3315 endRule(context, 'Background');3316 startRule(context, 'Rule');3317 startRule(context, 'RuleHeader');3318 build(context, token);3319 return 22;3320 }3321 if(match_Comment(context, token)) {3322 build(context, token);3323 return 49;3324 }3325 if(match_Empty(context, token)) {3326 build(context, token);3327 return 49;3328 }3329 ...

Full Screen

Full Screen

TestsUnitBaseCdsDdlParser.js

Source:TestsUnitBaseCdsDdlParser.js Github

copy

Full Screen

...22 assert.ok(rule instanceof SourceRangeImpl, "Opened rule must be derived from SourceRangeImpl");23 assert.equal("MyRule", rule.constructor.name, "Rule must be derived from (synthetic) MyRule prototype");24 assert.equal(NEXT_TOKEN_INDEX, rule.getStartTokenIndex(), "Wrong start token index");25 assert.equal(-1, rule.getEndTokenIndex(), "Wrong end token index");26 assert.ok("endRule" in rule, "Opened rule must contain endRule() method");27 assert.ok("attachChild" in rule, "Opened rule must contain attachChild() method");28 assert.ok("linkToParent" in rule, "Opened rule must contain linkToParent() method");29 rule.endRule();30 assert.equal(LAST_TOKEN_INDEX, rule.getEndTokenIndex(), "Wrong end token index");31 assert.ok(!("endRule" in rule), "Finished rule must not contain endRule() method");32 assert.ok(!("attachChild" in rule), "Finished rule must not contain attachChild() method");33 assert.ok(!("linkToParent" in rule), "Finished rule must not contain linkToParent() method");34 });35 test("startArrayRule_and_endRule_unparented", function (assert) {36 var rule = baseParser.startArrayRule("MyArrayRule");37 rule.level2 = true;38 assert.ok(rule instanceof EObjectContainmentEList, "Opened rule must be derived from EObjectContainmentEList");39 assert.equal("MyArrayRule", rule.constructor.name, "Rule must be derived from (synthetic) MyArrayRule prototype");40 assert.equal(NEXT_TOKEN_INDEX, rule.startTokenIndex, "Wrong start token index");41 assert.equal(-1, rule.endTokenIndex, "Wrong end token index");42 assert.ok("endRule" in rule, "Opened rule must contain endRule() method");43 assert.ok("attachChild" in rule, "Opened rule must contain attachChild() method");44 assert.ok("linkToParent" in rule, "Opened rule must contain linkToParent() method");45 var o = {46 level3:true,47 setContainer : function(parent) {48 this.c = parent;49 }50 };51 assert.equal(0,rule.length);52 rule.attachChild(o);53 assert.equal(1,rule.length);54 assert.equal(o,rule[0]);55 assert.equal(rule, o.c, "container must be array before endRule() called");56 // Test case: attachChild done before array's parent set.57 rule.linkToParent({level1:true});58 rule.endRule();59 assert.equal(rule.owner,o.c,"Container of array element must be owner of array after endRule() called.");60 assert.equal(LAST_TOKEN_INDEX, rule.endTokenIndex, "Wrong end token index");61 assert.ok(!("endRule" in rule), "Finished rule must not contain endRule() method");62 assert.ok(!("attachChild" in rule), "Finished rule must not contain attachChild() method");63 assert.ok(!("linkToParent" in rule), "Finished rule must not contain linkToParent() method");64 });65 test("startArrayRule_and_endRule_lazyParented", function (assert) {66 var parent = {level1:true};67 var rule = baseParser.startArrayRule("MyArrayRule", parent);68 rule.level2 = true;69 assert.ok(rule instanceof EObjectContainmentEList, "Opened rule must be derived from EObjectContainmentEList");70 assert.equal("MyArrayRule", rule.constructor.name, "Rule must be derived from (synthetic) MyArrayRule prototype");71 assert.equal(NEXT_TOKEN_INDEX, rule.startTokenIndex, "Wrong start token index");72 assert.equal(-1, rule.endTokenIndex, "Wrong end token index");73 assert.ok("endRule" in rule, "Opened rule must contain endRule() method");74 assert.ok("attachChild" in rule, "Opened rule must contain attachChild() method");75 assert.ok("linkToParent" in rule, "Opened rule must contain linkToParent() method");76 var o = {77 level3:true,78 setContainer : function(parent) {79 this.c = parent;80 }81 };82 assert.equal(0,rule.length);83 var propName = "myArrayRule";84 assert.ok(!(propName in parent), "Parent must not have array unless it contains children");85 rule.attachChild(o);86 assert.ok(propName in parent, "Parent must have array if it contains children");87 assert.equal(1,rule.length);88 assert.equal(o,rule[0]);89 assert.equal(rule.owner, o.c, "container must be parent even before endRule() called");90 rule.endRule();91 assert.equal(rule.owner,o.c,"Container of array element must be owner of array after endRule() called.");92 assert.equal(LAST_TOKEN_INDEX, rule.endTokenIndex, "Wrong end token index");93 assert.ok(!("endRule" in rule), "Finished rule must not contain endRule() method");94 assert.ok(!("attachChild" in rule), "Finished rule must not contain attachChild() method");95 assert.ok(!("linkToParent" in rule), "Finished rule must not contain linkToParent() method");96 });97 test("startArrayRule_and_endRule_preParented", function (assert) {98 var parent = {level1:true};99 var rule = baseParser.startArrayRule("MyArrayRule", parent, true);100 rule.level2 = true;101 assert.ok(rule instanceof EObjectContainmentEList, "Opened rule must be derived from EObjectContainmentEList");102 assert.equal("MyArrayRule", rule.constructor.name, "Rule must be derived from (synthetic) MyArrayRule prototype");103 assert.equal(NEXT_TOKEN_INDEX, rule.startTokenIndex, "Wrong start token index");104 assert.equal(-1, rule.endTokenIndex, "Wrong end token index");105 assert.ok("endRule" in rule, "Opened rule must contain endRule() method");106 assert.ok("attachChild" in rule, "Opened rule must contain attachChild() method");107 assert.ok("linkToParent" in rule, "Opened rule must contain linkToParent() method");108 var o = {109 level3:true,110 setContainer : function(parent) {111 this.c = parent;112 }113 };114 assert.equal(0,rule.length);115 var propName = "myArrayRule";116 assert.ok(propName in parent, "Parent must have array even it does not contain children");117 rule.attachChild(o);118 assert.ok(propName in parent, "Parent must have array if it contains children");119 assert.equal(1,rule.length);120 assert.equal(o,rule[0]);121 assert.equal(rule.owner, o.c, "container must be parent even before endRule() called");122 rule.endRule();123 assert.equal(rule.owner,o.c,"Container of array element must be owner of array after endRule() called.");124 assert.equal(LAST_TOKEN_INDEX, rule.endTokenIndex, "Wrong end token index");125 assert.ok(!("endRule" in rule), "Finished rule must not contain endRule() method");126 assert.ok(!("attachChild" in rule), "Finished rule must not contain attachChild() method");127 assert.ok(!("linkToParent" in rule), "Finished rule must not contain linkToParent() method");128 });129 test("attachChild_on_rule", function (assert) {130 var rule = baseParser.startRule("MyRule");131 var ruleChild = baseParser.startRule("MyRuleChild");132 rule.attachChild(ruleChild);133 assert.equal(ruleChild, rule.myRuleChild, "RuleChild expected as property 'myRuleChild' on rule");134 assert.equal(rule, ruleChild.eContainer(), "Rule expected as container of ruleChild");135 });136 test("attachChild_on_arrayRule", function (assert) {137 var rule = baseParser.startArrayRule("MyArrayRule");138 var ruleChild = baseParser.startRule("MyRule");139 rule.attachChild(ruleChild);140 assert.equal(ruleChild, rule[0], "RuleChild expected as array element on rule");141 assert.equal(rule, ruleChild.eContainer(), "Rule expected as container of ruleChild before endRule()");142 rule.linkToParent({level1:true});143 rule.endRule();144 assert.equal(rule.owner, ruleChild.eContainer(), "Rule's owner expected as container of ruleChild after endRule()");145 });146 test("tokenAndValue", function (assert) {147 var tav = baseParser.tokenAndValue("MyToken", 1);148 assert.ok(tav instanceof SourceRangeImpl, "TokenAndValue must be derived from SourceRangeImpl");149 assert.equal("TokenAndValue", tav.constructor.name, "TokenAndValue must be derived from (synthetic) TokenAndValue prototype");150 assert.equal("MyToken", tav.token, "Expected token is wrong");151 assert.equal(1, tav.value, "Expected value is wrong");152 var ruleValue = baseParser.startRule("MyRuleValue");153 tav = baseParser.tokenAndValue("MyToken", ruleValue);154 assert.equal(ruleValue, tav.value, "Expected value is wrong");155 assert.equal(tav, ruleValue.eContainer(), "RuleValue must have TokenAndValue as container");156 });157 test("linkChild_to_classicParent", function (assert) {158 var rule = baseParser.startRule("MyRule");...

Full Screen

Full Screen

TuringMachine.js

Source:TuringMachine.js Github

copy

Full Screen

...65 do {66 this.iteration();67 } while(this.currentStateId === this.newIterationState);68 69 let {stateId = -1, memory = []} = this.endRule(this.currentStateId, this.memory);70 this.currentStateId = stateId;71 this.memory = memory;72 const result = this.currentStateId === this.endStateId ? true : false;73 this.clear();74 return result;75 };76};...

Full Screen

Full Screen

Fsm.js

Source:Fsm.js Github

copy

Full Screen

...55 this.currentStateId = stateId;56 this.memory = memory;57 this.tree = tree;58 });59 let {stateId = -1, memory = []} = this.endRule(this.currentStateId, this.memory);60 this.currentStateId = stateId;61 this.memory = memory;62 let result = this.currentStateId === this.endStateId ? true : false;63 let tree = this.tree;64 this.clear();65 return {result, tree};66 }67 else {68 return {result: 'invalid string'};69 }70 };71};...

Full Screen

Full Screen

outline-none.js

Source:outline-none.js Github

copy

Full Screen

...27 } else {28 lastRule = null;29 }30 }31 function endRule() {32 if (lastRule) {33 if (lastRule.outline) {34 if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") === -1) {35 reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule);36 } else if (lastRule.propCount === 1) {37 reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);38 }39 }40 }41 }42 parser.addListener("startrule", startRule);43 parser.addListener("startfontface", startRule);44 parser.addListener("startpage", startRule);45 parser.addListener("startpagemargin", startRule);...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

1const postcss = require('postcss');2function findStart(endRule, ruleName)3{4 ruleName = ruleName || endRule.params;5 let prev = endRule.prev();6 // loop over previous rules7 while (prev)8 {9 // if previous rule is a '@at-start' rule10 if (prev.type == 'atrule' && prev.name == 'at-start')11 {12 // and matches given '@at-end' rule13 if (prev.params.startsWith(ruleName)) {14 return prev;15 }16 }17 prev = prev.prev();18 }19}20module.exports = postcss.plugin('atwrap', function atwrap(opts) {21 opts = opts || {};22 return function(css, res) {23 css.walkAtRules('at-end', function(endRule) {24 // find matching '@at-start' rule before current '@at-end' rule25 const ruleName = endRule.params.trim().split(/\s+/)[0];26 // throw warning and interrupt if '@at-end' does not define rule name27 if (!ruleName || ruleName.length == 0) {28 endRule.warn(res, "Could not determine '@at-end' rule name.");29 return;30 }31 const startRule = findStart(endRule, ruleName);32 // throw warning and interrupt if no '@at-start' rule was found33 if (startRule === undefined) {34 endRule.warn(res, "Could not find '@at-start' rule matching '@at-end' rule.");35 return;36 }37 let parent = endRule.parent;38 let wrapped = [];39 // collect sibling rules between '@at-start' and '@at-end'40 parent.each(function(rule) {41 let index = rule.parent.index(rule);42 if (index > startRule.parent.index(startRule) && index < endRule.parent.index(endRule)) {43 // collect rule44 wrapped.push(rule.clone());45 // remove it from parent46 rule.remove();47 }48 });49 // remove ruleName from params given to '@at-start' rule50 const ruleParams = startRule.params.replace(ruleName, '').trim();51 // create new atRule to contain selected children52 let atRule = postcss.atRule({53 name: ruleName,54 params: ruleParams55 });56 // add new at-rule to the parent57 parent.insertAfter(endRule, atRule);58 // re-inject wrapped rules59 wrapped.forEach(function(rule) {60 atRule.append(rule);61 });62 // remove old '@at-start' and '@at-end' rules63 startRule.remove();64 endRule.remove();65 });66 return css;67 };...

Full Screen

Full Screen

order-alphabetical.js

Source:order-alphabetical.js Github

copy

Full Screen

1/*2 * Rule: All properties should be in alphabetical order.3 */4CSSLint.addRule({5 // rule information6 id: "order-alphabetical",7 name: "Alphabetical order",8 desc: "Assure properties are in alphabetical order",9 browsers: "All",10 // initialization11 init: function(parser, reporter) {12 "use strict";13 var rule = this,14 properties;15 var startRule = function () {16 properties = [];17 };18 var endRule = function(event) {19 var currentProperties = properties.join(","),20 expectedProperties = properties.sort().join(",");21 if (currentProperties !== expectedProperties) {22 reporter.report("Rule doesn't have all its properties in alphabetical order.", event.line, event.col, rule);23 }24 };25 parser.addListener("startrule", startRule);26 parser.addListener("startfontface", startRule);27 parser.addListener("startpage", startRule);28 parser.addListener("startpagemargin", startRule);29 parser.addListener("startkeyframerule", startRule);30 parser.addListener("startviewport", startRule);31 parser.addListener("property", function(event) {32 var name = event.property.text,33 lowerCasePrefixLessName = name.toLowerCase().replace(/^-.*?-/, "");34 properties.push(lowerCasePrefixLessName);35 });36 parser.addListener("endrule", endRule);37 parser.addListener("endfontface", endRule);38 parser.addListener("endpage", endRule);39 parser.addListener("endpagemargin", endRule);40 parser.addListener("endkeyframerule", endRule);41 parser.addListener("endviewport", endRule);42 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('gherkin');2var parser = new gherkin.Parser();3var lexer = new gherkin.Lexer('en');4var path = require('path');5var fs = require('fs');6var featurePath = path.join(__dirname, 'test.feature');7var feature = fs.readFileSync(featurePath, 'utf8');8var tokens = lexer.lex(feature);9var feature = parser.parse(tokens);10feature.endRule();11console.log(feature);12 at Object.<anonymous> (test.js:14:11)13 at Module._compile (module.js:556:32)14 at Object.Module._extensions..js (module.js:565:10)15 at Module.load (module.js:473:32)16 at tryModuleLoad (module.js:432:12)17 at Function.Module._load (module.js:424:3)18 at Function.Module.runMain (module.js:590:10)19 at startup (bootstrap_node.js:158:16)

Full Screen

Using AI Code Generation

copy

Full Screen

1const gherkin = require('gherkin');2const fs = require('fs');3const parser = new gherkin.Parser();4const lexer = new gherkin.Lexer();5const feature = fs.readFileSync('test.feature', 'utf8');6const gherkinDocument = parser.parse(lexer.lex(feature));7const scenario = gherkinDocument.feature.children[0];8const steps = scenario.steps;9var step = steps[0];10console.log(step.keyword + step.text);11step = steps[1];12console.log(step.keyword + step.text);13step = steps[2];14console.log(step.keyword + step.text);15step = steps[3];16console.log(step.keyword + step.text);17step = steps[4];18console.log(step.keyword + step.text);19step = steps[5];20console.log(step.keyword + step.text);21step = steps[6];22console.log(step.keyword + step.text);23step = steps[7];24console.log(step.keyword + step.text);25step = steps[8];26console.log(step.keyword + step.text);27step = steps[9];28console.log(step.keyword + step.text);29step = steps[10];30console.log(step.keyword + step.text);31step = steps[11];32console.log(step.keyword + step.text);33step = steps[12];34console.log(step.keyword + step.text);35step = steps[13];36console.log(step.keyword + step.text);37step = steps[14];38console.log(step.keyword + step.text);39step = steps[15];40console.log(step.keyword + step.text);41step = steps[16];42console.log(step.keyword + step.text);43step = steps[17];44console.log(step.keyword + step.text);45step = steps[18];46console.log(step.keyword + step.text);47step = steps[19];48console.log(step.keyword + step.text);49step = steps[20];50console.log(step.keyword + step.text);51step = steps[21];52console.log(step.keyword + step.text);53step = steps[22];54console.log(step.keyword + step.text);55step = steps[23];56console.log(step.keyword + step.text);57step = steps[24];58console.log(step.keyword + step.text);59step = steps[25];60console.log(step.keyword + step.text);61step = steps[26];62console.log(step.keyword + step.text);63step = steps[27];64console.log(step.keyword + step.text);65step = steps[28];66console.log(step.keyword + step.text);67step = steps[29];68console.log(step

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('gherkin');2var parser = new gherkin.Parser();3var lexer = new gherkin.Lexer(parser);4var fs = require('fs');5var data = fs.readFileSync('featureFile.feature', 'utf-8');6var feature = lexer.scan(data.toString());7feature.endRule();8import React from 'react';9import { expect } from 'chai';10import { shallow, mount, render } from 'enzyme';11import sinon from 'sinon';12import Button from '../Button';13describe('Button', () => {14 it('should call the function passed as a prop when the button is clicked', () => {15 const onClick = sinon.spy();16 const wrapper = shallow(<Button onClick={onClick} />);17 wrapper.find('button').simulate('click');18 expect(onClick.calledOnce).to.equal(true);19 });20});21import React from 'react';22import PropTypes from 'prop-types';23const Button = ({ onClick }) => (24 <button onClick={onClick}>Click me</button>25);26Button.propTypes = {27};28export default Button;29import React

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('gherkin');2var parser = new gherkin.Parser();3var tokenMatcher = new gherkin.TokenMatcher();4var lexer = new gherkin.TokenScanner();5var token;6var rule;7var count = 0;8var feature = new gherkin.AstBuilder(tokenMatcher).getGherkinDocument();9while (token = lexer.read()) {10 rule = tokenMatcher.match_Token(token);11 count++;12 if (count === 5) {13 feature.endRule(rule);14 }15}16console.log(feature.getFeature().getName());17var gherkin = require('gherkin');18var parser = new gherkin.Parser();19var tokenMatcher = new gherkin.TokenMatcher();20var lexer = new gherkin.TokenScanner();21var token;22var rule;23var count = 0;24var feature = new gherkin.AstBuilder(tokenMatcher).getGherkinDocument();25while (token = lexer.read()) {26 rule = tokenMatcher.match_Token(token);27 count++;28 if (count === 5) {29 feature.endRule(rule);30 }31}32console.log(feature.getFeature().getName());33var gherkin = require('gherkin');34var parser = new gherkin.Parser();35var tokenMatcher = new gherkin.TokenMatcher();36var lexer = new gherkin.TokenScanner();37var token;38var rule;39var count = 0;40var feature = new gherkin.AstBuilder(tokenMatcher).getGherkinDocument();41while (token = lexer.read()) {42 rule = tokenMatcher.match_Token(token);43 count++;44 if (count === 5) {45 feature.endRule(rule);46 }47}48console.log(feature.getFeature().getName());49var gherkin = require('gherkin');50var parser = new gherkin.Parser();

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('cucumber-gherkin');2var parser = new gherkin.Parser();3var feature = parser.parse("Feature: test4");5feature.endRule();6console.log(feature);7}

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var parser = new Cucumber.Parser();3parser.parse('Feature: test4');5var gherkinDocument = parser.getGherkinDocument();6var feature = gherkinDocument.feature;7var background = feature.children[0];8var scenario = feature.children[1];9var steps = scenario.steps;10var step = steps[0];11var endRule = step.endRule;12console.log(endRule);13{ type: 'Rule',14 location: { line: 4, column: 1 },15 tags: [] }161 scenario (1 undefined)173 steps (1 undefined, 1 skipped, 1 passed)18When(/^I am on the home page$/, function (callback) {19 callback(null, 'pending');20});

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