How to use matchTokenAt_21 method in Cucumber-gherkin

Best JavaScript code snippet using cucumber-gherkin

gherkin.js

Source:gherkin.js Github

copy

Full Screen

...3909      return matchTokenAt_19(token, context);3910    case 20:3911      return matchTokenAt_20(token, context);3912    case 21:3913      return matchTokenAt_21(token, context);3914    case 22:3915      return matchTokenAt_22(token, context);3916    case 23:3917      return matchTokenAt_23(token, context);3918    case 24:3919      return matchTokenAt_24(token, context);3920    case 25:3921      return matchTokenAt_25(token, context);3922    case 26:3923      return matchTokenAt_26(token, context);3924    case 28:3925      return matchTokenAt_28(token, context);3926    case 29:3927      return matchTokenAt_29(token, context);3928    case 30:3929      return matchTokenAt_30(token, context);3930    case 31:3931      return matchTokenAt_31(token, context);3932    case 32:3933      return matchTokenAt_32(token, context);3934    case 33:3935      return matchTokenAt_33(token, context);3936    default:3937      throw new Error("Unknown state: " + state);3938    }3939  }3940  // Start3941  function matchTokenAt_0(token, context) {3942    if(match_EOF(context, token)) {3943      build(context, token);3944      return 27;3945    }3946    if(match_Language(context, token)) {3947      startRule(context, 'Feature');3948      startRule(context, 'Feature_Header');3949      build(context, token);3950      return 1;3951    }3952    if(match_TagLine(context, token)) {3953      startRule(context, 'Feature');3954      startRule(context, 'Feature_Header');3955      startRule(context, 'Tags');3956      build(context, token);3957      return 2;3958    }3959    if(match_FeatureLine(context, token)) {3960      startRule(context, 'Feature');3961      startRule(context, 'Feature_Header');3962      build(context, token);3963      return 3;3964    }3965    if(match_Comment(context, token)) {3966      build(context, token);3967      return 0;3968    }3969    if(match_Empty(context, token)) {3970      build(context, token);3971      return 0;3972    }3973    3974    var stateComment = "State: 0 - Start";3975    token.detach();3976    var expectedTokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"];3977    var error = token.isEof ?3978      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3979      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3980    if (self.stopAtFirstError) throw error;3981    addError(context, error);3982    return 0;3983  }3984  // GherkinDocument:0>Feature:0>Feature_Header:0>#Language:03985  function matchTokenAt_1(token, context) {3986    if(match_TagLine(context, token)) {3987      startRule(context, 'Tags');3988      build(context, token);3989      return 2;3990    }3991    if(match_FeatureLine(context, token)) {3992      build(context, token);3993      return 3;3994    }3995    if(match_Comment(context, token)) {3996      build(context, token);3997      return 1;3998    }3999    if(match_Empty(context, token)) {4000      build(context, token);4001      return 1;4002    }4003    4004    var stateComment = "State: 1 - GherkinDocument:0>Feature:0>Feature_Header:0>#Language:0";4005    token.detach();4006    var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];4007    var error = token.isEof ?4008      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4009      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4010    if (self.stopAtFirstError) throw error;4011    addError(context, error);4012    return 1;4013  }4014  // GherkinDocument:0>Feature:0>Feature_Header:1>Tags:0>#TagLine:04015  function matchTokenAt_2(token, context) {4016    if(match_TagLine(context, token)) {4017      build(context, token);4018      return 2;4019    }4020    if(match_FeatureLine(context, token)) {4021      endRule(context, 'Tags');4022      build(context, token);4023      return 3;4024    }4025    if(match_Comment(context, token)) {4026      build(context, token);4027      return 2;4028    }4029    if(match_Empty(context, token)) {4030      build(context, token);4031      return 2;4032    }4033    4034    var stateComment = "State: 2 - GherkinDocument:0>Feature:0>Feature_Header:1>Tags:0>#TagLine:0";4035    token.detach();4036    var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];4037    var error = token.isEof ?4038      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4039      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4040    if (self.stopAtFirstError) throw error;4041    addError(context, error);4042    return 2;4043  }4044  // GherkinDocument:0>Feature:0>Feature_Header:2>#FeatureLine:04045  function matchTokenAt_3(token, context) {4046    if(match_EOF(context, token)) {4047      endRule(context, 'Feature_Header');4048      endRule(context, 'Feature');4049      build(context, token);4050      return 27;4051    }4052    if(match_Empty(context, token)) {4053      build(context, token);4054      return 3;4055    }4056    if(match_Comment(context, token)) {4057      build(context, token);4058      return 5;4059    }4060    if(match_BackgroundLine(context, token)) {4061      endRule(context, 'Feature_Header');4062      startRule(context, 'Background');4063      build(context, token);4064      return 6;4065    }4066    if(match_TagLine(context, token)) {4067      endRule(context, 'Feature_Header');4068      startRule(context, 'Scenario_Definition');4069      startRule(context, 'Tags');4070      build(context, token);4071      return 11;4072    }4073    if(match_ScenarioLine(context, token)) {4074      endRule(context, 'Feature_Header');4075      startRule(context, 'Scenario_Definition');4076      startRule(context, 'Scenario');4077      build(context, token);4078      return 12;4079    }4080    if(match_ScenarioOutlineLine(context, token)) {4081      endRule(context, 'Feature_Header');4082      startRule(context, 'Scenario_Definition');4083      startRule(context, 'ScenarioOutline');4084      build(context, token);4085      return 17;4086    }4087    if(match_Other(context, token)) {4088      startRule(context, 'Description');4089      build(context, token);4090      return 4;4091    }4092    4093    var stateComment = "State: 3 - GherkinDocument:0>Feature:0>Feature_Header:2>#FeatureLine:0";4094    token.detach();4095    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4096    var error = token.isEof ?4097      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4098      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4099    if (self.stopAtFirstError) throw error;4100    addError(context, error);4101    return 3;4102  }4103  // GherkinDocument:0>Feature:0>Feature_Header:3>Description_Helper:1>Description:0>#Other:04104  function matchTokenAt_4(token, context) {4105    if(match_EOF(context, token)) {4106      endRule(context, 'Description');4107      endRule(context, 'Feature_Header');4108      endRule(context, 'Feature');4109      build(context, token);4110      return 27;4111    }4112    if(match_Comment(context, token)) {4113      endRule(context, 'Description');4114      build(context, token);4115      return 5;4116    }4117    if(match_BackgroundLine(context, token)) {4118      endRule(context, 'Description');4119      endRule(context, 'Feature_Header');4120      startRule(context, 'Background');4121      build(context, token);4122      return 6;4123    }4124    if(match_TagLine(context, token)) {4125      endRule(context, 'Description');4126      endRule(context, 'Feature_Header');4127      startRule(context, 'Scenario_Definition');4128      startRule(context, 'Tags');4129      build(context, token);4130      return 11;4131    }4132    if(match_ScenarioLine(context, token)) {4133      endRule(context, 'Description');4134      endRule(context, 'Feature_Header');4135      startRule(context, 'Scenario_Definition');4136      startRule(context, 'Scenario');4137      build(context, token);4138      return 12;4139    }4140    if(match_ScenarioOutlineLine(context, token)) {4141      endRule(context, 'Description');4142      endRule(context, 'Feature_Header');4143      startRule(context, 'Scenario_Definition');4144      startRule(context, 'ScenarioOutline');4145      build(context, token);4146      return 17;4147    }4148    if(match_Other(context, token)) {4149      build(context, token);4150      return 4;4151    }4152    4153    var stateComment = "State: 4 - GherkinDocument:0>Feature:0>Feature_Header:3>Description_Helper:1>Description:0>#Other:0";4154    token.detach();4155    var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4156    var error = token.isEof ?4157      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4158      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4159    if (self.stopAtFirstError) throw error;4160    addError(context, error);4161    return 4;4162  }4163  // GherkinDocument:0>Feature:0>Feature_Header:3>Description_Helper:2>#Comment:04164  function matchTokenAt_5(token, context) {4165    if(match_EOF(context, token)) {4166      endRule(context, 'Feature_Header');4167      endRule(context, 'Feature');4168      build(context, token);4169      return 27;4170    }4171    if(match_Comment(context, token)) {4172      build(context, token);4173      return 5;4174    }4175    if(match_BackgroundLine(context, token)) {4176      endRule(context, 'Feature_Header');4177      startRule(context, 'Background');4178      build(context, token);4179      return 6;4180    }4181    if(match_TagLine(context, token)) {4182      endRule(context, 'Feature_Header');4183      startRule(context, 'Scenario_Definition');4184      startRule(context, 'Tags');4185      build(context, token);4186      return 11;4187    }4188    if(match_ScenarioLine(context, token)) {4189      endRule(context, 'Feature_Header');4190      startRule(context, 'Scenario_Definition');4191      startRule(context, 'Scenario');4192      build(context, token);4193      return 12;4194    }4195    if(match_ScenarioOutlineLine(context, token)) {4196      endRule(context, 'Feature_Header');4197      startRule(context, 'Scenario_Definition');4198      startRule(context, 'ScenarioOutline');4199      build(context, token);4200      return 17;4201    }4202    if(match_Empty(context, token)) {4203      build(context, token);4204      return 5;4205    }4206    4207    var stateComment = "State: 5 - GherkinDocument:0>Feature:0>Feature_Header:3>Description_Helper:2>#Comment:0";4208    token.detach();4209    var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];4210    var error = token.isEof ?4211      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4212      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4213    if (self.stopAtFirstError) throw error;4214    addError(context, error);4215    return 5;4216  }4217  // GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:04218  function matchTokenAt_6(token, context) {4219    if(match_EOF(context, token)) {4220      endRule(context, 'Background');4221      endRule(context, 'Feature');4222      build(context, token);4223      return 27;4224    }4225    if(match_Empty(context, token)) {4226      build(context, token);4227      return 6;4228    }4229    if(match_Comment(context, token)) {4230      build(context, token);4231      return 8;4232    }4233    if(match_StepLine(context, token)) {4234      startRule(context, 'Step');4235      build(context, token);4236      return 9;4237    }4238    if(match_TagLine(context, token)) {4239      endRule(context, 'Background');4240      startRule(context, 'Scenario_Definition');4241      startRule(context, 'Tags');4242      build(context, token);4243      return 11;4244    }4245    if(match_ScenarioLine(context, token)) {4246      endRule(context, 'Background');4247      startRule(context, 'Scenario_Definition');4248      startRule(context, 'Scenario');4249      build(context, token);4250      return 12;4251    }4252    if(match_ScenarioOutlineLine(context, token)) {4253      endRule(context, 'Background');4254      startRule(context, 'Scenario_Definition');4255      startRule(context, 'ScenarioOutline');4256      build(context, token);4257      return 17;4258    }4259    if(match_Other(context, token)) {4260      startRule(context, 'Description');4261      build(context, token);4262      return 7;4263    }4264    4265    var stateComment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0";4266    token.detach();4267    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];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 6;4274  }4275  // GherkinDocument:0>Feature:1>Background:1>Description_Helper:1>Description:0>#Other:04276  function matchTokenAt_7(token, context) {4277    if(match_EOF(context, token)) {4278      endRule(context, 'Description');4279      endRule(context, 'Background');4280      endRule(context, 'Feature');4281      build(context, token);4282      return 27;4283    }4284    if(match_Comment(context, token)) {4285      endRule(context, 'Description');4286      build(context, token);4287      return 8;4288    }4289    if(match_StepLine(context, token)) {4290      endRule(context, 'Description');4291      startRule(context, 'Step');4292      build(context, token);4293      return 9;4294    }4295    if(match_TagLine(context, token)) {4296      endRule(context, 'Description');4297      endRule(context, 'Background');4298      startRule(context, 'Scenario_Definition');4299      startRule(context, 'Tags');4300      build(context, token);4301      return 11;4302    }4303    if(match_ScenarioLine(context, token)) {4304      endRule(context, 'Description');4305      endRule(context, 'Background');4306      startRule(context, 'Scenario_Definition');4307      startRule(context, 'Scenario');4308      build(context, token);4309      return 12;4310    }4311    if(match_ScenarioOutlineLine(context, token)) {4312      endRule(context, 'Description');4313      endRule(context, 'Background');4314      startRule(context, 'Scenario_Definition');4315      startRule(context, 'ScenarioOutline');4316      build(context, token);4317      return 17;4318    }4319    if(match_Other(context, token)) {4320      build(context, token);4321      return 7;4322    }4323    4324    var stateComment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>Description_Helper:1>Description:0>#Other:0";4325    token.detach();4326    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4327    var error = token.isEof ?4328      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4329      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4330    if (self.stopAtFirstError) throw error;4331    addError(context, error);4332    return 7;4333  }4334  // GherkinDocument:0>Feature:1>Background:1>Description_Helper:2>#Comment:04335  function matchTokenAt_8(token, context) {4336    if(match_EOF(context, token)) {4337      endRule(context, 'Background');4338      endRule(context, 'Feature');4339      build(context, token);4340      return 27;4341    }4342    if(match_Comment(context, token)) {4343      build(context, token);4344      return 8;4345    }4346    if(match_StepLine(context, token)) {4347      startRule(context, 'Step');4348      build(context, token);4349      return 9;4350    }4351    if(match_TagLine(context, token)) {4352      endRule(context, 'Background');4353      startRule(context, 'Scenario_Definition');4354      startRule(context, 'Tags');4355      build(context, token);4356      return 11;4357    }4358    if(match_ScenarioLine(context, token)) {4359      endRule(context, 'Background');4360      startRule(context, 'Scenario_Definition');4361      startRule(context, 'Scenario');4362      build(context, token);4363      return 12;4364    }4365    if(match_ScenarioOutlineLine(context, token)) {4366      endRule(context, 'Background');4367      startRule(context, 'Scenario_Definition');4368      startRule(context, 'ScenarioOutline');4369      build(context, token);4370      return 17;4371    }4372    if(match_Empty(context, token)) {4373      build(context, token);4374      return 8;4375    }4376    4377    var stateComment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>Description_Helper:2>#Comment:0";4378    token.detach();4379    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];4380    var error = token.isEof ?4381      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4382      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4383    if (self.stopAtFirstError) throw error;4384    addError(context, error);4385    return 8;4386  }4387  // GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:04388  function matchTokenAt_9(token, context) {4389    if(match_EOF(context, token)) {4390      endRule(context, 'Step');4391      endRule(context, 'Background');4392      endRule(context, 'Feature');4393      build(context, token);4394      return 27;4395    }4396    if(match_TableRow(context, token)) {4397      startRule(context, 'DataTable');4398      build(context, token);4399      return 10;4400    }4401    if(match_DocStringSeparator(context, token)) {4402      startRule(context, 'DocString');4403      build(context, token);4404      return 32;4405    }4406    if(match_StepLine(context, token)) {4407      endRule(context, 'Step');4408      startRule(context, 'Step');4409      build(context, token);4410      return 9;4411    }4412    if(match_TagLine(context, token)) {4413      endRule(context, 'Step');4414      endRule(context, 'Background');4415      startRule(context, 'Scenario_Definition');4416      startRule(context, 'Tags');4417      build(context, token);4418      return 11;4419    }4420    if(match_ScenarioLine(context, token)) {4421      endRule(context, 'Step');4422      endRule(context, 'Background');4423      startRule(context, 'Scenario_Definition');4424      startRule(context, 'Scenario');4425      build(context, token);4426      return 12;4427    }4428    if(match_ScenarioOutlineLine(context, token)) {4429      endRule(context, 'Step');4430      endRule(context, 'Background');4431      startRule(context, 'Scenario_Definition');4432      startRule(context, 'ScenarioOutline');4433      build(context, token);4434      return 17;4435    }4436    if(match_Comment(context, token)) {4437      build(context, token);4438      return 9;4439    }4440    if(match_Empty(context, token)) {4441      build(context, token);4442      return 9;4443    }4444    4445    var stateComment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0";4446    token.detach();4447    var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4448    var error = token.isEof ?4449      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4450      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4451    if (self.stopAtFirstError) throw error;4452    addError(context, error);4453    return 9;4454  }4455  // GherkinDocument:0>Feature:1>Background:2>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:04456  function matchTokenAt_10(token, context) {4457    if(match_EOF(context, token)) {4458      endRule(context, 'DataTable');4459      endRule(context, 'Step');4460      endRule(context, 'Background');4461      endRule(context, 'Feature');4462      build(context, token);4463      return 27;4464    }4465    if(match_TableRow(context, token)) {4466      build(context, token);4467      return 10;4468    }4469    if(match_StepLine(context, token)) {4470      endRule(context, 'DataTable');4471      endRule(context, 'Step');4472      startRule(context, 'Step');4473      build(context, token);4474      return 9;4475    }4476    if(match_TagLine(context, token)) {4477      endRule(context, 'DataTable');4478      endRule(context, 'Step');4479      endRule(context, 'Background');4480      startRule(context, 'Scenario_Definition');4481      startRule(context, 'Tags');4482      build(context, token);4483      return 11;4484    }4485    if(match_ScenarioLine(context, token)) {4486      endRule(context, 'DataTable');4487      endRule(context, 'Step');4488      endRule(context, 'Background');4489      startRule(context, 'Scenario_Definition');4490      startRule(context, 'Scenario');4491      build(context, token);4492      return 12;4493    }4494    if(match_ScenarioOutlineLine(context, token)) {4495      endRule(context, 'DataTable');4496      endRule(context, 'Step');4497      endRule(context, 'Background');4498      startRule(context, 'Scenario_Definition');4499      startRule(context, 'ScenarioOutline');4500      build(context, token);4501      return 17;4502    }4503    if(match_Comment(context, token)) {4504      build(context, token);4505      return 10;4506    }4507    if(match_Empty(context, token)) {4508      build(context, token);4509      return 10;4510    }4511    4512    var stateComment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";4513    token.detach();4514    var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4515    var error = token.isEof ?4516      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4517      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4518    if (self.stopAtFirstError) throw error;4519    addError(context, error);4520    return 10;4521  }4522  // GherkinDocument:0>Feature:2>Scenario_Definition:0>Tags:0>#TagLine:04523  function matchTokenAt_11(token, context) {4524    if(match_TagLine(context, token)) {4525      build(context, token);4526      return 11;4527    }4528    if(match_ScenarioLine(context, token)) {4529      endRule(context, 'Tags');4530      startRule(context, 'Scenario');4531      build(context, token);4532      return 12;4533    }4534    if(match_ScenarioOutlineLine(context, token)) {4535      endRule(context, 'Tags');4536      startRule(context, 'ScenarioOutline');4537      build(context, token);4538      return 17;4539    }4540    if(match_Comment(context, token)) {4541      build(context, token);4542      return 11;4543    }4544    if(match_Empty(context, token)) {4545      build(context, token);4546      return 11;4547    }4548    4549    var stateComment = "State: 11 - GherkinDocument:0>Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0";4550    token.detach();4551    var expectedTokens = ["#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4552    var error = token.isEof ?4553      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4554      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4555    if (self.stopAtFirstError) throw error;4556    addError(context, error);4557    return 11;4558  }4559  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:04560  function matchTokenAt_12(token, context) {4561    if(match_EOF(context, token)) {4562      endRule(context, 'Scenario');4563      endRule(context, 'Scenario_Definition');4564      endRule(context, 'Feature');4565      build(context, token);4566      return 27;4567    }4568    if(match_Empty(context, token)) {4569      build(context, token);4570      return 12;4571    }4572    if(match_Comment(context, token)) {4573      build(context, token);4574      return 14;4575    }4576    if(match_StepLine(context, token)) {4577      startRule(context, 'Step');4578      build(context, token);4579      return 15;4580    }4581    if(match_TagLine(context, token)) {4582      endRule(context, 'Scenario');4583      endRule(context, 'Scenario_Definition');4584      startRule(context, 'Scenario_Definition');4585      startRule(context, 'Tags');4586      build(context, token);4587      return 11;4588    }4589    if(match_ScenarioLine(context, token)) {4590      endRule(context, 'Scenario');4591      endRule(context, 'Scenario_Definition');4592      startRule(context, 'Scenario_Definition');4593      startRule(context, 'Scenario');4594      build(context, token);4595      return 12;4596    }4597    if(match_ScenarioOutlineLine(context, token)) {4598      endRule(context, 'Scenario');4599      endRule(context, 'Scenario_Definition');4600      startRule(context, 'Scenario_Definition');4601      startRule(context, 'ScenarioOutline');4602      build(context, token);4603      return 17;4604    }4605    if(match_Other(context, token)) {4606      startRule(context, 'Description');4607      build(context, token);4608      return 13;4609    }4610    4611    var stateComment = "State: 12 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0";4612    token.detach();4613    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4614    var error = token.isEof ?4615      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4616      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4617    if (self.stopAtFirstError) throw error;4618    addError(context, error);4619    return 12;4620  }4621  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Description_Helper:1>Description:0>#Other:04622  function matchTokenAt_13(token, context) {4623    if(match_EOF(context, token)) {4624      endRule(context, 'Description');4625      endRule(context, 'Scenario');4626      endRule(context, 'Scenario_Definition');4627      endRule(context, 'Feature');4628      build(context, token);4629      return 27;4630    }4631    if(match_Comment(context, token)) {4632      endRule(context, 'Description');4633      build(context, token);4634      return 14;4635    }4636    if(match_StepLine(context, token)) {4637      endRule(context, 'Description');4638      startRule(context, 'Step');4639      build(context, token);4640      return 15;4641    }4642    if(match_TagLine(context, token)) {4643      endRule(context, 'Description');4644      endRule(context, 'Scenario');4645      endRule(context, 'Scenario_Definition');4646      startRule(context, 'Scenario_Definition');4647      startRule(context, 'Tags');4648      build(context, token);4649      return 11;4650    }4651    if(match_ScenarioLine(context, token)) {4652      endRule(context, 'Description');4653      endRule(context, 'Scenario');4654      endRule(context, 'Scenario_Definition');4655      startRule(context, 'Scenario_Definition');4656      startRule(context, 'Scenario');4657      build(context, token);4658      return 12;4659    }4660    if(match_ScenarioOutlineLine(context, token)) {4661      endRule(context, 'Description');4662      endRule(context, 'Scenario');4663      endRule(context, 'Scenario_Definition');4664      startRule(context, 'Scenario_Definition');4665      startRule(context, 'ScenarioOutline');4666      build(context, token);4667      return 17;4668    }4669    if(match_Other(context, token)) {4670      build(context, token);4671      return 13;4672    }4673    4674    var stateComment = "State: 13 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Description_Helper:1>Description:0>#Other:0";4675    token.detach();4676    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4677    var error = token.isEof ?4678      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4679      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4680    if (self.stopAtFirstError) throw error;4681    addError(context, error);4682    return 13;4683  }4684  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Description_Helper:2>#Comment:04685  function matchTokenAt_14(token, context) {4686    if(match_EOF(context, token)) {4687      endRule(context, 'Scenario');4688      endRule(context, 'Scenario_Definition');4689      endRule(context, 'Feature');4690      build(context, token);4691      return 27;4692    }4693    if(match_Comment(context, token)) {4694      build(context, token);4695      return 14;4696    }4697    if(match_StepLine(context, token)) {4698      startRule(context, 'Step');4699      build(context, token);4700      return 15;4701    }4702    if(match_TagLine(context, token)) {4703      endRule(context, 'Scenario');4704      endRule(context, 'Scenario_Definition');4705      startRule(context, 'Scenario_Definition');4706      startRule(context, 'Tags');4707      build(context, token);4708      return 11;4709    }4710    if(match_ScenarioLine(context, token)) {4711      endRule(context, 'Scenario');4712      endRule(context, 'Scenario_Definition');4713      startRule(context, 'Scenario_Definition');4714      startRule(context, 'Scenario');4715      build(context, token);4716      return 12;4717    }4718    if(match_ScenarioOutlineLine(context, token)) {4719      endRule(context, 'Scenario');4720      endRule(context, 'Scenario_Definition');4721      startRule(context, 'Scenario_Definition');4722      startRule(context, 'ScenarioOutline');4723      build(context, token);4724      return 17;4725    }4726    if(match_Empty(context, token)) {4727      build(context, token);4728      return 14;4729    }4730    4731    var stateComment = "State: 14 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Description_Helper:2>#Comment:0";4732    token.detach();4733    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];4734    var error = token.isEof ?4735      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4736      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4737    if (self.stopAtFirstError) throw error;4738    addError(context, error);4739    return 14;4740  }4741  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:0>#StepLine:04742  function matchTokenAt_15(token, context) {4743    if(match_EOF(context, token)) {4744      endRule(context, 'Step');4745      endRule(context, 'Scenario');4746      endRule(context, 'Scenario_Definition');4747      endRule(context, 'Feature');4748      build(context, token);4749      return 27;4750    }4751    if(match_TableRow(context, token)) {4752      startRule(context, 'DataTable');4753      build(context, token);4754      return 16;4755    }4756    if(match_DocStringSeparator(context, token)) {4757      startRule(context, 'DocString');4758      build(context, token);4759      return 30;4760    }4761    if(match_StepLine(context, token)) {4762      endRule(context, 'Step');4763      startRule(context, 'Step');4764      build(context, token);4765      return 15;4766    }4767    if(match_TagLine(context, token)) {4768      endRule(context, 'Step');4769      endRule(context, 'Scenario');4770      endRule(context, 'Scenario_Definition');4771      startRule(context, 'Scenario_Definition');4772      startRule(context, 'Tags');4773      build(context, token);4774      return 11;4775    }4776    if(match_ScenarioLine(context, token)) {4777      endRule(context, 'Step');4778      endRule(context, 'Scenario');4779      endRule(context, 'Scenario_Definition');4780      startRule(context, 'Scenario_Definition');4781      startRule(context, 'Scenario');4782      build(context, token);4783      return 12;4784    }4785    if(match_ScenarioOutlineLine(context, token)) {4786      endRule(context, 'Step');4787      endRule(context, 'Scenario');4788      endRule(context, 'Scenario_Definition');4789      startRule(context, 'Scenario_Definition');4790      startRule(context, 'ScenarioOutline');4791      build(context, token);4792      return 17;4793    }4794    if(match_Comment(context, token)) {4795      build(context, token);4796      return 15;4797    }4798    if(match_Empty(context, token)) {4799      build(context, token);4800      return 15;4801    }4802    4803    var stateComment = "State: 15 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:0>#StepLine:0";4804    token.detach();4805    var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4806    var error = token.isEof ?4807      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4808      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4809    if (self.stopAtFirstError) throw error;4810    addError(context, error);4811    return 15;4812  }4813  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:04814  function matchTokenAt_16(token, context) {4815    if(match_EOF(context, token)) {4816      endRule(context, 'DataTable');4817      endRule(context, 'Step');4818      endRule(context, 'Scenario');4819      endRule(context, 'Scenario_Definition');4820      endRule(context, 'Feature');4821      build(context, token);4822      return 27;4823    }4824    if(match_TableRow(context, token)) {4825      build(context, token);4826      return 16;4827    }4828    if(match_StepLine(context, token)) {4829      endRule(context, 'DataTable');4830      endRule(context, 'Step');4831      startRule(context, 'Step');4832      build(context, token);4833      return 15;4834    }4835    if(match_TagLine(context, token)) {4836      endRule(context, 'DataTable');4837      endRule(context, 'Step');4838      endRule(context, 'Scenario');4839      endRule(context, 'Scenario_Definition');4840      startRule(context, 'Scenario_Definition');4841      startRule(context, 'Tags');4842      build(context, token);4843      return 11;4844    }4845    if(match_ScenarioLine(context, token)) {4846      endRule(context, 'DataTable');4847      endRule(context, 'Step');4848      endRule(context, 'Scenario');4849      endRule(context, 'Scenario_Definition');4850      startRule(context, 'Scenario_Definition');4851      startRule(context, 'Scenario');4852      build(context, token);4853      return 12;4854    }4855    if(match_ScenarioOutlineLine(context, token)) {4856      endRule(context, 'DataTable');4857      endRule(context, 'Step');4858      endRule(context, 'Scenario');4859      endRule(context, 'Scenario_Definition');4860      startRule(context, 'Scenario_Definition');4861      startRule(context, 'ScenarioOutline');4862      build(context, token);4863      return 17;4864    }4865    if(match_Comment(context, token)) {4866      build(context, token);4867      return 16;4868    }4869    if(match_Empty(context, token)) {4870      build(context, token);4871      return 16;4872    }4873    4874    var stateComment = "State: 16 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";4875    token.detach();4876    var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];4877    var error = token.isEof ?4878      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4879      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4880    if (self.stopAtFirstError) throw error;4881    addError(context, error);4882    return 16;4883  }4884  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:04885  function matchTokenAt_17(token, context) {4886    if(match_EOF(context, token)) {4887      endRule(context, 'ScenarioOutline');4888      endRule(context, 'Scenario_Definition');4889      endRule(context, 'Feature');4890      build(context, token);4891      return 27;4892    }4893    if(match_Empty(context, token)) {4894      build(context, token);4895      return 17;4896    }4897    if(match_Comment(context, token)) {4898      build(context, token);4899      return 19;4900    }4901    if(match_StepLine(context, token)) {4902      startRule(context, 'Step');4903      build(context, token);4904      return 20;4905    }4906    if(match_TagLine(context, token)) {4907      if(lookahead_0(context, token)) {4908      startRule(context, 'Examples_Definition');4909      startRule(context, 'Tags');4910      build(context, token);4911      return 22;4912      }4913    }4914    if(match_TagLine(context, token)) {4915      endRule(context, 'ScenarioOutline');4916      endRule(context, 'Scenario_Definition');4917      startRule(context, 'Scenario_Definition');4918      startRule(context, 'Tags');4919      build(context, token);4920      return 11;4921    }4922    if(match_ExamplesLine(context, token)) {4923      startRule(context, 'Examples_Definition');4924      startRule(context, 'Examples');4925      build(context, token);4926      return 23;4927    }4928    if(match_ScenarioLine(context, token)) {4929      endRule(context, 'ScenarioOutline');4930      endRule(context, 'Scenario_Definition');4931      startRule(context, 'Scenario_Definition');4932      startRule(context, 'Scenario');4933      build(context, token);4934      return 12;4935    }4936    if(match_ScenarioOutlineLine(context, token)) {4937      endRule(context, 'ScenarioOutline');4938      endRule(context, 'Scenario_Definition');4939      startRule(context, 'Scenario_Definition');4940      startRule(context, 'ScenarioOutline');4941      build(context, token);4942      return 17;4943    }4944    if(match_Other(context, token)) {4945      startRule(context, 'Description');4946      build(context, token);4947      return 18;4948    }4949    4950    var stateComment = "State: 17 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0";4951    token.detach();4952    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];4953    var error = token.isEof ?4954      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :4955      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);4956    if (self.stopAtFirstError) throw error;4957    addError(context, error);4958    return 17;4959  }4960  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>Description_Helper:1>Description:0>#Other:04961  function matchTokenAt_18(token, context) {4962    if(match_EOF(context, token)) {4963      endRule(context, 'Description');4964      endRule(context, 'ScenarioOutline');4965      endRule(context, 'Scenario_Definition');4966      endRule(context, 'Feature');4967      build(context, token);4968      return 27;4969    }4970    if(match_Comment(context, token)) {4971      endRule(context, 'Description');4972      build(context, token);4973      return 19;4974    }4975    if(match_StepLine(context, token)) {4976      endRule(context, 'Description');4977      startRule(context, 'Step');4978      build(context, token);4979      return 20;4980    }4981    if(match_TagLine(context, token)) {4982      if(lookahead_0(context, token)) {4983      endRule(context, 'Description');4984      startRule(context, 'Examples_Definition');4985      startRule(context, 'Tags');4986      build(context, token);4987      return 22;4988      }4989    }4990    if(match_TagLine(context, token)) {4991      endRule(context, 'Description');4992      endRule(context, 'ScenarioOutline');4993      endRule(context, 'Scenario_Definition');4994      startRule(context, 'Scenario_Definition');4995      startRule(context, 'Tags');4996      build(context, token);4997      return 11;4998    }4999    if(match_ExamplesLine(context, token)) {5000      endRule(context, 'Description');5001      startRule(context, 'Examples_Definition');5002      startRule(context, 'Examples');5003      build(context, token);5004      return 23;5005    }5006    if(match_ScenarioLine(context, token)) {5007      endRule(context, 'Description');5008      endRule(context, 'ScenarioOutline');5009      endRule(context, 'Scenario_Definition');5010      startRule(context, 'Scenario_Definition');5011      startRule(context, 'Scenario');5012      build(context, token);5013      return 12;5014    }5015    if(match_ScenarioOutlineLine(context, token)) {5016      endRule(context, 'Description');5017      endRule(context, 'ScenarioOutline');5018      endRule(context, 'Scenario_Definition');5019      startRule(context, 'Scenario_Definition');5020      startRule(context, 'ScenarioOutline');5021      build(context, token);5022      return 17;5023    }5024    if(match_Other(context, token)) {5025      build(context, token);5026      return 18;5027    }5028    5029    var stateComment = "State: 18 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>Description_Helper:1>Description:0>#Other:0";5030    token.detach();5031    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];5032    var error = token.isEof ?5033      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5034      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5035    if (self.stopAtFirstError) throw error;5036    addError(context, error);5037    return 18;5038  }5039  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>Description_Helper:2>#Comment:05040  function matchTokenAt_19(token, context) {5041    if(match_EOF(context, token)) {5042      endRule(context, 'ScenarioOutline');5043      endRule(context, 'Scenario_Definition');5044      endRule(context, 'Feature');5045      build(context, token);5046      return 27;5047    }5048    if(match_Comment(context, token)) {5049      build(context, token);5050      return 19;5051    }5052    if(match_StepLine(context, token)) {5053      startRule(context, 'Step');5054      build(context, token);5055      return 20;5056    }5057    if(match_TagLine(context, token)) {5058      if(lookahead_0(context, token)) {5059      startRule(context, 'Examples_Definition');5060      startRule(context, 'Tags');5061      build(context, token);5062      return 22;5063      }5064    }5065    if(match_TagLine(context, token)) {5066      endRule(context, 'ScenarioOutline');5067      endRule(context, 'Scenario_Definition');5068      startRule(context, 'Scenario_Definition');5069      startRule(context, 'Tags');5070      build(context, token);5071      return 11;5072    }5073    if(match_ExamplesLine(context, token)) {5074      startRule(context, 'Examples_Definition');5075      startRule(context, 'Examples');5076      build(context, token);5077      return 23;5078    }5079    if(match_ScenarioLine(context, token)) {5080      endRule(context, 'ScenarioOutline');5081      endRule(context, 'Scenario_Definition');5082      startRule(context, 'Scenario_Definition');5083      startRule(context, 'Scenario');5084      build(context, token);5085      return 12;5086    }5087    if(match_ScenarioOutlineLine(context, token)) {5088      endRule(context, 'ScenarioOutline');5089      endRule(context, 'Scenario_Definition');5090      startRule(context, 'Scenario_Definition');5091      startRule(context, 'ScenarioOutline');5092      build(context, token);5093      return 17;5094    }5095    if(match_Empty(context, token)) {5096      build(context, token);5097      return 19;5098    }5099    5100    var stateComment = "State: 19 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>Description_Helper:2>#Comment:0";5101    token.detach();5102    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];5103    var error = token.isEof ?5104      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5105      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5106    if (self.stopAtFirstError) throw error;5107    addError(context, error);5108    return 19;5109  }5110  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:0>#StepLine:05111  function matchTokenAt_20(token, context) {5112    if(match_EOF(context, token)) {5113      endRule(context, 'Step');5114      endRule(context, 'ScenarioOutline');5115      endRule(context, 'Scenario_Definition');5116      endRule(context, 'Feature');5117      build(context, token);5118      return 27;5119    }5120    if(match_TableRow(context, token)) {5121      startRule(context, 'DataTable');5122      build(context, token);5123      return 21;5124    }5125    if(match_DocStringSeparator(context, token)) {5126      startRule(context, 'DocString');5127      build(context, token);5128      return 28;5129    }5130    if(match_StepLine(context, token)) {5131      endRule(context, 'Step');5132      startRule(context, 'Step');5133      build(context, token);5134      return 20;5135    }5136    if(match_TagLine(context, token)) {5137      if(lookahead_0(context, token)) {5138      endRule(context, 'Step');5139      startRule(context, 'Examples_Definition');5140      startRule(context, 'Tags');5141      build(context, token);5142      return 22;5143      }5144    }5145    if(match_TagLine(context, token)) {5146      endRule(context, 'Step');5147      endRule(context, 'ScenarioOutline');5148      endRule(context, 'Scenario_Definition');5149      startRule(context, 'Scenario_Definition');5150      startRule(context, 'Tags');5151      build(context, token);5152      return 11;5153    }5154    if(match_ExamplesLine(context, token)) {5155      endRule(context, 'Step');5156      startRule(context, 'Examples_Definition');5157      startRule(context, 'Examples');5158      build(context, token);5159      return 23;5160    }5161    if(match_ScenarioLine(context, token)) {5162      endRule(context, 'Step');5163      endRule(context, 'ScenarioOutline');5164      endRule(context, 'Scenario_Definition');5165      startRule(context, 'Scenario_Definition');5166      startRule(context, 'Scenario');5167      build(context, token);5168      return 12;5169    }5170    if(match_ScenarioOutlineLine(context, token)) {5171      endRule(context, 'Step');5172      endRule(context, 'ScenarioOutline');5173      endRule(context, 'Scenario_Definition');5174      startRule(context, 'Scenario_Definition');5175      startRule(context, 'ScenarioOutline');5176      build(context, token);5177      return 17;5178    }5179    if(match_Comment(context, token)) {5180      build(context, token);5181      return 20;5182    }5183    if(match_Empty(context, token)) {5184      build(context, token);5185      return 20;5186    }5187    5188    var stateComment = "State: 20 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:0>#StepLine:0";5189    token.detach();5190    var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5191    var error = token.isEof ?5192      Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5193      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5194    if (self.stopAtFirstError) throw error;5195    addError(context, error);5196    return 20;5197  }5198  // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:05199  function matchTokenAt_21(token, context) {5200    if(match_EOF(context, token)) {5201      endRule(context, 'DataTable');5202      endRule(context, 'Step');5203      endRule(context, 'ScenarioOutline');5204      endRule(context, 'Scenario_Definition');5205      endRule(context, 'Feature');5206      build(context, token);5207      return 27;5208    }5209    if(match_TableRow(context, token)) {5210      build(context, token);5211      return 21;5212    }5213    if(match_StepLine(context, token)) {...

