How to use match_ExamplesLine method in Cucumber-gherkin

Best JavaScript code snippet using cucumber-gherkin

gherkin.js

Source:gherkin.js Github

copy

Full Screen

...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)) {5214 endRule(context, 'DataTable');5215 endRule(context, 'Step');5216 startRule(context, 'Step');5217 build(context, token);5218 return 20;5219 }5220 if(match_TagLine(context, token)) {5221 if(lookahead_0(context, token)) {5222 endRule(context, 'DataTable');5223 endRule(context, 'Step');5224 startRule(context, 'Examples_Definition');5225 startRule(context, 'Tags');5226 build(context, token);5227 return 22;5228 }5229 }5230 if(match_TagLine(context, token)) {5231 endRule(context, 'DataTable');5232 endRule(context, 'Step');5233 endRule(context, 'ScenarioOutline');5234 endRule(context, 'Scenario_Definition');5235 startRule(context, 'Scenario_Definition');5236 startRule(context, 'Tags');5237 build(context, token);5238 return 11;5239 }5240 if(match_ExamplesLine(context, token)) {5241 endRule(context, 'DataTable');5242 endRule(context, 'Step');5243 startRule(context, 'Examples_Definition');5244 startRule(context, 'Examples');5245 build(context, token);5246 return 23;5247 }5248 if(match_ScenarioLine(context, token)) {5249 endRule(context, 'DataTable');5250 endRule(context, 'Step');5251 endRule(context, 'ScenarioOutline');5252 endRule(context, 'Scenario_Definition');5253 startRule(context, 'Scenario_Definition');5254 startRule(context, 'Scenario');5255 build(context, token);5256 return 12;5257 }5258 if(match_ScenarioOutlineLine(context, token)) {5259 endRule(context, 'DataTable');5260 endRule(context, 'Step');5261 endRule(context, 'ScenarioOutline');5262 endRule(context, 'Scenario_Definition');5263 startRule(context, 'Scenario_Definition');5264 startRule(context, 'ScenarioOutline');5265 build(context, token);5266 return 17;5267 }5268 if(match_Comment(context, token)) {5269 build(context, token);5270 return 21;5271 }5272 if(match_Empty(context, token)) {5273 build(context, token);5274 return 21;5275 }5276 5277 var stateComment = "State: 21 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0";5278 token.detach();5279 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5280 var error = token.isEof ?5281 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5282 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5283 if (self.stopAtFirstError) throw error;5284 addError(context, error);5285 return 21;5286 }5287 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:05288 function matchTokenAt_22(token, context) {5289 if(match_TagLine(context, token)) {5290 build(context, token);5291 return 22;5292 }5293 if(match_ExamplesLine(context, token)) {5294 endRule(context, 'Tags');5295 startRule(context, 'Examples');5296 build(context, token);5297 return 23;5298 }5299 if(match_Comment(context, token)) {5300 build(context, token);5301 return 22;5302 }5303 if(match_Empty(context, token)) {5304 build(context, token);5305 return 22;5306 }5307 5308 var stateComment = "State: 22 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0";5309 token.detach();5310 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];5311 var error = token.isEof ?5312 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5313 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5314 if (self.stopAtFirstError) throw error;5315 addError(context, error);5316 return 22;5317 }5318 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:05319 function matchTokenAt_23(token, context) {5320 if(match_EOF(context, token)) {5321 endRule(context, 'Examples');5322 endRule(context, 'Examples_Definition');5323 endRule(context, 'ScenarioOutline');5324 endRule(context, 'Scenario_Definition');5325 endRule(context, 'Feature');5326 build(context, token);5327 return 27;5328 }5329 if(match_Empty(context, token)) {5330 build(context, token);5331 return 23;5332 }5333 if(match_Comment(context, token)) {5334 build(context, token);5335 return 25;5336 }5337 if(match_TableRow(context, token)) {5338 startRule(context, 'Examples_Table');5339 build(context, token);5340 return 26;5341 }5342 if(match_TagLine(context, token)) {5343 if(lookahead_0(context, token)) {5344 endRule(context, 'Examples');5345 endRule(context, 'Examples_Definition');5346 startRule(context, 'Examples_Definition');5347 startRule(context, 'Tags');5348 build(context, token);5349 return 22;5350 }5351 }5352 if(match_TagLine(context, token)) {5353 endRule(context, 'Examples');5354 endRule(context, 'Examples_Definition');5355 endRule(context, 'ScenarioOutline');5356 endRule(context, 'Scenario_Definition');5357 startRule(context, 'Scenario_Definition');5358 startRule(context, 'Tags');5359 build(context, token);5360 return 11;5361 }5362 if(match_ExamplesLine(context, token)) {5363 endRule(context, 'Examples');5364 endRule(context, 'Examples_Definition');5365 startRule(context, 'Examples_Definition');5366 startRule(context, 'Examples');5367 build(context, token);5368 return 23;5369 }5370 if(match_ScenarioLine(context, token)) {5371 endRule(context, 'Examples');5372 endRule(context, 'Examples_Definition');5373 endRule(context, 'ScenarioOutline');5374 endRule(context, 'Scenario_Definition');5375 startRule(context, 'Scenario_Definition');5376 startRule(context, 'Scenario');5377 build(context, token);5378 return 12;5379 }5380 if(match_ScenarioOutlineLine(context, token)) {5381 endRule(context, 'Examples');5382 endRule(context, 'Examples_Definition');5383 endRule(context, 'ScenarioOutline');5384 endRule(context, 'Scenario_Definition');5385 startRule(context, 'Scenario_Definition');5386 startRule(context, 'ScenarioOutline');5387 build(context, token);5388 return 17;5389 }5390 if(match_Other(context, token)) {5391 startRule(context, 'Description');5392 build(context, token);5393 return 24;5394 }5395 5396 var stateComment = "State: 23 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0";5397 token.detach();5398 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];5399 var error = token.isEof ?5400 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5401 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5402 if (self.stopAtFirstError) throw error;5403 addError(context, error);5404 return 23;5405 }5406 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Description_Helper:1>Description:0>#Other:05407 function matchTokenAt_24(token, context) {5408 if(match_EOF(context, token)) {5409 endRule(context, 'Description');5410 endRule(context, 'Examples');5411 endRule(context, 'Examples_Definition');5412 endRule(context, 'ScenarioOutline');5413 endRule(context, 'Scenario_Definition');5414 endRule(context, 'Feature');5415 build(context, token);5416 return 27;5417 }5418 if(match_Comment(context, token)) {5419 endRule(context, 'Description');5420 build(context, token);5421 return 25;5422 }5423 if(match_TableRow(context, token)) {5424 endRule(context, 'Description');5425 startRule(context, 'Examples_Table');5426 build(context, token);5427 return 26;5428 }5429 if(match_TagLine(context, token)) {5430 if(lookahead_0(context, token)) {5431 endRule(context, 'Description');5432 endRule(context, 'Examples');5433 endRule(context, 'Examples_Definition');5434 startRule(context, 'Examples_Definition');5435 startRule(context, 'Tags');5436 build(context, token);5437 return 22;5438 }5439 }5440 if(match_TagLine(context, token)) {5441 endRule(context, 'Description');5442 endRule(context, 'Examples');5443 endRule(context, 'Examples_Definition');5444 endRule(context, 'ScenarioOutline');5445 endRule(context, 'Scenario_Definition');5446 startRule(context, 'Scenario_Definition');5447 startRule(context, 'Tags');5448 build(context, token);5449 return 11;5450 }5451 if(match_ExamplesLine(context, token)) {5452 endRule(context, 'Description');5453 endRule(context, 'Examples');5454 endRule(context, 'Examples_Definition');5455 startRule(context, 'Examples_Definition');5456 startRule(context, 'Examples');5457 build(context, token);5458 return 23;5459 }5460 if(match_ScenarioLine(context, token)) {5461 endRule(context, 'Description');5462 endRule(context, 'Examples');5463 endRule(context, 'Examples_Definition');5464 endRule(context, 'ScenarioOutline');5465 endRule(context, 'Scenario_Definition');5466 startRule(context, 'Scenario_Definition');5467 startRule(context, 'Scenario');5468 build(context, token);5469 return 12;5470 }5471 if(match_ScenarioOutlineLine(context, token)) {5472 endRule(context, 'Description');5473 endRule(context, 'Examples');5474 endRule(context, 'Examples_Definition');5475 endRule(context, 'ScenarioOutline');5476 endRule(context, 'Scenario_Definition');5477 startRule(context, 'Scenario_Definition');5478 startRule(context, 'ScenarioOutline');5479 build(context, token);5480 return 17;5481 }5482 if(match_Other(context, token)) {5483 build(context, token);5484 return 24;5485 }5486 5487 var stateComment = "State: 24 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Description_Helper:1>Description:0>#Other:0";5488 token.detach();5489 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"];5490 var error = token.isEof ?5491 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5492 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5493 if (self.stopAtFirstError) throw error;5494 addError(context, error);5495 return 24;5496 }5497 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Description_Helper:2>#Comment:05498 function matchTokenAt_25(token, context) {5499 if(match_EOF(context, token)) {5500 endRule(context, 'Examples');5501 endRule(context, 'Examples_Definition');5502 endRule(context, 'ScenarioOutline');5503 endRule(context, 'Scenario_Definition');5504 endRule(context, 'Feature');5505 build(context, token);5506 return 27;5507 }5508 if(match_Comment(context, token)) {5509 build(context, token);5510 return 25;5511 }5512 if(match_TableRow(context, token)) {5513 startRule(context, 'Examples_Table');5514 build(context, token);5515 return 26;5516 }5517 if(match_TagLine(context, token)) {5518 if(lookahead_0(context, token)) {5519 endRule(context, 'Examples');5520 endRule(context, 'Examples_Definition');5521 startRule(context, 'Examples_Definition');5522 startRule(context, 'Tags');5523 build(context, token);5524 return 22;5525 }5526 }5527 if(match_TagLine(context, token)) {5528 endRule(context, 'Examples');5529 endRule(context, 'Examples_Definition');5530 endRule(context, 'ScenarioOutline');5531 endRule(context, 'Scenario_Definition');5532 startRule(context, 'Scenario_Definition');5533 startRule(context, 'Tags');5534 build(context, token);5535 return 11;5536 }5537 if(match_ExamplesLine(context, token)) {5538 endRule(context, 'Examples');5539 endRule(context, 'Examples_Definition');5540 startRule(context, 'Examples_Definition');5541 startRule(context, 'Examples');5542 build(context, token);5543 return 23;5544 }5545 if(match_ScenarioLine(context, token)) {5546 endRule(context, 'Examples');5547 endRule(context, 'Examples_Definition');5548 endRule(context, 'ScenarioOutline');5549 endRule(context, 'Scenario_Definition');5550 startRule(context, 'Scenario_Definition');5551 startRule(context, 'Scenario');5552 build(context, token);5553 return 12;5554 }5555 if(match_ScenarioOutlineLine(context, token)) {5556 endRule(context, 'Examples');5557 endRule(context, 'Examples_Definition');5558 endRule(context, 'ScenarioOutline');5559 endRule(context, 'Scenario_Definition');5560 startRule(context, 'Scenario_Definition');5561 startRule(context, 'ScenarioOutline');5562 build(context, token);5563 return 17;5564 }5565 if(match_Empty(context, token)) {5566 build(context, token);5567 return 25;5568 }5569 5570 var stateComment = "State: 25 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Description_Helper:2>#Comment:0";5571 token.detach();5572 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"];5573 var error = token.isEof ?5574 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5575 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5576 if (self.stopAtFirstError) throw error;5577 addError(context, error);5578 return 25;5579 }5580 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:05581 function matchTokenAt_26(token, context) {5582 if(match_EOF(context, token)) {5583 endRule(context, 'Examples_Table');5584 endRule(context, 'Examples');5585 endRule(context, 'Examples_Definition');5586 endRule(context, 'ScenarioOutline');5587 endRule(context, 'Scenario_Definition');5588 endRule(context, 'Feature');5589 build(context, token);5590 return 27;5591 }5592 if(match_TableRow(context, token)) {5593 build(context, token);5594 return 26;5595 }5596 if(match_TagLine(context, token)) {5597 if(lookahead_0(context, token)) {5598 endRule(context, 'Examples_Table');5599 endRule(context, 'Examples');5600 endRule(context, 'Examples_Definition');5601 startRule(context, 'Examples_Definition');5602 startRule(context, 'Tags');5603 build(context, token);5604 return 22;5605 }5606 }5607 if(match_TagLine(context, token)) {5608 endRule(context, 'Examples_Table');5609 endRule(context, 'Examples');5610 endRule(context, 'Examples_Definition');5611 endRule(context, 'ScenarioOutline');5612 endRule(context, 'Scenario_Definition');5613 startRule(context, 'Scenario_Definition');5614 startRule(context, 'Tags');5615 build(context, token);5616 return 11;5617 }5618 if(match_ExamplesLine(context, token)) {5619 endRule(context, 'Examples_Table');5620 endRule(context, 'Examples');5621 endRule(context, 'Examples_Definition');5622 startRule(context, 'Examples_Definition');5623 startRule(context, 'Examples');5624 build(context, token);5625 return 23;5626 }5627 if(match_ScenarioLine(context, token)) {5628 endRule(context, 'Examples_Table');5629 endRule(context, 'Examples');5630 endRule(context, 'Examples_Definition');5631 endRule(context, 'ScenarioOutline');5632 endRule(context, 'Scenario_Definition');5633 startRule(context, 'Scenario_Definition');5634 startRule(context, 'Scenario');5635 build(context, token);5636 return 12;5637 }5638 if(match_ScenarioOutlineLine(context, token)) {5639 endRule(context, 'Examples_Table');5640 endRule(context, 'Examples');5641 endRule(context, 'Examples_Definition');5642 endRule(context, 'ScenarioOutline');5643 endRule(context, 'Scenario_Definition');5644 startRule(context, 'Scenario_Definition');5645 startRule(context, 'ScenarioOutline');5646 build(context, token);5647 return 17;5648 }5649 if(match_Comment(context, token)) {5650 build(context, token);5651 return 26;5652 }5653 if(match_Empty(context, token)) {5654 build(context, token);5655 return 26;5656 }5657 5658 var stateComment = "State: 26 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:0";5659 token.detach();5660 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5661 var error = token.isEof ?5662 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5663 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5664 if (self.stopAtFirstError) throw error;5665 addError(context, error);5666 return 26;5667 }5668 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:05669 function matchTokenAt_28(token, context) {5670 if(match_DocStringSeparator(context, token)) {5671 build(context, token);5672 return 29;5673 }5674 if(match_Other(context, token)) {5675 build(context, token);5676 return 28;5677 }5678 5679 var stateComment = "State: 28 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";5680 token.detach();5681 var expectedTokens = ["#DocStringSeparator", "#Other"];5682 var error = token.isEof ?5683 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5684 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5685 if (self.stopAtFirstError) throw error;5686 addError(context, error);5687 return 28;5688 }5689 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:05690 function matchTokenAt_29(token, context) {5691 if(match_EOF(context, token)) {5692 endRule(context, 'DocString');5693 endRule(context, 'Step');5694 endRule(context, 'ScenarioOutline');5695 endRule(context, 'Scenario_Definition');5696 endRule(context, 'Feature');5697 build(context, token);5698 return 27;5699 }5700 if(match_StepLine(context, token)) {5701 endRule(context, 'DocString');5702 endRule(context, 'Step');5703 startRule(context, 'Step');5704 build(context, token);5705 return 20;5706 }5707 if(match_TagLine(context, token)) {5708 if(lookahead_0(context, token)) {5709 endRule(context, 'DocString');5710 endRule(context, 'Step');5711 startRule(context, 'Examples_Definition');5712 startRule(context, 'Tags');5713 build(context, token);5714 return 22;5715 }5716 }5717 if(match_TagLine(context, token)) {5718 endRule(context, 'DocString');5719 endRule(context, 'Step');5720 endRule(context, 'ScenarioOutline');5721 endRule(context, 'Scenario_Definition');5722 startRule(context, 'Scenario_Definition');5723 startRule(context, 'Tags');5724 build(context, token);5725 return 11;5726 }5727 if(match_ExamplesLine(context, token)) {5728 endRule(context, 'DocString');5729 endRule(context, 'Step');5730 startRule(context, 'Examples_Definition');5731 startRule(context, 'Examples');5732 build(context, token);5733 return 23;5734 }5735 if(match_ScenarioLine(context, token)) {5736 endRule(context, 'DocString');5737 endRule(context, 'Step');5738 endRule(context, 'ScenarioOutline');5739 endRule(context, 'Scenario_Definition');5740 startRule(context, 'Scenario_Definition');5741 startRule(context, 'Scenario');5742 build(context, token);5743 return 12;5744 }5745 if(match_ScenarioOutlineLine(context, token)) {5746 endRule(context, 'DocString');5747 endRule(context, 'Step');5748 endRule(context, 'ScenarioOutline');5749 endRule(context, 'Scenario_Definition');5750 startRule(context, 'Scenario_Definition');5751 startRule(context, 'ScenarioOutline');5752 build(context, token);5753 return 17;5754 }5755 if(match_Comment(context, token)) {5756 build(context, token);5757 return 29;5758 }5759 if(match_Empty(context, token)) {5760 build(context, token);5761 return 29;5762 }5763 5764 var stateComment = "State: 29 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";5765 token.detach();5766 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5767 var error = token.isEof ?5768 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5769 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5770 if (self.stopAtFirstError) throw error;5771 addError(context, error);5772 return 29;5773 }5774 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:05775 function matchTokenAt_30(token, context) {5776 if(match_DocStringSeparator(context, token)) {5777 build(context, token);5778 return 31;5779 }5780 if(match_Other(context, token)) {5781 build(context, token);5782 return 30;5783 }5784 5785 var stateComment = "State: 30 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";5786 token.detach();5787 var expectedTokens = ["#DocStringSeparator", "#Other"];5788 var error = token.isEof ?5789 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5790 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5791 if (self.stopAtFirstError) throw error;5792 addError(context, error);5793 return 30;5794 }5795 // GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:05796 function matchTokenAt_31(token, context) {5797 if(match_EOF(context, token)) {5798 endRule(context, 'DocString');5799 endRule(context, 'Step');5800 endRule(context, 'Scenario');5801 endRule(context, 'Scenario_Definition');5802 endRule(context, 'Feature');5803 build(context, token);5804 return 27;5805 }5806 if(match_StepLine(context, token)) {5807 endRule(context, 'DocString');5808 endRule(context, 'Step');5809 startRule(context, 'Step');5810 build(context, token);5811 return 15;5812 }5813 if(match_TagLine(context, token)) {5814 endRule(context, 'DocString');5815 endRule(context, 'Step');5816 endRule(context, 'Scenario');5817 endRule(context, 'Scenario_Definition');5818 startRule(context, 'Scenario_Definition');5819 startRule(context, 'Tags');5820 build(context, token);5821 return 11;5822 }5823 if(match_ScenarioLine(context, token)) {5824 endRule(context, 'DocString');5825 endRule(context, 'Step');5826 endRule(context, 'Scenario');5827 endRule(context, 'Scenario_Definition');5828 startRule(context, 'Scenario_Definition');5829 startRule(context, 'Scenario');5830 build(context, token);5831 return 12;5832 }5833 if(match_ScenarioOutlineLine(context, token)) {5834 endRule(context, 'DocString');5835 endRule(context, 'Step');5836 endRule(context, 'Scenario');5837 endRule(context, 'Scenario_Definition');5838 startRule(context, 'Scenario_Definition');5839 startRule(context, 'ScenarioOutline');5840 build(context, token);5841 return 17;5842 }5843 if(match_Comment(context, token)) {5844 build(context, token);5845 return 31;5846 }5847 if(match_Empty(context, token)) {5848 build(context, token);5849 return 31;5850 }5851 5852 var stateComment = "State: 31 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";5853 token.detach();5854 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5855 var error = token.isEof ?5856 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5857 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5858 if (self.stopAtFirstError) throw error;5859 addError(context, error);5860 return 31;5861 }5862 // GherkinDocument:0>Feature:1>Background:2>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:05863 function matchTokenAt_32(token, context) {5864 if(match_DocStringSeparator(context, token)) {5865 build(context, token);5866 return 33;5867 }5868 if(match_Other(context, token)) {5869 build(context, token);5870 return 32;5871 }5872 5873 var stateComment = "State: 32 - GherkinDocument:0>Feature:1>Background:2>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0";5874 token.detach();5875 var expectedTokens = ["#DocStringSeparator", "#Other"];5876 var error = token.isEof ?5877 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5878 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5879 if (self.stopAtFirstError) throw error;5880 addError(context, error);5881 return 32;5882 }5883 // GherkinDocument:0>Feature:1>Background:2>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:05884 function matchTokenAt_33(token, context) {5885 if(match_EOF(context, token)) {5886 endRule(context, 'DocString');5887 endRule(context, 'Step');5888 endRule(context, 'Background');5889 endRule(context, 'Feature');5890 build(context, token);5891 return 27;5892 }5893 if(match_StepLine(context, token)) {5894 endRule(context, 'DocString');5895 endRule(context, 'Step');5896 startRule(context, 'Step');5897 build(context, token);5898 return 9;5899 }5900 if(match_TagLine(context, token)) {5901 endRule(context, 'DocString');5902 endRule(context, 'Step');5903 endRule(context, 'Background');5904 startRule(context, 'Scenario_Definition');5905 startRule(context, 'Tags');5906 build(context, token);5907 return 11;5908 }5909 if(match_ScenarioLine(context, token)) {5910 endRule(context, 'DocString');5911 endRule(context, 'Step');5912 endRule(context, 'Background');5913 startRule(context, 'Scenario_Definition');5914 startRule(context, 'Scenario');5915 build(context, token);5916 return 12;5917 }5918 if(match_ScenarioOutlineLine(context, token)) {5919 endRule(context, 'DocString');5920 endRule(context, 'Step');5921 endRule(context, 'Background');5922 startRule(context, 'Scenario_Definition');5923 startRule(context, 'ScenarioOutline');5924 build(context, token);5925 return 17;5926 }5927 if(match_Comment(context, token)) {5928 build(context, token);5929 return 33;5930 }5931 if(match_Empty(context, token)) {5932 build(context, token);5933 return 33;5934 }5935 5936 var stateComment = "State: 33 - GherkinDocument:0>Feature:1>Background:2>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0";5937 token.detach();5938 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"];5939 var error = token.isEof ?5940 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :5941 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);5942 if (self.stopAtFirstError) throw error;5943 addError(context, error);5944 return 33;5945 }5946 function match_EOF(context, token) {5947 return handleExternalError(context, false, function () {5948 return context.tokenMatcher.match_EOF(token);5949 });5950 }5951 function match_Empty(context, token) {5952 if(token.isEof) return false;5953 return handleExternalError(context, false, function () {5954 return context.tokenMatcher.match_Empty(token);5955 });5956 }5957 function match_Comment(context, token) {5958 if(token.isEof) return false;5959 return handleExternalError(context, false, function () {5960 return context.tokenMatcher.match_Comment(token);5961 });5962 }5963 function match_TagLine(context, token) {5964 if(token.isEof) return false;5965 return handleExternalError(context, false, function () {5966 return context.tokenMatcher.match_TagLine(token);5967 });5968 }5969 function match_FeatureLine(context, token) {5970 if(token.isEof) return false;5971 return handleExternalError(context, false, function () {5972 return context.tokenMatcher.match_FeatureLine(token);5973 });5974 }5975 function match_BackgroundLine(context, token) {5976 if(token.isEof) return false;5977 return handleExternalError(context, false, function () {5978 return context.tokenMatcher.match_BackgroundLine(token);5979 });5980 }5981 function match_ScenarioLine(context, token) {5982 if(token.isEof) return false;5983 return handleExternalError(context, false, function () {5984 return context.tokenMatcher.match_ScenarioLine(token);5985 });5986 }5987 function match_ScenarioOutlineLine(context, token) {5988 if(token.isEof) return false;5989 return handleExternalError(context, false, function () {5990 return context.tokenMatcher.match_ScenarioOutlineLine(token);5991 });5992 }5993 function match_ExamplesLine(context, token) {5994 if(token.isEof) return false;5995 return handleExternalError(context, false, function () {5996 return context.tokenMatcher.match_ExamplesLine(token);5997 });5998 }5999 function match_StepLine(context, token) {6000 if(token.isEof) return false;6001 return handleExternalError(context, false, function () {6002 return context.tokenMatcher.match_StepLine(token);6003 });6004 }6005 function match_DocStringSeparator(context, token) {6006 if(token.isEof) return false;6007 return handleExternalError(context, false, function () {6008 return context.tokenMatcher.match_DocStringSeparator(token);6009 });6010 }6011 function match_TableRow(context, token) {6012 if(token.isEof) return false;6013 return handleExternalError(context, false, function () {6014 return context.tokenMatcher.match_TableRow(token);6015 });6016 }6017 function match_Language(context, token) {6018 if(token.isEof) return false;6019 return handleExternalError(context, false, function () {6020 return context.tokenMatcher.match_Language(token);6021 });6022 }6023 function match_Other(context, token) {6024 if(token.isEof) return false;6025 return handleExternalError(context, false, function () {6026 return context.tokenMatcher.match_Other(token);6027 });6028 }6029 function lookahead_0(context, currentToken) {6030 currentToken.detach();6031 var token;6032 var queue = [];6033 var match = false;6034 do {6035 token = readToken(context);6036 token.detach();6037 queue.push(token);6038 if (false || match_ExamplesLine(context, token)) {6039 match = true;6040 break;6041 }6042 } while(false || match_Empty(context, token) || match_Comment(context, token) || match_TagLine(context, token));6043 context.tokenQueue = context.tokenQueue.concat(queue);6044 return match;6045 }6046}6047},{"./ast_builder":2,"./errors":6,"./token_matcher":13,"./token_scanner":14}],11:[function(require,module,exports){6048var countSymbols = require('../count_symbols');6049function Compiler() {6050 this.compile = function (gherkin_document) {6051 var pickles = [];6052 if (gherkin_document.feature == null) return pickles;6053 var feature = gherkin_document.feature;6054 var language = feature.language;6055 var featureTags = feature.tags;6056 var backgroundSteps = [];6057 feature.children.forEach(function (scenarioDefinition) {6058 if(scenarioDefinition.type === 'Background') {6059 backgroundSteps = pickleSteps(scenarioDefinition);6060 } else if(scenarioDefinition.type === 'Scenario') {6061 compileScenario(featureTags, backgroundSteps, scenarioDefinition, language, pickles);6062 } else {6063 compileScenarioOutline(featureTags, backgroundSteps, scenarioDefinition, language, pickles);6064 }6065 });6066 return pickles;6067 };6068 function compileScenario(featureTags, backgroundSteps, scenario, language, pickles) {6069 var steps = scenario.steps.length == 0 ? [] : [].concat(backgroundSteps);6070 var tags = [].concat(featureTags).concat(scenario.tags);6071 scenario.steps.forEach(function (step) {6072 steps.push(pickleStep(step));6073 });6074 var pickle = {6075 tags: pickleTags(tags),6076 name: scenario.name,6077 language: language,6078 locations: [pickleLocation(scenario.location)],6079 steps: steps6080 };6081 pickles.push(pickle);6082 }6083 function compileScenarioOutline(featureTags, backgroundSteps, scenarioOutline, language, pickles) {6084 scenarioOutline.examples.filter(function(e) { return e.tableHeader != undefined; }).forEach(function (examples) {6085 var variableCells = examples.tableHeader.cells;6086 examples.tableBody.forEach(function (values) {6087 var valueCells = values.cells;6088 var steps = scenarioOutline.steps.length == 0 ? [] : [].concat(backgroundSteps);6089 var tags = [].concat(featureTags).concat(scenarioOutline.tags).concat(examples.tags);6090 scenarioOutline.steps.forEach(function (scenarioOutlineStep) {6091 var stepText = interpolate(scenarioOutlineStep.text, variableCells, valueCells);6092 var args = createPickleArguments(scenarioOutlineStep.argument, variableCells, valueCells);6093 var pickleStep = {6094 text: stepText,6095 arguments: args,6096 locations: [6097 pickleLocation(values.location),6098 pickleStepLocation(scenarioOutlineStep)6099 ]6100 };6101 steps.push(pickleStep);6102 });6103 var pickle = {6104 name: interpolate(scenarioOutline.name, variableCells, valueCells),6105 language: language,6106 steps: steps,6107 tags: pickleTags(tags),6108 locations: [6109 pickleLocation(values.location),6110 pickleLocation(scenarioOutline.location)6111 ]6112 };6113 pickles.push(pickle);6114 });6115 });6116 }6117 function createPickleArguments(argument, variableCells, valueCells) {6118 var result = [];6119 if (!argument) return result;6120 if (argument.type === 'DataTable') {6121 var table = {6122 rows: argument.rows.map(function (row) {6123 return {6124 cells: row.cells.map(function (cell) {6125 return {6126 location: pickleLocation(cell.location),6127 value: interpolate(cell.value, variableCells, valueCells)6128 };6129 })6130 };6131 })6132 };6133 result.push(table);6134 } else if (argument.type === 'DocString') {6135 var docString = {6136 location: pickleLocation(argument.location),6137 content: interpolate(argument.content, variableCells, valueCells),6138 };6139 if(argument.contentType) {6140 docString.contentType = interpolate(argument.contentType, variableCells, valueCells);6141 }6142 result.push(docString);6143 } else {6144 throw Error('Internal error');6145 }6146 return result;6147 }6148 function interpolate(name, variableCells, valueCells) {6149 variableCells.forEach(function (variableCell, n) {6150 var valueCell = valueCells[n];6151 var search = new RegExp('<' + variableCell.value + '>', 'g');6152 // JS Specific - dollar sign needs to be escaped with another dollar sign6153 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter6154 var replacement = valueCell.value.replace(new RegExp('\\$', 'g'), '$$$$')6155 name = name.replace(search, replacement);6156 });6157 return name;6158 }6159 function pickleSteps(scenarioDefinition) {6160 return scenarioDefinition.steps.map(function (step) {6161 return pickleStep(step);6162 });6163 }6164 function pickleStep(step) {6165 return {6166 text: step.text,6167 arguments: createPickleArguments(step.argument, [], []),6168 locations: [pickleStepLocation(step)]6169 }6170 }6171 function pickleStepLocation(step) {6172 return {6173 line: step.location.line,6174 column: step.location.column + (step.keyword ? countSymbols(step.keyword) : 0)6175 };6176 }6177 function pickleLocation(location) {6178 return {6179 line: location.line,6180 column: location.column6181 }6182 }6183 function pickleTags(tags) {6184 return tags.map(function (tag) {6185 return pickleTag(tag);6186 });6187 }6188 function pickleTag(tag) {6189 return {6190 name: tag.name,6191 location: pickleLocation(tag.location)6192 };6193 }6194}6195module.exports = Compiler;6196},{"../count_symbols":4}],12:[function(require,module,exports){6197function Token(line, location) {6198 this.line = line;6199 this.location = location;6200 this.isEof = line == null;6201};6202Token.prototype.getTokenValue = function () {6203 return this.isEof ? "EOF" : this.line.getLineText(-1);6204};6205Token.prototype.detach = function () {6206 // TODO: Detach line, but is this really needed?6207};6208module.exports = Token;6209},{}],13:[function(require,module,exports){6210var DIALECTS = require('./dialects');6211var Errors = require('./errors');6212var LANGUAGE_PATTERN = /^\s*#\s*language\s*:\s*([a-zA-Z\-_]+)\s*$/;6213module.exports = function TokenMatcher(defaultDialectName) {6214 defaultDialectName = defaultDialectName || 'en';6215 var dialect;6216 var dialectName;6217 var activeDocStringSeparator;6218 var indentToRemove;6219 function changeDialect(newDialectName, location) {6220 var newDialect = DIALECTS[newDialectName];6221 if(!newDialect) {6222 throw Errors.NoSuchLanguageException.create(newDialectName, location);6223 }6224 dialectName = newDialectName;6225 dialect = newDialect;6226 }6227 this.reset = function () {6228 if(dialectName != defaultDialectName) changeDialect(defaultDialectName);6229 activeDocStringSeparator = null;6230 indentToRemove = 0;6231 };6232 this.reset();6233 this.match_TagLine = function match_TagLine(token) {6234 if(token.line.startsWith('@')) {6235 setTokenMatched(token, 'TagLine', null, null, null, token.line.getTags());6236 return true;6237 }6238 return false;6239 };6240 this.match_FeatureLine = function match_FeatureLine(token) {6241 return matchTitleLine(token, 'FeatureLine', dialect.feature);6242 };6243 this.match_ScenarioLine = function match_ScenarioLine(token) {6244 return matchTitleLine(token, 'ScenarioLine', dialect.scenario);6245 };6246 this.match_ScenarioOutlineLine = function match_ScenarioOutlineLine(token) {6247 return matchTitleLine(token, 'ScenarioOutlineLine', dialect.scenarioOutline);6248 };6249 this.match_BackgroundLine = function match_BackgroundLine(token) {6250 return matchTitleLine(token, 'BackgroundLine', dialect.background);6251 };6252 this.match_ExamplesLine = function match_ExamplesLine(token) {6253 return matchTitleLine(token, 'ExamplesLine', dialect.examples);6254 };6255 this.match_TableRow = function match_TableRow(token) {6256 if (token.line.startsWith('|')) {6257 // TODO: indent6258 setTokenMatched(token, 'TableRow', null, null, null, token.line.getTableCells());6259 return true;6260 }6261 return false;6262 };6263 this.match_Empty = function match_Empty(token) {6264 if (token.line.isEmpty) {6265 setTokenMatched(token, 'Empty', null, null, 0);6266 return true;...

