gherkin 3.2.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 616936d9b8360845b1bc12aa9977027ca9798a70
4
- data.tar.gz: e86bcaf18d78f4eae825334729b858b144cddb06
3
+ metadata.gz: 102502b0196281ce889e476bb1b645495f9a3366
4
+ data.tar.gz: 37bf6cba35678e8e3e11eb491585c17fde460864
5
5
  SHA512:
6
- metadata.gz: a92897921797ebde32ca547eada1292adb5b338d4d3bd4b26328c361a22032460e9b117bb4acc133a19259b8aeae2b33053bed63747d4391c9521e235053db2f
7
- data.tar.gz: c3a596f0c6f3d18088e2861dc40b7635a6d196f3aeceb9bf4eea6fbc17498d7470d6549235c103e996159f90141bc10da56ec98384179e3b66b706faf76f9e61
6
+ metadata.gz: da171454a40855f30ed5c85632f82d54580fd4d38de2bf2298ee7afc7ce055e14975e43363d4179a54917900a19535a1c7b95352bc9b6d3a95a45992f90825b1
7
+ data.tar.gz: 03bbb62e8405dd94325094bf9e4bdbc63e18e00d5de419ab5aaac223d00aec19264285bfebda40b981c3321920b45bb45a14874b95886d05cb47fc1d015b2b09
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014-2016 Cucumber Ltd, Gaspar Nagy
3
+ Copyright (c) Cucumber Ltd, Gaspar Nagy, Björn Rasmusson, Peter Sergeant
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/Makefile CHANGED
@@ -38,7 +38,11 @@ acceptance/testdata/%.feature.pickles.json: ../testdata/%.feature ../testdata/%.
38
38
 
39
39
  acceptance/testdata/%.feature.errors: ../testdata/%.feature ../testdata/%.feature.errors .built
40
40
  mkdir -p `dirname $@`
41
- ! bin/gherkin-generate-ast $< 2> $@
41
+ # Travis disables C extensions for jruby, and it doesn't seem possible to
42
+ # tell JRuby *not* to print this warning when they're disabled.
43
+ # Filter out the warning before doing the comparison.
44
+ ! bin/gherkin-generate-ast $< 2> $@.tmp
45
+ cat $@.tmp | grep -v "jruby: warning: unknown property jruby.cext.enabled" > $@
42
46
  diff --unified $<.errors $@
43
47
  .DELETE_ON_ERROR: acceptance/testdata/%.feature.errors
44
48
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ $VERBOSE=nil # Shut up JRuby warnings on Travis
2
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"../lib"))
3
4
  require 'gherkin/parser'
4
5
  require 'json'
@@ -9,7 +10,7 @@ files = ARGV.any? ? ARGV : (STDIN.tty? ? [] : [STDIN])
9
10
  start_time = Time.now
10
11
  files.each do |file|
11
12
  begin
12
- File.open(file) do |io|
13
+ File.open(file, 'r:UTF-8') do |io|
13
14
  puts JSON.generate(parser.parse(io))
14
15
  end
15
16
  rescue Gherkin::ParserError => e
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ $VERBOSE=nil # Shut up JRuby warnings on Travis
2
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"../lib"))
3
4
  require 'gherkin/pickles/compiler'
4
5
  require 'gherkin/parser'
@@ -11,7 +12,7 @@ files = ARGV.any? ? ARGV : (STDIN.tty? ? [] : [STDIN])
11
12
  start_time = Time.now
12
13
  files.each do |file|
13
14
  begin
14
- File.open(file) do |io|
15
+ File.open(file, 'r:UTF-8') do |io|
15
16
  feature = parser.parse(io)
16
17
  pickles = compiler.compile(feature, file);
17
18
  puts JSON.generate(pickles)
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ $VERBOSE=nil # Shut up JRuby warnings on Travis
2
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"../lib"))
3
4
  require 'gherkin/parser'
4
5
  require 'gherkin/token_formatter_builder'
@@ -6,7 +7,7 @@ require 'gherkin/token_formatter_builder'
6
7
  parser = Gherkin::Parser.new(Gherkin::TokenFormatterBuilder.new)
7
8
  files = ARGV + (STDIN.tty? ? [] : [STDIN])
8
9
  files.each do |file|
9
- File.open(file) do |io|
10
+ File.open(file, 'r:UTF-8') do |io|
10
11
  print parser.parse(io)
11
12
  end
12
13
  end
@@ -26,10 +26,10 @@
26
26
  @helper MatchToken(TokenType tokenType)
27
27
  {<text>match_@(tokenType)(context, token)</text>}
28
28
  # This file is generated. Do not edit! Edit gherkin-ruby.razor instead.
29
- require_relative 'ast_builder'
30
- require_relative 'token_matcher'
31
- require_relative 'token_scanner'
32
- require_relative 'errors'
29
+ require 'gherkin/ast_builder'
30
+ require 'gherkin/token_matcher'
31
+ require 'gherkin/token_scanner'
32
+ require 'gherkin/errors'
33
33
 
34
34
  module Gherkin
35
35
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'gherkin'
4
- s.version = '3.2.0'
4
+ s.version = '4.0.0'
5
5
  s.authors = ["Gáspár Nagy", "Aslak Hellesøy", "Steve Tooke"]
6
6
  s.description = 'Gherkin parser'
7
7
  s.summary = "gherkin-#{s.version}"
@@ -1,4 +1,4 @@
1
- require_relative 'ast_node'
1
+ require 'gherkin/ast_node'
2
2
 
3
3
  module Gherkin
4
4
  class AstBuilder
@@ -23,7 +23,7 @@ module Gherkin
23
23
  def build(token)
24
24
  if token.matched_type == :Comment
25
25
  @comments.push({
26
- type: 'Comment',
26
+ type: :Comment,
27
27
  location: get_location(token),
28
28
  text: token.matched_text
29
29
  })
@@ -33,7 +33,7 @@ module Gherkin
33
33
  end
34
34
 
35
35
  def get_result
36
- current_node.get_single(:Feature)
36
+ current_node.get_single(:GherkinDocument)
37
37
  end
38
38
 
39
39
  def current_node
@@ -53,7 +53,7 @@ module Gherkin
53
53
  tags_node.get_tokens(:TagLine).each do |token|
54
54
  token.matched_items.each do |tag_item|
55
55
  tags.push({
56
- type: 'Tag',
56
+ type: :Tag,
57
57
  location: get_location(token, tag_item.column),
58
58
  name: tag_item.text
59
59
  })
@@ -66,7 +66,7 @@ module Gherkin
66
66
  def get_table_rows(node)
67
67
  rows = node.get_tokens(:TableRow).map do |token|
68
68
  {
69
- type: 'TableRow',
69
+ type: :TableRow,
70
70
  location: get_location(token),
71
71
  cells: get_cells(token)
72
72
  }
@@ -88,7 +88,7 @@ module Gherkin
88
88
  def get_cells(table_row_token)
89
89
  table_row_token.matched_items.map do |cell_item|
90
90
  {
91
- type: 'TableCell',
91
+ type: :TableCell,
92
92
  location: get_location(table_row_token, cell_item.column),
93
93
  value: cell_item.text
94
94
  }
@@ -190,7 +190,7 @@ module Gherkin
190
190
  examples_node = node.get_single(:Examples)
191
191
  examples_line = examples_node.get_token(:ExamplesLine)
192
192
  description = get_description(examples_node)
193
- rows = get_table_rows(examples_node)
193
+ examples_table = examples_node.get_single(:Examples_Table)
194
194
 
195
195
  reject_nils(
196
196
  type: examples_node.rule_type,
@@ -199,6 +199,13 @@ module Gherkin
199
199
  keyword: examples_line.matched_keyword,
200
200
  name: examples_line.matched_text,
201
201
  description: description,
202
+ tableHeader: !examples_table.nil? ? examples_table[:tableHeader] : nil,
203
+ tableBody: !examples_table.nil? ? examples_table[:tableBody] : nil
204
+ )
205
+ when :Examples_Table
206
+ rows = get_table_rows(node)
207
+
208
+ reject_nils(
202
209
  tableHeader: rows.first,
203
210
  tableBody: rows[1..-1]
204
211
  )
@@ -214,8 +221,10 @@ module Gherkin
214
221
  tags = get_tags(header)
215
222
  feature_line = header.get_token(:FeatureLine)
216
223
  return unless feature_line
224
+ children = []
217
225
  background = node.get_single(:Background)