Full Screen

Full Screen

parser.js

Source:parser.js Github

copy

Full Screen

...156      return matchTokenAt_19(token, context);157    case 20:158      return matchTokenAt_20(token, context);159    case 21:160      return matchTokenAt_21(token, context);161    case 22:162      return matchTokenAt_22(token, context);163    case 23:164      return matchTokenAt_23(token, context);165    case 24:166      return matchTokenAt_24(token, context);167    case 25:168      return matchTokenAt_25(token, context);169    case 26:170      return matchTokenAt_26(token, context);171    case 28:172      return matchTokenAt_28(token, context);173    case 29:174      return matchTokenAt_29(token, context);175    case 30:176      return matchTokenAt_30(token, context);177    case 31:178      return matchTokenAt_31(token, context);179    case 32:180      return matchTokenAt_32(token, context);181    case 33:182      return matchTokenAt_33(token, context);183    default:184      throw new Error("Unknown state: " + state);185    }186  }187  // Start188  function matchTokenAt_0(token, context) {189    if(match_Language(context, token)) {190      startRule(context, 'Feature_Header');191      build(context, token);192      return 1;193    }194    if(match_TagLine(context, token)) {195      startRule(context, 'Feature_Header');196      startRule(context, 'Tags');197      build(context, token);198      return 2;199    }200    if(match_FeatureLine(context, token)) {201      startRule(context, 'Feature_Header');202      build(context, token);203      return 3;204    }205    if(match_Comment(context, token)) {206      build(context, token);207      return 0;208    }209    if(match_Empty(context, token)) {210      build(context, token);211      return 0;212    }213    214    var stateComment = "State: 0 - Start";215    token.detach();216    var expectedTokens = ["#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"];217    var error = token.isEof ?218      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :219      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);220    if (this.stopAtFirstError) throw error;221    addError(context, error);222    return 0;223  }224  // Feature:0>Feature_Header:0>#Language:0225  function matchTokenAt_1(token, context) {226    if(match_TagLine(context, token)) {227      startRule(context, 'Tags');228      build(context, token);229      return 2;230    }231    if(match_FeatureLine(context, token)) {232      build(context, token);233      return 3;234    }235    if(match_Comment(context, token)) {236      build(context, token);237      return 1;238    }239    if(match_Empty(context, token)) {240      build(context, token);241      return 1;242    }243    244    var stateComment = "State: 1 - Feature:0>Feature_Header:0>#Language:0";245    token.detach();246    var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];247    var error = token.isEof ?248      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :249      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);250    if (this.stopAtFirstError) throw error;251    addError(context, error);252    return 1;253  }254  // Feature:0>Feature_Header:1>Tags:0>#TagLine:0255  function matchTokenAt_2(token, context) {256    if(match_TagLine(context, token)) {257      build(context, token);258      return 2;259    }260    if(match_FeatureLine(context, token)) {261      endRule(context, 'Tags');262      build(context, token);263      return 3;264    }265    if(match_Comment(context, token)) {266      build(context, token);267      return 2;268    }269    if(match_Empty(context, token)) {270      build(context, token);271      return 2;272    }273    274    var stateComment = "State: 2 - Feature:0>Feature_Header:1>Tags:0>#TagLine:0";275    token.detach();276    var expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];277    var error = token.isEof ?278      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :279      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);280    if (this.stopAtFirstError) throw error;281    addError(context, error);282    return 2;283  }284  // Feature:0>Feature_Header:2>#FeatureLine:0285  function matchTokenAt_3(token, context) {286    if(match_EOF(context, token)) {287      endRule(context, 'Feature_Header');288      build(context, token);289      return 27;290    }291    if(match_Empty(context, token)) {292      build(context, token);293      return 3;294    }295    if(match_Comment(context, token)) {296      build(context, token);297      return 5;298    }299    if(match_BackgroundLine(context, token)) {300      endRule(context, 'Feature_Header');301      startRule(context, 'Background');302      build(context, token);303      return 6;304    }305    if(match_TagLine(context, token)) {306      endRule(context, 'Feature_Header');307      startRule(context, 'Scenario_Definition');308      startRule(context, 'Tags');309      build(context, token);310      return 11;311    }312    if(match_ScenarioLine(context, token)) {313      endRule(context, 'Feature_Header');314      startRule(context, 'Scenario_Definition');315      startRule(context, 'Scenario');316      build(context, token);317      return 12;318    }319    if(match_ScenarioOutlineLine(context, token)) {320      endRule(context, 'Feature_Header');321      startRule(context, 'Scenario_Definition');322      startRule(context, 'ScenarioOutline');323      build(context, token);324      return 17;325    }326    if(match_Other(context, token)) {327      startRule(context, 'Description');328      build(context, token);329      return 4;330    }331    332    var stateComment = "State: 3 - Feature:0>Feature_Header:2>#FeatureLine:0";333    token.detach();334    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];335    var error = token.isEof ?336      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :337      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);338    if (this.stopAtFirstError) throw error;339    addError(context, error);340    return 3;341  }342  // Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0343  function matchTokenAt_4(token, context) {344    if(match_EOF(context, token)) {345      endRule(context, 'Description');346      endRule(context, 'Feature_Header');347      build(context, token);348      return 27;349    }350    if(match_Comment(context, token)) {351      endRule(context, 'Description');352      build(context, token);353      return 5;354    }355    if(match_BackgroundLine(context, token)) {356      endRule(context, 'Description');357      endRule(context, 'Feature_Header');358      startRule(context, 'Background');359      build(context, token);360      return 6;361    }362    if(match_TagLine(context, token)) {363      endRule(context, 'Description');364      endRule(context, 'Feature_Header');365      startRule(context, 'Scenario_Definition');366      startRule(context, 'Tags');367      build(context, token);368      return 11;369    }370    if(match_ScenarioLine(context, token)) {371      endRule(context, 'Description');372      endRule(context, 'Feature_Header');373      startRule(context, 'Scenario_Definition');374      startRule(context, 'Scenario');375      build(context, token);376      return 12;377    }378    if(match_ScenarioOutlineLine(context, token)) {379      endRule(context, 'Description');380      endRule(context, 'Feature_Header');381      startRule(context, 'Scenario_Definition');382      startRule(context, 'ScenarioOutline');383      build(context, token);384      return 17;385    }386    if(match_Other(context, token)) {387      build(context, token);388      return 4;389    }390    391    var stateComment = "State: 4 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0";392    token.detach();393    var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];394    var error = token.isEof ?395      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :396      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);397    if (this.stopAtFirstError) throw error;398    addError(context, error);399    return 4;400  }401  // Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0402  function matchTokenAt_5(token, context) {403    if(match_EOF(context, token)) {404      endRule(context, 'Feature_Header');405      build(context, token);406      return 27;407    }408    if(match_Comment(context, token)) {409      build(context, token);410      return 5;411    }412    if(match_BackgroundLine(context, token)) {413      endRule(context, 'Feature_Header');414      startRule(context, 'Background');415      build(context, token);416      return 6;417    }418    if(match_TagLine(context, token)) {419      endRule(context, 'Feature_Header');420      startRule(context, 'Scenario_Definition');421      startRule(context, 'Tags');422      build(context, token);423      return 11;424    }425    if(match_ScenarioLine(context, token)) {426      endRule(context, 'Feature_Header');427      startRule(context, 'Scenario_Definition');428      startRule(context, 'Scenario');429      build(context, token);430      return 12;431    }432    if(match_ScenarioOutlineLine(context, token)) {433      endRule(context, 'Feature_Header');434      startRule(context, 'Scenario_Definition');435      startRule(context, 'ScenarioOutline');436      build(context, token);437      return 17;438    }439    if(match_Empty(context, token)) {440      build(context, token);441      return 5;442    }443    444    var stateComment = "State: 5 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0";445    token.detach();446    var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];447    var error = token.isEof ?448      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :449      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);450    if (this.stopAtFirstError) throw error;451    addError(context, error);452    return 5;453  }454  // Feature:1>Background:0>#BackgroundLine:0455  function matchTokenAt_6(token, context) {456    if(match_EOF(context, token)) {457      endRule(context, 'Background');458      build(context, token);459      return 27;460    }461    if(match_Empty(context, token)) {462      build(context, token);463      return 6;464    }465    if(match_Comment(context, token)) {466      build(context, token);467      return 8;468    }469    if(match_StepLine(context, token)) {470      startRule(context, 'Step');471      build(context, token);472      return 9;473    }474    if(match_TagLine(context, token)) {475      endRule(context, 'Background');476      startRule(context, 'Scenario_Definition');477      startRule(context, 'Tags');478      build(context, token);479      return 11;480    }481    if(match_ScenarioLine(context, token)) {482      endRule(context, 'Background');483      startRule(context, 'Scenario_Definition');484      startRule(context, 'Scenario');485      build(context, token);486      return 12;487    }488    if(match_ScenarioOutlineLine(context, token)) {489      endRule(context, 'Background');490      startRule(context, 'Scenario_Definition');491      startRule(context, 'ScenarioOutline');492      build(context, token);493      return 17;494    }495    if(match_Other(context, token)) {496      startRule(context, 'Description');497      build(context, token);498      return 7;499    }500    501    var stateComment = "State: 6 - Feature:1>Background:0>#BackgroundLine:0";502    token.detach();503    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];504    var error = token.isEof ?505      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :506      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);507    if (this.stopAtFirstError) throw error;508    addError(context, error);509    return 6;510  }511  // Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0512  function matchTokenAt_7(token, context) {513    if(match_EOF(context, token)) {514      endRule(context, 'Description');515      endRule(context, 'Background');516      build(context, token);517      return 27;518    }519    if(match_Comment(context, token)) {520      endRule(context, 'Description');521      build(context, token);522      return 8;523    }524    if(match_StepLine(context, token)) {525      endRule(context, 'Description');526      startRule(context, 'Step');527      build(context, token);528      return 9;529    }530    if(match_TagLine(context, token)) {531      endRule(context, 'Description');532      endRule(context, 'Background');533      startRule(context, 'Scenario_Definition');534      startRule(context, 'Tags');535      build(context, token);536      return 11;537    }538    if(match_ScenarioLine(context, token)) {539      endRule(context, 'Description');540      endRule(context, 'Background');541      startRule(context, 'Scenario_Definition');542      startRule(context, 'Scenario');543      build(context, token);544      return 12;545    }546    if(match_ScenarioOutlineLine(context, token)) {547      endRule(context, 'Description');548      endRule(context, 'Background');549      startRule(context, 'Scenario_Definition');550      startRule(context, 'ScenarioOutline');551      build(context, token);552      return 17;553    }554    if(match_Other(context, token)) {555      build(context, token);556      return 7;557    }558    559    var stateComment = "State: 7 - Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0";560    token.detach();561    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];562    var error = token.isEof ?563      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :564      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);565    if (this.stopAtFirstError) throw error;566    addError(context, error);567    return 7;568  }569  // Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0570  function matchTokenAt_8(token, context) {571    if(match_EOF(context, token)) {572      endRule(context, 'Background');573      build(context, token);574      return 27;575    }576    if(match_Comment(context, token)) {577      build(context, token);578      return 8;579    }580    if(match_StepLine(context, token)) {581      startRule(context, 'Step');582      build(context, token);583      return 9;584    }585    if(match_TagLine(context, token)) {586      endRule(context, 'Background');587      startRule(context, 'Scenario_Definition');588      startRule(context, 'Tags');589      build(context, token);590      return 11;591    }592    if(match_ScenarioLine(context, token)) {593      endRule(context, 'Background');594      startRule(context, 'Scenario_Definition');595      startRule(context, 'Scenario');596      build(context, token);597      return 12;598    }599    if(match_ScenarioOutlineLine(context, token)) {600      endRule(context, 'Background');601      startRule(context, 'Scenario_Definition');602      startRule(context, 'ScenarioOutline');603      build(context, token);604      return 17;605    }606    if(match_Empty(context, token)) {607      build(context, token);608      return 8;609    }610    611    var stateComment = "State: 8 - Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0";612    token.detach();613    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];614    var error = token.isEof ?615      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :616      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);617    if (this.stopAtFirstError) throw error;618    addError(context, error);619    return 8;620  }621  // Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0622  function matchTokenAt_9(token, context) {623    if(match_EOF(context, token)) {624      endRule(context, 'Step');625      endRule(context, 'Background');626      build(context, token);627      return 27;628    }629    if(match_TableRow(context, token)) {630      startRule(context, 'DataTable');631      build(context, token);632      return 10;633    }634    if(match_DocStringSeparator(context, token)) {635      startRule(context, 'DocString');636      build(context, token);637      return 32;638    }639    if(match_StepLine(context, token)) {640      endRule(context, 'Step');641      startRule(context, 'Step');642      build(context, token);643      return 9;644    }645    if(match_TagLine(context, token)) {646      endRule(context, 'Step');647      endRule(context, 'Background');648      startRule(context, 'Scenario_Definition');649      startRule(context, 'Tags');650      build(context, token);651      return 11;652    }653    if(match_ScenarioLine(context, token)) {654      endRule(context, 'Step');655      endRule(context, 'Background');656      startRule(context, 'Scenario_Definition');657      startRule(context, 'Scenario');658      build(context, token);659      return 12;660    }661    if(match_ScenarioOutlineLine(context, token)) {662      endRule(context, 'Step');663      endRule(context, 'Background');664      startRule(context, 'Scenario_Definition');665      startRule(context, 'ScenarioOutline');666      build(context, token);667      return 17;668    }669    if(match_Comment(context, token)) {670      build(context, token);671      return 9;672    }673    if(match_Empty(context, token)) {674      build(context, token);675      return 9;676    }677    678    var stateComment = "State: 9 - Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0";679    token.detach();680    var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];681    var error = token.isEof ?682      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :683      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);684    if (this.stopAtFirstError) throw error;685    addError(context, error);686    return 9;687  }688  // Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0689  function matchTokenAt_10(token, context) {690    if(match_EOF(context, token)) {691      endRule(context, 'DataTable');692      endRule(context, 'Step');693      endRule(context, 'Background');694      build(context, token);695      return 27;696    }697    if(match_TableRow(context, token)) {698      build(context, token);699      return 10;700    }701    if(match_StepLine(context, token)) {702      endRule(context, 'DataTable');703      endRule(context, 'Step');704      startRule(context, 'Step');705      build(context, token);706      return 9;707    }708    if(match_TagLine(context, token)) {709      endRule(context, 'DataTable');710      endRule(context, 'Step');711      endRule(context, 'Background');712      startRule(context, 'Scenario_Definition');713      startRule(context, 'Tags');714      build(context, token);715      return 11;716    }717    if(match_ScenarioLine(context, token)) {718      endRule(context, 'DataTable');719      endRule(context, 'Step');720      endRule(context, 'Background');721      startRule(context, 'Scenario_Definition');722      startRule(context, 'Scenario');723      build(context, token);724      return 12;725    }726    if(match_ScenarioOutlineLine(context, token)) {727      endRule(context, 'DataTable');728      endRule(context, 'Step');729      endRule(context, 'Background');730      startRule(context, 'Scenario_Definition');731      startRule(context, 'ScenarioOutline');732      build(context, token);733      return 17;734    }735    if(match_Comment(context, token)) {736      build(context, token);737      return 10;738    }739    if(match_Empty(context, token)) {740      build(context, token);741      return 10;742    }743    744    var stateComment = "State: 10 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";745    token.detach();746    var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];747    var error = token.isEof ?748      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :749      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);750    if (this.stopAtFirstError) throw error;751    addError(context, error);752    return 10;753  }754  // Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0755  function matchTokenAt_11(token, context) {756    if(match_TagLine(context, token)) {757      build(context, token);758      return 11;759    }760    if(match_ScenarioLine(context, token)) {761      endRule(context, 'Tags');762      startRule(context, 'Scenario');763      build(context, token);764      return 12;765    }766    if(match_ScenarioOutlineLine(context, token)) {767      endRule(context, 'Tags');768      startRule(context, 'ScenarioOutline');769      build(context, token);770      return 17;771    }772    if(match_Comment(context, token)) {773      build(context, token);774      return 11;775    }776    if(match_Empty(context, token)) {777      build(context, token);778      return 11;779    }780    781    var stateComment = "State: 11 - Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0";782    token.detach();783    var expectedTokens = ["#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];784    var error = token.isEof ?785      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :786      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);787    if (this.stopAtFirstError) throw error;788    addError(context, error);789    return 11;790  }791  // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0792  function matchTokenAt_12(token, context) {793    if(match_EOF(context, token)) {794      endRule(context, 'Scenario');795      endRule(context, 'Scenario_Definition');796      build(context, token);797      return 27;798    }799    if(match_Empty(context, token)) {800      build(context, token);801      return 12;802    }803    if(match_Comment(context, token)) {804      build(context, token);805      return 14;806    }807    if(match_StepLine(context, token)) {808      startRule(context, 'Step');809      build(context, token);810      return 15;811    }812    if(match_TagLine(context, token)) {813      endRule(context, 'Scenario');814      endRule(context, 'Scenario_Definition');815      startRule(context, 'Scenario_Definition');816      startRule(context, 'Tags');817      build(context, token);818      return 11;819    }820    if(match_ScenarioLine(context, token)) {821      endRule(context, 'Scenario');822      endRule(context, 'Scenario_Definition');823      startRule(context, 'Scenario_Definition');824      startRule(context, 'Scenario');825      build(context, token);826      return 12;827    }828    if(match_ScenarioOutlineLine(context, token)) {829      endRule(context, 'Scenario');830      endRule(context, 'Scenario_Definition');831      startRule(context, 'Scenario_Definition');832      startRule(context, 'ScenarioOutline');833      build(context, token);834      return 17;835    }836    if(match_Other(context, token)) {837      startRule(context, 'Description');838      build(context, token);839      return 13;840    }841    842    var stateComment = "State: 12 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0";843    token.detach();844    var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];845    var error = token.isEof ?846      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :847      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);848    if (this.stopAtFirstError) throw error;849    addError(context, error);850    return 12;851  }852  // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0853  function matchTokenAt_13(token, context) {854    if(match_EOF(context, token)) {855      endRule(context, 'Description');856      endRule(context, 'Scenario');857      endRule(context, 'Scenario_Definition');858      build(context, token);859      return 27;860    }861    if(match_Comment(context, token)) {862      endRule(context, 'Description');863      build(context, token);864      return 14;865    }866    if(match_StepLine(context, token)) {867      endRule(context, 'Description');868      startRule(context, 'Step');869      build(context, token);870      return 15;871    }872    if(match_TagLine(context, token)) {873      endRule(context, 'Description');874      endRule(context, 'Scenario');875      endRule(context, 'Scenario_Definition');876      startRule(context, 'Scenario_Definition');877      startRule(context, 'Tags');878      build(context, token);879      return 11;880    }881    if(match_ScenarioLine(context, token)) {882      endRule(context, 'Description');883      endRule(context, 'Scenario');884      endRule(context, 'Scenario_Definition');885      startRule(context, 'Scenario_Definition');886      startRule(context, 'Scenario');887      build(context, token);888      return 12;889    }890    if(match_ScenarioOutlineLine(context, token)) {891      endRule(context, 'Description');892      endRule(context, 'Scenario');893      endRule(context, 'Scenario_Definition');894      startRule(context, 'Scenario_Definition');895      startRule(context, 'ScenarioOutline');896      build(context, token);897      return 17;898    }899    if(match_Other(context, token)) {900      build(context, token);901      return 13;902    }903    904    var stateComment = "State: 13 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0";905    token.detach();906    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];907    var error = token.isEof ?908      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :909      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);910    if (this.stopAtFirstError) throw error;911    addError(context, error);912    return 13;913  }914  // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0915  function matchTokenAt_14(token, context) {916    if(match_EOF(context, token)) {917      endRule(context, 'Scenario');918      endRule(context, 'Scenario_Definition');919      build(context, token);920      return 27;921    }922    if(match_Comment(context, token)) {923      build(context, token);924      return 14;925    }926    if(match_StepLine(context, token)) {927      startRule(context, 'Step');928      build(context, token);929      return 15;930    }931    if(match_TagLine(context, token)) {932      endRule(context, 'Scenario');933      endRule(context, 'Scenario_Definition');934      startRule(context, 'Scenario_Definition');935      startRule(context, 'Tags');936      build(context, token);937      return 11;938    }939    if(match_ScenarioLine(context, token)) {940      endRule(context, 'Scenario');941      endRule(context, 'Scenario_Definition');942      startRule(context, 'Scenario_Definition');943      startRule(context, 'Scenario');944      build(context, token);945      return 12;946    }947    if(match_ScenarioOutlineLine(context, token)) {948      endRule(context, 'Scenario');949      endRule(context, 'Scenario_Definition');950      startRule(context, 'Scenario_Definition');951      startRule(context, 'ScenarioOutline');952      build(context, token);953      return 17;954    }955    if(match_Empty(context, token)) {956      build(context, token);957      return 14;958    }959    960    var stateComment = "State: 14 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0";961    token.detach();962    var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];963    var error = token.isEof ?964      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :965      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);966    if (this.stopAtFirstError) throw error;967    addError(context, error);968    return 14;969  }970  // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0971  function matchTokenAt_15(token, context) {972    if(match_EOF(context, token)) {973      endRule(context, 'Step');974      endRule(context, 'Scenario');975      endRule(context, 'Scenario_Definition');976      build(context, token);977      return 27;978    }979    if(match_TableRow(context, token)) {980      startRule(context, 'DataTable');981      build(context, token);982      return 16;983    }984    if(match_DocStringSeparator(context, token)) {985      startRule(context, 'DocString');986      build(context, token);987      return 30;988    }989    if(match_StepLine(context, token)) {990      endRule(context, 'Step');991      startRule(context, 'Step');992      build(context, token);993      return 15;994    }995    if(match_TagLine(context, token)) {996      endRule(context, 'Step');997      endRule(context, 'Scenario');998      endRule(context, 'Scenario_Definition');999      startRule(context, 'Scenario_Definition');1000      startRule(context, 'Tags');1001      build(context, token);1002      return 11;1003    }1004    if(match_ScenarioLine(context, token)) {1005      endRule(context, 'Step');1006      endRule(context, 'Scenario');1007      endRule(context, 'Scenario_Definition');1008      startRule(context, 'Scenario_Definition');1009      startRule(context, 'Scenario');1010      build(context, token);1011      return 12;1012    }1013    if(match_ScenarioOutlineLine(context, token)) {1014      endRule(context, 'Step');1015      endRule(context, 'Scenario');1016      endRule(context, 'Scenario_Definition');1017      startRule(context, 'Scenario_Definition');1018      startRule(context, 'ScenarioOutline');1019      build(context, token);1020      return 17;1021    }1022    if(match_Comment(context, token)) {1023      build(context, token);1024      return 15;1025    }1026    if(match_Empty(context, token)) {1027      build(context, token);1028      return 15;1029    }1030    1031    var stateComment = "State: 15 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0";1032    token.detach();1033    var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];1034    var error = token.isEof ?1035      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :1036      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1037    if (this.stopAtFirstError) throw error;1038    addError(context, error);1039    return 15;1040  }1041  // Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:01042  function matchTokenAt_16(token, context) {1043    if(match_EOF(context, token)) {1044      endRule(context, 'DataTable');1045      endRule(context, 'Step');1046      endRule(context, 'Scenario');1047      endRule(context, 'Scenario_Definition');1048      build(context, token);1049      return 27;1050    }1051    if(match_TableRow(context, token)) {1052      build(context, token);1053      return 16;1054    }1055    if(match_StepLine(context, token)) {1056      endRule(context, 'DataTable');1057      endRule(context, 'Step');1058      startRule(context, 'Step');1059      build(context, token);1060      return 15;1061    }1062    if(match_TagLine(context, token)) {1063      endRule(context, 'DataTable');1064      endRule(context, 'Step');1065      endRule(context, 'Scenario');1066      endRule(context, 'Scenario_Definition');1067      startRule(context, 'Scenario_Definition');1068      startRule(context, 'Tags');1069      build(context, token);1070      return 11;1071    }1072    if(match_ScenarioLine(context, token)) {1073      endRule(context, 'DataTable');1074      endRule(context, 'Step');1075      endRule(context, 'Scenario');1076      endRule(context, 'Scenario_Definition');1077      startRule(context, 'Scenario_Definition');1078      startRule(context, 'Scenario');1079      build(context, token);1080      return 12;1081    }1082    if(match_ScenarioOutlineLine(context, token)) {1083      endRule(context, 'DataTable');1084      endRule(context, 'Step');1085      endRule(context, 'Scenario');1086      endRule(context, 'Scenario_Definition');1087      startRule(context, 'Scenario_Definition');1088      startRule(context, 'ScenarioOutline');1089      build(context, token);1090      return 17;1091    }1092    if(match_Comment(context, token)) {1093      build(context, token);1094      return 16;1095    }1096    if(match_Empty(context, token)) {1097      build(context, token);1098      return 16;1099    }1100    1101    var stateComment = "State: 16 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";1102    token.detach();1103    var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];1104    var error = token.isEof ?1105      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :1106      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1107    if (this.stopAtFirstError) throw error;1108    addError(context, error);1109    return 16;1110  }1111  // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:01112  function matchTokenAt_17(token, context) {1113    if(match_Empty(context, token)) {1114      build(context, token);1115      return 17;1116    }1117    if(match_Comment(context, token)) {1118      build(context, token);1119      return 19;1120    }1121    if(match_StepLine(context, token)) {1122      startRule(context, 'Step');1123      build(context, token);1124      return 20;1125    }1126    if(match_TagLine(context, token)) {1127      startRule(context, 'Examples');1128      startRule(context, 'Tags');1129      build(context, token);1130      return 22;1131    }1132    if(match_ExamplesLine(context, token)) {1133      startRule(context, 'Examples');1134      build(context, token);1135      return 23;1136    }1137    if(match_Other(context, token)) {1138      startRule(context, 'Description');1139      build(context, token);1140      return 18;1141    }1142    1143    var stateComment = "State: 17 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0";1144    token.detach();1145    var expectedTokens = ["#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Other"];1146    var error = token.isEof ?1147      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :1148      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1149    if (this.stopAtFirstError) throw error;1150    addError(context, error);1151    return 17;1152  }1153  // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:01154  function matchTokenAt_18(token, context) {1155    if(match_Comment(context, token)) {1156      endRule(context, 'Description');1157      build(context, token);1158      return 19;1159    }1160    if(match_StepLine(context, token)) {1161      endRule(context, 'Description');1162      startRule(context, 'Step');1163      build(context, token);1164      return 20;1165    }1166    if(match_TagLine(context, token)) {1167      endRule(context, 'Description');1168      startRule(context, 'Examples');1169      startRule(context, 'Tags');1170      build(context, token);1171      return 22;1172    }1173    if(match_ExamplesLine(context, token)) {1174      endRule(context, 'Description');1175      startRule(context, 'Examples');1176      build(context, token);1177      return 23;1178    }1179    if(match_Other(context, token)) {1180      build(context, token);1181      return 18;1182    }1183    1184    var stateComment = "State: 18 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0";1185    token.detach();1186    var expectedTokens = ["#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Other"];1187    var error = token.isEof ?1188      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :1189      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1190    if (this.stopAtFirstError) throw error;1191    addError(context, error);1192    return 18;1193  }1194  // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:01195  function matchTokenAt_19(token, context) {1196    if(match_Comment(context, token)) {1197      build(context, token);1198      return 19;1199    }1200    if(match_StepLine(context, token)) {1201      startRule(context, 'Step');1202      build(context, token);1203      return 20;1204    }1205    if(match_TagLine(context, token)) {1206      startRule(context, 'Examples');1207      startRule(context, 'Tags');1208      build(context, token);1209      return 22;1210    }1211    if(match_ExamplesLine(context, token)) {1212      startRule(context, 'Examples');1213      build(context, token);1214      return 23;1215    }1216    if(match_Empty(context, token)) {1217      build(context, token);1218      return 19;1219    }1220    1221    var stateComment = "State: 19 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0";1222    token.detach();1223    var expectedTokens = ["#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Empty"];1224    var error = token.isEof ?1225      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :1226      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1227    if (this.stopAtFirstError) throw error;1228    addError(context, error);1229    return 19;1230  }1231  // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:01232  function matchTokenAt_20(token, context) {1233    if(match_TableRow(context, token)) {1234      startRule(context, 'DataTable');1235      build(context, token);1236      return 21;1237    }1238    if(match_DocStringSeparator(context, token)) {1239      startRule(context, 'DocString');1240      build(context, token);1241      return 28;1242    }1243    if(match_StepLine(context, token)) {1244      endRule(context, 'Step');1245      startRule(context, 'Step');1246      build(context, token);1247      return 20;1248    }1249    if(match_TagLine(context, token)) {1250      endRule(context, 'Step');1251      startRule(context, 'Examples');1252      startRule(context, 'Tags');1253      build(context, token);1254      return 22;1255    }1256    if(match_ExamplesLine(context, token)) {1257      endRule(context, 'Step');1258      startRule(context, 'Examples');1259      build(context, token);1260      return 23;1261    }1262    if(match_Comment(context, token)) {1263      build(context, token);1264      return 20;1265    }1266    if(match_Empty(context, token)) {1267      build(context, token);1268      return 20;1269    }1270    1271    var stateComment = "State: 20 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0";1272    token.detach();1273    var expectedTokens = ["#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1274    var error = token.isEof ?1275      new Errors.UnexpectedEOFException(token, expectedTokens, stateComment) :1276      Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1277    if (this.stopAtFirstError) throw error;1278    addError(context, error);1279    return 20;1280  }1281  // Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:01282  function matchTokenAt_21(token, context) {1283    if(match_TableRow(context, token)) {1284      build(context, token);1285      return 21;1286    }1287    if(match_StepLine(context, token)) {1288      endRule(context, 'DataTable');1289      endRule(context, 'Step');1290      startRule(context, 'Step');1291      build(context, token);1292      return 20;1293    }1294    if(match_TagLine(context, token)) {1295      endRule(context, 'DataTable');1296      endRule(context, 'Step');...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var gherkin = require('gherkin');3var parser = new gherkin.Parser();4var lexer = new gherkin.Lexer();5var tokenMatcher = new Cucumber.TokenMatcher();6var feature = parser.parse(gherkinSource);7var tokens = lexer.lex(gherkinSource);8var token = tokens[0];9var match = tokenMatcher.matchTokenAt_21(token, feature, 0);10console.log(match);11var Cucumber = require('cucumber');12var gherkin = require('gherkin');13var parser = new gherkin.Parser();14var lexer = new gherkin.Lexer();15var tokenMatcher = new Cucumber.TokenMatcher();16var feature = parser.parse(gherkinSource);17var tokens = lexer.lex(gherkinSource);18var token = tokens[0];19var match = tokenMatcher.matchTokenAt_21(token, feature, 0);20console.log(match);21var Cucumber = require('cucumber');22var gherkin = require('gherkin');23var parser = new gherkin.Parser();24var lexer = new gherkin.Lexer();25var tokenMatcher = new Cucumber.TokenMatcher();26var feature = parser.parse(gherkinSource);27var tokens = lexer.lex(gherkinSource);28var token = tokens[0];29var match = tokenMatcher.matchTokenAt_21(token, feature, 0);30console.log(match);31var Cucumber = require('cucumber');32var gherkin = require('gherkin');33var parser = new gherkin.Parser();34var lexer = new gherkin.Lexer();35var tokenMatcher = new Cucumber.TokenMatcher();36var feature = parser.parse(gherkinSource);37var tokens = lexer.lex(gherkinSource);38var token = tokens[0];39var match = tokenMatcher.matchTokenAt_21(token

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber-gherkin');2var fs = require('fs');3var gherkin = fs.readFileSync('test.feature', 'utf8');4var parser = new Cucumber.Parser();5var feature = parser.parse(gherkin);6var featureElement = feature.getFeatureElements()[0];7var step = featureElement.getSteps()[0];8var token = step.getTokens()[1];9var result = Cucumber.TokenType.matchTokenAt_21(token, 1, 'Given');10console.log(result);11var Cucumber = require('cucumber-gherkin');12var fs = require('fs');13var gherkin = fs.readFileSync('test.feature', 'utf8');14var parser = new Cucumber.Parser();15var feature = parser.parse(gherkin);16var featureElement = feature.getFeatureElements()[0];17var step = featureElement.getSteps()[0];18var token = step.getTokens()[1];19var result = Cucumber.TokenType.matchTokenAt_22(token, 1, 'Given', 'I am using cucumber-gherkin');20console.log(result);21var Cucumber = require('cucumber-gherkin');22var fs = require('fs');23var gherkin = fs.readFileSync('test.feature', 'utf8');24var parser = new Cucumber.Parser();25var feature = parser.parse(gherkin);26var featureElement = feature.getFeatureElements()[0];27var step = featureElement.getSteps()[0];

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var Gherkin = require('gherkin');3var GherkinLexer = Gherkin.Lexer('en');4var gherkinDocument = GherkinLexer.scan('Given I have 2 cukes in my belly');5var matchTokenAt_21 = Cucumber.Gherkin.getMatchTokenAt_21();6var token = matchTokenAt_21(gherkinDocument, 1, 1);7console.log(token);8console.log(token.matchedType);

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var fs = require('fs');3var gherkin = fs.readFileSync('test.feature', 'utf8');4var tokenMatcher = Cucumber.TokenMatcher('en');5var lexer = Cucumber.Lexer(tokenMatcher);6var tokens = lexer.lex(gherkin);7var token = tokens[0];8var tokenType = token.getType();9var tokenValue = token.getValue();10var tokenLine = token.getLine();11var tokenLocation = token.getLocation();12var tokenMatch = token.match(tokenType, tokenValue);13console.log(tokenMatch);

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('cucumber-gherkin');2    But I should not see the button`;3var tokenMatcher = new gherkin.TokenMatcher();4var tokenScanner = new gherkin.TokenScanner(feature);5var token = tokenScanner.read();6while (token != null) {7  var match = tokenMatcher.matchTokenAt_21(token, tokenScanner.getLine(), tokenScanner.getColumn());8  console.log(match);9  token = tokenScanner.read();10}11{ matchedType: 6, matchedText: 'Feature:' }12{ matchedType: 7, matchedText: 'Test feature' }13{ matchedType: 6, matchedText: 'Scenario:' }14{ matchedType: 7, matchedText: 'Test scenario' }15{ matchedType: 6, matchedText: 'Given' }16{ matchedType: 7, matchedText: 'I am on the home page' }17{ matchedType: 6, matchedText: 'And' }18{ matchedType: 7, matchedText: 'I click on the button' }19{ matchedType: 6, matchedText: 'Then' }20{ matchedType: 7, matchedText: 'I should see the home page' }21{ matchedType: 6, matchedText: 'But' }22{ matchedType: 7, matchedText: 'I should not see the button' }

Full Screen

Using AI Code Generation

copy

Full Screen

1var Cucumber = require('cucumber');2var Gherkin = require('gherkin');3var lexer = new Gherkin.Lexer('en');4';5var tokens = lexer.scan(feature);6var token = tokens[3];7console.log(token);8var match = Cucumber.TokenMatcher.matchTokenAt_21(token, 0, tokens);9console.log(match);10{ line: 4,11  location: { line: 4, column: 1 },12  matchedLineTextRest: '' }13var Cucumber = require('cucumber');14var Gherkin = require('gherkin');15var lexer = new Gherkin.Lexer('en');16';17var tokens = lexer.scan(feature);18var token = tokens[4];19console.log(token);20var match = Cucumber.TokenMatcher.matchTokenAt_21(token, 0, tokens);21console.log(match);22{ line: 5,23  location: { line: 5, column: 1 },

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