sexpr 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/CHANGELOG.md +29 -0
  2. data/README.md +28 -2
  3. data/examples/bool_expr/bool_expr.citrus +6 -6
  4. data/examples/bool_expr/bool_expr.rb +68 -1
  5. data/lib/sexpr.rb +29 -22
  6. data/lib/sexpr/errors.rb +3 -0
  7. data/lib/sexpr/grammar.rb +7 -6
  8. data/lib/sexpr/grammar/options.rb +3 -0
  9. data/lib/sexpr/grammar/parsing.rb +6 -1
  10. data/lib/sexpr/grammar/tagging.rb +30 -11
  11. data/lib/sexpr/node.rb +30 -0
  12. data/lib/sexpr/parser.rb +2 -2
  13. data/lib/sexpr/parser/citrus.rb +6 -17
  14. data/lib/sexpr/parser/ext.rb +9 -0
  15. data/lib/sexpr/processor.rb +61 -0
  16. data/lib/sexpr/processor/helper.rb +31 -0
  17. data/lib/sexpr/processor/null_helper.rb +11 -0
  18. data/lib/sexpr/processor/sexpr_coercions.rb +44 -0
  19. data/lib/sexpr/rewriter.rb +20 -0
  20. data/lib/sexpr/version.rb +1 -1
  21. data/sexpr.noespec +1 -1
  22. data/spec/grammar/test_parse.rb +10 -6
  23. data/spec/grammar/test_sexpr.rb +47 -13
  24. data/spec/node/test_sexpr_copy.rb +35 -0
  25. data/spec/node/test_tracking_markers.rb +21 -0
  26. data/spec/parser/citrus/test_new.rb +0 -4
  27. data/spec/parser/citrus/test_parse.rb +4 -0
  28. data/spec/parser/citrus/test_registration.rb +0 -6
  29. data/spec/parser/citrus/test_to_sexpr.rb +22 -7
  30. data/spec/processor/helper/test_call.rb +51 -0
  31. data/spec/processor/test_build_helper_chain.rb +24 -0
  32. data/spec/processor/test_call.rb +46 -0
  33. data/spec/processor/test_helper.rb +19 -0
  34. data/spec/processor/test_main_processor.rb +18 -0
  35. data/spec/processor/test_sexpr_coercions.rb +46 -0
  36. data/spec/rewriter/test_copy_and_apply.rb +29 -0
  37. data/spec/spec_helper.rb +22 -0
  38. data/spec/test_readme_examples.rb +11 -0
  39. data/spec/test_rewriter.rb +16 -0
  40. metadata +106 -80
@@ -20,9 +20,5 @@ module Sexpr::Parser
20
20
  p.parser.should eq(bool_expr_parser)
21
21
  end
22
22
 
23
- it 'passes the options' do
24
- Citrus.new(bool_expr_parser, {:hello => "World"}).options[:hello].should eq("World")
25
- end
26
-
27
23
  end
28
24
  end
@@ -8,6 +8,10 @@ module Sexpr::Parser
8
8
  parser.parse("true").should be_a(::Citrus::Match)
9
9
  end
10
10
 
11
+ it 'is idempotent' do
12
+ parser.parse(parser.parse("true")).should be_a(::Citrus::Match)
13
+ end
14
+
11
15
  it 'raises a Citrus::ParserError when parsing fails' do