218
- scenario_definitions = node.get_items(:Scenario_Definition)
226
+ children.push(background) if background
227
+ children.concat(node.get_items(:Scenario_Definition))
219
228
  description = get_description(header)
220
229
  language = feature_line.matched_gherkin_dialect
221
230
 
@@ -227,8 +236,13 @@ module Gherkin
227
236
  keyword: feature_line.matched_keyword,
228
237
  name: feature_line.matched_text,
229
238
  description: description,
230
- background: background,
231
- scenarioDefinitions: scenario_definitions,
239
+ children: children,
240
+ )
241
+ when :GherkinDocument
242
+ feature = node.get_single(:Feature)
243
+ reject_nils(
244
+ type: node.rule_type,
245
+ feature: feature,
232
246
  comments: @comments
233
247
  )
234
248
  else
@@ -2,7 +2,7 @@ require 'json'
2
2
 
3
3
  module Gherkin
4
4
  DIALECT_FILE_PATH = File.expand_path("gherkin-languages.json", File.dirname(__FILE__))
5
- DIALECTS = JSON.parse File.read(DIALECT_FILE_PATH)
5
+ DIALECTS = JSON.parse File.open(DIALECT_FILE_PATH, 'r:UTF-8').read
6
6
 
7
7
  class Dialect
8
8
  def self.for(name)
@@ -2169,6 +2169,7 @@
2169
2169
  ],
2170
2170
  "feature": [
2171
2171
  "Функция",
2172
+ "Функциональность",
2172
2173
  "Функционал",
2173
2174
  "Свойство"
2174
2175
  ],
@@ -1,8 +1,8 @@
1
1
  # This file is generated. Do not edit! Edit gherkin-ruby.razor instead.
2
- require_relative 'ast_builder'
3
- require_relative 'token_matcher'
4
- require_relative 'token_scanner'
5
- require_relative 'errors'
2
+ require 'gherkin/ast_builder'
3
+ require 'gherkin/token_matcher'
4
+ require 'gherkin/token_scanner'
5
+ require 'gherkin/errors'
6
6
 
7
7
  module Gherkin
8
8
 
@@ -22,14 +22,16 @@ module Gherkin
22
22
  :_TableRow, # #TableRow
23
23
  :_Language, # #Language
24
24
  :_Other, # #Other
25
+ :GherkinDocument, # GherkinDocument! := Feature?
25
26
  :Feature, # Feature! := Feature_Header Background? Scenario_Definition*
26
27
  :Feature_Header, # Feature_Header! := #Language? Tags? #FeatureLine Feature_Description
27
28
  :Background, # Background! := #BackgroundLine Background_Description Scenario_Step*
28
29
  :Scenario_Definition, # Scenario_Definition! := Tags? (Scenario | ScenarioOutline)
29
30
  :Scenario, # Scenario! := #ScenarioLine Scenario_Description Scenario_Step*
30
- :ScenarioOutline, # ScenarioOutline! := #ScenarioOutlineLine ScenarioOutline_Description ScenarioOutline_Step* Examples_Definition+
31
+ :ScenarioOutline, # ScenarioOutline! := #ScenarioOutlineLine ScenarioOutline_Description ScenarioOutline_Step* Examples_Definition*
31
32
  :Examples_Definition, # Examples_Definition! [#Empty|#Comment|#TagLine-&gt;#ExamplesLine] := Tags? Examples
32
- :Examples, # Examples! := #ExamplesLine Examples_Description #TableRow #TableRow+
33
+ :Examples, # Examples! := #ExamplesLine Examples_Description Examples_Table?
34
+ :Examples_Table, # Examples_Table! := #TableRow #TableRow*
33
35
  :Scenario_Step, # Scenario_Step := Step
34
36
  :ScenarioOutline_Step, # ScenarioOutline_Step := Step
35
37
  :Step, # Step! := #StepLine Step_Arg?
@@ -76,7 +78,7 @@ module Gherkin
76
78
  []
77
79
  )
78
80
 
79
- start_rule(context, :Feature);
81
+ start_rule(context, :GherkinDocument);
80
82
  state = 0
81
83
  token = nil
82
84
  begin
@@ -84,7 +86,7 @@ module Gherkin
84
86
  state = match_token(state, token, context)
85
87
  end until(token.eof?)
86
88
 
87
- end_rule(context, :Feature)
89
+ end_rule(context, :GherkinDocument)
88
90
 
89
91
  raise CompositeParserException.new(context.errors) if context.errors.any?
90
92
 
@@ -276,8 +278,8 @@ module Gherkin
276
278
  match_token_at_25(token, context)
277
279
  when 26
278
280
  match_token_at_26(token, context)
279
- when 27
280
- match_token_at_27(token, context)
281
+ when 28
282
+ match_token_at_28(token, context)
281
283
  when 29
282
284
  match_token_at_29(token, context)
283
285
  when 30
@@ -288,8 +290,6 @@ module Gherkin
288
290
  match_token_at_32(token, context)
289
291
  when 33
290
292
  match_token_at_33(token, context)
291
- when 34
292
- match_token_at_34(token, context)
293
293
  else
294
294
  raise InvalidOperationException, "Unknown state: #{state}"
295
295
  end
@@ -298,18 +298,25 @@ module Gherkin
298
298
 
299
299
  # Start
300
300
  def match_token_at_0(token, context)
301
+ if match_EOF(context, token)
302
+ build(context, token);
303
+ return 27
304
+ end
301
305
  if match_Language(context, token)
306
+ start_rule(context, :Feature);
302
307
  start_rule(context, :Feature_Header);
303
308
  build(context, token);
304
309
  return 1
305
310
  end
306
311
  if match_TagLine(context, token)
312
+ start_rule(context, :Feature);
307
313
  start_rule(context, :Feature_Header);
308
314
  start_rule(context, :Tags);
309
315
  build(context, token);
310
316
  return 2
311
317
  end
312
318
  if match_FeatureLine(context, token)
319
+ start_rule(context, :Feature);
313
320
  start_rule(context, :Feature_Header);
314
321
  build(context, token);
315
322
  return 3
@@ -325,14 +332,14 @@ module Gherkin
325
332
 
326
333
  state_comment = "State: 0 - Start"
327
334
  token.detach
328
- expected_tokens = ["#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"]
335
+ expected_tokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"]
329
336
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
330
337
  raise error if (stop_at_first_error)
331
338
  add_error(context, error)
332
339
  return 0
333
340
  end
334
341
 
335
- # Feature:0>Feature_Header:0>#Language:0
342
+ # GherkinDocument:0>Feature:0>Feature_Header:0>#Language:0
336
343
  def match_token_at_1(token, context)
337
344
  if match_TagLine(context, token)
338
345
  start_rule(context, :Tags);
@@ -352,7 +359,7 @@ module Gherkin
352
359
  return 1
353
360
  end
354
361
 
355
- state_comment = "State: 1 - Feature:0>Feature_Header:0>#Language:0"
362
+ state_comment = "State: 1 - GherkinDocument:0>Feature:0>Feature_Header:0>#Language:0"
356
363
  token.detach
357
364
  expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]
358
365
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -361,7 +368,7 @@ module Gherkin
361
368
  return 1
362
369
  end
363
370
 
364
- # Feature:0>Feature_Header:1>Tags:0>#TagLine:0
371
+ # GherkinDocument:0>Feature:0>Feature_Header:1>Tags:0>#TagLine:0
365
372
  def match_token_at_2(token, context)
366
373
  if match_TagLine(context, token)
367
374
  build(context, token);
@@ -381,7 +388,7 @@ module Gherkin
381
388
  return 2
382
389
  end
383
390
 
384
- state_comment = "State: 2 - Feature:0>Feature_Header:1>Tags:0>#TagLine:0"
391
+ state_comment = "State: 2 - GherkinDocument:0>Feature:0>Feature_Header:1>Tags:0>#TagLine:0"
385
392
  token.detach
386
393
  expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]
387
394
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -390,12 +397,13 @@ module Gherkin
390
397
  return 2
391
398
  end
392
399
 
393
- # Feature:0>Feature_Header:2>#FeatureLine:0
400
+ # GherkinDocument:0>Feature:0>Feature_Header:2>#FeatureLine:0
394
401
  def match_token_at_3(token, context)
395
402
  if match_EOF(context, token)
396
403
  end_rule(context, :Feature_Header);
404
+ end_rule(context, :Feature);
397
405
  build(context, token);
398
- return 28
406
+ return 27
399
407
  end
