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