kalculator 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kalculator/evaluator.rb +4 -0
- data/lib/kalculator/lexer.rb +1 -0
- data/lib/kalculator/parser.rb +3 -0
- data/lib/kalculator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c192de434bfd521b2abde4bcdd7e19b33aabf7315eec6b999687478aa8a2321b
|
4
|
+
data.tar.gz: a66810da20caf1fe4a2b682d987b081c58c71aeeb74dec0ac99e69aab1d0168d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5c9b29cf0b2f2bb327610407e499ece24abc585b4f3f543de7cf31593fe2ad8836fe0038f5c37750c59e2959e27418e5b710d211bc2d89d065074dcc2f10bed
|
7
|
+
data.tar.gz: c7aa10d0ea25bc227ea19e4c160bca130e1fdcd417de0318e722c8813eb8df630adad85fad3413537fd1f9e8243ad17591a5e625762148ba0ed49a9026269bbd
|
data/lib/kalculator/evaluator.rb
CHANGED
data/lib/kalculator/lexer.rb
CHANGED
data/lib/kalculator/parser.rb
CHANGED
@@ -22,6 +22,9 @@ class Kalculator
|
|
22
22
|
clause('DATE LPAREN expression RPAREN') do |_, _, e0, _|
|
23
23
|
[:date, e0]
|
24
24
|
end
|
25
|
+
clause('EXISTS LPAREN IDENT RPAREN') do |_, _, n, _|
|
26
|
+
[:exists, n]
|
27
|
+
end
|
25
28
|
clause('MAX LPAREN expression COMMA expression RPAREN') { |_, _, left, _, right, _| [:max, left, right] }
|
26
29
|
clause('MIN LPAREN expression COMMA expression RPAREN') { |_, _, left, _, right, _| [:min, left, right] }
|
27
30
|
clause('LPAREN expression RPAREN') { |_, expression, _| expression }
|
data/lib/kalculator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kalculator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Ries
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rltk
|