400
408
  if match_Empty(context, token)
401
409
  build(context, token);
@@ -438,7 +446,7 @@ module Gherkin
438
446
  return 4
439
447
  end
440
448
 
441
- state_comment = "State: 3 - Feature:0>Feature_Header:2>#FeatureLine:0"
449
+ state_comment = "State: 3 - GherkinDocument:0>Feature:0>Feature_Header:2>#FeatureLine:0"
442
450
  token.detach
443
451
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
444
452
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -447,13 +455,14 @@ module Gherkin
447
455
  return 3
448
456
  end
449
457
 
450
- # Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0
458
+ # GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0
451
459
  def match_token_at_4(token, context)
452
460
  if match_EOF(context, token)
453
461
  end_rule(context, :Description);
454
462
  end_rule(context, :Feature_Header);
463
+ end_rule(context, :Feature);
455
464
  build(context, token);
456
- return 28
465
+ return 27
457
466
  end
458
467
  if match_Comment(context, token)
459
468
  end_rule(context, :Description);
@@ -496,7 +505,7 @@ module Gherkin
496
505
  return 4
497
506
  end
498
507
 
499
- state_comment = "State: 4 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0"
508
+ state_comment = "State: 4 - GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0"
500
509
  token.detach
501
510
  expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
502
511
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -505,12 +514,13 @@ module Gherkin
505
514
  return 4
506
515
  end
507
516
 
508
- # Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0
517
+ # GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0
509
518
  def match_token_at_5(token, context)
510
519
  if match_EOF(context, token)
511
520
  end_rule(context, :Feature_Header);
521
+ end_rule(context, :Feature);
512
522
  build(context, token);
513
- return 28
523
+ return 27
514
524
  end
515
525
  if match_Comment(context, token)
516
526
  build(context, token);
@@ -548,7 +558,7 @@ module Gherkin
548
558
  return 5
549
559
  end
550
560
 
551
- state_comment = "State: 5 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0"
561
+ state_comment = "State: 5 - GherkinDocument:0>Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0"
552
562
  token.detach
553
563
  expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]
554
564
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -557,12 +567,13 @@ module Gherkin
557
567
  return 5
558
568
  end
559
569
 
560
- # Feature:1>Background:0>#BackgroundLine:0
570
+ # GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0
561
571
  def match_token_at_6(token, context)
562
572
  if match_EOF(context, token)
563
573
  end_rule(context, :Background);
574
+ end_rule(context, :Feature);
564
575
  build(context, token);
565
- return 28
576
+ return 27
566
577
  end
567
578
  if match_Empty(context, token)
568
579
  build(context, token);
@@ -604,7 +615,7 @@ module Gherkin
604
615
  return 7
605
616
  end
606
617
 
607
- state_comment = "State: 6 - Feature:1>Background:0>#BackgroundLine:0"
618
+ state_comment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0"
608
619
  token.detach
609
620
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
610
621
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -613,13 +624,14 @@ module Gherkin
613
624
  return 6
614
625
  end
615
626
 
616
- # Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0
627
+ # GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0
617
628
  def match_token_at_7(token, context)
618
629
  if match_EOF(context, token)
619
630
  end_rule(context, :Description);
620
631
  end_rule(context, :Background);
632
+ end_rule(context, :Feature);
621
633
  build(context, token);
622
- return 28
634
+ return 27
623
635
  end
624
636
  if match_Comment(context, token)
625
637
  end_rule(context, :Description);
@@ -661,7 +673,7 @@ module Gherkin
661
673
  return 7
662
674
  end
663
675
 
664
- state_comment = "State: 7 - Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0"
676
+ state_comment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0"
665
677
  token.detach
666
678
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
667
679
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -670,12 +682,13 @@ module Gherkin
670
682
  return 7
671
683
  end
672
684
 
673
- # Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0
685
+ # GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0
674
686
  def match_token_at_8(token, context)
675
687
  if match_EOF(context, token)
676
688
  end_rule(context, :Background);
689
+ end_rule(context, :Feature);
677
690
  build(context, token);
678
- return 28
691
+ return 27
679
692
  end
680
693
  if match_Comment(context, token)
681
694
  build(context, token);
@@ -712,7 +725,7 @@ module Gherkin
712
725
  return 8
713
726
  end
714
727
 
715
- state_comment = "State: 8 - Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0"
728
+ state_comment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0"
716
729
  token.detach
717
730
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]
718
731
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -721,13 +734,14 @@ module Gherkin
721
734
  return 8
722
735
  end
723
736
 
724
- # Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0
737
+ # GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0
725
738
  def match_token_at_9(token, context)
726
739
  if match_EOF(context, token)
727
740
  end_rule(context, :Step);
728
741
  end_rule(context, :Background);
742
+ end_rule(context, :Feature);
729
743
  build(context, token);
730
- return 28
744
+ return 27
731
745
  end
732
746
  if match_TableRow(context, token)
733
747
  start_rule(context, :DataTable);
@@ -737,7 +751,7 @@ module Gherkin
737
751
  if match_DocStringSeparator(context, token)
738
752
  start_rule(context, :DocString);
739
753
  build(context, token);
740
- return 33
754
+ return 32
741
755
  end
742
756
  if match_StepLine(context, token)
743
757
  end_rule(context, :Step);
@@ -778,7 +792,7 @@ module Gherkin
778
792
  return 9
779
793
  end
780
794
 
781
- state_comment = "State: 9 - Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0"
795
+ state_comment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0"
782
796
  token.detach
783
797
  expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
784
798
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -787,14 +801,15 @@ module Gherkin
787
801
  return 9
788
802
  end
789
803
 
790
- # Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0
804
+ # GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0
791
805
  def match_token_at_10(token, context)
792
806
  if match_EOF(context, token)
793
807
  end_rule(context, :DataTable);
794
808
  end_rule(context, :Step);
795
809
  end_rule(context, :Background);
810
+ end_rule(context, :Feature);
796
811
  build(context, token);
797
- return 28
812
+ return 27
798
813
  end
799
814
  if match_TableRow(context, token)
800
815
  build(context, token);
@@ -843,7 +858,7 @@ module Gherkin
843
858
  return 10
844
859
  end
845
860
 
846
- state_comment = "State: 10 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"
861
+ state_comment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"
847
862
  token.detach
848
863
  expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
849
864
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -852,7 +867,7 @@ module Gherkin
852
867
  return 10
853
868
  end
854
869
 
855
- # Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0
870
+ # GherkinDocument:0>Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0
856
871
  def match_token_at_11(token, context)
857
872
  if match_TagLine(context, token)
858
873
  build(context, token);
@@ -879,7 +894,7 @@ module Gherkin
879
894
  return 11
880
895
  end
881
896
 
882
- state_comment = "State: 11 - Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0"
897
+ state_comment = "State: 11 - GherkinDocument:0>Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0"
883
898
  token.detach
884
899
  expected_tokens = ["#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
885
900
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -888,13 +903,14 @@ module Gherkin
888
903
  return 11
889
904
  end
890
905
 
891
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0
906
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0
892
907
  def match_token_at_12(token, context)
893
908
  if match_EOF(context, token)
894
909
  end_rule(context, :Scenario);
895
910
  end_rule(context, :Scenario_Definition);
911
+ end_rule(context, :Feature);
896
912
  build(context, token);
897
- return 28
913
+ return 27
898
914
  end
899
915
  if match_Empty(context, token)
900
916
  build(context, token);
@@ -939,7 +955,7 @@ module Gherkin
939
955
  return 13
940
956
  end
941
957
 
942
- state_comment = "State: 12 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0"
958
+ state_comment = "State: 12 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0"
943
959
  token.detach
944
960
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
945
961
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -948,14 +964,15 @@ module Gherkin
948
964
  return 12
949
965
  end
950
966
 
951
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0
967
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0
952
968
  def match_token_at_13(token, context)
953
969
  if match_EOF(context, token)
954
970
  end_rule(context, :Description);
955
971
  end_rule(context, :Scenario);
956
972
  end_rule(context, :Scenario_Definition);
973
+ end_rule(context, :Feature);
957
974
  build(context, token);
958
- return 28
975
+ return 27
959
976
  end
960
977
  if match_Comment(context, token)
961
978
  end_rule(context, :Description);
@@ -1000,7 +1017,7 @@ module Gherkin
1000
1017
  return 13
1001
1018
  end
1002
1019
 
1003
- state_comment = "State: 13 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0"
1020
+ state_comment = "State: 13 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0"
1004
1021
  token.detach
1005
1022
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
1006
1023
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -1009,13 +1026,14 @@ module Gherkin
1009
1026
  return 13
1010
1027
  end
1011
1028
 
1012
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0
1029
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0
1013
1030
  def match_token_at_14(token, context)
1014
1031
  if match_EOF(context, token)
1015
1032
  end_rule(context, :Scenario);
1016
1033
  end_rule(context, :Scenario_Definition);
1034
+ end_rule(context, :Feature);
1017
1035
  build(context, token);
1018
- return 28
1036
+ return 27
1019
1037
  end
1020
1038
  if match_Comment(context, token)
1021
1039
  build(context, token);
@@ -1055,7 +1073,7 @@ module Gherkin
1055
1073
  return 14
1056
1074
  end
1057
1075
 
1058
- state_comment = "State: 14 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0"
1076
+ state_comment = "State: 14 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0"
1059
1077
  token.detach
1060
1078
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]
1061
1079
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -1064,14 +1082,15 @@ module Gherkin
1064
1082
  return 14
