klam 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.rspec +0 -0
- data/.travis.yml +8 -0
- data/Gemfile +1 -0
- data/LICENSE.txt +19 -0
- data/PROGRESS.asciidoc +105 -0
- data/README.asciidoc +11 -0
- data/Rakefile +5 -0
- data/klam.gemspec +28 -0
- data/lib/klam.rb +16 -0
- data/lib/klam/compilation_stages.rb +4 -0
- data/lib/klam/compilation_stages/convert_freezes_to_lambdas.rb +17 -0
- data/lib/klam/compilation_stages/convert_lexical_variables.rb +79 -0
- data/lib/klam/compilation_stages/convert_partial_applications_to_lambdas.rb +35 -0
- data/lib/klam/compilation_stages/convert_self_tail_calls_to_loops.rb +147 -0
- data/lib/klam/compilation_stages/curry_abstraction_applications.rb +33 -0
- data/lib/klam/compilation_stages/emit_ruby.rb +232 -0
- data/lib/klam/compilation_stages/kl_to_internal_representation.rb +21 -0
- data/lib/klam/compilation_stages/make_abstractions_monadic.rb +26 -0
- data/lib/klam/compilation_stages/make_abstractions_variadic.rb +23 -0
- data/lib/klam/compilation_stages/simplify_boolean_operations.rb +74 -0
- data/lib/klam/compilation_stages/strip_type_declarations.rb +24 -0
- data/lib/klam/compiler.rb +63 -0
- data/lib/klam/cons.rb +18 -0
- data/lib/klam/converters.rb +4 -0
- data/lib/klam/converters/.list.rb.swp +0 -0
- data/lib/klam/converters/list.rb +29 -0
- data/lib/klam/environment.rb +61 -0
- data/lib/klam/error.rb +4 -0
- data/lib/klam/lexer.rb +185 -0
- data/lib/klam/primitives.rb +4 -0
- data/lib/klam/primitives/arithmetic.rb +49 -0
- data/lib/klam/primitives/assignments.rb +13 -0
- data/lib/klam/primitives/boolean_operations.rb +22 -0
- data/lib/klam/primitives/error_handling.rb +19 -0
- data/lib/klam/primitives/generic_functions.rb +19 -0
- data/lib/klam/primitives/lists.rb +23 -0
- data/lib/klam/primitives/streams.rb +32 -0
- data/lib/klam/primitives/strings.rb +58 -0
- data/lib/klam/primitives/symbols.rb +16 -0
- data/lib/klam/primitives/time.rb +19 -0
- data/lib/klam/primitives/vectors.rb +26 -0
- data/lib/klam/reader.rb +46 -0
- data/lib/klam/template.rb +38 -0
- data/lib/klam/variable.rb +21 -0
- data/lib/klam/variable_generator.rb +12 -0
- data/lib/klam/version.rb +3 -0
- data/spec/functional/application_spec.rb +94 -0
- data/spec/functional/atoms_spec.rb +56 -0
- data/spec/functional/extensions/do_spec.rb +22 -0
- data/spec/functional/primitives/assignments_spec.rb +38 -0
- data/spec/functional/primitives/boolean_operations_spec.rb +133 -0
- data/spec/functional/primitives/error_handling_spec.rb +22 -0
- data/spec/functional/primitives/generic_functions_spec.rb +82 -0
- data/spec/functional/tail_call_optimization_spec.rb +71 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/unit/klam/compilation_stages/convert_lexical_variables_spec.rb +58 -0
- data/spec/unit/klam/compilation_stages/convert_self_tail_calls_to_loops_spec.rb +33 -0
- data/spec/unit/klam/compilation_stages/curry_abstraction_applications_spec.rb +19 -0
- data/spec/unit/klam/compilation_stages/make_abstractions_variadic_spec.rb +12 -0
- data/spec/unit/klam/converters/list_spec.rb +57 -0
- data/spec/unit/klam/lexer_spec.rb +149 -0
- data/spec/unit/klam/primitives/arithmetic_spec.rb +153 -0
- data/spec/unit/klam/primitives/boolean_operations_spec.rb +39 -0
- data/spec/unit/klam/primitives/error_handling_spec.rb +19 -0
- data/spec/unit/klam/primitives/lists_spec.rb +49 -0
- data/spec/unit/klam/primitives/strings_spec.rb +53 -0
- data/spec/unit/klam/primitives/symbols_spec.rb +19 -0
- data/spec/unit/klam/primitives/time_spec.rb +16 -0
- data/spec/unit/klam/primitives/vectors_spec.rb +55 -0
- data/spec/unit/klam/reader_spec.rb +47 -0
- data/spec/unit/klam/template_spec.rb +28 -0
- data/spec/unit/klam/variable_spec.rb +22 -0
- data/spec/unit/klam/version_spec.rb +7 -0
- metadata +225 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Primitives::ErrorHandling do
|
4
|
+
include Klam::Primitives::ErrorHandling
|
5
|
+
|
6
|
+
describe '#simple-error' do
|
7
|
+
it 'raises an error having the supplied message' do
|
8
|
+
expect {
|
9
|
+
send(:"simple-error", 'oops!')
|
10
|
+
}.to raise_error(Klam::Error, 'oops!')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '#error-to-string' do
|
15
|
+
it 'extracts the message from the given error' do
|
16
|
+
expect(send(:"error-to-string", Klam::Error.new('oops!'))).to eq('oops!')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Primitives::Lists do
|
4
|
+
include Klam::Primitives::Lists
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
@head = :head
|
8
|
+
@tail = :tail
|
9
|
+
@cons = cons(@head, @tail)
|
10
|
+
@empty_list = Klam::Primitives::Lists::EMPTY_LIST
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '.cons' do
|
14
|
+
it 'returns an object recognized by the cons? predicate' do
|
15
|
+
expect(cons?(@cons)).to be true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '.hd' do
|
20
|
+
it 'returns the head of the list' do
|
21
|
+
expect(hd(@cons)).to eq(@head)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'raises an exception when applied to the empty list' do
|
25
|
+
expect { hd(@empty_list) }.to raise_error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '.tl' do
|
30
|
+
it 'returns the tail of the list' do
|
31
|
+
expect(tl(@cons)).to eq(@tail)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'raises an exception when applied to the empty list' do
|
35
|
+
expect { tl(@empty_list) }.to raise_error
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe '.cons?' do
|
40
|
+
it 'returns false for the empty list' do
|
41
|
+
expect(cons?(@emtpy_list)).to be false
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'returns false for atoms' do
|
45
|
+
applications = [true, false, 37, :symbol, 'string'].map { |a| cons?(a) }
|
46
|
+
expect(applications.uniq).to eq([false])
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Primitives::Strings do
|
4
|
+
include Klam::Primitives::Strings
|
5
|
+
|
6
|
+
describe '(pos Str N)' do
|
7
|
+
it 'returns the character at zero-based index N' do
|
8
|
+
expect(pos('howdy', 1)).to eq('o')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'raises an error if N is negative' do
|
12
|
+
expect {
|
13
|
+
pos('howdy', -1)
|
14
|
+
}.to raise_error(Klam::Error, 'index out of bounds: -1')
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'raises an error if N is beyond the end of the string' do
|
18
|
+
expect {
|
19
|
+
pos('howdy', 5)
|
20
|
+
}.to raise_error(Klam::Error, 'index out of bounds: 5')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '(tlstr Str)' do
|
25
|
+
it 'returns a string containing all but the first character of S' do
|
26
|
+
expect(tlstr('howdy')).to eq('owdy')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'raises an error when Str is empty' do
|
30
|
+
expect {
|
31
|
+
tlstr('')
|
32
|
+
}.to raise_error('attempted to take tail of empty string')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '(cn S1 S2)' do
|
37
|
+
it 'returns S1 concatenated with S2' do
|
38
|
+
expect(cn('hi ', 'there')).to eq('hi there')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe '(n->string N)' do
|
43
|
+
it 'returns a unit string with the character having codepoint N' do
|
44
|
+
expect(send(:"n->string", 65)).to eq('A')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe '(string->n)' do
|
49
|
+
it 'returns the codepoint of the first character' do
|
50
|
+
expect(send(:"string->n", 'A')).to eq(65)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Primitives::Symbols do
|
4
|
+
include Klam::Primitives::Symbols
|
5
|
+
|
6
|
+
describe '(intern Str)' do
|
7
|
+
it 'returns the symbol corresponding to the given string' do
|
8
|
+
expect(intern('foo')).to eq(:foo)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns the boolean true when given the string "true"' do
|
12
|
+
expect(intern('true')).to be(true)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'returns the boolean false when given the string "false"' do
|
16
|
+
expect(intern('false')).to be(false)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Primitives::Time do
|
4
|
+
include Klam::Primitives::Time
|
5
|
+
describe '(time Type)' do
|
6
|
+
it 'returns the current time in seconds as a float when Type is :real' do
|
7
|
+
allow(Time).to receive(:now).and_return(123.4)
|
8
|
+
expect(send(:"get-time", :real)).to eq(123.4)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns the current time in seconds as an integer when Type is :unix' do
|
12
|
+
allow(Time).to receive(:now).and_return(123.4)
|
13
|
+
expect(send(:"get-time", :unix)).to eq(123)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Primitives::Vectors do
|
4
|
+
include Klam::Primitives::Vectors
|
5
|
+
|
6
|
+
describe '(absvector N)' do
|
7
|
+
it 'returns an absvector of size N' do
|
8
|
+
vec = absvector(3)
|
9
|
+
expect(vec).to be_kind_of Array
|
10
|
+
expect(vec.size).to eq(3)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '(address-> V N Value)' do
|
15
|
+
before(:each) do
|
16
|
+
@vec = absvector(3)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'returns V' do
|
20
|
+
expect(send(:"address->", @vec, 1, :foo)).to be @vec
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'stores Value in index N of V' do
|
24
|
+
send(:"address->", @vec, 1, :foo)
|
25
|
+
expect(send(:"<-address", @vec, 1)).to eq(:foo)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '(<-address V N)' do
|
30
|
+
before(:each) do
|
31
|
+
@vec = absvector(3)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'returns the value previously stored at index N of V' do
|
35
|
+
send(:"address->", @vec, 1, :foo)
|
36
|
+
expect(send(:"<-address", @vec, 1)).to eq(:foo)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'does not raise an error if index N is uninitialized in V' do
|
40
|
+
expect {
|
41
|
+
send(:"<-address", @vec, 1)
|
42
|
+
}.not_to raise_error
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe '(absvector? X)' do
|
47
|
+
it 'returns true for vectors' do
|
48
|
+
expect(absvector?(absvector(1))).to be true
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'returns false for other types' do
|
52
|
+
expect(absvector?(37)).to be false
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Reader do
|
4
|
+
include Klam::Converters::List
|
5
|
+
|
6
|
+
def reader(str)
|
7
|
+
Klam::Reader.new(StringIO.new(str))
|
8
|
+
end
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
@empty_list = Klam::Primitives::Lists::EMPTY_LIST
|
12
|
+
end
|
13
|
+
|
14
|
+
describe 'Reading lists' do
|
15
|
+
it 'reads () as an empty list' do
|
16
|
+
expect(reader('()').next)
|
17
|
+
.to be(@empty_list)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'reads a list as a single expression' do
|
21
|
+
list = reader('(1 2 3)').next
|
22
|
+
expect(list).to eq(arrayToList([1, 2, 3]))
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'supports nested lists' do
|
26
|
+
list = reader('(1 (2 (3) ()))').next
|
27
|
+
expect(list)
|
28
|
+
.to eq(arrayToList([1, [2, [3], []]]))
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'raises an error on unterminated lists' do
|
32
|
+
expect {
|
33
|
+
reader('(1').next
|
34
|
+
}.to raise_error(Klam::SyntaxError, 'Unterminated list')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe 'Reading booleans' do
|
39
|
+
it 'reads true as true' do
|
40
|
+
expect(reader('true').next).to be(true)
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'reads false as false' do
|
44
|
+
expect(reader('false').next).to be(false)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Klam::Template' do
|
4
|
+
include Klam::Template
|
5
|
+
|
6
|
+
describe 'render_string' do
|
7
|
+
it 'replaces placeholders with their corresponding arguments' do
|
8
|
+
expect(render_string('this $1 a $2.', 'is', 'template'))
|
9
|
+
.to eq('this is a template.')
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'supports placeholders at the beginning of the template' do
|
13
|
+
expect(render_string('$1 world', 'hello')).to eq('hello world')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'supports placeholders at the end of the template' do
|
17
|
+
expect(render_string('hello $1', 'world')).to eq('hello world')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'supports placeholders as the complete template' do
|
21
|
+
expect(render_string('$1', 'hello')).to eq('hello')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'joins array arguments with a comma before insertion' do
|
25
|
+
expect(render_string('[$1]', ['a', 'b', 'c'])).to eq('[a,b,c]')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Klam::Variable do
|
4
|
+
describe "#==" do
|
5
|
+
before(:each) do
|
6
|
+
@name = 'foo'
|
7
|
+
@variable = Klam::Variable.new(@name)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'returns true when the other variable has the same name' do
|
11
|
+
expect(@variable == Klam::Variable.new(@name)).to be(true)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'returns false when the other variable has a different name' do
|
15
|
+
expect(@variable == Klam::Variable.new(@name + '1')).to be(false)
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'returns false when the other object is not a Klam::Variable' do
|
19
|
+
expect(@variable == :foo).to be(false)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: klam
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Greg Spurrier
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '10.4'
|
20
|
+
- - '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '10.4'
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '10.4'
|
28
|
+
- - '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '10.4'
|
31
|
+
prerelease: false
|
32
|
+
type: :development
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rspec
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.1'
|
40
|
+
- - '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.1.0
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.1'
|
48
|
+
- - '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 3.1.0
|
51
|
+
prerelease: false
|
52
|
+
type: :development
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rspec-autotest
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.0'
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.0.0
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.0'
|
68
|
+
- - '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.0.0
|
71
|
+
prerelease: false
|
72
|
+
type: :development
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: ZenTest
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '4.11'
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.11'
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '4.11'
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '4.11'
|
91
|
+
prerelease: false
|
92
|
+
type: :development
|
93
|
+
description: Klam is a Ruby implementation of Kl, the small Lisp on top of which the Shen programming language is implemented.
|
94
|
+
email:
|
95
|
+
- greg@sourcematters.org
|
96
|
+
executables: []
|
97
|
+
extensions: []
|
98
|
+
extra_rdoc_files: []
|
99
|
+
files:
|
100
|
+
- .gitignore
|
101
|
+
- .rspec
|
102
|
+
- .travis.yml
|
103
|
+
- Gemfile
|
104
|
+
- LICENSE.txt
|
105
|
+
- PROGRESS.asciidoc
|
106
|
+
- README.asciidoc
|
107
|
+
- Rakefile
|
108
|
+
- klam.gemspec
|
109
|
+
- lib/klam.rb
|
110
|
+
- lib/klam/compilation_stages.rb
|
111
|
+
- lib/klam/compilation_stages/convert_freezes_to_lambdas.rb
|
112
|
+
- lib/klam/compilation_stages/convert_lexical_variables.rb
|
113
|
+
- lib/klam/compilation_stages/convert_partial_applications_to_lambdas.rb
|
114
|
+
- lib/klam/compilation_stages/convert_self_tail_calls_to_loops.rb
|
115
|
+
- lib/klam/compilation_stages/curry_abstraction_applications.rb
|
116
|
+
- lib/klam/compilation_stages/emit_ruby.rb
|
117
|
+
- lib/klam/compilation_stages/kl_to_internal_representation.rb
|
118
|
+
- lib/klam/compilation_stages/make_abstractions_monadic.rb
|
119
|
+
- lib/klam/compilation_stages/make_abstractions_variadic.rb
|
120
|
+
- lib/klam/compilation_stages/simplify_boolean_operations.rb
|
121
|
+
- lib/klam/compilation_stages/strip_type_declarations.rb
|
122
|
+
- lib/klam/compiler.rb
|
123
|
+
- lib/klam/cons.rb
|
124
|
+
- lib/klam/converters.rb
|
125
|
+
- lib/klam/converters/.list.rb.swp
|
126
|
+
- lib/klam/converters/list.rb
|
127
|
+
- lib/klam/environment.rb
|
128
|
+
- lib/klam/error.rb
|
129
|
+
- lib/klam/lexer.rb
|
130
|
+
- lib/klam/primitives.rb
|
131
|
+
- lib/klam/primitives/arithmetic.rb
|
132
|
+
- lib/klam/primitives/assignments.rb
|
133
|
+
- lib/klam/primitives/boolean_operations.rb
|
134
|
+
- lib/klam/primitives/error_handling.rb
|
135
|
+
- lib/klam/primitives/generic_functions.rb
|
136
|
+
- lib/klam/primitives/lists.rb
|
137
|
+
- lib/klam/primitives/streams.rb
|
138
|
+
- lib/klam/primitives/strings.rb
|
139
|
+
- lib/klam/primitives/symbols.rb
|
140
|
+
- lib/klam/primitives/time.rb
|
141
|
+
- lib/klam/primitives/vectors.rb
|
142
|
+
- lib/klam/reader.rb
|
143
|
+
- lib/klam/template.rb
|
144
|
+
- lib/klam/variable.rb
|
145
|
+
- lib/klam/variable_generator.rb
|
146
|
+
- lib/klam/version.rb
|
147
|
+
- spec/functional/application_spec.rb
|
148
|
+
- spec/functional/atoms_spec.rb
|
149
|
+
- spec/functional/extensions/do_spec.rb
|
150
|
+
- spec/functional/primitives/assignments_spec.rb
|
151
|
+
- spec/functional/primitives/boolean_operations_spec.rb
|
152
|
+
- spec/functional/primitives/error_handling_spec.rb
|
153
|
+
- spec/functional/primitives/generic_functions_spec.rb
|
154
|
+
- spec/functional/tail_call_optimization_spec.rb
|
155
|
+
- spec/spec_helper.rb
|
156
|
+
- spec/unit/klam/compilation_stages/convert_lexical_variables_spec.rb
|
157
|
+
- spec/unit/klam/compilation_stages/convert_self_tail_calls_to_loops_spec.rb
|
158
|
+
- spec/unit/klam/compilation_stages/curry_abstraction_applications_spec.rb
|
159
|
+
- spec/unit/klam/compilation_stages/make_abstractions_variadic_spec.rb
|
160
|
+
- spec/unit/klam/converters/list_spec.rb
|
161
|
+
- spec/unit/klam/lexer_spec.rb
|
162
|
+
- spec/unit/klam/primitives/arithmetic_spec.rb
|
163
|
+
- spec/unit/klam/primitives/boolean_operations_spec.rb
|
164
|
+
- spec/unit/klam/primitives/error_handling_spec.rb
|
165
|
+
- spec/unit/klam/primitives/lists_spec.rb
|
166
|
+
- spec/unit/klam/primitives/strings_spec.rb
|
167
|
+
- spec/unit/klam/primitives/symbols_spec.rb
|
168
|
+
- spec/unit/klam/primitives/time_spec.rb
|
169
|
+
- spec/unit/klam/primitives/vectors_spec.rb
|
170
|
+
- spec/unit/klam/reader_spec.rb
|
171
|
+
- spec/unit/klam/template_spec.rb
|
172
|
+
- spec/unit/klam/variable_spec.rb
|
173
|
+
- spec/unit/klam/version_spec.rb
|
174
|
+
homepage: https://github.com/gregspurrier/klam
|
175
|
+
licenses:
|
176
|
+
- MIT
|
177
|
+
metadata: {}
|
178
|
+
post_install_message:
|
179
|
+
rdoc_options: []
|
180
|
+
require_paths:
|
181
|
+
- lib
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: 1.9.3
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - '>='
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubyforge_project:
|
194
|
+
rubygems_version: 2.1.9
|
195
|
+
signing_key:
|
196
|
+
specification_version: 4
|
197
|
+
summary: Klam is a Ruby implementation of the Kl.
|
198
|
+
test_files:
|
199
|
+
- spec/functional/application_spec.rb
|
200
|
+
- spec/functional/atoms_spec.rb
|
201
|
+
- spec/functional/extensions/do_spec.rb
|
202
|
+
- spec/functional/primitives/assignments_spec.rb
|
203
|
+
- spec/functional/primitives/boolean_operations_spec.rb
|
204
|
+
- spec/functional/primitives/error_handling_spec.rb
|
205
|
+
- spec/functional/primitives/generic_functions_spec.rb
|
206
|
+
- spec/functional/tail_call_optimization_spec.rb
|
207
|
+
- spec/spec_helper.rb
|
208
|
+
- spec/unit/klam/compilation_stages/convert_lexical_variables_spec.rb
|
209
|
+
- spec/unit/klam/compilation_stages/convert_self_tail_calls_to_loops_spec.rb
|
210
|
+
- spec/unit/klam/compilation_stages/curry_abstraction_applications_spec.rb
|
211
|
+
- spec/unit/klam/compilation_stages/make_abstractions_variadic_spec.rb
|
212
|
+
- spec/unit/klam/converters/list_spec.rb
|
213
|
+
- spec/unit/klam/lexer_spec.rb
|
214
|
+
- spec/unit/klam/primitives/arithmetic_spec.rb
|
215
|
+
- spec/unit/klam/primitives/boolean_operations_spec.rb
|
216
|
+
- spec/unit/klam/primitives/error_handling_spec.rb
|
217
|
+
- spec/unit/klam/primitives/lists_spec.rb
|
218
|
+
- spec/unit/klam/primitives/strings_spec.rb
|
219
|
+
- spec/unit/klam/primitives/symbols_spec.rb
|
220
|
+
- spec/unit/klam/primitives/time_spec.rb
|
221
|
+
- spec/unit/klam/primitives/vectors_spec.rb
|
222
|
+
- spec/unit/klam/reader_spec.rb
|
223
|
+
- spec/unit/klam/template_spec.rb
|
224
|
+
- spec/unit/klam/variable_spec.rb
|
225
|
+
- spec/unit/klam/version_spec.rb
|