12
16
  lambda{
13
17
  parser.parse("bl and or")
@@ -10,11 +10,5 @@ module Sexpr::Parser
10
10
  Sexpr::Parser.factor(bool_expr_parser).should be_a(Citrus)
11
11
  end
12
12
 
13
- it 'should accept factor options, defaulting to defaults' do
14
- cit = Sexpr::Parser.factor(bool_expr_parser, {:hello => "World"})
15
- cit.options[:hello].should eq("World")
16
- cit.options.should have_key(:from_match_to_sexpr)
17
- end
18
-
19
13
  end
20
14
  end
@@ -1,15 +1,30 @@
1
1
  require 'spec_helper'
2
2
  module Sexpr::Parser
3
- describe Citrus, "sexpr" do
3
+ describe Citrus, "to_sexpr" do
4
4
 
5
- it 'calls value by default' do
6
- parser = Citrus.new(bool_expr_parser)
7
- parser.sexpr("true").should eq([:bool_lit, true])
5
+ let(:parser){
6
+ Citrus.new(bool_expr_parser)
7
+ }
8
+
9
+ subject{ parser.to_sexpr(parser.parse("not x")) }
10
+
11
+ it 'calls sexpr' do
12
+ subject.should eq([:bool_not, [:var_ref, "x"]])
13
+ end
14
+
15
+ it 'returns a Sexpr object' do
16
+ subject.should be_a(Sexpr)
17
+ end
18
+
19
+ it 'tags the modules recursively' do
20
+ subject.last.should be_a(Sexpr)
8
21
  end
9
22
 
10
- it 'delegates to from_match_to_sexpr if specified' do
11
- parser = Citrus.new(bool_expr_parser, :from_match_to_sexpr => lambda{|x| 12})
12
- parser.sexpr("true").should eq(12)
23
+ it 'sets the markers' do
24
+ [subject, subject.last].each do |s|
25
+ s.tracking_markers.should be_a(Hash)
26
+ s.tracking_markers[:citrus_match].should_not be_nil
27
+ end
13
28
  end
14
29
 
15
30
  end
@@ -0,0 +1,51 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ class Processor
4
+ describe Helper, "call" do
5
+
6
+ let(:helper) { FooHelper.new }
7
+ let(:processor) { FooProcessor.new }
8
+ let(:toplevel) {
9
+ Proc.new do |rw,node|
10
+ rw.should eq(processor)
11
+ [:toplevel, node]
12
+ end
13
+ }
14
+
15
+ it 'dispatches to the method when it exists' do
16
+ expected = \
17
+ [:foo_hello,
18
+ [:toplevel,
19
+ [:hello, "world"] ]]
20
+ got = helper.call(processor, [:hello, "world"], &toplevel)
21
+ got.should eq(expected)
22
+ end
23
+
24
+ it 'falls back to yielding when no method' do
25
+ expected = \
26
+ [:toplevel,
27
+ [:nosuchone] ]
28
+ got = helper.call(processor, [:nosuchone], &toplevel)
29
+ got.should eq(expected)
30
+ end
31
+
32
+ it 'calls next_in_chain when set' do
33
+ helper.next_in_chain = Class.new do
34
+ def call(rw, node)
35
+ raise unless rw.is_a?(FooProcessor)
36
+ yield rw, [:next, node]
37
+ end
38
+ end.new
39
+
40
+ expected = \
41
+ [:foo_hello,
42
+ [:toplevel,
43
+ [:next,
44
+ [:hello, "world"] ]]]
45
+ got = helper.call(processor, [:hello, "world"], &toplevel)
46
+ got.should eq(expected)
47
+ end
48
+
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ describe Processor, "build_helper_chain" do
4
+
5
+ def chain(helpers)
6
+ Processor.build_helper_chain(helpers)
7
+ end
8
+
9
+ it 'returns a NullHelper instance when the chain is empty' do
10
+ chain([]).should be_a(Processor::NullHelper)
11
+ end
12
+
13
+ it 'returns an instance of the first helper when a singleton chain' do
14
+ chain([ FooHelper ]).should be_a(FooHelper)
15
+ end
16
+
17
+ it 'returns chained helpers when a list' do
18
+ chain = chain([ FooHelper, BarHelper ])
19
+ chain.should be_a(FooHelper)
20
+ chain.next_in_chain.should be_a(BarHelper)
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,46 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ describe Processor, 'call' do
4
+
5
+ let(:procclass){
6
+ Class.new(Processor) do
7
+
8
+ def on_hello(sexpr)
9
+ [:seen_hello, sexpr]
10
+ end
11
+
12
+ def on_missing(sexpr)
13
+ if sexpr.first == :nosuchone
14
+ [:seen_missing, sexpr]
15
+ else
16
+ super
17
+ end
18
+ end
19
+
20
+ end
21
+ }
22
+ let(:proc){ procclass.new }
23
+
24
+ it 'dispatches to existing methods' do
25
+ ast = [:hello, "world"]
26
+ proc.call(ast).should eq([:seen_hello, [:hello, "world"]])
27
+ end
28
+
29
+ it 'calls on_missing when not found' do
30
+ ast = [:nosuchone, "world"]
31
+ proc.call(ast).should eq([:seen_missing, [:nosuchone, "world"]])
32
+ end
33
+
34
+ it 'raises unexpected by default in on_missing' do
35
+ ast = [:nonono, "world"]
36
+ lambda{ proc.call(ast) }.should raise_error(UnexpectedSexprError, /nonono/)
37
+ end
38
+
39
+ it 'raises an ArgumentError unless called on a sexpr' do
40
+ lambda{
41
+ proc.call("world").should raise_error(ArgumentError, /world/)
42
+ }
43
+ end
44
+
45
+ end
46
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ describe Processor, "helper" do
4
+
5
+ it 'installs the helping class in the registered helpers' do
6
+ Processor.helpers.should eq([])
7
+ FooProcessor.helpers.should eq([FooHelper])
8
+ BarProcessor.helpers.should eq([FooHelper, BarHelper])
9
+ end
10
+
11
+ it 'extends the processor classes with Methods modules' do
12
+ FooProcessor.included_modules.should be_include(FooHelper::Methods)
13
+ FooProcessor.included_modules.should_not be_include(BarHelper::Methods)
14
+ BarProcessor.included_modules.should be_include(FooHelper::Methods)
15
+ BarProcessor.included_modules.should be_include(BarHelper::Methods)
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ describe Processor, "main_processor" do
4
+
5
+ let(:procclass){ Class.new(Processor) }
6
+
7
+ it 'defaults to self' do
8
+ proc = procclass.new
9
+ proc.main_processor.should eq(proc)
10
+ end
11
+
12
+ it 'may be specified through options' do
13
+ proc = procclass.new(:main_processor => :hello)
14
+ proc.main_processor.should eq(:hello)
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,46 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ class Processor
4
+ describe SexprCoercions do
5
+
6
+ let(:helper){ SexprCoercions.new }
7
+ let(:processor){ Processor.new }
8
+
9
+ it 'extends input sexprs' do
10
+ sexpr = [:hello, "world"]
11
+ seen = helper.call(processor, sexpr) do |_,n|
12
+ n.should be_a(Sexpr)
13
+ n
14
+ end
15
+ seen.should eq(sexpr)
16
+ end
17
+
18
+ it 'extends output sexprs' do
19
+ sexpr = [:hello, "world"]
20
+ seen = helper.call(processor, sexpr) do |_,n|
21
+ n.should be_a(Sexpr)
22
+ [:result]
23
+ end
24
+ seen.should eq([:result])
25
+ seen.should be_a(Sexpr)
26
+ end
27
+
28
+ it 'does not require the output to be a sexpr' do
29
+ sexpr = [:hello, "world"]
30
+ seen = helper.call(processor, sexpr) do |_,n|
31
+ n.should be_a(Sexpr)
32
+ "blah"
33
+ end
34
+ seen.should eq("blah")
35
+ seen.should_not be_a(Sexpr)
36
+ end
37
+
38
+ it 'fails with a string, unless the underlying grammar may parse' do
39
+ lambda{
40
+ helper.call(processor, "blah") do |_,n| end
41
+ }.should raise_error(NoParserError)
42
+ end
43
+
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ describe Rewriter, "copy_and_apply" do
4
+
5
+ let(:rwclass){
6
+ Class.new(Rewriter){
7
+ def on_hello(sexpr)
8
+ copy_and_apply(sexpr)
9
+ end
10
+ def on_lit(sexpr)
11
+ [:lit, sexpr.last.upcase]
12
+ end
13
+ }
14
+ }
15
+ let(:rw){ rwclass.new }
16
+
17
+ it 'provides a friendly way of rewriting' do
18
+ sexpr = [:hello, [:lit, "world"]]
19
+ rw.call(sexpr).should eq([:hello, [:lit, "WORLD"]])
20
+ end
21
+
22
+ it 'extends input and output sexpr with the Sexpr module' do
23
+ sexpr = [:hello, [:lit, "world"]]
24
+ rw.call(sexpr).should be_a(Sexpr)
25
+ sexpr.should be_a(Sexpr)
26
+ end
27
+
28
+ end
29
+ end
@@ -7,6 +7,28 @@ $LOAD_PATH.unshift (root/"lib").to_s
7
7
  require 'sexpr'
8
8
  require (root/"examples/bool_expr/bool_expr").to_s
9
9
 
10
+ class FooHelper < Sexpr::Processor::Helper
11
+ module Methods
12
+ end
13
+
14
+ def on_hello(rw, node)
15
+ raise unless rw.is_a?(FooProcessor)
16
+ [:foo_hello, yield(rw, node)]
17
+ end
18
+
19
+ end
20
+ class FooProcessor < Sexpr::Processor
21
+ helper FooHelper
22
+ end
23
+
24
+ class BarHelper < Sexpr::Processor::Helper
25
+ module Methods
26
+ end
27
+ end
28
+ class BarProcessor < FooProcessor
29
+ helper BarHelper
30
+ end
31
+
10
32
  def fixtures_path
11
33
  Path.dir/"../examples/bool_expr"
12
34
  end
@@ -43,12 +43,23 @@ describe "the README examples" do
43
43
  # the grammar can also be used to automatically have support on top of
44
44
  # such s-expressions
45
45
  expr = grammar.sexpr([:bool_lit, true])
46
+ (Sexpr===expr).should be_true
46
47
 
47
48
  (expr.sexpr_type).should eq(:bool_lit)
48
49
  # => :bool_lit
49
50
 
50
51
  (expr.sexpr_body).should eq([true])
51
52
  # => [true]
53
+
54
+ copy = expr.sexpr_copy do |base,child|
55
+ # copy a s-expression ala Enumerable#inject (base is [:bool_lit] initially)
56
+ base << [:bool_lit, !child]
57
+ end
58
+ copy.should eq([:bool_lit, [:bool_lit, false]])
59
+ # => [:bool_lit, [:bool_lit, false]]
60
+
61
+ (Sexpr===copy).should be_true
62
+
52
63
  end
53
64
 
54
65
  end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+ module Sexpr
3
+ describe Rewriter do
4
+
5
+ it 'has a SexprCoercions helper by default' do
6
+ Rewriter.helpers.should eq([Processor::SexprCoercions])
7
+ end
8
+
9
+ it 'allows subclassing while conserving helpers' do
10
+ subclass = Class.new(Rewriter)
11
+ subclass.helpers.should eq([Processor::SexprCoercions])
12
+ subclass.helpers.object_id.should_not eq(Rewriter.helpers.object_id)
13
+ end
14
+
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sexpr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-21 00:00:00.000000000 Z
12
+ date: 2012-02-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: epath
16
- requirement: &70125157365880 !ruby/object:Gem::Requirement
16
+ requirement: &84257100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.0.1
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70125157365880
24
+ version_requirements: *84257100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: citrus
27
- requirement: &70125157365260 !ruby/object:Gem::Requirement
27
+ requirement: &84256730 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.4'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70125157365260
35
+ version_requirements: *84256730
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70125157364640 !ruby/object:Gem::Requirement
38
+ requirement: &84256430 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.9.2
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70125157364640
46
+ version_requirements: *84256430
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70125157383820 !ruby/object:Gem::Requirement
49
+ requirement: &84256090 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.8.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70125157383820
57
+ version_requirements: *84256090
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: wlang
60
- requirement: &70125157383220 !ruby/object:Gem::Requirement
60
+ requirement: &84255790 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 0.10.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70125157383220
68
+ version_requirements: *84255790
69
69
  description: Sexpr helps manipulating s-expressions in ruby.
70
70
  email:
71
71
  - blambeau@gmail.com
@@ -81,78 +81,94 @@ files:
81
81
  - CHANGELOG.md
82
82
  - Gemfile
83
83
  - Gemfile.lock
84
- - examples/bool_expr/bool_expr.citrus
85
84
  - examples/bool_expr/bool_expr.rb
85
+ - examples/bool_expr/bool_expr.citrus
86
86
  - examples/bool_expr/bool_expr.sexp.yml
87
- - lib/sexpr/errors.rb
88
- - lib/sexpr/grammar/matching.rb
89
- - lib/sexpr/grammar/options.rb
90
- - lib/sexpr/grammar/parsing.rb
91
- - lib/sexpr/grammar/tagging.rb
92
- - lib/sexpr/grammar.rb
93
- - lib/sexpr/loader.rb
94
- - lib/sexpr/matcher/alternative.rb
95
- - lib/sexpr/matcher/many.rb
96
- - lib/sexpr/matcher/reference.rb
87
+ - lib/sexpr.rb
88
+ - lib/sexpr/matcher/terminal.rb
97
89
  - lib/sexpr/matcher/rule.rb
90
+ - lib/sexpr/matcher/alternative.rb
98
91
  - lib/sexpr/matcher/sequence.rb
99
- - lib/sexpr/matcher/terminal.rb
100
- - lib/sexpr/matcher.rb
92
+ - lib/sexpr/matcher/reference.rb
93
+ - lib/sexpr/matcher/many.rb
94
+ - lib/sexpr/rewriter.rb
95
+ - lib/sexpr/grammar.rb
101
96
  - lib/sexpr/node.rb
97
+ - lib/sexpr/processor/sexpr_coercions.rb
98
+ - lib/sexpr/processor/helper.rb
99
+ - lib/sexpr/processor/null_helper.rb
100
+ - lib/sexpr/processor.rb
102
101
  - lib/sexpr/parser/citrus.rb
102
+ - lib/sexpr/parser/ext.rb
103
+ - lib/sexpr/errors.rb
104
+ - lib/sexpr/loader.rb
105
+ - lib/sexpr/grammar/parsing.rb
106
+ - lib/sexpr/grammar/tagging.rb
107
+ - lib/sexpr/grammar/options.rb
108
+ - lib/sexpr/grammar/matching.rb
103
109
  - lib/sexpr/parser.rb
110
+ - lib/sexpr/matcher.rb
104
111
  - lib/sexpr/version.rb
105
- - lib/sexpr.rb
106
112
  - LICENCE.md
107
113
  - Manifest.txt
108
114
  - Rakefile
109
115
  - README.md
110
- - spec/grammar/matching/test_compile_rule.rb
111
- - spec/grammar/matching/test_compile_rule_defn.rb
112
- - spec/grammar/options/test_install_parser.rb
113
- - spec/grammar/options/test_install_path.rb
114
- - spec/grammar/options/test_install_root.rb
115
- - spec/grammar/tagging/test_looks_a_sexpr.rb
116
- - spec/grammar/tagging/test_mod2rulename.rb
117
- - spec/grammar/tagging/test_rule2modname.rb
118
- - spec/grammar/tagging/test_tag_sexpr.rb
119
- - spec/grammar/test_new.rb
120
- - spec/grammar/test_parse.rb
121
- - spec/grammar/test_sexpr.rb
122
- - spec/grammar.yml
123
- - spec/matcher/alternative/test_eat.rb
124
- - spec/matcher/alternative/test_match_q.rb
125
- - spec/matcher/many/test_eat.rb
126
- - spec/matcher/many/test_initialize.rb
127
- - spec/matcher/many/test_match_q.rb
116
+ - spec/spec_helper.rb
128
117
  - spec/matcher/reference/test_eat.rb
129
118
  - spec/matcher/reference/test_match_q.rb
130
119
  - spec/matcher/rule/test_eat.rb
131
120
  - spec/matcher/rule/test_match_q.rb
121
+ - spec/matcher/many/test_eat.rb
122
+ - spec/matcher/many/test_initialize.rb
123
+ - spec/matcher/many/test_match_q.rb
132
124
  - spec/matcher/sequence/test_eat.rb
133
125
  - spec/matcher/sequence/test_match_q.rb
134
126
  - spec/matcher/terminal/test_eat.rb
135
- - spec/matcher/terminal/test_match_q.rb
136
127
  - spec/matcher/terminal/test_terminal_match.rb
137
- - spec/node/test_sexpr_body.rb
138
- - spec/node/test_sexpr_type.rb
128
+ - spec/matcher/terminal/test_match_q.rb
129
+ - spec/matcher/alternative/test_eat.rb
130
+ - spec/matcher/alternative/test_match_q.rb
131
+ - spec/rewriter/test_copy_and_apply.rb
132
+ - spec/processor/test_helper.rb
133
+ - spec/processor/test_sexpr_coercions.rb
134
+ - spec/processor/test_main_processor.rb
135
+ - spec/processor/test_build_helper_chain.rb
136
+ - spec/processor/test_call.rb
137
+ - spec/processor/helper/test_call.rb
138
+ - spec/test_rewriter.rb
139
+ - spec/grammar.yml
139
140
  - spec/parser/citrus/test_new.rb
140
- - spec/parser/citrus/test_parse.rb
141
- - spec/parser/citrus/test_recognize.rb
142
141
  - spec/parser/citrus/test_registration.rb
142
+ - spec/parser/citrus/test_parse.rb
143
143
  - spec/parser/citrus/test_to_sexpr.rb
144
+ - spec/parser/citrus/test_recognize.rb
144
145
  - spec/parser/test_factor.rb
145
146
  - spec/parser/test_input_text.rb
146
- - spec/spec_helper.rb
147
+ - spec/test_sexpr.rb
147
148
  - spec/test_load.rb
149
+ - spec/grammar/test_new.rb
150
+ - spec/grammar/tagging/test_mod2rulename.rb
151
+ - spec/grammar/tagging/test_rule2modname.rb
152
+ - spec/grammar/tagging/test_looks_a_sexpr.rb
153
+ - spec/grammar/tagging/test_tag_sexpr.rb
154
+ - spec/grammar/test_sexpr.rb
155
+ - spec/grammar/options/test_install_root.rb
156
+ - spec/grammar/options/test_install_parser.rb
157
+ - spec/grammar/options/test_install_path.rb
158
+ - spec/grammar/test_parse.rb
159
+ - spec/grammar/matching/test_compile_rule.rb
160
+ - spec/grammar/matching/test_compile_rule_defn.rb
161
+ - spec/node/test_tracking_markers.rb
162
+ - spec/node/test_sexpr_copy.rb
163
+ - spec/node/test_sexpr_body.rb
164
+ - spec/node/test_sexpr_type.rb
148
165
  - spec/test_readme_examples.rb
149
- - spec/test_sexpr.rb
150
166
  - tasks/debug_mail.rake
151
- - tasks/debug_mail.txt
167
+ - tasks/yard.rake
152
168
  - tasks/gem.rake
153
169
  - tasks/spec_test.rake
154
170
  - tasks/unit_test.rake
155
- - tasks/yard.rake
171
+ - tasks/debug_mail.txt
156
172
  homepage: https://github.com/blambeau/sexp
157
173
  licenses: []
158
174
  post_install_message:
@@ -167,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
183
  version: '0'
168
184
  segments:
169
185
  - 0
170
- hash: -235845001447098495
186
+ hash: -185808739
171
187
  required_rubygems_version: !ruby/object:Gem::Requirement
172
188
  none: false
173
189
  requirements:
@@ -176,48 +192,58 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
192
  version: '0'
177
193
  requirements: []
178
194
  rubyforge_project:
179
- rubygems_version: 1.8.10
195
+ rubygems_version: 1.8.15
180
196
  signing_key:
181
197
  specification_version: 3
182
198
  summary: A compilation framework around s-expressions
183
199
  test_files:
184
- - spec/grammar/matching/test_compile_rule.rb
185
- - spec/grammar/matching/test_compile_rule_defn.rb
186
- - spec/grammar/options/test_install_parser.rb
187
- - spec/grammar/options/test_install_path.rb
188
- - spec/grammar/options/test_install_root.rb
189
- - spec/grammar/tagging/test_looks_a_sexpr.rb
190
- - spec/grammar/tagging/test_mod2rulename.rb
191
- - spec/grammar/tagging/test_rule2modname.rb
192
- - spec/grammar/tagging/test_tag_sexpr.rb
193
- - spec/grammar/test_new.rb
194
- - spec/grammar/test_parse.rb
195
- - spec/grammar/test_sexpr.rb
196
- - spec/grammar.yml
197
- - spec/matcher/alternative/test_eat.rb
198
- - spec/matcher/alternative/test_match_q.rb
199
- - spec/matcher/many/test_eat.rb
200
- - spec/matcher/many/test_initialize.rb
201
- - spec/matcher/many/test_match_q.rb
200
+ - spec/spec_helper.rb
202
201
  - spec/matcher/reference/test_eat.rb
203
202
  - spec/matcher/reference/test_match_q.rb
204
203
  - spec/matcher/rule/test_eat.rb
205
204
  - spec/matcher/rule/test_match_q.rb
205
+ - spec/matcher/many/test_eat.rb
206
+ - spec/matcher/many/test_initialize.rb
207
+ - spec/matcher/many/test_match_q.rb
206
208
  - spec/matcher/sequence/test_eat.rb
207
209
  - spec/matcher/sequence/test_match_q.rb
208
210
  - spec/matcher/terminal/test_eat.rb
209
- - spec/matcher/terminal/test_match_q.rb
210
211
  - spec/matcher/terminal/test_terminal_match.rb
211
- - spec/node/test_sexpr_body.rb
212
- - spec/node/test_sexpr_type.rb
212
+ - spec/matcher/terminal/test_match_q.rb
213
+ - spec/matcher/alternative/test_eat.rb
214
+ - spec/matcher/alternative/test_match_q.rb
215
+ - spec/rewriter/test_copy_and_apply.rb
216
+ - spec/processor/test_helper.rb
217
+ - spec/processor/test_sexpr_coercions.rb
218
+ - spec/processor/test_main_processor.rb
219
+ - spec/processor/test_build_helper_chain.rb
220
+ - spec/processor/test_call.rb
221
+ - spec/processor/helper/test_call.rb
222
+ - spec/test_rewriter.rb
223
+ - spec/grammar.yml
213
224
  - spec/parser/citrus/test_new.rb
214
- - spec/parser/citrus/test_parse.rb
215
- - spec/parser/citrus/test_recognize.rb
216
225
  - spec/parser/citrus/test_registration.rb
226
+ - spec/parser/citrus/test_parse.rb
217
227
  - spec/parser/citrus/test_to_sexpr.rb
228
+ - spec/parser/citrus/test_recognize.rb
218
229
  - spec/parser/test_factor.rb
219
230
  - spec/parser/test_input_text.rb
220
- - spec/spec_helper.rb
231
+ - spec/test_sexpr.rb
221
232
  - spec/test_load.rb
233
+ - spec/grammar/test_new.rb
234
+ - spec/grammar/tagging/test_mod2rulename.rb
235
+ - spec/grammar/tagging/test_rule2modname.rb
236
+ - spec/grammar/tagging/test_looks_a_sexpr.rb
237
+ - spec/grammar/tagging/test_tag_sexpr.rb
238
+ - spec/grammar/test_sexpr.rb
239
+ - spec/grammar/options/test_install_root.rb
240
+ - spec/grammar/options/test_install_parser.rb
241
+ - spec/grammar/options/test_install_path.rb
242
+ - spec/grammar/test_parse.rb
243
+ - spec/grammar/matching/test_compile_rule.rb
244
+ - spec/grammar/matching/test_compile_rule_defn.rb
245
+ - spec/node/test_tracking_markers.rb
246
+ - spec/node/test_sexpr_copy.rb
247
+ - spec/node/test_sexpr_body.rb
248
+ - spec/node/test_sexpr_type.rb
222
249
  - spec/test_readme_examples.rb
223
- - spec/test_sexpr.rb