1065
1083
  end
1066
1084
 
1067
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0
1085
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0
1068
1086
  def match_token_at_15(token, context)
1069
1087
  if match_EOF(context, token)
1070
1088
  end_rule(context, :Step);
1071
1089
  end_rule(context, :Scenario);
1072
1090
  end_rule(context, :Scenario_Definition);
1091
+ end_rule(context, :Feature);
1073
1092
  build(context, token);
1074
- return 28
1093
+ return 27
1075
1094
  end
1076
1095
  if match_TableRow(context, token)
1077
1096
  start_rule(context, :DataTable);
@@ -1081,7 +1100,7 @@ module Gherkin
1081
1100
  if match_DocStringSeparator(context, token)
1082
1101
  start_rule(context, :DocString);
1083
1102
  build(context, token);
1084
- return 31
1103
+ return 30
1085
1104
  end
1086
1105
  if match_StepLine(context, token)
1087
1106
  end_rule(context, :Step);
@@ -1125,7 +1144,7 @@ module Gherkin
1125
1144
  return 15
1126
1145
  end
1127
1146
 
1128
- state_comment = "State: 15 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0"
1147
+ state_comment = "State: 15 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0"
1129
1148
  token.detach
1130
1149
  expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1131
1150
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -1134,15 +1153,16 @@ module Gherkin
1134
1153
  return 15
1135
1154
  end
1136
1155
 
1137
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0
1156
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0
1138
1157
  def match_token_at_16(token, context)
1139
1158
  if match_EOF(context, token)
1140
1159
  end_rule(context, :DataTable);
1141
1160
  end_rule(context, :Step);
1142
1161
  end_rule(context, :Scenario);
1143
1162
  end_rule(context, :Scenario_Definition);
1163
+ end_rule(context, :Feature);
1144
1164
  build(context, token);
1145
- return 28
1165
+ return 27
1146
1166
  end
1147
1167
  if match_TableRow(context, token)
1148
1168
  build(context, token);
@@ -1194,7 +1214,7 @@ module Gherkin
1194
1214
  return 16
1195
1215
  end
1196
1216
 
1197
- state_comment = "State: 16 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"
1217
+ state_comment = "State: 16 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"
1198
1218
  token.detach
1199
1219
  expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1200
1220
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -1203,8 +1223,15 @@ module Gherkin
1203
1223
  return 16
1204
1224
  end
1205
1225
 
1206
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0
1226
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0
1207
1227
  def match_token_at_17(token, context)
1228
+ if match_EOF(context, token)
1229
+ end_rule(context, :ScenarioOutline);
1230
+ end_rule(context, :Scenario_Definition);
1231
+ end_rule(context, :Feature);
1232
+ build(context, token);
1233
+ return 27
1234
+ end
1208
1235
  if match_Empty(context, token)
1209
1236
  build(context, token);
1210
1237
  return 17
@@ -1219,10 +1246,20 @@ module Gherkin
1219
1246
  return 20
1220
1247
  end
1221
1248
  if match_TagLine(context, token)
1249
+ if lookahead_0(context, token)
1222
1250
  start_rule(context, :Examples_Definition);
1223
1251
  start_rule(context, :Tags);
1224
1252
  build(context, token);
1225
1253
  return 22
1254
+ end
1255
+ end
1256
+ if match_TagLine(context, token)
1257
+ end_rule(context, :ScenarioOutline);
1258
+ end_rule(context, :Scenario_Definition);
1259
+ start_rule(context, :Scenario_Definition);
1260
+ start_rule(context, :Tags);
1261
+ build(context, token);
1262
+ return 11
1226
1263
  end
1227
1264
  if match_ExamplesLine(context, token)
1228
1265
  start_rule(context, :Examples_Definition);
@@ -1230,23 +1267,47 @@ module Gherkin
1230
1267
  build(context, token);
1231
1268
  return 23
1232
1269
  end
1270
+ if match_ScenarioLine(context, token)
1271
+ end_rule(context, :ScenarioOutline);
1272
+ end_rule(context, :Scenario_Definition);
1273
+ start_rule(context, :Scenario_Definition);
1274
+ start_rule(context, :Scenario);
1275
+ build(context, token);
1276
+ return 12
1277
+ end
1278
+ if match_ScenarioOutlineLine(context, token)
1279
+ end_rule(context, :ScenarioOutline);
1280
+ end_rule(context, :Scenario_Definition);
1281
+ start_rule(context, :Scenario_Definition);
1282
+ start_rule(context, :ScenarioOutline);
1283
+ build(context, token);
1284
+ return 17
1285
+ end
1233
1286
  if match_Other(context, token)
1234
1287
  start_rule(context, :Description);
1235
1288
  build(context, token);
1236
1289
  return 18
1237
1290
  end
1238
1291
 
1239
- state_comment = "State: 17 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0"
1292
+ state_comment = "State: 17 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0"
1240
1293
  token.detach
1241
- expected_tokens = ["#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Other"]
1294
+ expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
1242
1295
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1243
1296
  raise error if (stop_at_first_error)
1244
1297
  add_error(context, error)
1245
1298
  return 17
1246
1299
  end
1247
1300
 
1248
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0
1301
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0
1249
1302
  def match_token_at_18(token, context)
1303
+ if match_EOF(context, token)
1304
+ end_rule(context, :Description);
1305
+ end_rule(context, :ScenarioOutline);
1306
+ end_rule(context, :Scenario_Definition);
1307
+ end_rule(context, :Feature);
1308
+ build(context, token);
1309
+ return 27
1310
+ end
1250
1311
  if match_Comment(context, token)
1251
1312
  end_rule(context, :Description);
1252
1313
  build(context, token);
@@ -1259,11 +1320,22 @@ module Gherkin
1259
1320
  return 20
1260
1321
  end
1261
1322
  if match_TagLine(context, token)
1323
+ if lookahead_0(context, token)
1262
1324
  end_rule(context, :Description);
1263
1325
  start_rule(context, :Examples_Definition);
1264
1326
  start_rule(context, :Tags);
1265
1327
  build(context, token);
1266
1328
  return 22
1329
+ end
1330
+ end
1331
+ if match_TagLine(context, token)
1332
+ end_rule(context, :Description);
1333
+ end_rule(context, :ScenarioOutline);
1334
+ end_rule(context, :Scenario_Definition);
1335
+ start_rule(context, :Scenario_Definition);
1336
+ start_rule(context, :Tags);
1337
+ build(context, token);
1338
+ return 11
1267
1339
  end
1268
1340
  if match_ExamplesLine(context, token)
1269
1341
  end_rule(context, :Description);
@@ -1272,22 +1344,47 @@ module Gherkin
1272
1344
  build(context, token);
1273
1345
  return 23
1274
1346
  end
1347
+ if match_ScenarioLine(context, token)
1348
+ end_rule(context, :Description);
1349
+ end_rule(context, :ScenarioOutline);
1350
+ end_rule(context, :Scenario_Definition);
1351
+ start_rule(context, :Scenario_Definition);
1352
+ start_rule(context, :Scenario);
1353
+ build(context, token);
1354
+ return 12
1355
+ end
1356
+ if match_ScenarioOutlineLine(context, token)
1357
+ end_rule(context, :Description);
1358
+ end_rule(context, :ScenarioOutline);
1359
+ end_rule(context, :Scenario_Definition);
1360
+ start_rule(context, :Scenario_Definition);
1361
+ start_rule(context, :ScenarioOutline);
1362
+ build(context, token);
1363
+ return 17
1364
+ end
1275
1365
  if match_Other(context, token)