Full Screen

Full Screen

parser.py

Source:parser.py Github

copy

Full Screen

...122 def match_ScenarioLine(self, context, token):123 if token.eof():124 return False125 return self.handle_external_error(context, False, token, context.token_matcher.match_ScenarioLine)126 def match_ExamplesLine(self, context, token):127 if token.eof():128 return False129 return self.handle_external_error(context, False, token, context.token_matcher.match_ExamplesLine)130 def match_StepLine(self, context, token):131 if token.eof():132 return False133 return self.handle_external_error(context, False, token, context.token_matcher.match_StepLine)134 def match_DocStringSeparator(self, context, token):135 if token.eof():136 return False137 return self.handle_external_error(context, False, token, context.token_matcher.match_DocStringSeparator)138 def match_TableRow(self, context, token):139 if token.eof():140 return False141 return self.handle_external_error(context, False, token, context.token_matcher.match_TableRow)142 def match_Language(self, context, token):143 if token.eof():144 return False145 return self.handle_external_error(context, False, token, context.token_matcher.match_Language)146 def match_Other(self, context, token):147 if token.eof():148 return False149 return self.handle_external_error(context, False, token, context.token_matcher.match_Other)150 def match_token(self, state, token, context):151 state_map = {152 0: self.match_token_at_0,153 1: self.match_token_at_1,154 2: self.match_token_at_2,155 3: self.match_token_at_3,156 4: self.match_token_at_4,157 5: self.match_token_at_5,158 6: self.match_token_at_6,159 7: self.match_token_at_7,160 8: self.match_token_at_8,161 9: self.match_token_at_9,162 10: self.match_token_at_10,163 11: self.match_token_at_11,164 12: self.match_token_at_12,165 13: self.match_token_at_13,166 14: self.match_token_at_14,167 15: self.match_token_at_15,168 16: self.match_token_at_16,169 17: self.match_token_at_17,170 18: self.match_token_at_18,171 19: self.match_token_at_19,172 20: self.match_token_at_20,173 21: self.match_token_at_21,174 22: self.match_token_at_22,175 23: self.match_token_at_23,176 24: self.match_token_at_24,177 25: self.match_token_at_25,178 26: self.match_token_at_26,179 27: self.match_token_at_27,180 28: self.match_token_at_28,181 29: self.match_token_at_29,182 30: self.match_token_at_30,183 31: self.match_token_at_31,184 32: self.match_token_at_32,185 33: self.match_token_at_33,186 34: self.match_token_at_34,187 35: self.match_token_at_35,188 36: self.match_token_at_36,189 37: self.match_token_at_37,190 38: self.match_token_at_38,191 39: self.match_token_at_39,192 40: self.match_token_at_40,193 42: self.match_token_at_42,194 43: self.match_token_at_43,195 44: self.match_token_at_44,196 45: self.match_token_at_45,197 46: self.match_token_at_46,198 47: self.match_token_at_47,199 48: self.match_token_at_48,200 49: self.match_token_at_49,201 }202 if state in state_map:203 return state_map[state](token, context)204 else:205 raise RuntimeError("Unknown state: " + str(state))206 # Start207 def match_token_at_0(self, token, context):208 if self.match_EOF(context, token):209 self.build(context, token)210 return 41211 if self.match_Language(context, token):212 self.start_rule(context, 'Feature')213 self.start_rule(context, 'FeatureHeader')214 self.build(context, token)215 return 1216 if self.match_TagLine(context, token):217 self.start_rule(context, 'Feature')218 self.start_rule(context, 'FeatureHeader')219 self.start_rule(context, 'Tags')220 self.build(context, token)221 return 2222 if self.match_FeatureLine(context, token):223 self.start_rule(context, 'Feature')224 self.start_rule(context, 'FeatureHeader')225 self.build(context, token)226 return 3227 if self.match_Comment(context, token):228 self.build(context, token)229 return 0230 if self.match_Empty(context, token):231 self.build(context, token)232 return 0233 state_comment = "State: 0 - Start"234 token.detach235 expected_tokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"]236 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)237 if (self.stop_at_first_error):238 raise error239 self.add_error(context, error)240 return 0241 # GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0242 def match_token_at_1(self, token, context):243 if self.match_TagLine(context, token):244 self.start_rule(context, 'Tags')245 self.build(context, token)246 return 2247 if self.match_FeatureLine(context, token):248 self.build(context, token)249 return 3250 if self.match_Comment(context, token):251 self.build(context, token)252 return 1253 if self.match_Empty(context, token):254 self.build(context, token)255 return 1256 state_comment = "State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0"257 token.detach258 expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]259 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)260 if (self.stop_at_first_error):261 raise error262 self.add_error(context, error)263 return 1264 # GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0265 def match_token_at_2(self, token, context):266 if self.match_TagLine(context, token):267 self.build(context, token)268 return 2269 if self.match_FeatureLine(context, token):270 self.end_rule(context, 'Tags')271 self.build(context, token)272 return 3273 if self.match_Comment(context, token):274 self.build(context, token)275 return 2276 if self.match_Empty(context, token):277 self.build(context, token)278 return 2279 state_comment = "State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0"280 token.detach281 expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]282 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)283 if (self.stop_at_first_error):284 raise error285 self.add_error(context, error)286 return 2287 # GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0288 def match_token_at_3(self, token, context):289 if self.match_EOF(context, token):290 self.end_rule(context, 'FeatureHeader')291 self.end_rule(context, 'Feature')292 self.build(context, token)293 return 41294 if self.match_Empty(context, token):295 self.build(context, token)296 return 3297 if self.match_Comment(context, token):298 self.build(context, token)299 return 5300 if self.match_BackgroundLine(context, token):301 self.end_rule(context, 'FeatureHeader')302 self.start_rule(context, 'Background')303 self.build(context, token)304 return 6305 if self.match_TagLine(context, token):306 self.end_rule(context, 'FeatureHeader')307 self.start_rule(context, 'ScenarioDefinition')308 self.start_rule(context, 'Tags')309 self.build(context, token)310 return 11311 if self.match_ScenarioLine(context, token):312 self.end_rule(context, 'FeatureHeader')313 self.start_rule(context, 'ScenarioDefinition')314 self.start_rule(context, 'Scenario')315 self.build(context, token)316 return 12317 if self.match_RuleLine(context, token):318 self.end_rule(context, 'FeatureHeader')319 self.start_rule(context, 'Rule')320 self.start_rule(context, 'RuleHeader')321 self.build(context, token)322 return 22323 if self.match_Other(context, token):324 self.start_rule(context, 'Description')325 self.build(context, token)326 return 4327 state_comment = "State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0"328 token.detach329 expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]330 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)331 if (self.stop_at_first_error):332 raise error333 self.add_error(context, error)334 return 3335 # GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0336 def match_token_at_4(self, token, context):337 if self.match_EOF(context, token):338 self.end_rule(context, 'Description')339 self.end_rule(context, 'FeatureHeader')340 self.end_rule(context, 'Feature')341 self.build(context, token)342 return 41343 if self.match_Comment(context, token):344 self.end_rule(context, 'Description')345 self.build(context, token)346 return 5347 if self.match_BackgroundLine(context, token):348 self.end_rule(context, 'Description')349 self.end_rule(context, 'FeatureHeader')350 self.start_rule(context, 'Background')351 self.build(context, token)352 return 6353 if self.match_TagLine(context, token):354 self.end_rule(context, 'Description')355 self.end_rule(context, 'FeatureHeader')356 self.start_rule(context, 'ScenarioDefinition')357 self.start_rule(context, 'Tags')358 self.build(context, token)359 return 11360 if self.match_ScenarioLine(context, token):361 self.end_rule(context, 'Description')362 self.end_rule(context, 'FeatureHeader')363 self.start_rule(context, 'ScenarioDefinition')364 self.start_rule(context, 'Scenario')365 self.build(context, token)366 return 12367 if self.match_RuleLine(context, token):368 self.end_rule(context, 'Description')369 self.end_rule(context, 'FeatureHeader')370 self.start_rule(context, 'Rule')371 self.start_rule(context, 'RuleHeader')372 self.build(context, token)373 return 22374 if self.match_Other(context, token):375 self.build(context, token)376 return 4377 state_comment = "State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0"378 token.detach379 expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]380 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)381 if (self.stop_at_first_error):382 raise error383 self.add_error(context, error)384 return 4385 # GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0386 def match_token_at_5(self, token, context):387 if self.match_EOF(context, token):388 self.end_rule(context, 'FeatureHeader')389 self.end_rule(context, 'Feature')390 self.build(context, token)391 return 41392 if self.match_Comment(context, token):393 self.build(context, token)394 return 5395 if self.match_BackgroundLine(context, token):396 self.end_rule(context, 'FeatureHeader')397 self.start_rule(context, 'Background')398 self.build(context, token)399 return 6400 if self.match_TagLine(context, token):401 self.end_rule(context, 'FeatureHeader')402 self.start_rule(context, 'ScenarioDefinition')403 self.start_rule(context, 'Tags')404 self.build(context, token)405 return 11406 if self.match_ScenarioLine(context, token):407 self.end_rule(context, 'FeatureHeader')408 self.start_rule(context, 'ScenarioDefinition')409 self.start_rule(context, 'Scenario')410 self.build(context, token)411 return 12412 if self.match_RuleLine(context, token):413 self.end_rule(context, 'FeatureHeader')414 self.start_rule(context, 'Rule')415 self.start_rule(context, 'RuleHeader')416 self.build(context, token)417 return 22418 if self.match_Empty(context, token):419 self.build(context, token)420 return 5421 state_comment = "State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0"422 token.detach423 expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]424 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)425 if (self.stop_at_first_error):426 raise error427 self.add_error(context, error)428 return 5429 # GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0430 def match_token_at_6(self, token, context):431 if self.match_EOF(context, token):432 self.end_rule(context, 'Background')433 self.end_rule(context, 'Feature')434 self.build(context, token)435 return 41436 if self.match_Empty(context, token):437 self.build(context, token)438 return 6439 if self.match_Comment(context, token):440 self.build(context, token)441 return 8442 if self.match_StepLine(context, token):443 self.start_rule(context, 'Step')444 self.build(context, token)445 return 9446 if self.match_TagLine(context, token):447 self.end_rule(context, 'Background')448 self.start_rule(context, 'ScenarioDefinition')449 self.start_rule(context, 'Tags')450 self.build(context, token)451 return 11452 if self.match_ScenarioLine(context, token):453 self.end_rule(context, 'Background')454 self.start_rule(context, 'ScenarioDefinition')455 self.start_rule(context, 'Scenario')456 self.build(context, token)457 return 12458 if self.match_RuleLine(context, token):459 self.end_rule(context, 'Background')460 self.start_rule(context, 'Rule')461 self.start_rule(context, 'RuleHeader')462 self.build(context, token)463 return 22464 if self.match_Other(context, token):465 self.start_rule(context, 'Description')466 self.build(context, token)467 return 7468 state_comment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0"469 token.detach470 expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]471 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)472 if (self.stop_at_first_error):473 raise error474 self.add_error(context, error)475 return 6476 # GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0477 def match_token_at_7(self, token, context):478 if self.match_EOF(context, token):479 self.end_rule(context, 'Description')480 self.end_rule(context, 'Background')481 self.end_rule(context, 'Feature')482 self.build(context, token)483 return 41484 if self.match_Comment(context, token):485 self.end_rule(context, 'Description')486 self.build(context, token)487 return 8488 if self.match_StepLine(context, token):489 self.end_rule(context, 'Description')490 self.start_rule(context, 'Step')491 self.build(context, token)492 return 9493 if self.match_TagLine(context, token):494 self.end_rule(context, 'Description')495 self.end_rule(context, 'Background')496 self.start_rule(context, 'ScenarioDefinition')497 self.start_rule(context, 'Tags')498 self.build(context, token)499 return 11500 if self.match_ScenarioLine(context, token):501 self.end_rule(context, 'Description')502 self.end_rule(context, 'Background')503 self.start_rule(context, 'ScenarioDefinition')504 self.start_rule(context, 'Scenario')505 self.build(context, token)506 return 12507 if self.match_RuleLine(context, token):508 self.end_rule(context, 'Description')509 self.end_rule(context, 'Background')510 self.start_rule(context, 'Rule')511 self.start_rule(context, 'RuleHeader')512 self.build(context, token)513 return 22514 if self.match_Other(context, token):515 self.build(context, token)516 return 7517 state_comment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0"518 token.detach519 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]520 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)521 if (self.stop_at_first_error):522 raise error523 self.add_error(context, error)524 return 7525 # GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0526 def match_token_at_8(self, token, context):527 if self.match_EOF(context, token):528 self.end_rule(context, 'Background')529 self.end_rule(context, 'Feature')530 self.build(context, token)531 return 41532 if self.match_Comment(context, token):533 self.build(context, token)534 return 8535 if self.match_StepLine(context, token):536 self.start_rule(context, 'Step')537 self.build(context, token)538 return 9539 if self.match_TagLine(context, token):540 self.end_rule(context, 'Background')541 self.start_rule(context, 'ScenarioDefinition')542 self.start_rule(context, 'Tags')543 self.build(context, token)544 return 11545 if self.match_ScenarioLine(context, token):546 self.end_rule(context, 'Background')547 self.start_rule(context, 'ScenarioDefinition')548 self.start_rule(context, 'Scenario')549 self.build(context, token)550 return 12551 if self.match_RuleLine(context, token):552 self.end_rule(context, 'Background')553 self.start_rule(context, 'Rule')554 self.start_rule(context, 'RuleHeader')555 self.build(context, token)556 return 22557 if self.match_Empty(context, token):558 self.build(context, token)559 return 8560 state_comment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0"561 token.detach562 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]563 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)564 if (self.stop_at_first_error):565 raise error566 self.add_error(context, error)567 return 8568 # GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0569 def match_token_at_9(self, token, context):570 if self.match_EOF(context, token):571 self.end_rule(context, 'Step')572 self.end_rule(context, 'Background')573 self.end_rule(context, 'Feature')574 self.build(context, token)575 return 41576 if self.match_TableRow(context, token):577 self.start_rule(context, 'DataTable')578 self.build(context, token)579 return 10580 if self.match_DocStringSeparator(context, token):581 self.start_rule(context, 'DocString')582 self.build(context, token)583 return 48584 if self.match_StepLine(context, token):585 self.end_rule(context, 'Step')586 self.start_rule(context, 'Step')587 self.build(context, token)588 return 9589 if self.match_TagLine(context, token):590 self.end_rule(context, 'Step')591 self.end_rule(context, 'Background')592 self.start_rule(context, 'ScenarioDefinition')593 self.start_rule(context, 'Tags')594 self.build(context, token)595 return 11596 if self.match_ScenarioLine(context, token):597 self.end_rule(context, 'Step')598 self.end_rule(context, 'Background')599 self.start_rule(context, 'ScenarioDefinition')600 self.start_rule(context, 'Scenario')601 self.build(context, token)602 return 12603 if self.match_RuleLine(context, token):604 self.end_rule(context, 'Step')605 self.end_rule(context, 'Background')606 self.start_rule(context, 'Rule')607 self.start_rule(context, 'RuleHeader')608 self.build(context, token)609 return 22610 if self.match_Comment(context, token):611 self.build(context, token)612 return 9613 if self.match_Empty(context, token):614 self.build(context, token)615 return 9616 state_comment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0"617 token.detach618 expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]619 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)620 if (self.stop_at_first_error):621 raise error622 self.add_error(context, error)623 return 9624 # GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0625 def match_token_at_10(self, token, context):626 if self.match_EOF(context, token):627 self.end_rule(context, 'DataTable')628 self.end_rule(context, 'Step')629 self.end_rule(context, 'Background')630 self.end_rule(context, 'Feature')631 self.build(context, token)632 return 41633 if self.match_TableRow(context, token):634 self.build(context, token)635 return 10636 if self.match_StepLine(context, token):637 self.end_rule(context, 'DataTable')638 self.end_rule(context, 'Step')639 self.start_rule(context, 'Step')640 self.build(context, token)641 return 9642 if self.match_TagLine(context, token):643 self.end_rule(context, 'DataTable')644 self.end_rule(context, 'Step')645 self.end_rule(context, 'Background')646 self.start_rule(context, 'ScenarioDefinition')647 self.start_rule(context, 'Tags')648 self.build(context, token)649 return 11650 if self.match_ScenarioLine(context, token):651 self.end_rule(context, 'DataTable')652 self.end_rule(context, 'Step')653 self.end_rule(context, 'Background')654 self.start_rule(context, 'ScenarioDefinition')655 self.start_rule(context, 'Scenario')656 self.build(context, token)657 return 12658 if self.match_RuleLine(context, token):659 self.end_rule(context, 'DataTable')660 self.end_rule(context, 'Step')661 self.end_rule(context, 'Background')662 self.start_rule(context, 'Rule')663 self.start_rule(context, 'RuleHeader')664 self.build(context, token)665 return 22666 if self.match_Comment(context, token):667 self.build(context, token)668 return 10669 if self.match_Empty(context, token):670 self.build(context, token)671 return 10672 state_comment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"673 token.detach674 expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]675 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)676 if (self.stop_at_first_error):677 raise error678 self.add_error(context, error)679 return 10680 # GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0681 def match_token_at_11(self, token, context):682 if self.match_TagLine(context, token):683 self.build(context, token)684 return 11685 if self.match_ScenarioLine(context, token):686 self.end_rule(context, 'Tags')687 self.start_rule(context, 'Scenario')688 self.build(context, token)689 return 12690 if self.match_Comment(context, token):691 self.build(context, token)692 return 11693 if self.match_Empty(context, token):694 self.build(context, token)695 return 11696 state_comment = "State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0"697 token.detach698 expected_tokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"]699 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)700 if (self.stop_at_first_error):701 raise error702 self.add_error(context, error)703 return 11704 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0705 def match_token_at_12(self, token, context):706 if self.match_EOF(context, token):707 self.end_rule(context, 'Scenario')708 self.end_rule(context, 'ScenarioDefinition')709 self.end_rule(context, 'Feature')710 self.build(context, token)711 return 41712 if self.match_Empty(context, token):713 self.build(context, token)714 return 12715 if self.match_Comment(context, token):716 self.build(context, token)717 return 14718 if self.match_StepLine(context, token):719 self.start_rule(context, 'Step')720 self.build(context, token)721 return 15722 if self.match_TagLine(context, token):723 if self.lookahead_0(context, token):724 self.start_rule(context, 'ExamplesDefinition')725 self.start_rule(context, 'Tags')726 self.build(context, token)727 return 17728 if self.match_TagLine(context, token):729 self.end_rule(context, 'Scenario')730 self.end_rule(context, 'ScenarioDefinition')731 self.start_rule(context, 'ScenarioDefinition')732 self.start_rule(context, 'Tags')733 self.build(context, token)734 return 11735 if self.match_ExamplesLine(context, token):736 self.start_rule(context, 'ExamplesDefinition')737 self.start_rule(context, 'Examples')738 self.build(context, token)739 return 18740 if self.match_ScenarioLine(context, token):741 self.end_rule(context, 'Scenario')742 self.end_rule(context, 'ScenarioDefinition')743 self.start_rule(context, 'ScenarioDefinition')744 self.start_rule(context, 'Scenario')745 self.build(context, token)746 return 12747 if self.match_RuleLine(context, token):748 self.end_rule(context, 'Scenario')749 self.end_rule(context, 'ScenarioDefinition')750 self.start_rule(context, 'Rule')751 self.start_rule(context, 'RuleHeader')752 self.build(context, token)753 return 22754 if self.match_Other(context, token):755 self.start_rule(context, 'Description')756 self.build(context, token)757 return 13758 state_comment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0"759 token.detach760 expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]761 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)762 if (self.stop_at_first_error):763 raise error764 self.add_error(context, error)765 return 12766 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0767 def match_token_at_13(self, token, context):768 if self.match_EOF(context, token):769 self.end_rule(context, 'Description')770 self.end_rule(context, 'Scenario')771 self.end_rule(context, 'ScenarioDefinition')772 self.end_rule(context, 'Feature')773 self.build(context, token)774 return 41775 if self.match_Comment(context, token):776 self.end_rule(context, 'Description')777 self.build(context, token)778 return 14779 if self.match_StepLine(context, token):780 self.end_rule(context, 'Description')781 self.start_rule(context, 'Step')782 self.build(context, token)783 return 15784 if self.match_TagLine(context, token):785 if self.lookahead_0(context, token):786 self.end_rule(context, 'Description')787 self.start_rule(context, 'ExamplesDefinition')788 self.start_rule(context, 'Tags')789 self.build(context, token)790 return 17791 if self.match_TagLine(context, token):792 self.end_rule(context, 'Description')793 self.end_rule(context, 'Scenario')794 self.end_rule(context, 'ScenarioDefinition')795 self.start_rule(context, 'ScenarioDefinition')796 self.start_rule(context, 'Tags')797 self.build(context, token)798 return 11799 if self.match_ExamplesLine(context, token):800 self.end_rule(context, 'Description')801 self.start_rule(context, 'ExamplesDefinition')802 self.start_rule(context, 'Examples')803 self.build(context, token)804 return 18805 if self.match_ScenarioLine(context, token):806 self.end_rule(context, 'Description')807 self.end_rule(context, 'Scenario')808 self.end_rule(context, 'ScenarioDefinition')809 self.start_rule(context, 'ScenarioDefinition')810 self.start_rule(context, 'Scenario')811 self.build(context, token)812 return 12813 if self.match_RuleLine(context, token):814 self.end_rule(context, 'Description')815 self.end_rule(context, 'Scenario')816 self.end_rule(context, 'ScenarioDefinition')817 self.start_rule(context, 'Rule')818 self.start_rule(context, 'RuleHeader')819 self.build(context, token)820 return 22821 if self.match_Other(context, token):822 self.build(context, token)823 return 13824 state_comment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0"825 token.detach826 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]827 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)828 if (self.stop_at_first_error):829 raise error830 self.add_error(context, error)831 return 13832 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0833 def match_token_at_14(self, token, context):834 if self.match_EOF(context, token):835 self.end_rule(context, 'Scenario')836 self.end_rule(context, 'ScenarioDefinition')837 self.end_rule(context, 'Feature')838 self.build(context, token)839 return 41840 if self.match_Comment(context, token):841 self.build(context, token)842 return 14843 if self.match_StepLine(context, token):844 self.start_rule(context, 'Step')845 self.build(context, token)846 return 15847 if self.match_TagLine(context, token):848 if self.lookahead_0(context, token):849 self.start_rule(context, 'ExamplesDefinition')850 self.start_rule(context, 'Tags')851 self.build(context, token)852 return 17853 if self.match_TagLine(context, token):854 self.end_rule(context, 'Scenario')855 self.end_rule(context, 'ScenarioDefinition')856 self.start_rule(context, 'ScenarioDefinition')857 self.start_rule(context, 'Tags')858 self.build(context, token)859 return 11860 if self.match_ExamplesLine(context, token):861 self.start_rule(context, 'ExamplesDefinition')862 self.start_rule(context, 'Examples')863 self.build(context, token)864 return 18865 if self.match_ScenarioLine(context, token):866 self.end_rule(context, 'Scenario')867 self.end_rule(context, 'ScenarioDefinition')868 self.start_rule(context, 'ScenarioDefinition')869 self.start_rule(context, 'Scenario')870 self.build(context, token)871 return 12872 if self.match_RuleLine(context, token):873 self.end_rule(context, 'Scenario')874 self.end_rule(context, 'ScenarioDefinition')875 self.start_rule(context, 'Rule')876 self.start_rule(context, 'RuleHeader')877 self.build(context, token)878 return 22879 if self.match_Empty(context, token):880 self.build(context, token)881 return 14882 state_comment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0"883 token.detach884 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]885 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)886 if (self.stop_at_first_error):887 raise error888 self.add_error(context, error)889 return 14890 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0891 def match_token_at_15(self, token, context):892 if self.match_EOF(context, token):893 self.end_rule(context, 'Step')894 self.end_rule(context, 'Scenario')895 self.end_rule(context, 'ScenarioDefinition')896 self.end_rule(context, 'Feature')897 self.build(context, token)898 return 41899 if self.match_TableRow(context, token):900 self.start_rule(context, 'DataTable')901 self.build(context, token)902 return 16903 if self.match_DocStringSeparator(context, token):904 self.start_rule(context, 'DocString')905 self.build(context, token)906 return 46907 if self.match_StepLine(context, token):908 self.end_rule(context, 'Step')909 self.start_rule(context, 'Step')910 self.build(context, token)911 return 15912 if self.match_TagLine(context, token):913 if self.lookahead_0(context, token):914 self.end_rule(context, 'Step')915 self.start_rule(context, 'ExamplesDefinition')916 self.start_rule(context, 'Tags')917 self.build(context, token)918 return 17919 if self.match_TagLine(context, token):920 self.end_rule(context, 'Step')921 self.end_rule(context, 'Scenario')922 self.end_rule(context, 'ScenarioDefinition')923 self.start_rule(context, 'ScenarioDefinition')924 self.start_rule(context, 'Tags')925 self.build(context, token)926 return 11927 if self.match_ExamplesLine(context, token):928 self.end_rule(context, 'Step')929 self.start_rule(context, 'ExamplesDefinition')930 self.start_rule(context, 'Examples')931 self.build(context, token)932 return 18933 if self.match_ScenarioLine(context, token):934 self.end_rule(context, 'Step')935 self.end_rule(context, 'Scenario')936 self.end_rule(context, 'ScenarioDefinition')937 self.start_rule(context, 'ScenarioDefinition')938 self.start_rule(context, 'Scenario')939 self.build(context, token)940 return 12941 if self.match_RuleLine(context, token):942 self.end_rule(context, 'Step')943 self.end_rule(context, 'Scenario')944 self.end_rule(context, 'ScenarioDefinition')945 self.start_rule(context, 'Rule')946 self.start_rule(context, 'RuleHeader')947 self.build(context, token)948 return 22949 if self.match_Comment(context, token):950 self.build(context, token)951 return 15952 if self.match_Empty(context, token):953 self.build(context, token)954 return 15955 state_comment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0"956 token.detach957 expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]958 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)959 if (self.stop_at_first_error):960 raise error961 self.add_error(context, error)962 return 15963 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0964 def match_token_at_16(self, token, context):965 if self.match_EOF(context, token):966 self.end_rule(context, 'DataTable')967 self.end_rule(context, 'Step')968 self.end_rule(context, 'Scenario')969 self.end_rule(context, 'ScenarioDefinition')970 self.end_rule(context, 'Feature')971 self.build(context, token)972 return 41973 if self.match_TableRow(context, token):974 self.build(context, token)975 return 16976 if self.match_StepLine(context, token):977 self.end_rule(context, 'DataTable')978 self.end_rule(context, 'Step')979 self.start_rule(context, 'Step')980 self.build(context, token)981 return 15982 if self.match_TagLine(context, token):983 if self.lookahead_0(context, token):984 self.end_rule(context, 'DataTable')985 self.end_rule(context, 'Step')986 self.start_rule(context, 'ExamplesDefinition')987 self.start_rule(context, 'Tags')988 self.build(context, token)989 return 17990 if self.match_TagLine(context, token):991 self.end_rule(context, 'DataTable')992 self.end_rule(context, 'Step')993 self.end_rule(context, 'Scenario')994 self.end_rule(context, 'ScenarioDefinition')995 self.start_rule(context, 'ScenarioDefinition')996 self.start_rule(context, 'Tags')997 self.build(context, token)998 return 11999 if self.match_ExamplesLine(context, token):1000 self.end_rule(context, 'DataTable')1001 self.end_rule(context, 'Step')1002 self.start_rule(context, 'ExamplesDefinition')1003 self.start_rule(context, 'Examples')1004 self.build(context, token)1005 return 181006 if self.match_ScenarioLine(context, token):1007 self.end_rule(context, 'DataTable')1008 self.end_rule(context, 'Step')1009 self.end_rule(context, 'Scenario')1010 self.end_rule(context, 'ScenarioDefinition')1011 self.start_rule(context, 'ScenarioDefinition')1012 self.start_rule(context, 'Scenario')1013 self.build(context, token)1014 return 121015 if self.match_RuleLine(context, token):1016 self.end_rule(context, 'DataTable')1017 self.end_rule(context, 'Step')1018 self.end_rule(context, 'Scenario')1019 self.end_rule(context, 'ScenarioDefinition')1020 self.start_rule(context, 'Rule')1021 self.start_rule(context, 'RuleHeader')1022 self.build(context, token)1023 return 221024 if self.match_Comment(context, token):1025 self.build(context, token)1026 return 161027 if self.match_Empty(context, token):1028 self.build(context, token)1029 return 161030 state_comment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"1031 token.detach1032 expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]1033 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1034 if (self.stop_at_first_error):1035 raise error1036 self.add_error(context, error)1037 return 161038 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:01039 def match_token_at_17(self, token, context):1040 if self.match_TagLine(context, token):1041 self.build(context, token)1042 return 171043 if self.match_ExamplesLine(context, token):1044 self.end_rule(context, 'Tags')1045 self.start_rule(context, 'Examples')1046 self.build(context, token)1047 return 181048 if self.match_Comment(context, token):1049 self.build(context, token)1050 return 171051 if self.match_Empty(context, token):1052 self.build(context, token)1053 return 171054 state_comment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0"1055 token.detach1056 expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]1057 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1058 if (self.stop_at_first_error):1059 raise error1060 self.add_error(context, error)1061 return 171062 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:01063 def match_token_at_18(self, token, context):1064 if self.match_EOF(context, token):1065 self.end_rule(context, 'Examples')1066 self.end_rule(context, 'ExamplesDefinition')1067 self.end_rule(context, 'Scenario')1068 self.end_rule(context, 'ScenarioDefinition')1069 self.end_rule(context, 'Feature')1070 self.build(context, token)1071 return 411072 if self.match_Empty(context, token):1073 self.build(context, token)1074 return 181075 if self.match_Comment(context, token):1076 self.build(context, token)1077 return 201078 if self.match_TableRow(context, token):1079 self.start_rule(context, 'ExamplesTable')1080 self.build(context, token)1081 return 211082 if self.match_TagLine(context, token):1083 if self.lookahead_0(context, token):1084 self.end_rule(context, 'Examples')1085 self.end_rule(context, 'ExamplesDefinition')1086 self.start_rule(context, 'ExamplesDefinition')1087 self.start_rule(context, 'Tags')1088 self.build(context, token)1089 return 171090 if self.match_TagLine(context, token):1091 self.end_rule(context, 'Examples')1092 self.end_rule(context, 'ExamplesDefinition')1093 self.end_rule(context, 'Scenario')1094 self.end_rule(context, 'ScenarioDefinition')1095 self.start_rule(context, 'ScenarioDefinition')1096 self.start_rule(context, 'Tags')1097 self.build(context, token)1098 return 111099 if self.match_ExamplesLine(context, token):1100 self.end_rule(context, 'Examples')1101 self.end_rule(context, 'ExamplesDefinition')1102 self.start_rule(context, 'ExamplesDefinition')1103 self.start_rule(context, 'Examples')1104 self.build(context, token)1105 return 181106 if self.match_ScenarioLine(context, token):1107 self.end_rule(context, 'Examples')1108 self.end_rule(context, 'ExamplesDefinition')1109 self.end_rule(context, 'Scenario')1110 self.end_rule(context, 'ScenarioDefinition')1111 self.start_rule(context, 'ScenarioDefinition')1112 self.start_rule(context, 'Scenario')1113 self.build(context, token)1114 return 121115 if self.match_RuleLine(context, token):1116 self.end_rule(context, 'Examples')1117 self.end_rule(context, 'ExamplesDefinition')1118 self.end_rule(context, 'Scenario')1119 self.end_rule(context, 'ScenarioDefinition')1120 self.start_rule(context, 'Rule')1121 self.start_rule(context, 'RuleHeader')1122 self.build(context, token)1123 return 221124 if self.match_Other(context, token):1125 self.start_rule(context, 'Description')1126 self.build(context, token)1127 return 191128 state_comment = "State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0"1129 token.detach1130 expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]1131 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1132 if (self.stop_at_first_error):1133 raise error1134 self.add_error(context, error)1135 return 181136 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:01137 def match_token_at_19(self, token, context):1138 if self.match_EOF(context, token):1139 self.end_rule(context, 'Description')1140 self.end_rule(context, 'Examples')1141 self.end_rule(context, 'ExamplesDefinition')1142 self.end_rule(context, 'Scenario')1143 self.end_rule(context, 'ScenarioDefinition')1144 self.end_rule(context, 'Feature')1145 self.build(context, token)1146 return 411147 if self.match_Comment(context, token):1148 self.end_rule(context, 'Description')1149 self.build(context, token)1150 return 201151 if self.match_TableRow(context, token):1152 self.end_rule(context, 'Description')1153 self.start_rule(context, 'ExamplesTable')1154 self.build(context, token)1155 return 211156 if self.match_TagLine(context, token):1157 if self.lookahead_0(context, token):1158 self.end_rule(context, 'Description')1159 self.end_rule(context, 'Examples')1160 self.end_rule(context, 'ExamplesDefinition')1161 self.start_rule(context, 'ExamplesDefinition')1162 self.start_rule(context, 'Tags')1163 self.build(context, token)1164 return 171165 if self.match_TagLine(context, token):1166 self.end_rule(context, 'Description')1167 self.end_rule(context, 'Examples')1168 self.end_rule(context, 'ExamplesDefinition')1169 self.end_rule(context, 'Scenario')1170 self.end_rule(context, 'ScenarioDefinition')1171 self.start_rule(context, 'ScenarioDefinition')1172 self.start_rule(context, 'Tags')1173 self.build(context, token)1174 return 111175 if self.match_ExamplesLine(context, token):1176 self.end_rule(context, 'Description')1177 self.end_rule(context, 'Examples')1178 self.end_rule(context, 'ExamplesDefinition')1179 self.start_rule(context, 'ExamplesDefinition')1180 self.start_rule(context, 'Examples')1181 self.build(context, token)1182 return 181183 if self.match_ScenarioLine(context, token):1184 self.end_rule(context, 'Description')1185 self.end_rule(context, 'Examples')1186 self.end_rule(context, 'ExamplesDefinition')1187 self.end_rule(context, 'Scenario')1188 self.end_rule(context, 'ScenarioDefinition')1189 self.start_rule(context, 'ScenarioDefinition')1190 self.start_rule(context, 'Scenario')1191 self.build(context, token)1192 return 121193 if self.match_RuleLine(context, token):1194 self.end_rule(context, 'Description')1195 self.end_rule(context, 'Examples')1196 self.end_rule(context, 'ExamplesDefinition')1197 self.end_rule(context, 'Scenario')1198 self.end_rule(context, 'ScenarioDefinition')1199 self.start_rule(context, 'Rule')1200 self.start_rule(context, 'RuleHeader')1201 self.build(context, token)1202 return 221203 if self.match_Other(context, token):1204 self.build(context, token)1205 return 191206 state_comment = "State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0"1207 token.detach1208 expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]1209 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1210 if (self.stop_at_first_error):1211 raise error1212 self.add_error(context, error)1213 return 191214 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:01215 def match_token_at_20(self, token, context):1216 if self.match_EOF(context, token):1217 self.end_rule(context, 'Examples')1218 self.end_rule(context, 'ExamplesDefinition')1219 self.end_rule(context, 'Scenario')1220 self.end_rule(context, 'ScenarioDefinition')1221 self.end_rule(context, 'Feature')1222 self.build(context, token)1223 return 411224 if self.match_Comment(context, token):1225 self.build(context, token)1226 return 201227 if self.match_TableRow(context, token):1228 self.start_rule(context, 'ExamplesTable')1229 self.build(context, token)1230 return 211231 if self.match_TagLine(context, token):1232 if self.lookahead_0(context, token):1233 self.end_rule(context, 'Examples')1234 self.end_rule(context, 'ExamplesDefinition')1235 self.start_rule(context, 'ExamplesDefinition')1236 self.start_rule(context, 'Tags')1237 self.build(context, token)1238 return 171239 if self.match_TagLine(context, token):1240 self.end_rule(context, 'Examples')1241 self.end_rule(context, 'ExamplesDefinition')1242 self.end_rule(context, 'Scenario')1243 self.end_rule(context, 'ScenarioDefinition')1244 self.start_rule(context, 'ScenarioDefinition')1245 self.start_rule(context, 'Tags')1246 self.build(context, token)1247 return 111248 if self.match_ExamplesLine(context, token):1249 self.end_rule(context, 'Examples')1250 self.end_rule(context, 'ExamplesDefinition')1251 self.start_rule(context, 'ExamplesDefinition')1252 self.start_rule(context, 'Examples')1253 self.build(context, token)1254 return 181255 if self.match_ScenarioLine(context, token):1256 self.end_rule(context, 'Examples')1257 self.end_rule(context, 'ExamplesDefinition')1258 self.end_rule(context, 'Scenario')1259 self.end_rule(context, 'ScenarioDefinition')1260 self.start_rule(context, 'ScenarioDefinition')1261 self.start_rule(context, 'Scenario')1262 self.build(context, token)1263 return 121264 if self.match_RuleLine(context, token):1265 self.end_rule(context, 'Examples')1266 self.end_rule(context, 'ExamplesDefinition')1267 self.end_rule(context, 'Scenario')1268 self.end_rule(context, 'ScenarioDefinition')1269 self.start_rule(context, 'Rule')1270 self.start_rule(context, 'RuleHeader')1271 self.build(context, token)1272 return 221273 if self.match_Empty(context, token):1274 self.build(context, token)1275 return 201276 state_comment = "State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0"1277 token.detach1278 expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]1279 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1280 if (self.stop_at_first_error):1281 raise error1282 self.add_error(context, error)1283 return 201284 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:01285 def match_token_at_21(self, token, context):1286 if self.match_EOF(context, token):1287 self.end_rule(context, 'ExamplesTable')1288 self.end_rule(context, 'Examples')1289 self.end_rule(context, 'ExamplesDefinition')1290 self.end_rule(context, 'Scenario')1291 self.end_rule(context, 'ScenarioDefinition')1292 self.end_rule(context, 'Feature')1293 self.build(context, token)1294 return 411295 if self.match_TableRow(context, token):1296 self.build(context, token)1297 return 211298 if self.match_TagLine(context, token):1299 if self.lookahead_0(context, token):1300 self.end_rule(context, 'ExamplesTable')1301 self.end_rule(context, 'Examples')1302 self.end_rule(context, 'ExamplesDefinition')1303 self.start_rule(context, 'ExamplesDefinition')1304 self.start_rule(context, 'Tags')1305 self.build(context, token)1306 return 171307 if self.match_TagLine(context, token):1308 self.end_rule(context, 'ExamplesTable')1309 self.end_rule(context, 'Examples')1310 self.end_rule(context, 'ExamplesDefinition')1311 self.end_rule(context, 'Scenario')1312 self.end_rule(context, 'ScenarioDefinition')1313 self.start_rule(context, 'ScenarioDefinition')1314 self.start_rule(context, 'Tags')1315 self.build(context, token)1316 return 111317 if self.match_ExamplesLine(context, token):1318 self.end_rule(context, 'ExamplesTable')1319 self.end_rule(context, 'Examples')1320 self.end_rule(context, 'ExamplesDefinition')1321 self.start_rule(context, 'ExamplesDefinition')1322 self.start_rule(context, 'Examples')1323 self.build(context, token)1324 return 181325 if self.match_ScenarioLine(context, token):1326 self.end_rule(context, 'ExamplesTable')1327 self.end_rule(context, 'Examples')1328 self.end_rule(context, 'ExamplesDefinition')1329 self.end_rule(context, 'Scenario')1330 self.end_rule(context, 'ScenarioDefinition')1331 self.start_rule(context, 'ScenarioDefinition')1332 self.start_rule(context, 'Scenario')1333 self.build(context, token)1334 return 121335 if self.match_RuleLine(context, token):1336 self.end_rule(context, 'ExamplesTable')1337 self.end_rule(context, 'Examples')1338 self.end_rule(context, 'ExamplesDefinition')1339 self.end_rule(context, 'Scenario')1340 self.end_rule(context, 'ScenarioDefinition')1341 self.start_rule(context, 'Rule')1342 self.start_rule(context, 'RuleHeader')1343 self.build(context, token)1344 return 221345 if self.match_Comment(context, token):1346 self.build(context, token)1347 return 211348 if self.match_Empty(context, token):1349 self.build(context, token)1350 return 211351 state_comment = "State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0"1352 token.detach1353 expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]1354 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1355 if (self.stop_at_first_error):1356 raise error1357 self.add_error(context, error)1358 return 211359 # GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:01360 def match_token_at_22(self, token, context):1361 if self.match_EOF(context, token):1362 self.end_rule(context, 'RuleHeader')1363 self.end_rule(context, 'Rule')1364 self.end_rule(context, 'Feature')1365 self.build(context, token)1366 return 411367 if self.match_Empty(context, token):1368 self.build(context, token)1369 return 221370 if self.match_Comment(context, token):1371 self.build(context, token)1372 return 241373 if self.match_BackgroundLine(context, token):1374 self.end_rule(context, 'RuleHeader')1375 self.start_rule(context, 'Background')1376 self.build(context, token)1377 return 251378 if self.match_TagLine(context, token):1379 self.end_rule(context, 'RuleHeader')1380 self.start_rule(context, 'ScenarioDefinition')1381 self.start_rule(context, 'Tags')1382 self.build(context, token)1383 return 301384 if self.match_ScenarioLine(context, token):1385 self.end_rule(context, 'RuleHeader')1386 self.start_rule(context, 'ScenarioDefinition')1387 self.start_rule(context, 'Scenario')1388 self.build(context, token)1389 return 311390 if self.match_RuleLine(context, token):1391 self.end_rule(context, 'RuleHeader')1392 self.end_rule(context, 'Rule')1393 self.start_rule(context, 'Rule')1394 self.start_rule(context, 'RuleHeader')1395 self.build(context, token)1396 return 221397 if self.match_Other(context, token):1398 self.start_rule(context, 'Description')1399 self.build(context, token)1400 return 231401 state_comment = "State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:0"1402 token.detach1403 expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]1404 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1405 if (self.stop_at_first_error):1406 raise error1407 self.add_error(context, error)1408 return 221409 # GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:01410 def match_token_at_23(self, token, context):1411 if self.match_EOF(context, token):1412 self.end_rule(context, 'Description')1413 self.end_rule(context, 'RuleHeader')1414 self.end_rule(context, 'Rule')1415 self.end_rule(context, 'Feature')1416 self.build(context, token)1417 return 411418 if self.match_Comment(context, token):1419 self.end_rule(context, 'Description')1420 self.build(context, token)1421 return 241422 if self.match_BackgroundLine(context, token):1423 self.end_rule(context, 'Description')1424 self.end_rule(context, 'RuleHeader')1425 self.start_rule(context, 'Background')1426 self.build(context, token)1427 return 251428 if self.match_TagLine(context, token):1429 self.end_rule(context, 'Description')1430 self.end_rule(context, 'RuleHeader')1431 self.start_rule(context, 'ScenarioDefinition')1432 self.start_rule(context, 'Tags')1433 self.build(context, token)1434 return 301435 if self.match_ScenarioLine(context, token):1436 self.end_rule(context, 'Description')1437 self.end_rule(context, 'RuleHeader')1438 self.start_rule(context, 'ScenarioDefinition')1439 self.start_rule(context, 'Scenario')1440 self.build(context, token)1441 return 311442 if self.match_RuleLine(context, token):1443 self.end_rule(context, 'Description')1444 self.end_rule(context, 'RuleHeader')1445 self.end_rule(context, 'Rule')1446 self.start_rule(context, 'Rule')1447 self.start_rule(context, 'RuleHeader')1448 self.build(context, token)1449 return 221450 if self.match_Other(context, token):1451 self.build(context, token)1452 return 231453 state_comment = "State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:0"1454 token.detach1455 expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]1456 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1457 if (self.stop_at_first_error):1458 raise error1459 self.add_error(context, error)1460 return 231461 # GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:01462 def match_token_at_24(self, token, context):1463 if self.match_EOF(context, token):1464 self.end_rule(context, 'RuleHeader')1465 self.end_rule(context, 'Rule')1466 self.end_rule(context, 'Feature')1467 self.build(context, token)1468 return 411469 if self.match_Comment(context, token):1470 self.build(context, token)1471 return 241472 if self.match_BackgroundLine(context, token):1473 self.end_rule(context, 'RuleHeader')1474 self.start_rule(context, 'Background')1475 self.build(context, token)1476 return 251477 if self.match_TagLine(context, token):1478 self.end_rule(context, 'RuleHeader')1479 self.start_rule(context, 'ScenarioDefinition')1480 self.start_rule(context, 'Tags')1481 self.build(context, token)1482 return 301483 if self.match_ScenarioLine(context, token):1484 self.end_rule(context, 'RuleHeader')1485 self.start_rule(context, 'ScenarioDefinition')1486 self.start_rule(context, 'Scenario')1487 self.build(context, token)1488 return 311489 if self.match_RuleLine(context, token):1490 self.end_rule(context, 'RuleHeader')1491 self.end_rule(context, 'Rule')1492 self.start_rule(context, 'Rule')1493 self.start_rule(context, 'RuleHeader')1494 self.build(context, token)1495 return 221496 if self.match_Empty(context, token):1497 self.build(context, token)1498 return 241499 state_comment = "State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:0"1500 token.detach1501 expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]1502 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1503 if (self.stop_at_first_error):1504 raise error1505 self.add_error(context, error)1506 return 241507 # GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:01508 def match_token_at_25(self, token, context):1509 if self.match_EOF(context, token):1510 self.end_rule(context, 'Background')1511 self.end_rule(context, 'Rule')1512 self.end_rule(context, 'Feature')1513 self.build(context, token)1514 return 411515 if self.match_Empty(context, token):1516 self.build(context, token)1517 return 251518 if self.match_Comment(context, token):1519 self.build(context, token)1520 return 271521 if self.match_StepLine(context, token):1522 self.start_rule(context, 'Step')1523 self.build(context, token)1524 return 281525 if self.match_TagLine(context, token):1526 self.end_rule(context, 'Background')1527 self.start_rule(context, 'ScenarioDefinition')1528 self.start_rule(context, 'Tags')1529 self.build(context, token)1530 return 301531 if self.match_ScenarioLine(context, token):1532 self.end_rule(context, 'Background')1533 self.start_rule(context, 'ScenarioDefinition')1534 self.start_rule(context, 'Scenario')1535 self.build(context, token)1536 return 311537 if self.match_RuleLine(context, token):1538 self.end_rule(context, 'Background')1539 self.end_rule(context, 'Rule')1540 self.start_rule(context, 'Rule')1541 self.start_rule(context, 'RuleHeader')1542 self.build(context, token)1543 return 221544 if self.match_Other(context, token):1545 self.start_rule(context, 'Description')1546 self.build(context, token)1547 return 261548 state_comment = "State: 25 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0"1549 token.detach1550 expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]1551 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1552 if (self.stop_at_first_error):1553 raise error1554 self.add_error(context, error)1555 return 251556 # GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:01557 def match_token_at_26(self, token, context):1558 if self.match_EOF(context, token):1559 self.end_rule(context, 'Description')1560 self.end_rule(context, 'Background')1561 self.end_rule(context, 'Rule')1562 self.end_rule(context, 'Feature')1563 self.build(context, token)1564 return 411565 if self.match_Comment(context, token):1566 self.end_rule(context, 'Description')1567 self.build(context, token)1568 return 271569 if self.match_StepLine(context, token):1570 self.end_rule(context, 'Description')1571 self.start_rule(context, 'Step')1572 self.build(context, token)1573 return 281574 if self.match_TagLine(context, token):1575 self.end_rule(context, 'Description')1576 self.end_rule(context, 'Background')1577 self.start_rule(context, 'ScenarioDefinition')1578 self.start_rule(context, 'Tags')1579 self.build(context, token)1580 return 301581 if self.match_ScenarioLine(context, token):1582 self.end_rule(context, 'Description')1583 self.end_rule(context, 'Background')1584 self.start_rule(context, 'ScenarioDefinition')1585 self.start_rule(context, 'Scenario')1586 self.build(context, token)1587 return 311588 if self.match_RuleLine(context, token):1589 self.end_rule(context, 'Description')1590 self.end_rule(context, 'Background')1591 self.end_rule(context, 'Rule')1592 self.start_rule(context, 'Rule')1593 self.start_rule(context, 'RuleHeader')1594 self.build(context, token)1595 return 221596 if self.match_Other(context, token):1597 self.build(context, token)1598 return 261599 state_comment = "State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0"1600 token.detach1601 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]1602 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1603 if (self.stop_at_first_error):1604 raise error1605 self.add_error(context, error)1606 return 261607 # GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:01608 def match_token_at_27(self, token, context):1609 if self.match_EOF(context, token):1610 self.end_rule(context, 'Background')1611 self.end_rule(context, 'Rule')1612 self.end_rule(context, 'Feature')1613 self.build(context, token)1614 return 411615 if self.match_Comment(context, token):1616 self.build(context, token)1617 return 271618 if self.match_StepLine(context, token):1619 self.start_rule(context, 'Step')1620 self.build(context, token)1621 return 281622 if self.match_TagLine(context, token):1623 self.end_rule(context, 'Background')1624 self.start_rule(context, 'ScenarioDefinition')1625 self.start_rule(context, 'Tags')1626 self.build(context, token)1627 return 301628 if self.match_ScenarioLine(context, token):1629 self.end_rule(context, 'Background')1630 self.start_rule(context, 'ScenarioDefinition')1631 self.start_rule(context, 'Scenario')1632 self.build(context, token)1633 return 311634 if self.match_RuleLine(context, token):1635 self.end_rule(context, 'Background')1636 self.end_rule(context, 'Rule')1637 self.start_rule(context, 'Rule')1638 self.start_rule(context, 'RuleHeader')1639 self.build(context, token)1640 return 221641 if self.match_Empty(context, token):1642 self.build(context, token)1643 return 271644 state_comment = "State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0"1645 token.detach1646 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]1647 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1648 if (self.stop_at_first_error):1649 raise error1650 self.add_error(context, error)1651 return 271652 # GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:01653 def match_token_at_28(self, token, context):1654 if self.match_EOF(context, token):1655 self.end_rule(context, 'Step')1656 self.end_rule(context, 'Background')1657 self.end_rule(context, 'Rule')1658 self.end_rule(context, 'Feature')1659 self.build(context, token)1660 return 411661 if self.match_TableRow(context, token):1662 self.start_rule(context, 'DataTable')1663 self.build(context, token)1664 return 291665 if self.match_DocStringSeparator(context, token):1666 self.start_rule(context, 'DocString')1667 self.build(context, token)1668 return 441669 if self.match_StepLine(context, token):1670 self.end_rule(context, 'Step')1671 self.start_rule(context, 'Step')1672 self.build(context, token)1673 return 281674 if self.match_TagLine(context, token):1675 self.end_rule(context, 'Step')1676 self.end_rule(context, 'Background')1677 self.start_rule(context, 'ScenarioDefinition')1678 self.start_rule(context, 'Tags')1679 self.build(context, token)1680 return 301681 if self.match_ScenarioLine(context, token):1682 self.end_rule(context, 'Step')1683 self.end_rule(context, 'Background')1684 self.start_rule(context, 'ScenarioDefinition')1685 self.start_rule(context, 'Scenario')1686 self.build(context, token)1687 return 311688 if self.match_RuleLine(context, token):1689 self.end_rule(context, 'Step')1690 self.end_rule(context, 'Background')1691 self.end_rule(context, 'Rule')1692 self.start_rule(context, 'Rule')1693 self.start_rule(context, 'RuleHeader')1694 self.build(context, token)1695 return 221696 if self.match_Comment(context, token):1697 self.build(context, token)1698 return 281699 if self.match_Empty(context, token):1700 self.build(context, token)1701 return 281702 state_comment = "State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0"1703 token.detach1704 expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]1705 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1706 if (self.stop_at_first_error):1707 raise error1708 self.add_error(context, error)1709 return 281710 # GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:01711 def match_token_at_29(self, token, context):1712 if self.match_EOF(context, token):1713 self.end_rule(context, 'DataTable')1714 self.end_rule(context, 'Step')1715 self.end_rule(context, 'Background')1716 self.end_rule(context, 'Rule')1717 self.end_rule(context, 'Feature')1718 self.build(context, token)1719 return 411720 if self.match_TableRow(context, token):1721 self.build(context, token)1722 return 291723 if self.match_StepLine(context, token):1724 self.end_rule(context, 'DataTable')1725 self.end_rule(context, 'Step')1726 self.start_rule(context, 'Step')1727 self.build(context, token)1728 return 281729 if self.match_TagLine(context, token):1730 self.end_rule(context, 'DataTable')1731 self.end_rule(context, 'Step')1732 self.end_rule(context, 'Background')1733 self.start_rule(context, 'ScenarioDefinition')1734 self.start_rule(context, 'Tags')1735 self.build(context, token)1736 return 301737 if self.match_ScenarioLine(context, token):1738 self.end_rule(context, 'DataTable')1739 self.end_rule(context, 'Step')1740 self.end_rule(context, 'Background')1741 self.start_rule(context, 'ScenarioDefinition')1742 self.start_rule(context, 'Scenario')1743 self.build(context, token)1744 return 311745 if self.match_RuleLine(context, token):1746 self.end_rule(context, 'DataTable')1747 self.end_rule(context, 'Step')1748 self.end_rule(context, 'Background')1749 self.end_rule(context, 'Rule')1750 self.start_rule(context, 'Rule')1751 self.start_rule(context, 'RuleHeader')1752 self.build(context, token)1753 return 221754 if self.match_Comment(context, token):1755 self.build(context, token)1756 return 291757 if self.match_Empty(context, token):1758 self.build(context, token)1759 return 291760 state_comment = "State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"1761 token.detach1762 expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]1763 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1764 if (self.stop_at_first_error):1765 raise error1766 self.add_error(context, error)1767 return 291768 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:01769 def match_token_at_30(self, token, context):1770 if self.match_TagLine(context, token):1771 self.build(context, token)1772 return 301773 if self.match_ScenarioLine(context, token):1774 self.end_rule(context, 'Tags')1775 self.start_rule(context, 'Scenario')1776 self.build(context, token)1777 return 311778 if self.match_Comment(context, token):1779 self.build(context, token)1780 return 301781 if self.match_Empty(context, token):1782 self.build(context, token)1783 return 301784 state_comment = "State: 30 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0"1785 token.detach1786 expected_tokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"]1787 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1788 if (self.stop_at_first_error):1789 raise error1790 self.add_error(context, error)1791 return 301792 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:01793 def match_token_at_31(self, token, context):1794 if self.match_EOF(context, token):1795 self.end_rule(context, 'Scenario')1796 self.end_rule(context, 'ScenarioDefinition')1797 self.end_rule(context, 'Rule')1798 self.end_rule(context, 'Feature')1799 self.build(context, token)1800 return 411801 if self.match_Empty(context, token):1802 self.build(context, token)1803 return 311804 if self.match_Comment(context, token):1805 self.build(context, token)1806 return 331807 if self.match_StepLine(context, token):1808 self.start_rule(context, 'Step')1809 self.build(context, token)1810 return 341811 if self.match_TagLine(context, token):1812 if self.lookahead_0(context, token):1813 self.start_rule(context, 'ExamplesDefinition')1814 self.start_rule(context, 'Tags')1815 self.build(context, token)1816 return 361817 if self.match_TagLine(context, token):1818 self.end_rule(context, 'Scenario')1819 self.end_rule(context, 'ScenarioDefinition')1820 self.start_rule(context, 'ScenarioDefinition')1821 self.start_rule(context, 'Tags')1822 self.build(context, token)1823 return 301824 if self.match_ExamplesLine(context, token):1825 self.start_rule(context, 'ExamplesDefinition')1826 self.start_rule(context, 'Examples')1827 self.build(context, token)1828 return 371829 if self.match_ScenarioLine(context, token):1830 self.end_rule(context, 'Scenario')1831 self.end_rule(context, 'ScenarioDefinition')1832 self.start_rule(context, 'ScenarioDefinition')1833 self.start_rule(context, 'Scenario')1834 self.build(context, token)1835 return 311836 if self.match_RuleLine(context, token):1837 self.end_rule(context, 'Scenario')1838 self.end_rule(context, 'ScenarioDefinition')1839 self.end_rule(context, 'Rule')1840 self.start_rule(context, 'Rule')1841 self.start_rule(context, 'RuleHeader')1842 self.build(context, token)1843 return 221844 if self.match_Other(context, token):1845 self.start_rule(context, 'Description')1846 self.build(context, token)1847 return 321848 state_comment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0"1849 token.detach1850 expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]1851 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1852 if (self.stop_at_first_error):1853 raise error1854 self.add_error(context, error)1855 return 311856 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:01857 def match_token_at_32(self, token, context):1858 if self.match_EOF(context, token):1859 self.end_rule(context, 'Description')1860 self.end_rule(context, 'Scenario')1861 self.end_rule(context, 'ScenarioDefinition')1862 self.end_rule(context, 'Rule')1863 self.end_rule(context, 'Feature')1864 self.build(context, token)1865 return 411866 if self.match_Comment(context, token):1867 self.end_rule(context, 'Description')1868 self.build(context, token)1869 return 331870 if self.match_StepLine(context, token):1871 self.end_rule(context, 'Description')1872 self.start_rule(context, 'Step')1873 self.build(context, token)1874 return 341875 if self.match_TagLine(context, token):1876 if self.lookahead_0(context, token):1877 self.end_rule(context, 'Description')1878 self.start_rule(context, 'ExamplesDefinition')1879 self.start_rule(context, 'Tags')1880 self.build(context, token)1881 return 361882 if self.match_TagLine(context, token):1883 self.end_rule(context, 'Description')1884 self.end_rule(context, 'Scenario')1885 self.end_rule(context, 'ScenarioDefinition')1886 self.start_rule(context, 'ScenarioDefinition')1887 self.start_rule(context, 'Tags')1888 self.build(context, token)1889 return 301890 if self.match_ExamplesLine(context, token):1891 self.end_rule(context, 'Description')1892 self.start_rule(context, 'ExamplesDefinition')1893 self.start_rule(context, 'Examples')1894 self.build(context, token)1895 return 371896 if self.match_ScenarioLine(context, token):1897 self.end_rule(context, 'Description')1898 self.end_rule(context, 'Scenario')1899 self.end_rule(context, 'ScenarioDefinition')1900 self.start_rule(context, 'ScenarioDefinition')1901 self.start_rule(context, 'Scenario')1902 self.build(context, token)1903 return 311904 if self.match_RuleLine(context, token):1905 self.end_rule(context, 'Description')1906 self.end_rule(context, 'Scenario')1907 self.end_rule(context, 'ScenarioDefinition')1908 self.end_rule(context, 'Rule')1909 self.start_rule(context, 'Rule')1910 self.start_rule(context, 'RuleHeader')1911 self.build(context, token)1912 return 221913 if self.match_Other(context, token):1914 self.build(context, token)1915 return 321916 state_comment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0"1917 token.detach1918 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]1919 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1920 if (self.stop_at_first_error):1921 raise error1922 self.add_error(context, error)1923 return 321924 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:01925 def match_token_at_33(self, token, context):1926 if self.match_EOF(context, token):1927 self.end_rule(context, 'Scenario')1928 self.end_rule(context, 'ScenarioDefinition')1929 self.end_rule(context, 'Rule')1930 self.end_rule(context, 'Feature')1931 self.build(context, token)1932 return 411933 if self.match_Comment(context, token):1934 self.build(context, token)1935 return 331936 if self.match_StepLine(context, token):1937 self.start_rule(context, 'Step')1938 self.build(context, token)1939 return 341940 if self.match_TagLine(context, token):1941 if self.lookahead_0(context, token):1942 self.start_rule(context, 'ExamplesDefinition')1943 self.start_rule(context, 'Tags')1944 self.build(context, token)1945 return 361946 if self.match_TagLine(context, token):1947 self.end_rule(context, 'Scenario')1948 self.end_rule(context, 'ScenarioDefinition')1949 self.start_rule(context, 'ScenarioDefinition')1950 self.start_rule(context, 'Tags')1951 self.build(context, token)1952 return 301953 if self.match_ExamplesLine(context, token):1954 self.start_rule(context, 'ExamplesDefinition')1955 self.start_rule(context, 'Examples')1956 self.build(context, token)1957 return 371958 if self.match_ScenarioLine(context, token):1959 self.end_rule(context, 'Scenario')1960 self.end_rule(context, 'ScenarioDefinition')1961 self.start_rule(context, 'ScenarioDefinition')1962 self.start_rule(context, 'Scenario')1963 self.build(context, token)1964 return 311965 if self.match_RuleLine(context, token):1966 self.end_rule(context, 'Scenario')1967 self.end_rule(context, 'ScenarioDefinition')1968 self.end_rule(context, 'Rule')1969 self.start_rule(context, 'Rule')1970 self.start_rule(context, 'RuleHeader')1971 self.build(context, token)1972 return 221973 if self.match_Empty(context, token):1974 self.build(context, token)1975 return 331976 state_comment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0"1977 token.detach1978 expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]1979 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1980 if (self.stop_at_first_error):1981 raise error1982 self.add_error(context, error)1983 return 331984 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:01985 def match_token_at_34(self, token, context):1986 if self.match_EOF(context, token):1987 self.end_rule(context, 'Step')1988 self.end_rule(context, 'Scenario')1989 self.end_rule(context, 'ScenarioDefinition')1990 self.end_rule(context, 'Rule')1991 self.end_rule(context, 'Feature')1992 self.build(context, token)1993 return 411994 if self.match_TableRow(context, token):1995 self.start_rule(context, 'DataTable')1996 self.build(context, token)1997 return 351998 if self.match_DocStringSeparator(context, token):1999 self.start_rule(context, 'DocString')2000 self.build(context, token)2001 return 422002 if self.match_StepLine(context, token):2003 self.end_rule(context, 'Step')2004 self.start_rule(context, 'Step')2005 self.build(context, token)2006 return 342007 if self.match_TagLine(context, token):2008 if self.lookahead_0(context, token):2009 self.end_rule(context, 'Step')2010 self.start_rule(context, 'ExamplesDefinition')2011 self.start_rule(context, 'Tags')2012 self.build(context, token)2013 return 362014 if self.match_TagLine(context, token):2015 self.end_rule(context, 'Step')2016 self.end_rule(context, 'Scenario')2017 self.end_rule(context, 'ScenarioDefinition')2018 self.start_rule(context, 'ScenarioDefinition')2019 self.start_rule(context, 'Tags')2020 self.build(context, token)2021 return 302022 if self.match_ExamplesLine(context, token):2023 self.end_rule(context, 'Step')2024 self.start_rule(context, 'ExamplesDefinition')2025 self.start_rule(context, 'Examples')2026 self.build(context, token)2027 return 372028 if self.match_ScenarioLine(context, token):2029 self.end_rule(context, 'Step')2030 self.end_rule(context, 'Scenario')2031 self.end_rule(context, 'ScenarioDefinition')2032 self.start_rule(context, 'ScenarioDefinition')2033 self.start_rule(context, 'Scenario')2034 self.build(context, token)2035 return 312036 if self.match_RuleLine(context, token):2037 self.end_rule(context, 'Step')2038 self.end_rule(context, 'Scenario')2039 self.end_rule(context, 'ScenarioDefinition')2040 self.end_rule(context, 'Rule')2041 self.start_rule(context, 'Rule')2042 self.start_rule(context, 'RuleHeader')2043 self.build(context, token)2044 return 222045 if self.match_Comment(context, token):2046 self.build(context, token)2047 return 342048 if self.match_Empty(context, token):2049 self.build(context, token)2050 return 342051 state_comment = "State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0"2052 token.detach2053 expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2054 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2055 if (self.stop_at_first_error):2056 raise error2057 self.add_error(context, error)2058 return 342059 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02060 def match_token_at_35(self, token, context):2061 if self.match_EOF(context, token):2062 self.end_rule(context, 'DataTable')2063 self.end_rule(context, 'Step')2064 self.end_rule(context, 'Scenario')2065 self.end_rule(context, 'ScenarioDefinition')2066 self.end_rule(context, 'Rule')2067 self.end_rule(context, 'Feature')2068 self.build(context, token)2069 return 412070 if self.match_TableRow(context, token):2071 self.build(context, token)2072 return 352073 if self.match_StepLine(context, token):2074 self.end_rule(context, 'DataTable')2075 self.end_rule(context, 'Step')2076 self.start_rule(context, 'Step')2077 self.build(context, token)2078 return 342079 if self.match_TagLine(context, token):2080 if self.lookahead_0(context, token):2081 self.end_rule(context, 'DataTable')2082 self.end_rule(context, 'Step')2083 self.start_rule(context, 'ExamplesDefinition')2084 self.start_rule(context, 'Tags')2085 self.build(context, token)2086 return 362087 if self.match_TagLine(context, token):2088 self.end_rule(context, 'DataTable')2089 self.end_rule(context, 'Step')2090 self.end_rule(context, 'Scenario')2091 self.end_rule(context, 'ScenarioDefinition')2092 self.start_rule(context, 'ScenarioDefinition')2093 self.start_rule(context, 'Tags')2094 self.build(context, token)2095 return 302096 if self.match_ExamplesLine(context, token):2097 self.end_rule(context, 'DataTable')2098 self.end_rule(context, 'Step')2099 self.start_rule(context, 'ExamplesDefinition')2100 self.start_rule(context, 'Examples')2101 self.build(context, token)2102 return 372103 if self.match_ScenarioLine(context, token):2104 self.end_rule(context, 'DataTable')2105 self.end_rule(context, 'Step')2106 self.end_rule(context, 'Scenario')2107 self.end_rule(context, 'ScenarioDefinition')2108 self.start_rule(context, 'ScenarioDefinition')2109 self.start_rule(context, 'Scenario')2110 self.build(context, token)2111 return 312112 if self.match_RuleLine(context, token):2113 self.end_rule(context, 'DataTable')2114 self.end_rule(context, 'Step')2115 self.end_rule(context, 'Scenario')2116 self.end_rule(context, 'ScenarioDefinition')2117 self.end_rule(context, 'Rule')2118 self.start_rule(context, 'Rule')2119 self.start_rule(context, 'RuleHeader')2120 self.build(context, token)2121 return 222122 if self.match_Comment(context, token):2123 self.build(context, token)2124 return 352125 if self.match_Empty(context, token):2126 self.build(context, token)2127 return 352128 state_comment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"2129 token.detach2130 expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2131 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2132 if (self.stop_at_first_error):2133 raise error2134 self.add_error(context, error)2135 return 352136 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:02137 def match_token_at_36(self, token, context):2138 if self.match_TagLine(context, token):2139 self.build(context, token)2140 return 362141 if self.match_ExamplesLine(context, token):2142 self.end_rule(context, 'Tags')2143 self.start_rule(context, 'Examples')2144 self.build(context, token)2145 return 372146 if self.match_Comment(context, token):2147 self.build(context, token)2148 return 362149 if self.match_Empty(context, token):2150 self.build(context, token)2151 return 362152 state_comment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0"2153 token.detach2154 expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]2155 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2156 if (self.stop_at_first_error):2157 raise error2158 self.add_error(context, error)2159 return 362160 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:02161 def match_token_at_37(self, token, context):2162 if self.match_EOF(context, token):2163 self.end_rule(context, 'Examples')2164 self.end_rule(context, 'ExamplesDefinition')2165 self.end_rule(context, 'Scenario')2166 self.end_rule(context, 'ScenarioDefinition')2167 self.end_rule(context, 'Rule')2168 self.end_rule(context, 'Feature')2169 self.build(context, token)2170 return 412171 if self.match_Empty(context, token):2172 self.build(context, token)2173 return 372174 if self.match_Comment(context, token):2175 self.build(context, token)2176 return 392177 if self.match_TableRow(context, token):2178 self.start_rule(context, 'ExamplesTable')2179 self.build(context, token)2180 return 402181 if self.match_TagLine(context, token):2182 if self.lookahead_0(context, token):2183 self.end_rule(context, 'Examples')2184 self.end_rule(context, 'ExamplesDefinition')2185 self.start_rule(context, 'ExamplesDefinition')2186 self.start_rule(context, 'Tags')2187 self.build(context, token)2188 return 362189 if self.match_TagLine(context, token):2190 self.end_rule(context, 'Examples')2191 self.end_rule(context, 'ExamplesDefinition')2192 self.end_rule(context, 'Scenario')2193 self.end_rule(context, 'ScenarioDefinition')2194 self.start_rule(context, 'ScenarioDefinition')2195 self.start_rule(context, 'Tags')2196 self.build(context, token)2197 return 302198 if self.match_ExamplesLine(context, token):2199 self.end_rule(context, 'Examples')2200 self.end_rule(context, 'ExamplesDefinition')2201 self.start_rule(context, 'ExamplesDefinition')2202 self.start_rule(context, 'Examples')2203 self.build(context, token)2204 return 372205 if self.match_ScenarioLine(context, token):2206 self.end_rule(context, 'Examples')2207 self.end_rule(context, 'ExamplesDefinition')2208 self.end_rule(context, 'Scenario')2209 self.end_rule(context, 'ScenarioDefinition')2210 self.start_rule(context, 'ScenarioDefinition')2211 self.start_rule(context, 'Scenario')2212 self.build(context, token)2213 return 312214 if self.match_RuleLine(context, token):2215 self.end_rule(context, 'Examples')2216 self.end_rule(context, 'ExamplesDefinition')2217 self.end_rule(context, 'Scenario')2218 self.end_rule(context, 'ScenarioDefinition')2219 self.end_rule(context, 'Rule')2220 self.start_rule(context, 'Rule')2221 self.start_rule(context, 'RuleHeader')2222 self.build(context, token)2223 return 222224 if self.match_Other(context, token):2225 self.start_rule(context, 'Description')2226 self.build(context, token)2227 return 382228 state_comment = "State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0"2229 token.detach2230 expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]2231 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2232 if (self.stop_at_first_error):2233 raise error2234 self.add_error(context, error)2235 return 372236 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:02237 def match_token_at_38(self, token, context):2238 if self.match_EOF(context, token):2239 self.end_rule(context, 'Description')2240 self.end_rule(context, 'Examples')2241 self.end_rule(context, 'ExamplesDefinition')2242 self.end_rule(context, 'Scenario')2243 self.end_rule(context, 'ScenarioDefinition')2244 self.end_rule(context, 'Rule')2245 self.end_rule(context, 'Feature')2246 self.build(context, token)2247 return 412248 if self.match_Comment(context, token):2249 self.end_rule(context, 'Description')2250 self.build(context, token)2251 return 392252 if self.match_TableRow(context, token):2253 self.end_rule(context, 'Description')2254 self.start_rule(context, 'ExamplesTable')2255 self.build(context, token)2256 return 402257 if self.match_TagLine(context, token):2258 if self.lookahead_0(context, token):2259 self.end_rule(context, 'Description')2260 self.end_rule(context, 'Examples')2261 self.end_rule(context, 'ExamplesDefinition')2262 self.start_rule(context, 'ExamplesDefinition')2263 self.start_rule(context, 'Tags')2264 self.build(context, token)2265 return 362266 if self.match_TagLine(context, token):2267 self.end_rule(context, 'Description')2268 self.end_rule(context, 'Examples')2269 self.end_rule(context, 'ExamplesDefinition')2270 self.end_rule(context, 'Scenario')2271 self.end_rule(context, 'ScenarioDefinition')2272 self.start_rule(context, 'ScenarioDefinition')2273 self.start_rule(context, 'Tags')2274 self.build(context, token)2275 return 302276 if self.match_ExamplesLine(context, token):2277 self.end_rule(context, 'Description')2278 self.end_rule(context, 'Examples')2279 self.end_rule(context, 'ExamplesDefinition')2280 self.start_rule(context, 'ExamplesDefinition')2281 self.start_rule(context, 'Examples')2282 self.build(context, token)2283 return 372284 if self.match_ScenarioLine(context, token):2285 self.end_rule(context, 'Description')2286 self.end_rule(context, 'Examples')2287 self.end_rule(context, 'ExamplesDefinition')2288 self.end_rule(context, 'Scenario')2289 self.end_rule(context, 'ScenarioDefinition')2290 self.start_rule(context, 'ScenarioDefinition')2291 self.start_rule(context, 'Scenario')2292 self.build(context, token)2293 return 312294 if self.match_RuleLine(context, token):2295 self.end_rule(context, 'Description')2296 self.end_rule(context, 'Examples')2297 self.end_rule(context, 'ExamplesDefinition')2298 self.end_rule(context, 'Scenario')2299 self.end_rule(context, 'ScenarioDefinition')2300 self.end_rule(context, 'Rule')2301 self.start_rule(context, 'Rule')2302 self.start_rule(context, 'RuleHeader')2303 self.build(context, token)2304 return 222305 if self.match_Other(context, token):2306 self.build(context, token)2307 return 382308 state_comment = "State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0"2309 token.detach2310 expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]2311 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2312 if (self.stop_at_first_error):2313 raise error2314 self.add_error(context, error)2315 return 382316 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:02317 def match_token_at_39(self, token, context):2318 if self.match_EOF(context, token):2319 self.end_rule(context, 'Examples')2320 self.end_rule(context, 'ExamplesDefinition')2321 self.end_rule(context, 'Scenario')2322 self.end_rule(context, 'ScenarioDefinition')2323 self.end_rule(context, 'Rule')2324 self.end_rule(context, 'Feature')2325 self.build(context, token)2326 return 412327 if self.match_Comment(context, token):2328 self.build(context, token)2329 return 392330 if self.match_TableRow(context, token):2331 self.start_rule(context, 'ExamplesTable')2332 self.build(context, token)2333 return 402334 if self.match_TagLine(context, token):2335 if self.lookahead_0(context, token):2336 self.end_rule(context, 'Examples')2337 self.end_rule(context, 'ExamplesDefinition')2338 self.start_rule(context, 'ExamplesDefinition')2339 self.start_rule(context, 'Tags')2340 self.build(context, token)2341 return 362342 if self.match_TagLine(context, token):2343 self.end_rule(context, 'Examples')2344 self.end_rule(context, 'ExamplesDefinition')2345 self.end_rule(context, 'Scenario')2346 self.end_rule(context, 'ScenarioDefinition')2347 self.start_rule(context, 'ScenarioDefinition')2348 self.start_rule(context, 'Tags')2349 self.build(context, token)2350 return 302351 if self.match_ExamplesLine(context, token):2352 self.end_rule(context, 'Examples')2353 self.end_rule(context, 'ExamplesDefinition')2354 self.start_rule(context, 'ExamplesDefinition')2355 self.start_rule(context, 'Examples')2356 self.build(context, token)2357 return 372358 if self.match_ScenarioLine(context, token):2359 self.end_rule(context, 'Examples')2360 self.end_rule(context, 'ExamplesDefinition')2361 self.end_rule(context, 'Scenario')2362 self.end_rule(context, 'ScenarioDefinition')2363 self.start_rule(context, 'ScenarioDefinition')2364 self.start_rule(context, 'Scenario')2365 self.build(context, token)2366 return 312367 if self.match_RuleLine(context, token):2368 self.end_rule(context, 'Examples')2369 self.end_rule(context, 'ExamplesDefinition')2370 self.end_rule(context, 'Scenario')2371 self.end_rule(context, 'ScenarioDefinition')2372 self.end_rule(context, 'Rule')2373 self.start_rule(context, 'Rule')2374 self.start_rule(context, 'RuleHeader')2375 self.build(context, token)2376 return 222377 if self.match_Empty(context, token):2378 self.build(context, token)2379 return 392380 state_comment = "State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0"2381 token.detach2382 expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]2383 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2384 if (self.stop_at_first_error):2385 raise error2386 self.add_error(context, error)2387 return 392388 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:02389 def match_token_at_40(self, token, context):2390 if self.match_EOF(context, token):2391 self.end_rule(context, 'ExamplesTable')2392 self.end_rule(context, 'Examples')2393 self.end_rule(context, 'ExamplesDefinition')2394 self.end_rule(context, 'Scenario')2395 self.end_rule(context, 'ScenarioDefinition')2396 self.end_rule(context, 'Rule')2397 self.end_rule(context, 'Feature')2398 self.build(context, token)2399 return 412400 if self.match_TableRow(context, token):2401 self.build(context, token)2402 return 402403 if self.match_TagLine(context, token):2404 if self.lookahead_0(context, token):2405 self.end_rule(context, 'ExamplesTable')2406 self.end_rule(context, 'Examples')2407 self.end_rule(context, 'ExamplesDefinition')2408 self.start_rule(context, 'ExamplesDefinition')2409 self.start_rule(context, 'Tags')2410 self.build(context, token)2411 return 362412 if self.match_TagLine(context, token):2413 self.end_rule(context, 'ExamplesTable')2414 self.end_rule(context, 'Examples')2415 self.end_rule(context, 'ExamplesDefinition')2416 self.end_rule(context, 'Scenario')2417 self.end_rule(context, 'ScenarioDefinition')2418 self.start_rule(context, 'ScenarioDefinition')2419 self.start_rule(context, 'Tags')2420 self.build(context, token)2421 return 302422 if self.match_ExamplesLine(context, token):2423 self.end_rule(context, 'ExamplesTable')2424 self.end_rule(context, 'Examples')2425 self.end_rule(context, 'ExamplesDefinition')2426 self.start_rule(context, 'ExamplesDefinition')2427 self.start_rule(context, 'Examples')2428 self.build(context, token)2429 return 372430 if self.match_ScenarioLine(context, token):2431 self.end_rule(context, 'ExamplesTable')2432 self.end_rule(context, 'Examples')2433 self.end_rule(context, 'ExamplesDefinition')2434 self.end_rule(context, 'Scenario')2435 self.end_rule(context, 'ScenarioDefinition')2436 self.start_rule(context, 'ScenarioDefinition')2437 self.start_rule(context, 'Scenario')2438 self.build(context, token)2439 return 312440 if self.match_RuleLine(context, token):2441 self.end_rule(context, 'ExamplesTable')2442 self.end_rule(context, 'Examples')2443 self.end_rule(context, 'ExamplesDefinition')2444 self.end_rule(context, 'Scenario')2445 self.end_rule(context, 'ScenarioDefinition')2446 self.end_rule(context, 'Rule')2447 self.start_rule(context, 'Rule')2448 self.start_rule(context, 'RuleHeader')2449 self.build(context, token)2450 return 222451 if self.match_Comment(context, token):2452 self.build(context, token)2453 return 402454 if self.match_Empty(context, token):2455 self.build(context, token)2456 return 402457 state_comment = "State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0"2458 token.detach2459 expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2460 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2461 if (self.stop_at_first_error):2462 raise error2463 self.add_error(context, error)2464 return 402465 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:02466 def match_token_at_42(self, token, context):2467 if self.match_DocStringSeparator(context, token):2468 self.build(context, token)2469 return 432470 if self.match_Other(context, token):2471 self.build(context, token)2472 return 422473 state_comment = "State: 42 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"2474 token.detach2475 expected_tokens = ["#DocStringSeparator", "#Other"]2476 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2477 if (self.stop_at_first_error):2478 raise error2479 self.add_error(context, error)2480 return 422481 # GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:02482 def match_token_at_43(self, token, context):2483 if self.match_EOF(context, token):2484 self.end_rule(context, 'DocString')2485 self.end_rule(context, 'Step')2486 self.end_rule(context, 'Scenario')2487 self.end_rule(context, 'ScenarioDefinition')2488 self.end_rule(context, 'Rule')2489 self.end_rule(context, 'Feature')2490 self.build(context, token)2491 return 412492 if self.match_StepLine(context, token):2493 self.end_rule(context, 'DocString')2494 self.end_rule(context, 'Step')2495 self.start_rule(context, 'Step')2496 self.build(context, token)2497 return 342498 if self.match_TagLine(context, token):2499 if self.lookahead_0(context, token):2500 self.end_rule(context, 'DocString')2501 self.end_rule(context, 'Step')2502 self.start_rule(context, 'ExamplesDefinition')2503 self.start_rule(context, 'Tags')2504 self.build(context, token)2505 return 362506 if self.match_TagLine(context, token):2507 self.end_rule(context, 'DocString')2508 self.end_rule(context, 'Step')2509 self.end_rule(context, 'Scenario')2510 self.end_rule(context, 'ScenarioDefinition')2511 self.start_rule(context, 'ScenarioDefinition')2512 self.start_rule(context, 'Tags')2513 self.build(context, token)2514 return 302515 if self.match_ExamplesLine(context, token):2516 self.end_rule(context, 'DocString')2517 self.end_rule(context, 'Step')2518 self.start_rule(context, 'ExamplesDefinition')2519 self.start_rule(context, 'Examples')2520 self.build(context, token)2521 return 372522 if self.match_ScenarioLine(context, token):2523 self.end_rule(context, 'DocString')2524 self.end_rule(context, 'Step')2525 self.end_rule(context, 'Scenario')2526 self.end_rule(context, 'ScenarioDefinition')2527 self.start_rule(context, 'ScenarioDefinition')2528 self.start_rule(context, 'Scenario')2529 self.build(context, token)2530 return 312531 if self.match_RuleLine(context, token):2532 self.end_rule(context, 'DocString')2533 self.end_rule(context, 'Step')2534 self.end_rule(context, 'Scenario')2535 self.end_rule(context, 'ScenarioDefinition')2536 self.end_rule(context, 'Rule')2537 self.start_rule(context, 'Rule')2538 self.start_rule(context, 'RuleHeader')2539 self.build(context, token)2540 return 222541 if self.match_Comment(context, token):2542 self.build(context, token)2543 return 432544 if self.match_Empty(context, token):2545 self.build(context, token)2546 return 432547 state_comment = "State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"2548 token.detach2549 expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2550 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2551 if (self.stop_at_first_error):2552 raise error2553 self.add_error(context, error)2554 return 432555 # GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:02556 def match_token_at_44(self, token, context):2557 if self.match_DocStringSeparator(context, token):2558 self.build(context, token)2559 return 452560 if self.match_Other(context, token):2561 self.build(context, token)2562 return 442563 state_comment = "State: 44 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"2564 token.detach2565 expected_tokens = ["#DocStringSeparator", "#Other"]2566 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2567 if (self.stop_at_first_error):2568 raise error2569 self.add_error(context, error)2570 return 442571 # GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:02572 def match_token_at_45(self, token, context):2573 if self.match_EOF(context, token):2574 self.end_rule(context, 'DocString')2575 self.end_rule(context, 'Step')2576 self.end_rule(context, 'Background')2577 self.end_rule(context, 'Rule')2578 self.end_rule(context, 'Feature')2579 self.build(context, token)2580 return 412581 if self.match_StepLine(context, token):2582 self.end_rule(context, 'DocString')2583 self.end_rule(context, 'Step')2584 self.start_rule(context, 'Step')2585 self.build(context, token)2586 return 282587 if self.match_TagLine(context, token):2588 self.end_rule(context, 'DocString')2589 self.end_rule(context, 'Step')2590 self.end_rule(context, 'Background')2591 self.start_rule(context, 'ScenarioDefinition')2592 self.start_rule(context, 'Tags')2593 self.build(context, token)2594 return 302595 if self.match_ScenarioLine(context, token):2596 self.end_rule(context, 'DocString')2597 self.end_rule(context, 'Step')2598 self.end_rule(context, 'Background')2599 self.start_rule(context, 'ScenarioDefinition')2600 self.start_rule(context, 'Scenario')2601 self.build(context, token)2602 return 312603 if self.match_RuleLine(context, token):2604 self.end_rule(context, 'DocString')2605 self.end_rule(context, 'Step')2606 self.end_rule(context, 'Background')2607 self.end_rule(context, 'Rule')2608 self.start_rule(context, 'Rule')2609 self.start_rule(context, 'RuleHeader')2610 self.build(context, token)2611 return 222612 if self.match_Comment(context, token):2613 self.build(context, token)2614 return 452615 if self.match_Empty(context, token):2616 self.build(context, token)2617 return 452618 state_comment = "State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"2619 token.detach2620 expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2621 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2622 if (self.stop_at_first_error):2623 raise error2624 self.add_error(context, error)2625 return 452626 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:02627 def match_token_at_46(self, token, context):2628 if self.match_DocStringSeparator(context, token):2629 self.build(context, token)2630 return 472631 if self.match_Other(context, token):2632 self.build(context, token)2633 return 462634 state_comment = "State: 46 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"2635 token.detach2636 expected_tokens = ["#DocStringSeparator", "#Other"]2637 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2638 if (self.stop_at_first_error):2639 raise error2640 self.add_error(context, error)2641 return 462642 # GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:02643 def match_token_at_47(self, token, context):2644 if self.match_EOF(context, token):2645 self.end_rule(context, 'DocString')2646 self.end_rule(context, 'Step')2647 self.end_rule(context, 'Scenario')2648 self.end_rule(context, 'ScenarioDefinition')2649 self.end_rule(context, 'Feature')2650 self.build(context, token)2651 return 412652 if self.match_StepLine(context, token):2653 self.end_rule(context, 'DocString')2654 self.end_rule(context, 'Step')2655 self.start_rule(context, 'Step')2656 self.build(context, token)2657 return 152658 if self.match_TagLine(context, token):2659 if self.lookahead_0(context, token):2660 self.end_rule(context, 'DocString')2661 self.end_rule(context, 'Step')2662 self.start_rule(context, 'ExamplesDefinition')2663 self.start_rule(context, 'Tags')2664 self.build(context, token)2665 return 172666 if self.match_TagLine(context, token):2667 self.end_rule(context, 'DocString')2668 self.end_rule(context, 'Step')2669 self.end_rule(context, 'Scenario')2670 self.end_rule(context, 'ScenarioDefinition')2671 self.start_rule(context, 'ScenarioDefinition')2672 self.start_rule(context, 'Tags')2673 self.build(context, token)2674 return 112675 if self.match_ExamplesLine(context, token):2676 self.end_rule(context, 'DocString')2677 self.end_rule(context, 'Step')2678 self.start_rule(context, 'ExamplesDefinition')2679 self.start_rule(context, 'Examples')2680 self.build(context, token)2681 return 182682 if self.match_ScenarioLine(context, token):2683 self.end_rule(context, 'DocString')2684 self.end_rule(context, 'Step')2685 self.end_rule(context, 'Scenario')2686 self.end_rule(context, 'ScenarioDefinition')2687 self.start_rule(context, 'ScenarioDefinition')2688 self.start_rule(context, 'Scenario')2689 self.build(context, token)2690 return 122691 if self.match_RuleLine(context, token):2692 self.end_rule(context, 'DocString')2693 self.end_rule(context, 'Step')2694 self.end_rule(context, 'Scenario')2695 self.end_rule(context, 'ScenarioDefinition')2696 self.start_rule(context, 'Rule')2697 self.start_rule(context, 'RuleHeader')2698 self.build(context, token)2699 return 222700 if self.match_Comment(context, token):2701 self.build(context, token)2702 return 472703 if self.match_Empty(context, token):2704 self.build(context, token)2705 return 472706 state_comment = "State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"2707 token.detach2708 expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2709 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2710 if (self.stop_at_first_error):2711 raise error2712 self.add_error(context, error)2713 return 472714 # GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:02715 def match_token_at_48(self, token, context):2716 if self.match_DocStringSeparator(context, token):2717 self.build(context, token)2718 return 492719 if self.match_Other(context, token):2720 self.build(context, token)2721 return 482722 state_comment = "State: 48 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"2723 token.detach2724 expected_tokens = ["#DocStringSeparator", "#Other"]2725 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2726 if (self.stop_at_first_error):2727 raise error2728 self.add_error(context, error)2729 return 482730 # GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:02731 def match_token_at_49(self, token, context):2732 if self.match_EOF(context, token):2733 self.end_rule(context, 'DocString')2734 self.end_rule(context, 'Step')2735 self.end_rule(context, 'Background')2736 self.end_rule(context, 'Feature')2737 self.build(context, token)2738 return 412739 if self.match_StepLine(context, token):2740 self.end_rule(context, 'DocString')2741 self.end_rule(context, 'Step')2742 self.start_rule(context, 'Step')2743 self.build(context, token)2744 return 92745 if self.match_TagLine(context, token):2746 self.end_rule(context, 'DocString')2747 self.end_rule(context, 'Step')2748 self.end_rule(context, 'Background')2749 self.start_rule(context, 'ScenarioDefinition')2750 self.start_rule(context, 'Tags')2751 self.build(context, token)2752 return 112753 if self.match_ScenarioLine(context, token):2754 self.end_rule(context, 'DocString')2755 self.end_rule(context, 'Step')2756 self.end_rule(context, 'Background')2757 self.start_rule(context, 'ScenarioDefinition')2758 self.start_rule(context, 'Scenario')2759 self.build(context, token)2760 return 122761 if self.match_RuleLine(context, token):2762 self.end_rule(context, 'DocString')2763 self.end_rule(context, 'Step')2764 self.end_rule(context, 'Background')2765 self.start_rule(context, 'Rule')2766 self.start_rule(context, 'RuleHeader')2767 self.build(context, token)2768 return 222769 if self.match_Comment(context, token):2770 self.build(context, token)2771 return 492772 if self.match_Empty(context, token):2773 self.build(context, token)2774 return 492775 state_comment = "State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"2776 token.detach2777 expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]2778 error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)2779 if (self.stop_at_first_error):2780 raise error2781 self.add_error(context, error)2782 return 492783 def lookahead_0(self, context, currentToken):2784 currentToken.detach2785 token = None2786 queue = []2787 match = False2788 while True:2789 token = self.read_token(context)2790 token.detach2791 queue.append(token)2792 if (self.match_ExamplesLine(context, token) or False):2793 match = True2794 break2795 if not (self.match_Empty(context, token) or self.match_Comment(context, token) or self.match_TagLine(context, token) or False):2796 break2797 context.token_queue.extend(queue)2798 return match2799 # private2800 def handle_ast_error(self, context, argument, action):2801 self.handle_external_error(context, True, argument, action)2802 def handle_external_error(self, context, default_value, argument, action):2803 if self.stop_at_first_error:2804 return action(argument)2805 try:2806 return action(argument)...

