srl_ruby 0.4.9 → 0.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53f0b4c07147644a3298d66dd4db0b7108fc1cc630debc1be7dc5721bca244bf
4
- data.tar.gz: 410029ea6b5ddc36c6161d50701500af1cb406e8b39bbfa2b6d6d60839db41eb
3
+ metadata.gz: 32a18d724b0eaeff828ffc7fa2413834ea9e16dd1c46a06af7d5438c56fec159
4
+ data.tar.gz: 628b07343fdd3da4a2903b48b392ce6b52880e68ad0f229efd0d702abe3a90df
5
5
  SHA512:
6
- metadata.gz: 0e6124858fe023541f5fc291790251c2c87a2c36cbf28f9285d4b4ed6b87c3705ce381da3536c5e70627101f17c3b203673ea175fbb3fe58f7d193219ef959c0
7
- data.tar.gz: a74fb973b4d74fe3546e10e9466654998f0f675ebaf9253932d8fb04b516feea767ab511c86fd11522df58084049a2b0f6455e1fd54ecde7920fd8f32550fc0b
6
+ metadata.gz: 376fa359b54c5f5434c70ca9d855d718bfb933e30c5cdf29409f23ee3113659577b5680c073e091ca42c7e3ed0c68836ed9120fb93aa3d2be1a78cdcae08d8fb
7
+ data.tar.gz: 256f800715bc35d61cf134cddb91f199455357712e5f197d271e7efaebb6e745c66970d4a02935dd6f6779f22eb9309af744f0de47e78226bed924ae22885847
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SrlRuby
4
- VERSION = '0.4.9'
4
+ VERSION = '0.4.10'
5
5
  end
@@ -32,7 +32,7 @@ module Acceptance
32
32
  Terminal2NodeClass
33
33
  end
34
34
 
35
- # rule('rule_file' => %w[srl_heading srl_tests]).as 'start_rule'
35
+ # rule('rule_file' => 'srl_heading tests').as 'start_rule'
36
36
  def reduce_start_rule(_production, _range, _tokens, theChildren)
37
37
  rule_file = RuleFileTests.new(theChildren[0])
38
38
  tests = theChildren.last.flatten
@@ -54,16 +54,6 @@ module Acceptance
54
54
  theChildren.last
55
55
  end
56
56
 
57
- # rule('srl_tests' => %w[srl_tests single_test]).as 'test_list'
58
- def reduce_test_list(_production, _range, _tokens, theChildren)
59
- theChildren[0] << theChildren[1]
60
- end
61
-
62
- # rule('srl_tests' => 'single_test').as 'one_test'
63
- def reduce_one_test(_production, _range, _tokens, theChildren)
64
- [theChildren.last]
65
- end
66
-
67
57
  # rule('match_test' => %w[MATCH: STRING_LIT]).as 'match_string'
68
58
  def reduce_match_string(_production, _range, _tokens, theChildren)
69
59
  MatchTest.new(theChildren.last)
@@ -85,17 +75,6 @@ module Acceptance
85
75
  theChildren[2]
86
76
  end
87
77
 
88
- # rule('capture_expectations' => %w[capture_expectations
89
- # single_expectation]).as 'assertion_list'
90
- def reduce_assertion_list(_production, _range, _tokens, theChildren)
91
- theChildren[0] << theChildren[1]
92
- end
93
-
94
- # rule('capture_expectations' => 'single_expectation').as 'one_expectation'
95
- def reduce_one_expectation(_production, _range, _tokens, theChildren)
96
- [theChildren.last]
97
- end
98
-
99
78
  # rule('single_expectation' => %w[DASH INTEGER COLON capture_variable
100
79
  # COLON STRING_LIT]).as 'capture_expectation'
101
80
  def reduce_capture_expectation(_production, _range, _tokens, theChildren)
@@ -6,7 +6,6 @@ require 'rley' # Load the Rley gem
6
6
  # Grammar for Test-Rule files
7
7
  # [File format](https://github.com/SimpleRegex/Test-Rules/blob/master/README.md)
8
8
  ########################################
9
- # Define a grammar for basic arithmetical expressions
10
9
  builder = Rley::grammar_builder do
11
10
  # Punctuation
12
11
  add_terminals('COLON', 'DASH')
@@ -19,24 +18,20 @@ builder = Rley::grammar_builder do
19
18
  add_terminals('INTEGER', 'STRING_LIT')
20
19
  add_terminals('IDENTIFIER', 'SRL_SOURCE')
21
20
 
22
- rule('rule_file' => 'srl_heading srl_tests').as 'start_rule'
23
- rule('srl_heading' => 'SRL SRL_SOURCE').as 'srl_source'
24
- rule('srl_tests' => 'srl_tests single_test').as 'test_list'
25
- rule('srl_tests' => 'single_test').as 'one_test'
26
- rule('single_test' => 'atomic_test').as 'single_atomic_test'
27
- rule('single_test' => 'compound_test').as 'single_compound_test'
28
- rule('atomic_test' => 'match_test').as 'atomic_match'
29
- rule('atomic_test' => 'no_match_test').as 'atomic_no_match'
30
- rule('compound_test' => 'capture_test').as 'compound_capture'
31
- rule('match_test' => 'MATCH STRING_LIT').as 'match_string'
32
- rule('no_match_test' => 'NO MATCH STRING_LIT').as 'no_match_string'
33
- rule('capture_test' => 'capture_heading capture_expectations').as 'capture_test'
34
- rule('capture_heading' => 'CAPTURE FOR STRING_LIT COLON').as 'capture_string'
35
- rule('capture_expectations' => 'capture_expectations single_expectation').as 'assertion_list'
36
- rule('capture_expectations' => 'single_expectation').as 'one_expectation'
37
- rule('single_expectation' => 'DASH INTEGER COLON capture_variable COLON STRING_LIT').as 'capture_expectation'
38
- rule('capture_variable' => 'INTEGER').as 'var_integer'
39
- rule('capture_variable' => 'IDENTIFIER').as 'var_identifier'
21
+ rule('rule_file' => 'srl_heading srl_test+').tag 'start_rule'
22
+ rule('srl_heading' => 'SRL SRL_SOURCE').tag 'srl_source'
23
+ rule('srl_test' => 'atomic_test').tag 'single_atomic_test'
24
+ rule('srl_test' => 'compound_test').tag 'single_compound_test'
25
+ rule('atomic_test' => 'match_test').tag 'atomic_match'
26
+ rule('atomic_test' => 'no_match_test').tag 'atomic_no_match'
27
+ rule('compound_test' => 'capture_test').tag 'compound_capture'
28
+ rule('match_test' => 'MATCH STRING_LIT').tag 'match_string'
29
+ rule('no_match_test' => 'NO MATCH STRING_LIT').tag 'no_match_string'
30
+ rule('capture_test' => 'capture_heading capture_expectation+').tag 'capture_test'
31
+ rule('capture_heading' => 'CAPTURE FOR STRING_LIT COLON').tag 'capture_string'
32
+ rule('capture_expectation' => 'DASH INTEGER COLON capture_variable COLON STRING_LIT').tag 'capture_expectation'
33
+ rule('capture_variable' => 'INTEGER').tag 'var_integer'
34
+ rule('capture_variable' => 'IDENTIFIER').tag 'var_identifier'
40
35
  end
41
36
 
42
37
  # And now build the grammar...
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srl_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Geshef