1276
1366
  build(context, token);
1277
1367
  return 18
1278
1368
  end
1279
1369
 
1280
- state_comment = "State: 18 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0"
1370
+ state_comment = "State: 18 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0"
1281
1371
  token.detach
1282
- expected_tokens = ["#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Other"]
1372
+ expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
1283
1373
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1284
1374
  raise error if (stop_at_first_error)
1285
1375
  add_error(context, error)
1286
1376
  return 18
1287
1377
  end
1288
1378
 
1289
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0
1379
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0
1290
1380
  def match_token_at_19(token, context)
1381
+ if match_EOF(context, token)
1382
+ end_rule(context, :ScenarioOutline);
1383
+ end_rule(context, :Scenario_Definition);
1384
+ end_rule(context, :Feature);
1385
+ build(context, token);
1386
+ return 27
1387
+ end
1291
1388
  if match_Comment(context, token)
1292
1389
  build(context, token);
1293
1390
  return 19
@@ -1298,10 +1395,20 @@ module Gherkin
1298
1395
  return 20
1299
1396
  end
1300
1397
  if match_TagLine(context, token)
1398
+ if lookahead_0(context, token)
1301
1399
  start_rule(context, :Examples_Definition);
1302
1400
  start_rule(context, :Tags);
1303
1401
  build(context, token);
1304
1402
  return 22
1403
+ end
1404
+ end
1405
+ if match_TagLine(context, token)
1406
+ end_rule(context, :ScenarioOutline);
1407
+ end_rule(context, :Scenario_Definition);
1408
+ start_rule(context, :Scenario_Definition);
1409
+ start_rule(context, :Tags);
1410
+ build(context, token);
1411
+ return 11
1305
1412
  end
1306
1413
  if match_ExamplesLine(context, token)
1307
1414
  start_rule(context, :Examples_Definition);
@@ -1309,22 +1416,46 @@ module Gherkin
1309
1416
  build(context, token);
1310
1417
  return 23
1311
1418
  end
1419
+ if match_ScenarioLine(context, token)
1420
+ end_rule(context, :ScenarioOutline);
1421
+ end_rule(context, :Scenario_Definition);
1422
+ start_rule(context, :Scenario_Definition);
1423
+ start_rule(context, :Scenario);
1424
+ build(context, token);
1425
+ return 12
1426
+ end
1427
+ if match_ScenarioOutlineLine(context, token)
1428
+ end_rule(context, :ScenarioOutline);
1429
+ end_rule(context, :Scenario_Definition);
1430
+ start_rule(context, :Scenario_Definition);
1431
+ start_rule(context, :ScenarioOutline);
1432
+ build(context, token);
1433
+ return 17
1434
+ end
1312
1435
  if match_Empty(context, token)
1313
1436
  build(context, token);
1314
1437
  return 19
1315
1438
  end
1316
1439
 
1317
- state_comment = "State: 19 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0"
1440
+ state_comment = "State: 19 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0"
1318
1441
  token.detach
1319
- expected_tokens = ["#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#Empty"]
1442
+ expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]
1320
1443
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1321
1444
  raise error if (stop_at_first_error)
1322
1445
  add_error(context, error)
1323
1446
  return 19
1324
1447
  end
1325
1448
 
1326
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0
1449
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0
1327
1450
  def match_token_at_20(token, context)
1451
+ if match_EOF(context, token)
1452
+ end_rule(context, :Step);
1453
+ end_rule(context, :ScenarioOutline);
1454
+ end_rule(context, :Scenario_Definition);
1455
+ end_rule(context, :Feature);
1456
+ build(context, token);
1457
+ return 27
1458
+ end
1328
1459
  if match_TableRow(context, token)
1329
1460
  start_rule(context, :DataTable);
1330
1461
  build(context, token);
@@ -1333,7 +1464,7 @@ module Gherkin
1333
1464
  if match_DocStringSeparator(context, token)
1334
1465
  start_rule(context, :DocString);
1335
1466
  build(context, token);
1336
- return 29
1467
+ return 28
1337
1468
  end
1338
1469
  if match_StepLine(context, token)
1339
1470
  end_rule(context, :Step);
@@ -1342,11 +1473,22 @@ module Gherkin
1342
1473
  return 20
1343
1474
  end
1344
1475
  if match_TagLine(context, token)
1476
+ if lookahead_0(context, token)
1345
1477
  end_rule(context, :Step);
1346
1478
  start_rule(context, :Examples_Definition);
1347
1479
  start_rule(context, :Tags);
1348
1480
  build(context, token);
1349
1481
  return 22
1482
+ end
1483
+ end
1484
+ if match_TagLine(context, token)
1485
+ end_rule(context, :Step);
1486
+ end_rule(context, :ScenarioOutline);
1487
+ end_rule(context, :Scenario_Definition);
1488
+ start_rule(context, :Scenario_Definition);
1489
+ start_rule(context, :Tags);
1490
+ build(context, token);
1491
+ return 11
1350
1492
  end
1351
1493
  if match_ExamplesLine(context, token)
1352
1494
  end_rule(context, :Step);
@@ -1355,6 +1497,24 @@ module Gherkin
1355
1497
  build(context, token);
1356
1498
  return 23
1357
1499
  end
1500
+ if match_ScenarioLine(context, token)
1501
+ end_rule(context, :Step);
1502
+ end_rule(context, :ScenarioOutline);
1503
+ end_rule(context, :Scenario_Definition);
1504
+ start_rule(context, :Scenario_Definition);
1505
+ start_rule(context, :Scenario);
1506
+ build(context, token);
1507
+ return 12
1508
+ end
1509
+ if match_ScenarioOutlineLine(context, token)
1510
+ end_rule(context, :Step);
1511
+ end_rule(context, :ScenarioOutline);
1512
+ end_rule(context, :Scenario_Definition);
1513
+ start_rule(context, :Scenario_Definition);
1514
+ start_rule(context, :ScenarioOutline);
1515
+ build(context, token);
1516
+ return 17
1517
+ end
1358
1518
  if match_Comment(context, token)
1359
1519
  build(context, token);
1360
1520
  return 20
@@ -1364,17 +1524,26 @@ module Gherkin
1364
1524
  return 20
1365
1525
  end
1366
1526
 
1367
- state_comment = "State: 20 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0"
1527
+ state_comment = "State: 20 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0"
1368
1528
  token.detach