Full Screen

Full Screen

parser.js

Source:parser.js Github

copy

Full Screen

...879 startRule(context, 'Tags');880 build(context, token);881 return 11;882 }883 if(match_ExamplesLine(context, token)) {884 startRule(context, 'ExamplesDefinition');885 startRule(context, 'Examples');886 build(context, token);887 return 18;888 }889 if(match_ScenarioLine(context, token)) {890 endRule(context, 'Scenario');891 endRule(context, 'ScenarioDefinition');892 startRule(context, 'ScenarioDefinition');893 startRule(context, 'Scenario');894 build(context, token);895 return 12;896 }897 if(match_RuleLine(context, token)) {898 endRule(context, 'Scenario');899 endRule(context, 'ScenarioDefinition');900 startRule(context, 'Rule');901 startRule(context, 'RuleHeader');902 build(context, token);903 return 22;904 }905 if(match_Other(context, token)) {906 startRule(context, 'Description');907 build(context, token);908 return 13;909 }910 911 var stateComment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";912 token.detach();913 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];914 var error = token.isEof ?915 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :916 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);917 if (self.stopAtFirstError) throw error;918 addError(context, error);919 return 12;920 }921 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0922 function matchTokenAt_13(token, context) {923 if(match_EOF(context, token)) {924 endRule(context, 'Description');925 endRule(context, 'Scenario');926 endRule(context, 'ScenarioDefinition');927 endRule(context, 'Feature');928 build(context, token);929 return 41;930 }931 if(match_Comment(context, token)) {932 endRule(context, 'Description');933 build(context, token);934 return 14;935 }936 if(match_StepLine(context, token)) {937 endRule(context, 'Description');938 startRule(context, 'Step');939 build(context, token);940 return 15;941 }942 if(match_TagLine(context, token)) {943 if(lookahead_0(context, token)) {944 endRule(context, 'Description');945 startRule(context, 'ExamplesDefinition');946 startRule(context, 'Tags');947 build(context, token);948 return 17;949 }950 }951 if(match_TagLine(context, token)) {952 endRule(context, 'Description');953 endRule(context, 'Scenario');954 endRule(context, 'ScenarioDefinition');955 startRule(context, 'ScenarioDefinition');956 startRule(context, 'Tags');957 build(context, token);958 return 11;959 }960 if(match_ExamplesLine(context, token)) {961 endRule(context, 'Description');962 startRule(context, 'ExamplesDefinition');963 startRule(context, 'Examples');964 build(context, token);965 return 18;966 }967 if(match_ScenarioLine(context, token)) {968 endRule(context, 'Description');969 endRule(context, 'Scenario');970 endRule(context, 'ScenarioDefinition');971 startRule(context, 'ScenarioDefinition');972 startRule(context, 'Scenario');973 build(context, token);974 return 12;975 }976 if(match_RuleLine(context, token)) {977 endRule(context, 'Description');978 endRule(context, 'Scenario');979 endRule(context, 'ScenarioDefinition');980 startRule(context, 'Rule');981 startRule(context, 'RuleHeader');982 build(context, token);983 return 22;984 }985 if(match_Other(context, token)) {986 build(context, token);987 return 13;988 }989 990 var stateComment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";991 token.detach();992 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];993 var error = token.isEof ?994 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :995 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);996 if (self.stopAtFirstError) throw error;997 addError(context, error);998 return 13;999 }1000 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:01001 function matchTokenAt_14(token, context) {1002 if(match_EOF(context, token)) {1003 endRule(context, 'Scenario');1004 endRule(context, 'ScenarioDefinition');1005 endRule(context, 'Feature');1006 build(context, token);1007 return 41;1008 }1009 if(match_Comment(context, token)) {1010 build(context, token);1011 return 14;1012 }1013 if(match_StepLine(context, token)) {1014 startRule(context, 'Step');1015 build(context, token);1016 return 15;1017 }1018 if(match_TagLine(context, token)) {1019 if(lookahead_0(context, token)) {1020 startRule(context, 'ExamplesDefinition');1021 startRule(context, 'Tags');1022 build(context, token);1023 return 17;1024 }1025 }1026 if(match_TagLine(context, token)) {1027 endRule(context, 'Scenario');1028 endRule(context, 'ScenarioDefinition');1029 startRule(context, 'ScenarioDefinition');1030 startRule(context, 'Tags');1031 build(context, token);1032 return 11;1033 }1034 if(match_ExamplesLine(context, token)) {1035 startRule(context, 'ExamplesDefinition');1036 startRule(context, 'Examples');1037 build(context, token);1038 return 18;1039 }1040 if(match_ScenarioLine(context, token)) {1041 endRule(context, 'Scenario');1042 endRule(context, 'ScenarioDefinition');1043 startRule(context, 'ScenarioDefinition');1044 startRule(context, 'Scenario');1045 build(context, token);1046 return 12;1047 }1048 if(match_RuleLine(context, token)) {1049 endRule(context, 'Scenario');1050 endRule(context, 'ScenarioDefinition');1051 startRule(context, 'Rule');1052 startRule(context, 'RuleHeader');1053 build(context, token);1054 return 22;1055 }1056 if(match_Empty(context, token)) {1057 build(context, token);1058 return 14;1059 }1060 1061 var stateComment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";1062 token.detach();1063 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];1064 var error = token.isEof ?1065 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1066 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1067 if (self.stopAtFirstError) throw error;1068 addError(context, error);1069 return 14;1070 }1071 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:01072 function matchTokenAt_15(token, context) {1073 if(match_EOF(context, token)) {1074 endRule(context, 'Step');1075 endRule(context, 'Scenario');1076 endRule(context, 'ScenarioDefinition');1077 endRule(context, 'Feature');1078 build(context, token);1079 return 41;1080 }1081 if(match_TableRow(context, token)) {1082 startRule(context, 'DataTable');1083 build(context, token);1084 return 16;1085 }1086 if(match_DocStringSeparator(context, token)) {1087 startRule(context, 'DocString');1088 build(context, token);1089 return 46;1090 }1091 if(match_StepLine(context, token)) {1092 endRule(context, 'Step');1093 startRule(context, 'Step');1094 build(context, token);1095 return 15;1096 }1097 if(match_TagLine(context, token)) {1098 if(lookahead_0(context, token)) {1099 endRule(context, 'Step');1100 startRule(context, 'ExamplesDefinition');1101 startRule(context, 'Tags');1102 build(context, token);1103 return 17;1104 }1105 }1106 if(match_TagLine(context, token)) {1107 endRule(context, 'Step');1108 endRule(context, 'Scenario');1109 endRule(context, 'ScenarioDefinition');1110 startRule(context, 'ScenarioDefinition');1111 startRule(context, 'Tags');1112 build(context, token);1113 return 11;1114 }1115 if(match_ExamplesLine(context, token)) {1116 endRule(context, 'Step');1117 startRule(context, 'ExamplesDefinition');1118 startRule(context, 'Examples');1119 build(context, token);1120 return 18;1121 }1122 if(match_ScenarioLine(context, token)) {1123 endRule(context, 'Step');1124 endRule(context, 'Scenario');1125 endRule(context, 'ScenarioDefinition');1126 startRule(context, 'ScenarioDefinition');1127 startRule(context, 'Scenario');1128 build(context, token);1129 return 12;1130 }1131 if(match_RuleLine(context, token)) {1132 endRule(context, 'Step');1133 endRule(context, 'Scenario');1134 endRule(context, 'ScenarioDefinition');1135 startRule(context, 'Rule');1136 startRule(context, 'RuleHeader');1137 build(context, token);1138 return 22;1139 }1140 if(match_Comment(context, token)) {1141 build(context, token);1142 return 15;1143 }1144 if(match_Empty(context, token)) {1145 build(context, token);1146 return 15;1147 }1148 1149 var stateComment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";1150 token.detach();1151 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1152 var error = token.isEof ?1153 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1154 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1155 if (self.stopAtFirstError) throw error;1156 addError(context, error);1157 return 15;1158 }1159 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:01160 function matchTokenAt_16(token, context) {1161 if(match_EOF(context, token)) {1162 endRule(context, 'DataTable');1163 endRule(context, 'Step');1164 endRule(context, 'Scenario');1165 endRule(context, 'ScenarioDefinition');1166 endRule(context, 'Feature');1167 build(context, token);1168 return 41;1169 }1170 if(match_TableRow(context, token)) {1171 build(context, token);1172 return 16;1173 }1174 if(match_StepLine(context, token)) {1175 endRule(context, 'DataTable');1176 endRule(context, 'Step');1177 startRule(context, 'Step');1178 build(context, token);1179 return 15;1180 }1181 if(match_TagLine(context, token)) {1182 if(lookahead_0(context, token)) {1183 endRule(context, 'DataTable');1184 endRule(context, 'Step');1185 startRule(context, 'ExamplesDefinition');1186 startRule(context, 'Tags');1187 build(context, token);1188 return 17;1189 }1190 }1191 if(match_TagLine(context, token)) {1192 endRule(context, 'DataTable');1193 endRule(context, 'Step');1194 endRule(context, 'Scenario');1195 endRule(context, 'ScenarioDefinition');1196 startRule(context, 'ScenarioDefinition');1197 startRule(context, 'Tags');1198 build(context, token);1199 return 11;1200 }1201 if(match_ExamplesLine(context, token)) {1202 endRule(context, 'DataTable');1203 endRule(context, 'Step');1204 startRule(context, 'ExamplesDefinition');1205 startRule(context, 'Examples');1206 build(context, token);1207 return 18;1208 }1209 if(match_ScenarioLine(context, token)) {1210 endRule(context, 'DataTable');1211 endRule(context, 'Step');1212 endRule(context, 'Scenario');1213 endRule(context, 'ScenarioDefinition');1214 startRule(context, 'ScenarioDefinition');1215 startRule(context, 'Scenario');1216 build(context, token);1217 return 12;1218 }1219 if(match_RuleLine(context, token)) {1220 endRule(context, 'DataTable');1221 endRule(context, 'Step');1222 endRule(context, 'Scenario');1223 endRule(context, 'ScenarioDefinition');1224 startRule(context, 'Rule');1225 startRule(context, 'RuleHeader');1226 build(context, token);1227 return 22;1228 }1229 if(match_Comment(context, token)) {1230 build(context, token);1231 return 16;1232 }1233 if(match_Empty(context, token)) {1234 build(context, token);1235 return 16;1236 }1237 1238 var stateComment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";1239 token.detach();1240 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1241 var error = token.isEof ?1242 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1243 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1244 if (self.stopAtFirstError) throw error;1245 addError(context, error);1246 return 16;1247 }1248 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:01249 function matchTokenAt_17(token, context) {1250 if(match_TagLine(context, token)) {1251 build(context, token);1252 return 17;1253 }1254 if(match_ExamplesLine(context, token)) {1255 endRule(context, 'Tags');1256 startRule(context, 'Examples');1257 build(context, token);1258 return 18;1259 }1260 if(match_Comment(context, token)) {1261 build(context, token);1262 return 17;1263 }1264 if(match_Empty(context, token)) {1265 build(context, token);1266 return 17;1267 }1268 1269 var stateComment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";1270 token.detach();1271 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1272 var error = token.isEof ?1273 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1274 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1275 if (self.stopAtFirstError) throw error;1276 addError(context, error);1277 return 17;1278 }1279 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:01280 function matchTokenAt_18(token, context) {1281 if(match_EOF(context, token)) {1282 endRule(context, 'Examples');1283 endRule(context, 'ExamplesDefinition');1284 endRule(context, 'Scenario');1285 endRule(context, 'ScenarioDefinition');1286 endRule(context, 'Feature');1287 build(context, token);1288 return 41;1289 }1290 if(match_Empty(context, token)) {1291 build(context, token);1292 return 18;1293 }1294 if(match_Comment(context, token)) {1295 build(context, token);1296 return 20;1297 }1298 if(match_TableRow(context, token)) {1299 startRule(context, 'ExamplesTable');1300 build(context, token);1301 return 21;1302 }1303 if(match_TagLine(context, token)) {1304 if(lookahead_0(context, token)) {1305 endRule(context, 'Examples');1306 endRule(context, 'ExamplesDefinition');1307 startRule(context, 'ExamplesDefinition');1308 startRule(context, 'Tags');1309 build(context, token);1310 return 17;1311 }1312 }1313 if(match_TagLine(context, token)) {1314 endRule(context, 'Examples');1315 endRule(context, 'ExamplesDefinition');1316 endRule(context, 'Scenario');1317 endRule(context, 'ScenarioDefinition');1318 startRule(context, 'ScenarioDefinition');1319 startRule(context, 'Tags');1320 build(context, token);1321 return 11;1322 }1323 if(match_ExamplesLine(context, token)) {1324 endRule(context, 'Examples');1325 endRule(context, 'ExamplesDefinition');1326 startRule(context, 'ExamplesDefinition');1327 startRule(context, 'Examples');1328 build(context, token);1329 return 18;1330 }1331 if(match_ScenarioLine(context, token)) {1332 endRule(context, 'Examples');1333 endRule(context, 'ExamplesDefinition');1334 endRule(context, 'Scenario');1335 endRule(context, 'ScenarioDefinition');1336 startRule(context, 'ScenarioDefinition');1337 startRule(context, 'Scenario');1338 build(context, token);1339 return 12;1340 }1341 if(match_RuleLine(context, token)) {1342 endRule(context, 'Examples');1343 endRule(context, 'ExamplesDefinition');1344 endRule(context, 'Scenario');1345 endRule(context, 'ScenarioDefinition');1346 startRule(context, 'Rule');1347 startRule(context, 'RuleHeader');1348 build(context, token);1349 return 22;1350 }1351 if(match_Other(context, token)) {1352 startRule(context, 'Description');1353 build(context, token);1354 return 19;1355 }1356 1357 var stateComment = "State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";1358 token.detach();1359 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1360 var error = token.isEof ?1361 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1362 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1363 if (self.stopAtFirstError) throw error;1364 addError(context, error);1365 return 18;1366 }1367 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:01368 function matchTokenAt_19(token, context) {1369 if(match_EOF(context, token)) {1370 endRule(context, 'Description');1371 endRule(context, 'Examples');1372 endRule(context, 'ExamplesDefinition');1373 endRule(context, 'Scenario');1374 endRule(context, 'ScenarioDefinition');1375 endRule(context, 'Feature');1376 build(context, token);1377 return 41;1378 }1379 if(match_Comment(context, token)) {1380 endRule(context, 'Description');1381 build(context, token);1382 return 20;1383 }1384 if(match_TableRow(context, token)) {1385 endRule(context, 'Description');1386 startRule(context, 'ExamplesTable');1387 build(context, token);1388 return 21;1389 }1390 if(match_TagLine(context, token)) {1391 if(lookahead_0(context, token)) {1392 endRule(context, 'Description');1393 endRule(context, 'Examples');1394 endRule(context, 'ExamplesDefinition');1395 startRule(context, 'ExamplesDefinition');1396 startRule(context, 'Tags');1397 build(context, token);1398 return 17;1399 }1400 }1401 if(match_TagLine(context, token)) {1402 endRule(context, 'Description');1403 endRule(context, 'Examples');1404 endRule(context, 'ExamplesDefinition');1405 endRule(context, 'Scenario');1406 endRule(context, 'ScenarioDefinition');1407 startRule(context, 'ScenarioDefinition');1408 startRule(context, 'Tags');1409 build(context, token);1410 return 11;1411 }1412 if(match_ExamplesLine(context, token)) {1413 endRule(context, 'Description');1414 endRule(context, 'Examples');1415 endRule(context, 'ExamplesDefinition');1416 startRule(context, 'ExamplesDefinition');1417 startRule(context, 'Examples');1418 build(context, token);1419 return 18;1420 }1421 if(match_ScenarioLine(context, token)) {1422 endRule(context, 'Description');1423 endRule(context, 'Examples');1424 endRule(context, 'ExamplesDefinition');1425 endRule(context, 'Scenario');1426 endRule(context, 'ScenarioDefinition');1427 startRule(context, 'ScenarioDefinition');1428 startRule(context, 'Scenario');1429 build(context, token);1430 return 12;1431 }1432 if(match_RuleLine(context, token)) {1433 endRule(context, 'Description');1434 endRule(context, 'Examples');1435 endRule(context, 'ExamplesDefinition');1436 endRule(context, 'Scenario');1437 endRule(context, 'ScenarioDefinition');1438 startRule(context, 'Rule');1439 startRule(context, 'RuleHeader');1440 build(context, token);1441 return 22;1442 }1443 if(match_Other(context, token)) {1444 build(context, token);1445 return 19;1446 }1447 1448 var stateComment = "State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";1449 token.detach();1450 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1451 var error = token.isEof ?1452 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1453 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1454 if (self.stopAtFirstError) throw error;1455 addError(context, error);1456 return 19;1457 }1458 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:01459 function matchTokenAt_20(token, context) {1460 if(match_EOF(context, token)) {1461 endRule(context, 'Examples');1462 endRule(context, 'ExamplesDefinition');1463 endRule(context, 'Scenario');1464 endRule(context, 'ScenarioDefinition');1465 endRule(context, 'Feature');1466 build(context, token);1467 return 41;1468 }1469 if(match_Comment(context, token)) {1470 build(context, token);1471 return 20;1472 }1473 if(match_TableRow(context, token)) {1474 startRule(context, 'ExamplesTable');1475 build(context, token);1476 return 21;1477 }1478 if(match_TagLine(context, token)) {1479 if(lookahead_0(context, token)) {1480 endRule(context, 'Examples');1481 endRule(context, 'ExamplesDefinition');1482 startRule(context, 'ExamplesDefinition');1483 startRule(context, 'Tags');1484 build(context, token);1485 return 17;1486 }1487 }1488 if(match_TagLine(context, token)) {1489 endRule(context, 'Examples');1490 endRule(context, 'ExamplesDefinition');1491 endRule(context, 'Scenario');1492 endRule(context, 'ScenarioDefinition');1493 startRule(context, 'ScenarioDefinition');1494 startRule(context, 'Tags');1495 build(context, token);1496 return 11;1497 }1498 if(match_ExamplesLine(context, token)) {1499 endRule(context, 'Examples');1500 endRule(context, 'ExamplesDefinition');1501 startRule(context, 'ExamplesDefinition');1502 startRule(context, 'Examples');1503 build(context, token);1504 return 18;1505 }1506 if(match_ScenarioLine(context, token)) {1507 endRule(context, 'Examples');1508 endRule(context, 'ExamplesDefinition');1509 endRule(context, 'Scenario');1510 endRule(context, 'ScenarioDefinition');1511 startRule(context, 'ScenarioDefinition');1512 startRule(context, 'Scenario');1513 build(context, token);1514 return 12;1515 }1516 if(match_RuleLine(context, token)) {1517 endRule(context, 'Examples');1518 endRule(context, 'ExamplesDefinition');1519 endRule(context, 'Scenario');1520 endRule(context, 'ScenarioDefinition');1521 startRule(context, 'Rule');1522 startRule(context, 'RuleHeader');1523 build(context, token);1524 return 22;1525 }1526 if(match_Empty(context, token)) {1527 build(context, token);1528 return 20;1529 }1530 1531 var stateComment = "State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";1532 token.detach();1533 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];1534 var error = token.isEof ?1535 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1536 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1537 if (self.stopAtFirstError) throw error;1538 addError(context, error);1539 return 20;1540 }1541 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:01542 function matchTokenAt_21(token, context) {1543 if(match_EOF(context, token)) {1544 endRule(context, 'ExamplesTable');1545 endRule(context, 'Examples');1546 endRule(context, 'ExamplesDefinition');1547 endRule(context, 'Scenario');1548 endRule(context, 'ScenarioDefinition');1549 endRule(context, 'Feature');1550 build(context, token);1551 return 41;1552 }1553 if(match_TableRow(context, token)) {1554 build(context, token);1555 return 21;1556 }1557 if(match_TagLine(context, token)) {1558 if(lookahead_0(context, token)) {1559 endRule(context, 'ExamplesTable');1560 endRule(context, 'Examples');1561 endRule(context, 'ExamplesDefinition');1562 startRule(context, 'ExamplesDefinition');1563 startRule(context, 'Tags');1564 build(context, token);1565 return 17;1566 }1567 }1568 if(match_TagLine(context, token)) {1569 endRule(context, 'ExamplesTable');1570 endRule(context, 'Examples');1571 endRule(context, 'ExamplesDefinition');1572 endRule(context, 'Scenario');1573 endRule(context, 'ScenarioDefinition');1574 startRule(context, 'ScenarioDefinition');1575 startRule(context, 'Tags');1576 build(context, token);1577 return 11;1578 }1579 if(match_ExamplesLine(context, token)) {1580 endRule(context, 'ExamplesTable');1581 endRule(context, 'Examples');1582 endRule(context, 'ExamplesDefinition');1583 startRule(context, 'ExamplesDefinition');1584 startRule(context, 'Examples');1585 build(context, token);1586 return 18;1587 }1588 if(match_ScenarioLine(context, token)) {1589 endRule(context, 'ExamplesTable');1590 endRule(context, 'Examples');1591 endRule(context, 'ExamplesDefinition');1592 endRule(context, 'Scenario');1593 endRule(context, 'ScenarioDefinition');1594 startRule(context, 'ScenarioDefinition');1595 startRule(context, 'Scenario');1596 build(context, token);1597 return 12;1598 }1599 if(match_RuleLine(context, token)) {1600 endRule(context, 'ExamplesTable');1601 endRule(context, 'Examples');1602 endRule(context, 'ExamplesDefinition');1603 endRule(context, 'Scenario');1604 endRule(context, 'ScenarioDefinition');1605 startRule(context, 'Rule');1606 startRule(context, 'RuleHeader');1607 build(context, token);1608 return 22;1609 }1610 if(match_Comment(context, token)) {1611 build(context, token);1612 return 21;1613 }1614 if(match_Empty(context, token)) {1615 build(context, token);1616 return 21;1617 }1618 1619 var stateComment = "State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";1620 token.detach();1621 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1622 var error = token.isEof ?1623 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1624 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1625 if (self.stopAtFirstError) throw error;1626 addError(context, error);1627 return 21;1628 }1629 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:01630 function matchTokenAt_22(token, context) {1631 if(match_EOF(context, token)) {1632 endRule(context, 'RuleHeader');1633 endRule(context, 'Rule');1634 endRule(context, 'Feature');1635 build(context, token);1636 return 41;1637 }1638 if(match_Empty(context, token)) {1639 build(context, token);1640 return 22;1641 }1642 if(match_Comment(context, token)) {1643 build(context, token);1644 return 24;1645 }1646 if(match_BackgroundLine(context, token)) {1647 endRule(context, 'RuleHeader');1648 startRule(context, 'Background');1649 build(context, token);1650 return 25;1651 }1652 if(match_TagLine(context, token)) {1653 endRule(context, 'RuleHeader');1654 startRule(context, 'ScenarioDefinition');1655 startRule(context, 'Tags');1656 build(context, token);1657 return 30;1658 }1659 if(match_ScenarioLine(context, token)) {1660 endRule(context, 'RuleHeader');1661 startRule(context, 'ScenarioDefinition');1662 startRule(context, 'Scenario');1663 build(context, token);1664 return 31;1665 }1666 if(match_RuleLine(context, token)) {1667 endRule(context, 'RuleHeader');1668 endRule(context, 'Rule');1669 startRule(context, 'Rule');1670 startRule(context, 'RuleHeader');1671 build(context, token);1672 return 22;1673 }1674 if(match_Other(context, token)) {1675 startRule(context, 'Description');1676 build(context, token);1677 return 23;1678 }1679 1680 var stateComment = "State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>#RuleLine:0";1681 token.detach();1682 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1683 var error = token.isEof ?1684 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1685 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1686 if (self.stopAtFirstError) throw error;1687 addError(context, error);1688 return 22;1689 }1690 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:01691 function matchTokenAt_23(token, context) {1692 if(match_EOF(context, token)) {1693 endRule(context, 'Description');1694 endRule(context, 'RuleHeader');1695 endRule(context, 'Rule');1696 endRule(context, 'Feature');1697 build(context, token);1698 return 41;1699 }1700 if(match_Comment(context, token)) {1701 endRule(context, 'Description');1702 build(context, token);1703 return 24;1704 }1705 if(match_BackgroundLine(context, token)) {1706 endRule(context, 'Description');1707 endRule(context, 'RuleHeader');1708 startRule(context, 'Background');1709 build(context, token);1710 return 25;1711 }1712 if(match_TagLine(context, token)) {1713 endRule(context, 'Description');1714 endRule(context, 'RuleHeader');1715 startRule(context, 'ScenarioDefinition');1716 startRule(context, 'Tags');1717 build(context, token);1718 return 30;1719 }1720 if(match_ScenarioLine(context, token)) {1721 endRule(context, 'Description');1722 endRule(context, 'RuleHeader');1723 startRule(context, 'ScenarioDefinition');1724 startRule(context, 'Scenario');1725 build(context, token);1726 return 31;1727 }1728 if(match_RuleLine(context, token)) {1729 endRule(context, 'Description');1730 endRule(context, 'RuleHeader');1731 endRule(context, 'Rule');1732 startRule(context, 'Rule');1733 startRule(context, 'RuleHeader');1734 build(context, token);1735 return 22;1736 }1737 if(match_Other(context, token)) {1738 build(context, token);1739 return 23;1740 }1741 1742 var stateComment = "State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:1>Description:0>#Other:0";1743 token.detach();1744 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1745 var error = token.isEof ?1746 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1747 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1748 if (self.stopAtFirstError) throw error;1749 addError(context, error);1750 return 23;1751 }1752 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:01753 function matchTokenAt_24(token, context) {1754 if(match_EOF(context, token)) {1755 endRule(context, 'RuleHeader');1756 endRule(context, 'Rule');1757 endRule(context, 'Feature');1758 build(context, token);1759 return 41;1760 }1761 if(match_Comment(context, token)) {1762 build(context, token);1763 return 24;1764 }1765 if(match_BackgroundLine(context, token)) {1766 endRule(context, 'RuleHeader');1767 startRule(context, 'Background');1768 build(context, token);1769 return 25;1770 }1771 if(match_TagLine(context, token)) {1772 endRule(context, 'RuleHeader');1773 startRule(context, 'ScenarioDefinition');1774 startRule(context, 'Tags');1775 build(context, token);1776 return 30;1777 }1778 if(match_ScenarioLine(context, token)) {1779 endRule(context, 'RuleHeader');1780 startRule(context, 'ScenarioDefinition');1781 startRule(context, 'Scenario');1782 build(context, token);1783 return 31;1784 }1785 if(match_RuleLine(context, token)) {1786 endRule(context, 'RuleHeader');1787 endRule(context, 'Rule');1788 startRule(context, 'Rule');1789 startRule(context, 'RuleHeader');1790 build(context, token);1791 return 22;1792 }1793 if(match_Empty(context, token)) {1794 build(context, token);1795 return 24;1796 }1797 1798 var stateComment = "State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>DescriptionHelper:2>#Comment:0";1799 token.detach();1800 var expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];1801 var error = token.isEof ?1802 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1803 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1804 if (self.stopAtFirstError) throw error;1805 addError(context, error);1806 return 24;1807 }1808 // GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:01809 function matchTokenAt_25(token, context) {1810 if(match_EOF(context, token)) {1811 endRule(context, 'Background');1812 endRule(context, 'Rule');1813 endRule(context, 'Feature');1814 build(context, token);1815 return 41;1816 }1817 if(match_Empty(context, token)) {1818 build(context, token);1819 return 25;1820 }1821 if(match_Comment(context, token)) {1822 build(context, token);1823 return 27;1824 }1825 if(match_StepLine(context, token)) {1826 startRule(context, 'Step');1827 build(context, token);1828 return 28;1829 }1830 if(match_TagLine(context, token)) {1831 endRule(context, 'Background');1832 startRule(context, 'ScenarioDefinition');1833 startRule(context, 'Tags');1834 build(context, token);1835 return 30;1836 }1837 if(match_ScenarioLine(context, token)) {1838 endRule(context, 'Background');1839 startRule(context, 'ScenarioDefinition');1840 startRule(context, 'Scenario');1841 build(context, token);1842 return 31;1843 }1844 if(match_RuleLine(context, token)) {1845 endRule(context, 'Background');1846 endRule(context, 'Rule');1847 startRule(context, 'Rule');1848 startRule(context, 'RuleHeader');1849 build(context, token);1850 return 22;1851 }1852 if(match_Other(context, token)) {1853 startRule(context, 'Description');1854 build(context, token);1855 return 26;1856 }1857 1858 var stateComment = "State: 25 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0";1859 token.detach();1860 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1861 var error = token.isEof ?1862 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1863 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1864 if (self.stopAtFirstError) throw error;1865 addError(context, error);1866 return 25;1867 }1868 // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:01869 function matchTokenAt_26(token, context) {1870 if(match_EOF(context, token)) {1871 endRule(context, 'Description');1872 endRule(context, 'Background');1873 endRule(context, 'Rule');1874 endRule(context, 'Feature');1875 build(context, token);1876 return 41;1877 }1878 if(match_Comment(context, token)) {1879 endRule(context, 'Description');1880 build(context, token);1881 return 27;1882 }1883 if(match_StepLine(context, token)) {1884 endRule(context, 'Description');1885 startRule(context, 'Step');1886 build(context, token);1887 return 28;1888 }1889 if(match_TagLine(context, token)) {1890 endRule(context, 'Description');1891 endRule(context, 'Background');1892 startRule(context, 'ScenarioDefinition');1893 startRule(context, 'Tags');1894 build(context, token);1895 return 30;1896 }1897 if(match_ScenarioLine(context, token)) {1898 endRule(context, 'Description');1899 endRule(context, 'Background');1900 startRule(context, 'ScenarioDefinition');1901 startRule(context, 'Scenario');1902 build(context, token);1903 return 31;1904 }1905 if(match_RuleLine(context, token)) {1906 endRule(context, 'Description');1907 endRule(context, 'Background');1908 endRule(context, 'Rule');1909 startRule(context, 'Rule');1910 startRule(context, 'RuleHeader');1911 build(context, token);1912 return 22;1913 }1914 if(match_Other(context, token)) {1915 build(context, token);1916 return 26;1917 }1918 1919 var stateComment = "State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";1920 token.detach();1921 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1922 var error = token.isEof ?1923 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1924 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1925 if (self.stopAtFirstError) throw error;1926 addError(context, error);1927 return 26;1928 }1929 // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:01930 function matchTokenAt_27(token, context) {1931 if(match_EOF(context, token)) {1932 endRule(context, 'Background');1933 endRule(context, 'Rule');1934 endRule(context, 'Feature');1935 build(context, token);1936 return 41;1937 }1938 if(match_Comment(context, token)) {1939 build(context, token);1940 return 27;1941 }1942 if(match_StepLine(context, token)) {1943 startRule(context, 'Step');1944 build(context, token);1945 return 28;1946 }1947 if(match_TagLine(context, token)) {1948 endRule(context, 'Background');1949 startRule(context, 'ScenarioDefinition');1950 startRule(context, 'Tags');1951 build(context, token);1952 return 30;1953 }1954 if(match_ScenarioLine(context, token)) {1955 endRule(context, 'Background');1956 startRule(context, 'ScenarioDefinition');1957 startRule(context, 'Scenario');1958 build(context, token);1959 return 31;1960 }1961 if(match_RuleLine(context, token)) {1962 endRule(context, 'Background');1963 endRule(context, 'Rule');1964 startRule(context, 'Rule');1965 startRule(context, 'RuleHeader');1966 build(context, token);1967 return 22;1968 }1969 if(match_Empty(context, token)) {1970 build(context, token);1971 return 27;1972 }1973 1974 var stateComment = "State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0";1975 token.detach();1976 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];1977 var error = token.isEof ?1978 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :1979 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);1980 if (self.stopAtFirstError) throw error;1981 addError(context, error);1982 return 27;1983 }1984 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:01985 function matchTokenAt_28(token, context) {1986 if(match_EOF(context, token)) {1987 endRule(context, 'Step');1988 endRule(context, 'Background');1989 endRule(context, 'Rule');1990 endRule(context, 'Feature');1991 build(context, token);1992 return 41;1993 }1994 if(match_TableRow(context, token)) {1995 startRule(context, 'DataTable');1996 build(context, token);1997 return 29;1998 }1999 if(match_DocStringSeparator(context, token)) {2000 startRule(context, 'DocString');2001 build(context, token);2002 return 44;2003 }2004 if(match_StepLine(context, token)) {2005 endRule(context, 'Step');2006 startRule(context, 'Step');2007 build(context, token);2008 return 28;2009 }2010 if(match_TagLine(context, token)) {2011 endRule(context, 'Step');2012 endRule(context, 'Background');2013 startRule(context, 'ScenarioDefinition');2014 startRule(context, 'Tags');2015 build(context, token);2016 return 30;2017 }2018 if(match_ScenarioLine(context, token)) {2019 endRule(context, 'Step');2020 endRule(context, 'Background');2021 startRule(context, 'ScenarioDefinition');2022 startRule(context, 'Scenario');2023 build(context, token);2024 return 31;2025 }2026 if(match_RuleLine(context, token)) {2027 endRule(context, 'Step');2028 endRule(context, 'Background');2029 endRule(context, 'Rule');2030 startRule(context, 'Rule');2031 startRule(context, 'RuleHeader');2032 build(context, token);2033 return 22;2034 }2035 if(match_Comment(context, token)) {2036 build(context, token);2037 return 28;2038 }2039 if(match_Empty(context, token)) {2040 build(context, token);2041 return 28;2042 }2043 2044 var stateComment = "State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0";2045 token.detach();2046 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2047 var error = token.isEof ?2048 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2049 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2050 if (self.stopAtFirstError) throw error;2051 addError(context, error);2052 return 28;2053 }2054 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02055 function matchTokenAt_29(token, context) {2056 if(match_EOF(context, token)) {2057 endRule(context, 'DataTable');2058 endRule(context, 'Step');2059 endRule(context, 'Background');2060 endRule(context, 'Rule');2061 endRule(context, 'Feature');2062 build(context, token);2063 return 41;2064 }2065 if(match_TableRow(context, token)) {2066 build(context, token);2067 return 29;2068 }2069 if(match_StepLine(context, token)) {2070 endRule(context, 'DataTable');2071 endRule(context, 'Step');2072 startRule(context, 'Step');2073 build(context, token);2074 return 28;2075 }2076 if(match_TagLine(context, token)) {2077 endRule(context, 'DataTable');2078 endRule(context, 'Step');2079 endRule(context, 'Background');2080 startRule(context, 'ScenarioDefinition');2081 startRule(context, 'Tags');2082 build(context, token);2083 return 30;2084 }2085 if(match_ScenarioLine(context, token)) {2086 endRule(context, 'DataTable');2087 endRule(context, 'Step');2088 endRule(context, 'Background');2089 startRule(context, 'ScenarioDefinition');2090 startRule(context, 'Scenario');2091 build(context, token);2092 return 31;2093 }2094 if(match_RuleLine(context, token)) {2095 endRule(context, 'DataTable');2096 endRule(context, 'Step');2097 endRule(context, 'Background');2098 endRule(context, 'Rule');2099 startRule(context, 'Rule');2100 startRule(context, 'RuleHeader');2101 build(context, token);2102 return 22;2103 }2104 if(match_Comment(context, token)) {2105 build(context, token);2106 return 29;2107 }2108 if(match_Empty(context, token)) {2109 build(context, token);2110 return 29;2111 }2112 2113 var stateComment = "State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2114 token.detach();2115 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2116 var error = token.isEof ?2117 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2118 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2119 if (self.stopAtFirstError) throw error;2120 addError(context, error);2121 return 29;2122 }2123 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:02124 function matchTokenAt_30(token, context) {2125 if(match_TagLine(context, token)) {2126 build(context, token);2127 return 30;2128 }2129 if(match_ScenarioLine(context, token)) {2130 endRule(context, 'Tags');2131 startRule(context, 'Scenario');2132 build(context, token);2133 return 31;2134 }2135 if(match_Comment(context, token)) {2136 build(context, token);2137 return 30;2138 }2139 if(match_Empty(context, token)) {2140 build(context, token);2141 return 30;2142 }2143 2144 var stateComment = "State: 30 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0";2145 token.detach();2146 var expectedTokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"];2147 var error = token.isEof ?2148 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2149 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2150 if (self.stopAtFirstError) throw error;2151 addError(context, error);2152 return 30;2153 }2154 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:02155 function matchTokenAt_31(token, context) {2156 if(match_EOF(context, token)) {2157 endRule(context, 'Scenario');2158 endRule(context, 'ScenarioDefinition');2159 endRule(context, 'Rule');2160 endRule(context, 'Feature');2161 build(context, token);2162 return 41;2163 }2164 if(match_Empty(context, token)) {2165 build(context, token);2166 return 31;2167 }2168 if(match_Comment(context, token)) {2169 build(context, token);2170 return 33;2171 }2172 if(match_StepLine(context, token)) {2173 startRule(context, 'Step');2174 build(context, token);2175 return 34;2176 }2177 if(match_TagLine(context, token)) {2178 if(lookahead_0(context, token)) {2179 startRule(context, 'ExamplesDefinition');2180 startRule(context, 'Tags');2181 build(context, token);2182 return 36;2183 }2184 }2185 if(match_TagLine(context, token)) {2186 endRule(context, 'Scenario');2187 endRule(context, 'ScenarioDefinition');2188 startRule(context, 'ScenarioDefinition');2189 startRule(context, 'Tags');2190 build(context, token);2191 return 30;2192 }2193 if(match_ExamplesLine(context, token)) {2194 startRule(context, 'ExamplesDefinition');2195 startRule(context, 'Examples');2196 build(context, token);2197 return 37;2198 }2199 if(match_ScenarioLine(context, token)) {2200 endRule(context, 'Scenario');2201 endRule(context, 'ScenarioDefinition');2202 startRule(context, 'ScenarioDefinition');2203 startRule(context, 'Scenario');2204 build(context, token);2205 return 31;2206 }2207 if(match_RuleLine(context, token)) {2208 endRule(context, 'Scenario');2209 endRule(context, 'ScenarioDefinition');2210 endRule(context, 'Rule');2211 startRule(context, 'Rule');2212 startRule(context, 'RuleHeader');2213 build(context, token);2214 return 22;2215 }2216 if(match_Other(context, token)) {2217 startRule(context, 'Description');2218 build(context, token);2219 return 32;2220 }2221 2222 var stateComment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";2223 token.detach();2224 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2225 var error = token.isEof ?2226 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2227 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2228 if (self.stopAtFirstError) throw error;2229 addError(context, error);2230 return 31;2231 }2232 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:02233 function matchTokenAt_32(token, context) {2234 if(match_EOF(context, token)) {2235 endRule(context, 'Description');2236 endRule(context, 'Scenario');2237 endRule(context, 'ScenarioDefinition');2238 endRule(context, 'Rule');2239 endRule(context, 'Feature');2240 build(context, token);2241 return 41;2242 }2243 if(match_Comment(context, token)) {2244 endRule(context, 'Description');2245 build(context, token);2246 return 33;2247 }2248 if(match_StepLine(context, token)) {2249 endRule(context, 'Description');2250 startRule(context, 'Step');2251 build(context, token);2252 return 34;2253 }2254 if(match_TagLine(context, token)) {2255 if(lookahead_0(context, token)) {2256 endRule(context, 'Description');2257 startRule(context, 'ExamplesDefinition');2258 startRule(context, 'Tags');2259 build(context, token);2260 return 36;2261 }2262 }2263 if(match_TagLine(context, token)) {2264 endRule(context, 'Description');2265 endRule(context, 'Scenario');2266 endRule(context, 'ScenarioDefinition');2267 startRule(context, 'ScenarioDefinition');2268 startRule(context, 'Tags');2269 build(context, token);2270 return 30;2271 }2272 if(match_ExamplesLine(context, token)) {2273 endRule(context, 'Description');2274 startRule(context, 'ExamplesDefinition');2275 startRule(context, 'Examples');2276 build(context, token);2277 return 37;2278 }2279 if(match_ScenarioLine(context, token)) {2280 endRule(context, 'Description');2281 endRule(context, 'Scenario');2282 endRule(context, 'ScenarioDefinition');2283 startRule(context, 'ScenarioDefinition');2284 startRule(context, 'Scenario');2285 build(context, token);2286 return 31;2287 }2288 if(match_RuleLine(context, token)) {2289 endRule(context, 'Description');2290 endRule(context, 'Scenario');2291 endRule(context, 'ScenarioDefinition');2292 endRule(context, 'Rule');2293 startRule(context, 'Rule');2294 startRule(context, 'RuleHeader');2295 build(context, token);2296 return 22;2297 }2298 if(match_Other(context, token)) {2299 build(context, token);2300 return 32;2301 }2302 2303 var stateComment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";2304 token.detach();2305 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2306 var error = token.isEof ?2307 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2308 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2309 if (self.stopAtFirstError) throw error;2310 addError(context, error);2311 return 32;2312 }2313 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:02314 function matchTokenAt_33(token, context) {2315 if(match_EOF(context, token)) {2316 endRule(context, 'Scenario');2317 endRule(context, 'ScenarioDefinition');2318 endRule(context, 'Rule');2319 endRule(context, 'Feature');2320 build(context, token);2321 return 41;2322 }2323 if(match_Comment(context, token)) {2324 build(context, token);2325 return 33;2326 }2327 if(match_StepLine(context, token)) {2328 startRule(context, 'Step');2329 build(context, token);2330 return 34;2331 }2332 if(match_TagLine(context, token)) {2333 if(lookahead_0(context, token)) {2334 startRule(context, 'ExamplesDefinition');2335 startRule(context, 'Tags');2336 build(context, token);2337 return 36;2338 }2339 }2340 if(match_TagLine(context, token)) {2341 endRule(context, 'Scenario');2342 endRule(context, 'ScenarioDefinition');2343 startRule(context, 'ScenarioDefinition');2344 startRule(context, 'Tags');2345 build(context, token);2346 return 30;2347 }2348 if(match_ExamplesLine(context, token)) {2349 startRule(context, 'ExamplesDefinition');2350 startRule(context, 'Examples');2351 build(context, token);2352 return 37;2353 }2354 if(match_ScenarioLine(context, token)) {2355 endRule(context, 'Scenario');2356 endRule(context, 'ScenarioDefinition');2357 startRule(context, 'ScenarioDefinition');2358 startRule(context, 'Scenario');2359 build(context, token);2360 return 31;2361 }2362 if(match_RuleLine(context, token)) {2363 endRule(context, 'Scenario');2364 endRule(context, 'ScenarioDefinition');2365 endRule(context, 'Rule');2366 startRule(context, 'Rule');2367 startRule(context, 'RuleHeader');2368 build(context, token);2369 return 22;2370 }2371 if(match_Empty(context, token)) {2372 build(context, token);2373 return 33;2374 }2375 2376 var stateComment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";2377 token.detach();2378 var expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];2379 var error = token.isEof ?2380 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2381 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2382 if (self.stopAtFirstError) throw error;2383 addError(context, error);2384 return 33;2385 }2386 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:02387 function matchTokenAt_34(token, context) {2388 if(match_EOF(context, token)) {2389 endRule(context, 'Step');2390 endRule(context, 'Scenario');2391 endRule(context, 'ScenarioDefinition');2392 endRule(context, 'Rule');2393 endRule(context, 'Feature');2394 build(context, token);2395 return 41;2396 }2397 if(match_TableRow(context, token)) {2398 startRule(context, 'DataTable');2399 build(context, token);2400 return 35;2401 }2402 if(match_DocStringSeparator(context, token)) {2403 startRule(context, 'DocString');2404 build(context, token);2405 return 42;2406 }2407 if(match_StepLine(context, token)) {2408 endRule(context, 'Step');2409 startRule(context, 'Step');2410 build(context, token);2411 return 34;2412 }2413 if(match_TagLine(context, token)) {2414 if(lookahead_0(context, token)) {2415 endRule(context, 'Step');2416 startRule(context, 'ExamplesDefinition');2417 startRule(context, 'Tags');2418 build(context, token);2419 return 36;2420 }2421 }2422 if(match_TagLine(context, token)) {2423 endRule(context, 'Step');2424 endRule(context, 'Scenario');2425 endRule(context, 'ScenarioDefinition');2426 startRule(context, 'ScenarioDefinition');2427 startRule(context, 'Tags');2428 build(context, token);2429 return 30;2430 }2431 if(match_ExamplesLine(context, token)) {2432 endRule(context, 'Step');2433 startRule(context, 'ExamplesDefinition');2434 startRule(context, 'Examples');2435 build(context, token);2436 return 37;2437 }2438 if(match_ScenarioLine(context, token)) {2439 endRule(context, 'Step');2440 endRule(context, 'Scenario');2441 endRule(context, 'ScenarioDefinition');2442 startRule(context, 'ScenarioDefinition');2443 startRule(context, 'Scenario');2444 build(context, token);2445 return 31;2446 }2447 if(match_RuleLine(context, token)) {2448 endRule(context, 'Step');2449 endRule(context, 'Scenario');2450 endRule(context, 'ScenarioDefinition');2451 endRule(context, 'Rule');2452 startRule(context, 'Rule');2453 startRule(context, 'RuleHeader');2454 build(context, token);2455 return 22;2456 }2457 if(match_Comment(context, token)) {2458 build(context, token);2459 return 34;2460 }2461 if(match_Empty(context, token)) {2462 build(context, token);2463 return 34;2464 }2465 2466 var stateComment = "State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";2467 token.detach();2468 var expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2469 var error = token.isEof ?2470 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2471 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2472 if (self.stopAtFirstError) throw error;2473 addError(context, error);2474 return 34;2475 }2476 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02477 function matchTokenAt_35(token, context) {2478 if(match_EOF(context, token)) {2479 endRule(context, 'DataTable');2480 endRule(context, 'Step');2481 endRule(context, 'Scenario');2482 endRule(context, 'ScenarioDefinition');2483 endRule(context, 'Rule');2484 endRule(context, 'Feature');2485 build(context, token);2486 return 41;2487 }2488 if(match_TableRow(context, token)) {2489 build(context, token);2490 return 35;2491 }2492 if(match_StepLine(context, token)) {2493 endRule(context, 'DataTable');2494 endRule(context, 'Step');2495 startRule(context, 'Step');2496 build(context, token);2497 return 34;2498 }2499 if(match_TagLine(context, token)) {2500 if(lookahead_0(context, token)) {2501 endRule(context, 'DataTable');2502 endRule(context, 'Step');2503 startRule(context, 'ExamplesDefinition');2504 startRule(context, 'Tags');2505 build(context, token);2506 return 36;2507 }2508 }2509 if(match_TagLine(context, token)) {2510 endRule(context, 'DataTable');2511 endRule(context, 'Step');2512 endRule(context, 'Scenario');2513 endRule(context, 'ScenarioDefinition');2514 startRule(context, 'ScenarioDefinition');2515 startRule(context, 'Tags');2516 build(context, token);2517 return 30;2518 }2519 if(match_ExamplesLine(context, token)) {2520 endRule(context, 'DataTable');2521 endRule(context, 'Step');2522 startRule(context, 'ExamplesDefinition');2523 startRule(context, 'Examples');2524 build(context, token);2525 return 37;2526 }2527 if(match_ScenarioLine(context, token)) {2528 endRule(context, 'DataTable');2529 endRule(context, 'Step');2530 endRule(context, 'Scenario');2531 endRule(context, 'ScenarioDefinition');2532 startRule(context, 'ScenarioDefinition');2533 startRule(context, 'Scenario');2534 build(context, token);2535 return 31;2536 }2537 if(match_RuleLine(context, token)) {2538 endRule(context, 'DataTable');2539 endRule(context, 'Step');2540 endRule(context, 'Scenario');2541 endRule(context, 'ScenarioDefinition');2542 endRule(context, 'Rule');2543 startRule(context, 'Rule');2544 startRule(context, 'RuleHeader');2545 build(context, token);2546 return 22;2547 }2548 if(match_Comment(context, token)) {2549 build(context, token);2550 return 35;2551 }2552 if(match_Empty(context, token)) {2553 build(context, token);2554 return 35;2555 }2556 2557 var stateComment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2558 token.detach();2559 var expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2560 var error = token.isEof ?2561 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2562 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2563 if (self.stopAtFirstError) throw error;2564 addError(context, error);2565 return 35;2566 }2567 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:02568 function matchTokenAt_36(token, context) {2569 if(match_TagLine(context, token)) {2570 build(context, token);2571 return 36;2572 }2573 if(match_ExamplesLine(context, token)) {2574 endRule(context, 'Tags');2575 startRule(context, 'Examples');2576 build(context, token);2577 return 37;2578 }2579 if(match_Comment(context, token)) {2580 build(context, token);2581 return 36;2582 }2583 if(match_Empty(context, token)) {2584 build(context, token);2585 return 36;2586 }2587 2588 var stateComment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";2589 token.detach();2590 var expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];2591 var error = token.isEof ?2592 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2593 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2594 if (self.stopAtFirstError) throw error;2595 addError(context, error);2596 return 36;2597 }2598 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:02599 function matchTokenAt_37(token, context) {2600 if(match_EOF(context, token)) {2601 endRule(context, 'Examples');2602 endRule(context, 'ExamplesDefinition');2603 endRule(context, 'Scenario');2604 endRule(context, 'ScenarioDefinition');2605 endRule(context, 'Rule');2606 endRule(context, 'Feature');2607 build(context, token);2608 return 41;2609 }2610 if(match_Empty(context, token)) {2611 build(context, token);2612 return 37;2613 }2614 if(match_Comment(context, token)) {2615 build(context, token);2616 return 39;2617 }2618 if(match_TableRow(context, token)) {2619 startRule(context, 'ExamplesTable');2620 build(context, token);2621 return 40;2622 }2623 if(match_TagLine(context, token)) {2624 if(lookahead_0(context, token)) {2625 endRule(context, 'Examples');2626 endRule(context, 'ExamplesDefinition');2627 startRule(context, 'ExamplesDefinition');2628 startRule(context, 'Tags');2629 build(context, token);2630 return 36;2631 }2632 }2633 if(match_TagLine(context, token)) {2634 endRule(context, 'Examples');2635 endRule(context, 'ExamplesDefinition');2636 endRule(context, 'Scenario');2637 endRule(context, 'ScenarioDefinition');2638 startRule(context, 'ScenarioDefinition');2639 startRule(context, 'Tags');2640 build(context, token);2641 return 30;2642 }2643 if(match_ExamplesLine(context, token)) {2644 endRule(context, 'Examples');2645 endRule(context, 'ExamplesDefinition');2646 startRule(context, 'ExamplesDefinition');2647 startRule(context, 'Examples');2648 build(context, token);2649 return 37;2650 }2651 if(match_ScenarioLine(context, token)) {2652 endRule(context, 'Examples');2653 endRule(context, 'ExamplesDefinition');2654 endRule(context, 'Scenario');2655 endRule(context, 'ScenarioDefinition');2656 startRule(context, 'ScenarioDefinition');2657 startRule(context, 'Scenario');2658 build(context, token);2659 return 31;2660 }2661 if(match_RuleLine(context, token)) {2662 endRule(context, 'Examples');2663 endRule(context, 'ExamplesDefinition');2664 endRule(context, 'Scenario');2665 endRule(context, 'ScenarioDefinition');2666 endRule(context, 'Rule');2667 startRule(context, 'Rule');2668 startRule(context, 'RuleHeader');2669 build(context, token);2670 return 22;2671 }2672 if(match_Other(context, token)) {2673 startRule(context, 'Description');2674 build(context, token);2675 return 38;2676 }2677 2678 var stateComment = "State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";2679 token.detach();2680 var expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2681 var error = token.isEof ?2682 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2683 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2684 if (self.stopAtFirstError) throw error;2685 addError(context, error);2686 return 37;2687 }2688 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:02689 function matchTokenAt_38(token, context) {2690 if(match_EOF(context, token)) {2691 endRule(context, 'Description');2692 endRule(context, 'Examples');2693 endRule(context, 'ExamplesDefinition');2694 endRule(context, 'Scenario');2695 endRule(context, 'ScenarioDefinition');2696 endRule(context, 'Rule');2697 endRule(context, 'Feature');2698 build(context, token);2699 return 41;2700 }2701 if(match_Comment(context, token)) {2702 endRule(context, 'Description');2703 build(context, token);2704 return 39;2705 }2706 if(match_TableRow(context, token)) {2707 endRule(context, 'Description');2708 startRule(context, 'ExamplesTable');2709 build(context, token);2710 return 40;2711 }2712 if(match_TagLine(context, token)) {2713 if(lookahead_0(context, token)) {2714 endRule(context, 'Description');2715 endRule(context, 'Examples');2716 endRule(context, 'ExamplesDefinition');2717 startRule(context, 'ExamplesDefinition');2718 startRule(context, 'Tags');2719 build(context, token);2720 return 36;2721 }2722 }2723 if(match_TagLine(context, token)) {2724 endRule(context, 'Description');2725 endRule(context, 'Examples');2726 endRule(context, 'ExamplesDefinition');2727 endRule(context, 'Scenario');2728 endRule(context, 'ScenarioDefinition');2729 startRule(context, 'ScenarioDefinition');2730 startRule(context, 'Tags');2731 build(context, token);2732 return 30;2733 }2734 if(match_ExamplesLine(context, token)) {2735 endRule(context, 'Description');2736 endRule(context, 'Examples');2737 endRule(context, 'ExamplesDefinition');2738 startRule(context, 'ExamplesDefinition');2739 startRule(context, 'Examples');2740 build(context, token);2741 return 37;2742 }2743 if(match_ScenarioLine(context, token)) {2744 endRule(context, 'Description');2745 endRule(context, 'Examples');2746 endRule(context, 'ExamplesDefinition');2747 endRule(context, 'Scenario');2748 endRule(context, 'ScenarioDefinition');2749 startRule(context, 'ScenarioDefinition');2750 startRule(context, 'Scenario');2751 build(context, token);2752 return 31;2753 }2754 if(match_RuleLine(context, token)) {2755 endRule(context, 'Description');2756 endRule(context, 'Examples');2757 endRule(context, 'ExamplesDefinition');2758 endRule(context, 'Scenario');2759 endRule(context, 'ScenarioDefinition');2760 endRule(context, 'Rule');2761 startRule(context, 'Rule');2762 startRule(context, 'RuleHeader');2763 build(context, token);2764 return 22;2765 }2766 if(match_Other(context, token)) {2767 build(context, token);2768 return 38;2769 }2770 2771 var stateComment = "State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";2772 token.detach();2773 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2774 var error = token.isEof ?2775 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2776 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2777 if (self.stopAtFirstError) throw error;2778 addError(context, error);2779 return 38;2780 }2781 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:02782 function matchTokenAt_39(token, context) {2783 if(match_EOF(context, token)) {2784 endRule(context, 'Examples');2785 endRule(context, 'ExamplesDefinition');2786 endRule(context, 'Scenario');2787 endRule(context, 'ScenarioDefinition');2788 endRule(context, 'Rule');2789 endRule(context, 'Feature');2790 build(context, token);2791 return 41;2792 }2793 if(match_Comment(context, token)) {2794 build(context, token);2795 return 39;2796 }2797 if(match_TableRow(context, token)) {2798 startRule(context, 'ExamplesTable');2799 build(context, token);2800 return 40;2801 }2802 if(match_TagLine(context, token)) {2803 if(lookahead_0(context, token)) {2804 endRule(context, 'Examples');2805 endRule(context, 'ExamplesDefinition');2806 startRule(context, 'ExamplesDefinition');2807 startRule(context, 'Tags');2808 build(context, token);2809 return 36;2810 }2811 }2812 if(match_TagLine(context, token)) {2813 endRule(context, 'Examples');2814 endRule(context, 'ExamplesDefinition');2815 endRule(context, 'Scenario');2816 endRule(context, 'ScenarioDefinition');2817 startRule(context, 'ScenarioDefinition');2818 startRule(context, 'Tags');2819 build(context, token);2820 return 30;2821 }2822 if(match_ExamplesLine(context, token)) {2823 endRule(context, 'Examples');2824 endRule(context, 'ExamplesDefinition');2825 startRule(context, 'ExamplesDefinition');2826 startRule(context, 'Examples');2827 build(context, token);2828 return 37;2829 }2830 if(match_ScenarioLine(context, token)) {2831 endRule(context, 'Examples');2832 endRule(context, 'ExamplesDefinition');2833 endRule(context, 'Scenario');2834 endRule(context, 'ScenarioDefinition');2835 startRule(context, 'ScenarioDefinition');2836 startRule(context, 'Scenario');2837 build(context, token);2838 return 31;2839 }2840 if(match_RuleLine(context, token)) {2841 endRule(context, 'Examples');2842 endRule(context, 'ExamplesDefinition');2843 endRule(context, 'Scenario');2844 endRule(context, 'ScenarioDefinition');2845 endRule(context, 'Rule');2846 startRule(context, 'Rule');2847 startRule(context, 'RuleHeader');2848 build(context, token);2849 return 22;2850 }2851 if(match_Empty(context, token)) {2852 build(context, token);2853 return 39;2854 }2855 2856 var stateComment = "State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";2857 token.detach();2858 var expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];2859 var error = token.isEof ?2860 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2861 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2862 if (self.stopAtFirstError) throw error;2863 addError(context, error);2864 return 39;2865 }2866 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:02867 function matchTokenAt_40(token, context) {2868 if(match_EOF(context, token)) {2869 endRule(context, 'ExamplesTable');2870 endRule(context, 'Examples');2871 endRule(context, 'ExamplesDefinition');2872 endRule(context, 'Scenario');2873 endRule(context, 'ScenarioDefinition');2874 endRule(context, 'Rule');2875 endRule(context, 'Feature');2876 build(context, token);2877 return 41;2878 }2879 if(match_TableRow(context, token)) {2880 build(context, token);2881 return 40;2882 }2883 if(match_TagLine(context, token)) {2884 if(lookahead_0(context, token)) {2885 endRule(context, 'ExamplesTable');2886 endRule(context, 'Examples');2887 endRule(context, 'ExamplesDefinition');2888 startRule(context, 'ExamplesDefinition');2889 startRule(context, 'Tags');2890 build(context, token);2891 return 36;2892 }2893 }2894 if(match_TagLine(context, token)) {2895 endRule(context, 'ExamplesTable');2896 endRule(context, 'Examples');2897 endRule(context, 'ExamplesDefinition');2898 endRule(context, 'Scenario');2899 endRule(context, 'ScenarioDefinition');2900 startRule(context, 'ScenarioDefinition');2901 startRule(context, 'Tags');2902 build(context, token);2903 return 30;2904 }2905 if(match_ExamplesLine(context, token)) {2906 endRule(context, 'ExamplesTable');2907 endRule(context, 'Examples');2908 endRule(context, 'ExamplesDefinition');2909 startRule(context, 'ExamplesDefinition');2910 startRule(context, 'Examples');2911 build(context, token);2912 return 37;2913 }2914 if(match_ScenarioLine(context, token)) {2915 endRule(context, 'ExamplesTable');2916 endRule(context, 'Examples');2917 endRule(context, 'ExamplesDefinition');2918 endRule(context, 'Scenario');2919 endRule(context, 'ScenarioDefinition');2920 startRule(context, 'ScenarioDefinition');2921 startRule(context, 'Scenario');2922 build(context, token);2923 return 31;2924 }2925 if(match_RuleLine(context, token)) {2926 endRule(context, 'ExamplesTable');2927 endRule(context, 'Examples');2928 endRule(context, 'ExamplesDefinition');2929 endRule(context, 'Scenario');2930 endRule(context, 'ScenarioDefinition');2931 endRule(context, 'Rule');2932 startRule(context, 'Rule');2933 startRule(context, 'RuleHeader');2934 build(context, token);2935 return 22;2936 }2937 if(match_Comment(context, token)) {2938 build(context, token);2939 return 40;2940 }2941 if(match_Empty(context, token)) {2942 build(context, token);2943 return 40;2944 }2945 2946 var stateComment = "State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";2947 token.detach();2948 var expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2949 var error = token.isEof ?2950 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2951 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2952 if (self.stopAtFirstError) throw error;2953 addError(context, error);2954 return 40;2955 }2956 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:02957 function matchTokenAt_42(token, context) {2958 if(match_DocStringSeparator(context, token)) {2959 build(context, token);2960 return 43;2961 }2962 if(match_Other(context, token)) {2963 build(context, token);2964 return 42;2965 }2966 2967 var stateComment = "State: 42 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";2968 token.detach();2969 var expectedTokens = ["#DocStringSeparator", "#Other"];2970 var error = token.isEof ?2971 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :2972 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);2973 if (self.stopAtFirstError) throw error;2974 addError(context, error);2975 return 42;2976 }2977 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:02978 function matchTokenAt_43(token, context) {2979 if(match_EOF(context, token)) {2980 endRule(context, 'DocString');2981 endRule(context, 'Step');2982 endRule(context, 'Scenario');2983 endRule(context, 'ScenarioDefinition');2984 endRule(context, 'Rule');2985 endRule(context, 'Feature');2986 build(context, token);2987 return 41;2988 }2989 if(match_StepLine(context, token)) {2990 endRule(context, 'DocString');2991 endRule(context, 'Step');2992 startRule(context, 'Step');2993 build(context, token);2994 return 34;2995 }2996 if(match_TagLine(context, token)) {2997 if(lookahead_0(context, token)) {2998 endRule(context, 'DocString');2999 endRule(context, 'Step');3000 startRule(context, 'ExamplesDefinition');3001 startRule(context, 'Tags');3002 build(context, token);3003 return 36;3004 }3005 }3006 if(match_TagLine(context, token)) {3007 endRule(context, 'DocString');3008 endRule(context, 'Step');3009 endRule(context, 'Scenario');3010 endRule(context, 'ScenarioDefinition');3011 startRule(context, 'ScenarioDefinition');3012 startRule(context, 'Tags');3013 build(context, token);3014 return 30;3015 }3016 if(match_ExamplesLine(context, token)) {3017 endRule(context, 'DocString');3018 endRule(context, 'Step');3019 startRule(context, 'ExamplesDefinition');3020 startRule(context, 'Examples');3021 build(context, token);3022 return 37;3023 }3024 if(match_ScenarioLine(context, token)) {3025 endRule(context, 'DocString');3026 endRule(context, 'Step');3027 endRule(context, 'Scenario');3028 endRule(context, 'ScenarioDefinition');3029 startRule(context, 'ScenarioDefinition');3030 startRule(context, 'Scenario');3031 build(context, token);3032 return 31;3033 }3034 if(match_RuleLine(context, token)) {3035 endRule(context, 'DocString');3036 endRule(context, 'Step');3037 endRule(context, 'Scenario');3038 endRule(context, 'ScenarioDefinition');3039 endRule(context, 'Rule');3040 startRule(context, 'Rule');3041 startRule(context, 'RuleHeader');3042 build(context, token);3043 return 22;3044 }3045 if(match_Comment(context, token)) {3046 build(context, token);3047 return 43;3048 }3049 if(match_Empty(context, token)) {3050 build(context, token);3051 return 43;3052 }3053 3054 var stateComment = "State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3055 token.detach();3056 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3057 var error = token.isEof ?3058 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3059 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3060 if (self.stopAtFirstError) throw error;3061 addError(context, error);3062 return 43;3063 }3064 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03065 function matchTokenAt_44(token, context) {3066 if(match_DocStringSeparator(context, token)) {3067 build(context, token);3068 return 45;3069 }3070 if(match_Other(context, token)) {3071 build(context, token);3072 return 44;3073 }3074 3075 var stateComment = "State: 44 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3076 token.detach();3077 var expectedTokens = ["#DocStringSeparator", "#Other"];3078 var error = token.isEof ?3079 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3080 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3081 if (self.stopAtFirstError) throw error;3082 addError(context, error);3083 return 44;3084 }3085 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03086 function matchTokenAt_45(token, context) {3087 if(match_EOF(context, token)) {3088 endRule(context, 'DocString');3089 endRule(context, 'Step');3090 endRule(context, 'Background');3091 endRule(context, 'Rule');3092 endRule(context, 'Feature');3093 build(context, token);3094 return 41;3095 }3096 if(match_StepLine(context, token)) {3097 endRule(context, 'DocString');3098 endRule(context, 'Step');3099 startRule(context, 'Step');3100 build(context, token);3101 return 28;3102 }3103 if(match_TagLine(context, token)) {3104 endRule(context, 'DocString');3105 endRule(context, 'Step');3106 endRule(context, 'Background');3107 startRule(context, 'ScenarioDefinition');3108 startRule(context, 'Tags');3109 build(context, token);3110 return 30;3111 }3112 if(match_ScenarioLine(context, token)) {3113 endRule(context, 'DocString');3114 endRule(context, 'Step');3115 endRule(context, 'Background');3116 startRule(context, 'ScenarioDefinition');3117 startRule(context, 'Scenario');3118 build(context, token);3119 return 31;3120 }3121 if(match_RuleLine(context, token)) {3122 endRule(context, 'DocString');3123 endRule(context, 'Step');3124 endRule(context, 'Background');3125 endRule(context, 'Rule');3126 startRule(context, 'Rule');3127 startRule(context, 'RuleHeader');3128 build(context, token);3129 return 22;3130 }3131 if(match_Comment(context, token)) {3132 build(context, token);3133 return 45;3134 }3135 if(match_Empty(context, token)) {3136 build(context, token);3137 return 45;3138 }3139 3140 var stateComment = "State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3141 token.detach();3142 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3143 var error = token.isEof ?3144 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3145 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3146 if (self.stopAtFirstError) throw error;3147 addError(context, error);3148 return 45;3149 }3150 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03151 function matchTokenAt_46(token, context) {3152 if(match_DocStringSeparator(context, token)) {3153 build(context, token);3154 return 47;3155 }3156 if(match_Other(context, token)) {3157 build(context, token);3158 return 46;3159 }3160 3161 var stateComment = "State: 46 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3162 token.detach();3163 var expectedTokens = ["#DocStringSeparator", "#Other"];3164 var error = token.isEof ?3165 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3166 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3167 if (self.stopAtFirstError) throw error;3168 addError(context, error);3169 return 46;3170 }3171 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03172 function matchTokenAt_47(token, context) {3173 if(match_EOF(context, token)) {3174 endRule(context, 'DocString');3175 endRule(context, 'Step');3176 endRule(context, 'Scenario');3177 endRule(context, 'ScenarioDefinition');3178 endRule(context, 'Feature');3179 build(context, token);3180 return 41;3181 }3182 if(match_StepLine(context, token)) {3183 endRule(context, 'DocString');3184 endRule(context, 'Step');3185 startRule(context, 'Step');3186 build(context, token);3187 return 15;3188 }3189 if(match_TagLine(context, token)) {3190 if(lookahead_0(context, token)) {3191 endRule(context, 'DocString');3192 endRule(context, 'Step');3193 startRule(context, 'ExamplesDefinition');3194 startRule(context, 'Tags');3195 build(context, token);3196 return 17;3197 }3198 }3199 if(match_TagLine(context, token)) {3200 endRule(context, 'DocString');3201 endRule(context, 'Step');3202 endRule(context, 'Scenario');3203 endRule(context, 'ScenarioDefinition');3204 startRule(context, 'ScenarioDefinition');3205 startRule(context, 'Tags');3206 build(context, token);3207 return 11;3208 }3209 if(match_ExamplesLine(context, token)) {3210 endRule(context, 'DocString');3211 endRule(context, 'Step');3212 startRule(context, 'ExamplesDefinition');3213 startRule(context, 'Examples');3214 build(context, token);3215 return 18;3216 }3217 if(match_ScenarioLine(context, token)) {3218 endRule(context, 'DocString');3219 endRule(context, 'Step');3220 endRule(context, 'Scenario');3221 endRule(context, 'ScenarioDefinition');3222 startRule(context, 'ScenarioDefinition');3223 startRule(context, 'Scenario');3224 build(context, token);3225 return 12;3226 }3227 if(match_RuleLine(context, token)) {3228 endRule(context, 'DocString');3229 endRule(context, 'Step');3230 endRule(context, 'Scenario');3231 endRule(context, 'ScenarioDefinition');3232 startRule(context, 'Rule');3233 startRule(context, 'RuleHeader');3234 build(context, token);3235 return 22;3236 }3237 if(match_Comment(context, token)) {3238 build(context, token);3239 return 47;3240 }3241 if(match_Empty(context, token)) {3242 build(context, token);3243 return 47;3244 }3245 3246 var stateComment = "State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3247 token.detach();3248 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3249 var error = token.isEof ?3250 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3251 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3252 if (self.stopAtFirstError) throw error;3253 addError(context, error);3254 return 47;3255 }3256 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03257 function matchTokenAt_48(token, context) {3258 if(match_DocStringSeparator(context, token)) {3259 build(context, token);3260 return 49;3261 }3262 if(match_Other(context, token)) {3263 build(context, token);3264 return 48;3265 }3266 3267 var stateComment = "State: 48 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3268 token.detach();3269 var expectedTokens = ["#DocStringSeparator", "#Other"];3270 var error = token.isEof ?3271 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3272 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3273 if (self.stopAtFirstError) throw error;3274 addError(context, error);3275 return 48;3276 }3277 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03278 function matchTokenAt_49(token, context) {3279 if(match_EOF(context, token)) {3280 endRule(context, 'DocString');3281 endRule(context, 'Step');3282 endRule(context, 'Background');3283 endRule(context, 'Feature');3284 build(context, token);3285 return 41;3286 }3287 if(match_StepLine(context, token)) {3288 endRule(context, 'DocString');3289 endRule(context, 'Step');3290 startRule(context, 'Step');3291 build(context, token);3292 return 9;3293 }3294 if(match_TagLine(context, token)) {3295 endRule(context, 'DocString');3296 endRule(context, 'Step');3297 endRule(context, 'Background');3298 startRule(context, 'ScenarioDefinition');3299 startRule(context, 'Tags');3300 build(context, token);3301 return 11;3302 }3303 if(match_ScenarioLine(context, token)) {3304 endRule(context, 'DocString');3305 endRule(context, 'Step');3306 endRule(context, 'Background');3307 startRule(context, 'ScenarioDefinition');3308 startRule(context, 'Scenario');3309 build(context, token);3310 return 12;3311 }3312 if(match_RuleLine(context, token)) {3313 endRule(context, 'DocString');3314 endRule(context, 'Step');3315 endRule(context, 'Background');3316 startRule(context, 'Rule');3317 startRule(context, 'RuleHeader');3318 build(context, token);3319 return 22;3320 }3321 if(match_Comment(context, token)) {3322 build(context, token);3323 return 49;3324 }3325 if(match_Empty(context, token)) {3326 build(context, token);3327 return 49;3328 }3329 3330 var stateComment = "State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3331 token.detach();3332 var expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3333 var error = token.isEof ?3334 Errors.UnexpectedEOFException.create(token, expectedTokens, stateComment) :3335 Errors.UnexpectedTokenException.create(token, expectedTokens, stateComment);3336 if (self.stopAtFirstError) throw error;3337 addError(context, error);3338 return 49;3339 }3340 function match_EOF(context, token) {3341 return handleExternalError(context, false, function () {3342 return context.tokenMatcher.match_EOF(token);3343 });3344 }3345 function match_Empty(context, token) {3346 if(token.isEof) return false;3347 return handleExternalError(context, false, function () {3348 return context.tokenMatcher.match_Empty(token);3349 });3350 }3351 function match_Comment(context, token) {3352 if(token.isEof) return false;3353 return handleExternalError(context, false, function () {3354 return context.tokenMatcher.match_Comment(token);3355 });3356 }3357 function match_TagLine(context, token) {3358 if(token.isEof) return false;3359 return handleExternalError(context, false, function () {3360 return context.tokenMatcher.match_TagLine(token);3361 });3362 }3363 function match_FeatureLine(context, token) {3364 if(token.isEof) return false;3365 return handleExternalError(context, false, function () {3366 return context.tokenMatcher.match_FeatureLine(token);3367 });3368 }3369 function match_RuleLine(context, token) {3370 if(token.isEof) return false;3371 return handleExternalError(context, false, function () {3372 return context.tokenMatcher.match_RuleLine(token);3373 });3374 }3375 function match_BackgroundLine(context, token) {3376 if(token.isEof) return false;3377 return handleExternalError(context, false, function () {3378 return context.tokenMatcher.match_BackgroundLine(token);3379 });3380 }3381 function match_ScenarioLine(context, token) {3382 if(token.isEof) return false;3383 return handleExternalError(context, false, function () {3384 return context.tokenMatcher.match_ScenarioLine(token);3385 });3386 }3387 function match_ExamplesLine(context, token) {3388 if(token.isEof) return false;3389 return handleExternalError(context, false, function () {3390 return context.tokenMatcher.match_ExamplesLine(token);3391 });3392 }3393 function match_StepLine(context, token) {3394 if(token.isEof) return false;3395 return handleExternalError(context, false, function () {3396 return context.tokenMatcher.match_StepLine(token);3397 });3398 }3399 function match_DocStringSeparator(context, token) {3400 if(token.isEof) return false;3401 return handleExternalError(context, false, function () {3402 return context.tokenMatcher.match_DocStringSeparator(token);3403 });3404 }3405 function match_TableRow(context, token) {3406 if(token.isEof) return false;3407 return handleExternalError(context, false, function () {3408 return context.tokenMatcher.match_TableRow(token);3409 });3410 }3411 function match_Language(context, token) {3412 if(token.isEof) return false;3413 return handleExternalError(context, false, function () {3414 return context.tokenMatcher.match_Language(token);3415 });3416 }3417 function match_Other(context, token) {3418 if(token.isEof) return false;3419 return handleExternalError(context, false, function () {3420 return context.tokenMatcher.match_Other(token);3421 });3422 }3423 function lookahead_0(context, currentToken) {3424 currentToken.detach();3425 var token;3426 var queue = [];3427 var match = false;3428 do {3429 token = readToken(context);3430 token.detach();3431 queue.push(token);3432 if (false || match_ExamplesLine(context, token)) {3433 match = true;3434 break;3435 }3436 } while(false || match_Empty(context, token) || match_Comment(context, token) || match_TagLine(context, token));3437 context.tokenQueue = context.tokenQueue.concat(queue);3438 return match;3439 }...

