calyx 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/calyx/grammar.rb +3 -1
- data/lib/calyx/grammar/production/choices.rb +1 -1
- data/lib/calyx/grammar/production/concat.rb +3 -1
- data/lib/calyx/grammar/production/expression.rb +4 -1
- data/lib/calyx/grammar/production/non_terminal.rb +1 -1
- data/lib/calyx/grammar/production/terminal.rb +1 -1
- data/lib/calyx/grammar/production/weighted_choices.rb +1 -1
- data/lib/calyx/grammar/registry.rb +1 -1
- data/lib/calyx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3e641762dd894b48936eb9e945531b94be732b4
|
4
|
+
data.tar.gz: 0875b1def9d94ae12c2685f92a1fabd418b27853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735ff80c2e8c154c07aa3344c4717c91212a5734ae79c03289d7b741b87e0b60a1c813fa5294733db6697e96fb443b2dce7938565893ab9744bbfb721aebd00b
|
7
|
+
data.tar.gz: abcfc630585f97fb81753f9fd77fbba90e3cc1399a396626c468d3ab30fe50dcb70829525962e527212ee174f60005aa2dc3fed440f5c82934f8b9dd4de4d823
|
data/lib/calyx/grammar.rb
CHANGED
@@ -8,9 +8,12 @@ module Calyx
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def evaluate
|
11
|
-
@
|
11
|
+
terminal = @production.evaluate.flatten.reject { |o| o.is_a?(Symbol) }.join(''.freeze)
|
12
|
+
expression = @methods.reduce(terminal) do |value,method|
|
12
13
|
value.send(method)
|
13
14
|
end
|
15
|
+
|
16
|
+
[:expression, expression]
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
data/lib/calyx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calyx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rickerby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|