1369
- expected_tokens = ["#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
1529
+ expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1370
1530
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1371
1531
  raise error if (stop_at_first_error)
1372
1532
  add_error(context, error)
1373
1533
  return 20
1374
1534
  end
1375
1535
 
1376
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0
1536
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0
1377
1537
  def match_token_at_21(token, context)
1538
+ if match_EOF(context, token)
1539
+ end_rule(context, :DataTable);
1540
+ end_rule(context, :Step);
1541
+ end_rule(context, :ScenarioOutline);
1542
+ end_rule(context, :Scenario_Definition);
1543
+ end_rule(context, :Feature);
1544
+ build(context, token);
1545
+ return 27
1546
+ end
1378
1547
  if match_TableRow(context, token)
1379
1548
  build(context, token);
1380
1549
  return 21
@@ -1387,12 +1556,24 @@ module Gherkin
1387
1556
  return 20
1388
1557
  end
1389
1558
  if match_TagLine(context, token)
1559
+ if lookahead_0(context, token)
1390
1560
  end_rule(context, :DataTable);
1391
1561
  end_rule(context, :Step);
1392
1562
  start_rule(context, :Examples_Definition);
1393
1563
  start_rule(context, :Tags);
1394
1564
  build(context, token);
1395
1565
  return 22
1566
+ end
1567
+ end
1568
+ if match_TagLine(context, token)
1569
+ end_rule(context, :DataTable);
1570
+ end_rule(context, :Step);
1571
+ end_rule(context, :ScenarioOutline);
1572
+ end_rule(context, :Scenario_Definition);
1573
+ start_rule(context, :Scenario_Definition);
1574
+ start_rule(context, :Tags);
1575
+ build(context, token);
1576
+ return 11
1396
1577
  end
1397
1578
  if match_ExamplesLine(context, token)
1398
1579
  end_rule(context, :DataTable);
@@ -1402,6 +1583,26 @@ module Gherkin
1402
1583
  build(context, token);
1403
1584
  return 23
1404
1585
  end
1586
+ if match_ScenarioLine(context, token)
1587
+ end_rule(context, :DataTable);
1588
+ end_rule(context, :Step);
1589
+ end_rule(context, :ScenarioOutline);
1590
+ end_rule(context, :Scenario_Definition);
1591
+ start_rule(context, :Scenario_Definition);
1592
+ start_rule(context, :Scenario);
1593
+ build(context, token);
1594
+ return 12
1595
+ end
1596
+ if match_ScenarioOutlineLine(context, token)
1597
+ end_rule(context, :DataTable);
1598
+ end_rule(context, :Step);
1599
+ end_rule(context, :ScenarioOutline);
1600
+ end_rule(context, :Scenario_Definition);
1601
+ start_rule(context, :Scenario_Definition);
1602
+ start_rule(context, :ScenarioOutline);
1603
+ build(context, token);
1604
+ return 17
1605
+ end
1405
1606
  if match_Comment(context, token)
1406
1607
  build(context, token);
1407
1608
  return 21
@@ -1411,16 +1612,16 @@ module Gherkin
1411
1612
  return 21
1412
1613
  end
1413
1614
 
1414
- state_comment = "State: 21 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"
1615
+ state_comment = "State: 21 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"
1415
1616
  token.detach
1416
- expected_tokens = ["#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
1617
+ expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1417
1618
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1418
1619
  raise error if (stop_at_first_error)
1419
1620
  add_error(context, error)
1420
1621
  return 21
1421
1622
  end
1422
1623
 
1423
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0
1624
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0
1424
1625
  def match_token_at_22(token, context)
1425
1626
  if match_TagLine(context, token)
1426
1627
  build(context, token);
@@ -1441,7 +1642,7 @@ module Gherkin
1441
1642
  return 22
1442
1643
  end
1443
1644
 
1444
- state_comment = "State: 22 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0"
1645
+ state_comment = "State: 22 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0"
1445
1646
  token.detach
1446
1647
  expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
1447
1648
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
@@ -1450,8 +1651,17 @@ module Gherkin
1450
1651
  return 22
1451
1652
  end
1452
1653
 
1453
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0
1654
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0
1454
1655
  def match_token_at_23(token, context)
1656
+ if match_EOF(context, token)
1657
+ end_rule(context, :Examples);
1658
+ end_rule(context, :Examples_Definition);
1659
+ end_rule(context, :ScenarioOutline);
1660
+ end_rule(context, :Scenario_Definition);
1661
+ end_rule(context, :Feature);
1662
+ build(context, token);
1663
+ return 27
1664
+ end
1455
1665
  if match_Empty(context, token)
1456
1666
  build(context, token);
1457
1667
  return 23
@@ -1461,26 +1671,85 @@ module Gherkin
1461
1671
  return 25
1462
1672
  end
1463
1673
  if match_TableRow(context, token)
1674
+ start_rule(context, :Examples_Table);
1464
1675
  build(context, token);
1465
1676
  return 26
1466
1677
  end
1678
+ if match_TagLine(context, token)
1679
+ if lookahead_0(context, token)
1680
+ end_rule(context, :Examples);
1681
+ end_rule(context, :Examples_Definition);
1682
+ start_rule(context, :Examples_Definition);
1683
+ start_rule(context, :Tags);
1684
+ build(context, token);
1685
+ return 22
1686
+ end
1687
+ end
1688
+ if match_TagLine(context, token)
1689
+ end_rule(context, :Examples);
1690
+ end_rule(context, :Examples_Definition);
1691
+ end_rule(context, :ScenarioOutline);
1692
+ end_rule(context, :Scenario_Definition);
1693
+ start_rule(context, :Scenario_Definition);
1694
+ start_rule(context, :Tags);
1695
+ build(context, token);
1696
+ return 11
1697
+ end
1698
+ if match_ExamplesLine(context, token)
1699
+ end_rule(context, :Examples);
1700
+ end_rule(context, :Examples_Definition);
1701
+ start_rule(context, :Examples_Definition);
1702
+ start_rule(context, :Examples);
1703
+ build(context, token);
1704
+ return 23
1705
+ end
1706
+ if match_ScenarioLine(context, token)
1707
+ end_rule(context, :Examples);
1708
+ end_rule(context, :Examples_Definition);
1709
+ end_rule(context, :ScenarioOutline);
1710
+ end_rule(context, :Scenario_Definition);
1711
+ start_rule(context, :Scenario_Definition);
1712
+ start_rule(context, :Scenario);
1713
+ build(context, token);
1714
+ return 12
1715
+ end
1716
+ if match_ScenarioOutlineLine(context, token)
1717
+ end_rule(context, :Examples);
1718
+ end_rule(context, :Examples_Definition);
1719
+ end_rule(context, :ScenarioOutline);
1720
+ end_rule(context, :Scenario_Definition);
1721
+ start_rule(context, :Scenario_Definition);
1722
+ start_rule(context, :ScenarioOutline);
1723
+ build(context, token);
1724
+ return 17
1725
+ end
1467
1726
  if match_Other(context, token)
1468
1727
  start_rule(context, :Description);
1469
1728
  build(context, token);
1470
1729
  return 24
1471
1730
  end
1472
1731
 
1473
- state_comment = "State: 23 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0"
1732
+ state_comment = "State: 23 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0"
1474
1733
  token.detach
1475
- expected_tokens = ["#Empty", "#Comment", "#TableRow", "#Other"]
1734
+ expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
1476
1735
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1477
1736
  raise error if (stop_at_first_error)
1478
1737
  add_error(context, error)
1479
1738
  return 23
1480
1739
  end
1481
1740
 
1482
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:0
1741
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:0
1483
1742
  def match_token_at_24(token, context)
1743
+ if match_EOF(context, token)
1744
+ end_rule(context, :Description);
1745
+ end_rule(context, :Examples);
1746
+ end_rule(context, :Examples_Definition);
1747
+ end_rule(context, :ScenarioOutline);
1748
+ end_rule(context, :Scenario_Definition);
1749
+ end_rule(context, :Feature);
1750
+ build(context, token);
1751
+ return 27
1752
+ end
1484
1753
  if match_Comment(context, token)
1485
1754
  end_rule(context, :Description);
1486
1755
  build(context, token);
@@ -1488,87 +1757,178 @@ module Gherkin
1488
1757
  end
1489
1758
  if match_TableRow(context, token)
1490
1759
  end_rule(context, :Description);
1760
+ start_rule(context, :Examples_Table);
1491
1761
  build(context, token);
1492
1762
  return 26
1493
1763
  end
1764
+ if match_TagLine(context, token)
1765
+ if lookahead_0(context, token)
1766
+ end_rule(context, :Description);
1767
+ end_rule(context, :Examples);
1768
+ end_rule(context, :Examples_Definition);
1769
+ start_rule(context, :Examples_Definition);
1770
+ start_rule(context, :Tags);
1771
+ build(context, token);
1772
+ return 22
1773
+ end
1774
+ end
1775
+ if match_TagLine(context, token)
1776
+ end_rule(context, :Description);
1777
+ end_rule(context, :Examples);
1778
+ end_rule(context, :Examples_Definition);
1779
+ end_rule(context, :ScenarioOutline);
1780
+ end_rule(context, :Scenario_Definition);
1781
+ start_rule(context, :Scenario_Definition);
1782
+ start_rule(context, :Tags);
1783
+ build(context, token);
1784
+ return 11
1785
+ end
1786
+ if match_ExamplesLine(context, token)
1787
+ end_rule(context, :Description);
1788
+ end_rule(context, :Examples);
1789
+ end_rule(context, :Examples_Definition);
1790
+ start_rule(context, :Examples_Definition);
1791
+ start_rule(context, :Examples);
1792
+ build(context, token);
1793
+ return 23
1794
+ end
1795
+ if match_ScenarioLine(context, token)
1796
+ end_rule(context, :Description);
1797
+ end_rule(context, :Examples);
1798
+ end_rule(context, :Examples_Definition);
1799
+ end_rule(context, :ScenarioOutline);
1800
+ end_rule(context, :Scenario_Definition);
1801
+ start_rule(context, :Scenario_Definition);
1802
+ start_rule(context, :Scenario);
1803
+ build(context, token);
1804
+ return 12
1805
+ end
1806
+ if match_ScenarioOutlineLine(context, token)
1807
+ end_rule(context, :Description);
1808
+ end_rule(context, :Examples);
1809
+ end_rule(context, :Examples_Definition);
1810
+ end_rule(context, :ScenarioOutline);
1811
+ end_rule(context, :Scenario_Definition);
1812
+ start_rule(context, :Scenario_Definition);
1813
+ start_rule(context, :ScenarioOutline);
1814
+ build(context, token);
1815
+ return 17
1816
+ end
1494
1817
  if match_Other(context, token)
1495
1818
  build(context, token);
1496
1819
  return 24
1497
1820
  end
1498
1821
 
1499
- state_comment = "State: 24 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:0"
1822
+ state_comment = "State: 24 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:0"
1500
1823
  token.detach
1501
- expected_tokens = ["#Comment", "#TableRow", "#Other"]
1824
+ expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]
1502
1825
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1503
1826
  raise error if (stop_at_first_error)
1504
1827
  add_error(context, error)
1505
1828
  return 24
1506
1829
  end
1507
1830
 
1508
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:0
1831
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:0
1509
1832
  def match_token_at_25(token, context)
1833
+ if match_EOF(context, token)
1834
+ end_rule(context, :Examples);
1835
+ end_rule(context, :Examples_Definition);
1836
+ end_rule(context, :ScenarioOutline);
1837
+ end_rule(context, :Scenario_Definition);
1838
+ end_rule(context, :Feature);
1839
+ build(context, token);
1840
+ return 27
1841
+ end
1510
1842
  if match_Comment(context, token)
1511
1843
  build(context, token);
1512
1844
  return 25
1513
1845
  end
1514
1846
  if match_TableRow(context, token)
1847
+ start_rule(context, :Examples_Table);
1515
1848
  build(context, token);
1516
1849
  return 26
1517
1850
  end
1518
- if match_Empty(context, token)
1851
+ if match_TagLine(context, token)
1852
+ if lookahead_0(context, token)
1853
+ end_rule(context, :Examples);
1854
+ end_rule(context, :Examples_Definition);
1855
+ start_rule(context, :Examples_Definition);
1856
+ start_rule(context, :Tags);
1519
1857
  build(context, token);
1520
- return 25
1858
+ return 22
1859
+ end
1521
1860
  end
1522
-
1523
- state_comment = "State: 25 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:0"
1524
- token.detach
1525
- expected_tokens = ["#Comment", "#TableRow", "#Empty"]
1526
- error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1527
- raise error if (stop_at_first_error)
1528
- add_error(context, error)
1529
- return 25
1530
- end
1531
-
1532
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>#TableRow:0
1533
- def match_token_at_26(token, context)
1534
- if match_TableRow(context, token)
1861
+ if match_TagLine(context, token)
1862
+ end_rule(context, :Examples);
1863
+ end_rule(context, :Examples_Definition);
1864
+ end_rule(context, :ScenarioOutline);
1865
+ end_rule(context, :Scenario_Definition);
1866
+ start_rule(context, :Scenario_Definition);
1867
+ start_rule(context, :Tags);
1535
1868
  build(context, token);
1536
- return 27
1869
+ return 11
1537
1870
  end
1538
- if match_Comment(context, token)
1871
+ if match_ExamplesLine(context, token)
1872
+ end_rule(context, :Examples);
1873
+ end_rule(context, :Examples_Definition);
1874
+ start_rule(context, :Examples_Definition);
1875
+ start_rule(context, :Examples);
1539
1876
  build(context, token);
1540
- return 26
1877
+ return 23
1878
+ end
1879
+ if match_ScenarioLine(context, token)
1880
+ end_rule(context, :Examples);
1881
+ end_rule(context, :Examples_Definition);
1882
+ end_rule(context, :ScenarioOutline);
1883
+ end_rule(context, :Scenario_Definition);
1884
+ start_rule(context, :Scenario_Definition);
1885
+ start_rule(context, :Scenario);
1886
+ build(context, token);
1887
+ return 12
1888
+ end
1889
+ if match_ScenarioOutlineLine(context, token)
1890
+ end_rule(context, :Examples);
1891
+ end_rule(context, :Examples_Definition);
1892
+ end_rule(context, :ScenarioOutline);
1893
+ end_rule(context, :Scenario_Definition);
1894
+ start_rule(context, :Scenario_Definition);
1895
+ start_rule(context, :ScenarioOutline);
1896
+ build(context, token);
1897
+ return 17
1541
1898
  end
1542
1899
  if match_Empty(context, token)
1543
1900
  build(context, token);
1544
- return 26
1901
+ return 25
1545
1902
  end
1546
1903
 
1547
- state_comment = "State: 26 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>#TableRow:0"
1904
+ state_comment = "State: 25 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:0"
1548
1905
  token.detach
1549
- expected_tokens = ["#TableRow", "#Comment", "#Empty"]
1906
+ expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]
1550
1907
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1551
1908
  raise error if (stop_at_first_error)