Full Screen

Full Screen

token_matcher.py

Source:token_matcher.py Github

copy

Full Screen

...20 return self._match_title_line(token, 'ScenarioOutlineLine',21 self.dialect.scenario_outline_keywords)22 def match_BackgroundLine(self, token):23 return self._match_title_line(token, 'BackgroundLine', self.dialect.background_keywords)24 def match_ExamplesLine(self, token):25 return self._match_title_line(token, 'ExamplesLine', self.dialect.examples_keywords)26 def match_TableRow(self, token):27 if not token.line.startswith('|'):28 return False29 # TODO: indent30 self._set_token_matched(token, 'TableRow', items=token.line.table_cells)31 return True32 def match_StepLine(self, token):33 keywords = (self.dialect.given_keywords +34 self.dialect.when_keywords +35 self.dialect.then_keywords +36 self.dialect.and_keywords +37 self.dialect.but_keywords)38 for keyword in (k for k in keywords if token.line.startswith(k)):...

Full Screen

Full Screen

token_matcher.js

Source:token_matcher.js Github

copy

Full Screen

...39 };40 this.match_BackgroundLine = function match_BackgroundLine(token) {41 return matchTitleLine(token, 'BackgroundLine', dialect.background);42 };43 this.match_ExamplesLine = function match_ExamplesLine(token) {44 return matchTitleLine(token, 'ExamplesLine', dialect.examples);45 };46 this.match_TableRow = function match_TableRow(token) {47 if (token.line.startsWith('|')) {48 // TODO: indent49 setTokenMatched(token, 'TableRow', null, null, null, token.line.getTableCells());50 return true;51 }52 return false;53 };54 this.match_Empty = function match_Empty(token) {55 if (token.line.isEmpty) {56 setTokenMatched(token, 'Empty', null, null, 0);57 return true;...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('gherkin');2var parser = new gherkin.Parser();3var fs = require('fs');4var contents = fs.readFileSync('features/test.feature', 'utf8');5var feature = parser.parse(contents);6var examples = feature.feature.children[0].examples;7var examplesLine = feature.feature.children[0].examples[0].line;8var match_ExamplesLine = gherkin.match_ExamplesLine(examplesLine, examples);9console.log(match_ExamplesLine);10[ { line: 7,11 id: 'test;test',12 tableHeader: { cells: [Array] },13 tableBody: [ [Object] ] } ]

Full Screen

Using AI Code Generation

copy

Full Screen

1var fs = require('fs');2var gherkin = require('gherkin');3var parser = new gherkin.Parser();4var data = fs.readFileSync('test.feature', 'utf8');5var feature = parser.parse(data);6var examples = feature.children[0].examples[0];7var match_ExamplesLine = gherkin.match_ExamplesLine(examples);8console.log(match_ExamplesLine)9When(/^I click on the "([^"]*)" button$/, function (button) {10 return this.driver.findElement(By.css("button[data-test-id='" + button + "']")).click();11});

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('gherkin');2var parser = new gherkin.Parser();3var lexer = new gherkin.Lexer('en');4var feature = parser.parse(lexer.lex('Feature: Some feature5'));6var examples = feature.children[0].steps[0].examples;7var examplesLine = gherkin.match_ExamplesLine(examples, 'Given a step');8console.log(examplesLine);9gherkin.match_ExamplesLine(examples, 'Given a step');

Full Screen

Using AI Code Generation

copy

Full Screen

1var gherkin = require('cucumber-gherkin');2var fs = require('fs');3var featureFile = fs.readFileSync('test.feature', 'utf-8');4var feature = gherkin.parse(featureFile);5var examplesLine = feature.feature.children[0].examples[0].tableBody[0].cells[0].value;6console.log(examplesLine);7var match = gherkin.match_ExamplesLine(examplesLine);8console.log(match);

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