gherkin 7.0.4 → 8.0.0

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