1552
1909
  add_error(context, error)
1553
- return 26
1910
+ return 25
1554
1911
  end
1555
1912
 
1556
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:3>#TableRow:0
1557
- def match_token_at_27(token, context)
1913
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:0
1914
+ def match_token_at_26(token, context)
1558
1915
  if match_EOF(context, token)
1916
+ end_rule(context, :Examples_Table);
1559
1917
  end_rule(context, :Examples);
1560
1918
  end_rule(context, :Examples_Definition);
1561
1919
  end_rule(context, :ScenarioOutline);
1562
1920
  end_rule(context, :Scenario_Definition);
1921
+ end_rule(context, :Feature);
1563
1922
  build(context, token);
1564
- return 28
1923
+ return 27
1565
1924
  end
1566
1925
  if match_TableRow(context, token)
1567
1926
  build(context, token);
1568
- return 27
1927
+ return 26
1569
1928
  end
1570
1929
  if match_TagLine(context, token)
1571
1930
  if lookahead_0(context, token)
1931
+ end_rule(context, :Examples_Table);
1572
1932
  end_rule(context, :Examples);
1573
1933
  end_rule(context, :Examples_Definition);
1574
1934
  start_rule(context, :Examples_Definition);
@@ -1578,6 +1938,7 @@ module Gherkin
1578
1938
  end
1579
1939
  end
1580
1940
  if match_TagLine(context, token)
1941
+ end_rule(context, :Examples_Table);
1581
1942
  end_rule(context, :Examples);
1582
1943
  end_rule(context, :Examples_Definition);
1583
1944
  end_rule(context, :ScenarioOutline);
@@ -1588,6 +1949,7 @@ module Gherkin
1588
1949
  return 11
1589
1950
  end
1590
1951
  if match_ExamplesLine(context, token)
1952
+ end_rule(context, :Examples_Table);
1591
1953
  end_rule(context, :Examples);
1592
1954
  end_rule(context, :Examples_Definition);
1593
1955
  start_rule(context, :Examples_Definition);
@@ -1596,6 +1958,7 @@ module Gherkin
1596
1958
  return 23
1597
1959
  end
1598
1960
  if match_ScenarioLine(context, token)
1961
+ end_rule(context, :Examples_Table);
1599
1962
  end_rule(context, :Examples);
1600
1963
  end_rule(context, :Examples_Definition);
1601
1964
  end_rule(context, :ScenarioOutline);
@@ -1606,6 +1969,7 @@ module Gherkin
1606
1969
  return 12
1607
1970
  end
1608
1971
  if match_ScenarioOutlineLine(context, token)
1972
+ end_rule(context, :Examples_Table);
1609
1973
  end_rule(context, :Examples);
1610
1974
  end_rule(context, :Examples_Definition);
1611
1975
  end_rule(context, :ScenarioOutline);
@@ -1617,44 +1981,53 @@ module Gherkin
1617
1981
  end
1618
1982
  if match_Comment(context, token)
1619
1983
  build(context, token);
1620
- return 27
1984
+ return 26
1621
1985
  end
1622
1986
  if match_Empty(context, token)
1623
1987
  build(context, token);
1624
- return 27
1988
+ return 26
1625
1989
  end
1626
1990
 
1627
- state_comment = "State: 27 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:3>#TableRow:0"
1991
+ state_comment = "State: 26 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:0"
1628
1992
  token.detach
1629
1993
  expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1630
1994
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1631
1995
  raise error if (stop_at_first_error)
1632
1996
  add_error(context, error)
1633
- return 27
1997
+ return 26
1634
1998
  end
1635
1999
 
1636
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0
1637
- def match_token_at_29(token, context)
2000
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0
2001
+ def match_token_at_28(token, context)
1638
2002
  if match_DocStringSeparator(context, token)
1639
2003
  build(context, token);
1640
- return 30
2004
+ return 29
1641
2005
  end
1642
2006
  if match_Other(context, token)
1643
2007
  build(context, token);
1644
- return 29
2008
+ return 28
1645
2009
  end
1646
2010
 
1647
- state_comment = "State: 29 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"
2011
+ state_comment = "State: 28 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"
1648
2012
  token.detach
1649
2013
  expected_tokens = ["#DocStringSeparator", "#Other"]
1650
2014
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1651
2015
  raise error if (stop_at_first_error)
1652
2016
  add_error(context, error)
1653
- return 29
2017
+ return 28
1654
2018
  end
1655
2019
 
1656
- # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0
1657
- def match_token_at_30(token, context)
2020
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0
2021
+ def match_token_at_29(token, context)
2022
+ if match_EOF(context, token)
2023
+ end_rule(context, :DocString);
2024
+ end_rule(context, :Step);
2025
+ end_rule(context, :ScenarioOutline);
2026
+ end_rule(context, :Scenario_Definition);
2027
+ end_rule(context, :Feature);
2028
+ build(context, token);
2029
+ return 27
2030
+ end
1658
2031
  if match_StepLine(context, token)
1659
2032
  end_rule(context, :DocString);
1660
2033
  end_rule(context, :Step);
@@ -1663,12 +2036,24 @@ module Gherkin
1663
2036
  return 20
1664
2037
  end
1665
2038
  if match_TagLine(context, token)
2039
+ if lookahead_0(context, token)
1666
2040
  end_rule(context, :DocString);
1667
2041
  end_rule(context, :Step);
1668
2042
  start_rule(context, :Examples_Definition);
1669
2043
  start_rule(context, :Tags);
1670
2044
  build(context, token);
1671
2045
  return 22
2046
+ end
2047
+ end
2048
+ if match_TagLine(context, token)
2049
+ end_rule(context, :DocString);
2050
+ end_rule(context, :Step);
2051
+ end_rule(context, :ScenarioOutline);
2052
+ end_rule(context, :Scenario_Definition);
2053
+ start_rule(context, :Scenario_Definition);
2054
+ start_rule(context, :Tags);
2055
+ build(context, token);
2056
+ return 11
1672
2057
  end
1673
2058
  if match_ExamplesLine(context, token)
1674
2059
  end_rule(context, :DocString);
@@ -1678,53 +2063,74 @@ module Gherkin
1678
2063
  build(context, token);
1679
2064
  return 23
1680
2065
  end
2066
+ if match_ScenarioLine(context, token)
2067
+ end_rule(context, :DocString);
2068
+ end_rule(context, :Step);
2069
+ end_rule(context, :ScenarioOutline);
2070
+ end_rule(context, :Scenario_Definition);
2071
+ start_rule(context, :Scenario_Definition);
2072
+ start_rule(context, :Scenario);
2073
+ build(context, token);
2074
+ return 12
2075
+ end
2076
+ if match_ScenarioOutlineLine(context, token)
2077
+ end_rule(context, :DocString);
2078
+ end_rule(context, :Step);
2079
+ end_rule(context, :ScenarioOutline);
2080
+ end_rule(context, :Scenario_Definition);
2081
+ start_rule(context, :Scenario_Definition);
2082
+ start_rule(context, :ScenarioOutline);
2083
+ build(context, token);
2084
+ return 17
2085
+ end
1681
2086
  if match_Comment(context, token)
1682
2087
  build(context, token);
1683
- return 30
2088
+ return 29
1684
2089
  end
1685
2090
  if match_Empty(context, token)
1686
2091
  build(context, token);
1687
- return 30
2092
+ return 29
1688
2093
  end
1689
2094
 
1690
- state_comment = "State: 30 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"
2095
+ state_comment = "State: 29 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"
1691
2096
  token.detach
1692
- expected_tokens = ["#StepLine", "#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
2097
+ expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1693
2098
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1694
2099
  raise error if (stop_at_first_error)
1695
2100
  add_error(context, error)
1696
- return 30
2101
+ return 29
1697
2102
  end
1698
2103
 
1699
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0
1700
- def match_token_at_31(token, context)
2104
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0
2105
+ def match_token_at_30(token, context)
1701
2106
  if match_DocStringSeparator(context, token)
1702
2107
  build(context, token);
1703
- return 32
2108
+ return 31
1704
2109
  end
1705
2110
  if match_Other(context, token)
1706
2111
  build(context, token);
1707
- return 31
2112
+ return 30
1708
2113
  end
1709
2114
 
1710
- state_comment = "State: 31 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"
2115
+ state_comment = "State: 30 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"
1711
2116
  token.detach
1712
2117
  expected_tokens = ["#DocStringSeparator", "#Other"]
1713
2118
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1714
2119
  raise error if (stop_at_first_error)
1715
2120
  add_error(context, error)
1716
- return 31
2121
+ return 30
1717
2122
  end
1718
2123
 
1719
- # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0
1720
- def match_token_at_32(token, context)
2124
+ # GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0
2125
+ def match_token_at_31(token, context)
1721
2126
  if match_EOF(context, token)
1722
2127
  end_rule(context, :DocString);
1723
2128
  end_rule(context, :Step);
1724
2129
  end_rule(context, :Scenario);
1725
2130
  end_rule(context, :Scenario_Definition);
2131
+ end_rule(context, :Feature);
1726
2132
  build(context, token);
1727
- return 28
2133
+ return 27
1728
2134
  end
1729
2135
  if match_StepLine(context, token)
1730
2136
  end_rule(context, :DocString);
@@ -1765,50 +2171,51 @@ module Gherkin
1765
2171
  end
1766
2172
  if match_Comment(context, token)
1767
2173
  build(context, token);
1768
- return 32
2174
+ return 31
1769
2175
  end
1770
2176
  if match_Empty(context, token)
1771
2177
  build(context, token);
1772
- return 32
2178
+ return 31
1773
2179
  end
1774
2180
 
1775
- state_comment = "State: 32 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"
2181
+ state_comment = "State: 31 - GherkinDocument:0>Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"
1776
2182
  token.detach
1777
2183
  expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1778
2184
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1779
2185
  raise error if (stop_at_first_error)
1780
2186
  add_error(context, error)
1781
- return 32
2187
+ return 31
1782
2188
  end
1783
2189
 
1784
- # Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0
1785
- def match_token_at_33(token, context)
2190
+ # GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0
2191
+ def match_token_at_32(token, context)
1786
2192
  if match_DocStringSeparator(context, token)
1787
2193
  build(context, token);
1788
- return 34
2194
+ return 33
1789
2195
  end
1790
2196
  if match_Other(context, token)
1791
2197
  build(context, token);
1792
- return 33
2198
+ return 32
1793
2199
  end
1794
2200
 
1795
- state_comment = "State: 33 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"
2201
+ state_comment = "State: 32 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"
1796
2202
  token.detach
1797
2203
  expected_tokens = ["#DocStringSeparator", "#Other"]
1798
2204
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1799
2205
  raise error if (stop_at_first_error)
1800
2206
  add_error(context, error)
1801
- return 33
2207
+ return 32
1802
2208
  end
1803
2209
 
1804
- # Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0
1805
- def match_token_at_34(token, context)
2210
+ # GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0
2211
+ def match_token_at_33(token, context)
1806
2212
  if match_EOF(context, token)
1807
2213
  end_rule(context, :DocString);
1808
2214
  end_rule(context, :Step);
1809
2215
  end_rule(context, :Background);
2216
+ end_rule(context, :Feature);
1810
2217
  build(context, token);
1811
- return 28
2218
+ return 27
1812
2219
  end
1813
2220
  if match_StepLine(context, token)
1814
2221
  end_rule(context, :DocString);
@@ -1846,20 +2253,20 @@ module Gherkin
1846
2253
  end
1847
2254
  if match_Comment(context, token)
1848
2255
  build(context, token);
1849
- return 34
2256
+ return 33
1850
2257
  end
1851
2258
  if match_Empty(context, token)
1852
2259
  build(context, token);
1853
- return 34
2260
+ return 33
1854
2261
  end
1855
2262
 
1856
- state_comment = "State: 34 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"
2263
+ state_comment = "State: 33 - GherkinDocument:0>Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"
1857
2264
  token.detach
1858
2265
  expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]
1859
2266
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1860
2267
  raise error if (stop_at_first_error)
1861
2268
  add_error(context, error)
1862
- return 34
2269
+ return 33
1863
2270
  end
1864
2271
 
1865
2272