flea 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +274 -0
- data/Rakefile +36 -0
- data/VERSION +1 -0
- data/bin/flea +39 -0
- data/examples/guess-the-number.scm +18 -0
- data/flea-language-spec/README.rdoc +3 -0
- data/flea-language-spec/flea-language-spec.yaml +2 -0
- data/flea-language-spec/test-cases/01-display-and-basic-literals/01-display-string-literal.scm +5 -0
- data/flea-language-spec/test-cases/01-display-and-basic-literals/02-display-integer-literal.scm +5 -0
- data/flea-language-spec/test-cases/01-display-and-basic-literals/03-display-boolean-true-literal.scm +5 -0
- data/flea-language-spec/test-cases/01-display-and-basic-literals/04-display-boolean-false-literal.scm +5 -0
- data/flea-language-spec/test-cases/01-display-and-basic-literals/05-display-list-literal-using-quote.scm +5 -0
- data/flea-language-spec/test-cases/01-display-and-basic-literals/06-display-identifier-quoted.scm +5 -0
- data/flea-language-spec/test-cases/02-variables/01-define-with-string.scm +6 -0
- data/flea-language-spec/test-cases/02-variables/02-define-with-integer.scm +6 -0
- data/flea-language-spec/test-cases/02-variables/03-define-with-boolean-true.scm +6 -0
- data/flea-language-spec/test-cases/02-variables/04-define-with-boolean-false.scm +6 -0
- data/flea-language-spec/test-cases/02-variables/05-define-with-list.scm +6 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/01-addition.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/02-subtraction.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/03-multiplication.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/04-division.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/05-equality-true-integer.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/06-equality-false-integer.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/01-equal?-true-integer.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/02-equal?-false-integer.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/03-equal?-true-string.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/04-equal?-false-string.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/05-equal?-true-boolean.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/06-equal?-false-boolean.scm +5 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/07-equal?-true-list.scm +7 -0
- data/flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/08-equal?-false-list.scm +7 -0
- data/flea-language-spec/test-cases/04-comma-quoting/01-comma-quoting.scm +5 -0
- data/flea-language-spec/test-cases/05-lambda/01-lambda.scm +5 -0
- data/flea-language-spec/test-cases/05-lambda/02-call-in-place-lambda.scm +5 -0
- data/flea-language-spec/test-cases/05-lambda/03-define-with-lambda.scm +6 -0
- data/flea-language-spec/test-cases/05-lambda/04-define-and-call-lambda.scm +8 -0
- data/flea-language-spec/test-cases/05-lambda/05-lambda-repeated-argument.scm +9 -0
- data/flea-language-spec/test-cases/05-lambda/06-lambda-list-argument.scm +8 -0
- data/flea-language-spec/test-cases/05-lambda/07-lambda-n-or-more-arguments.scm +12 -0
- data/flea-language-spec/test-cases/05-lambda/08-lambda-should-return-last-result.scm +16 -0
- data/flea-language-spec/test-cases/06-if/01-if-true-single-arg.scm +6 -0
- data/flea-language-spec/test-cases/06-if/02-if-false-single-arg.scm +6 -0
- data/flea-language-spec/test-cases/06-if/03-if-true-two-args.scm +7 -0
- data/flea-language-spec/test-cases/06-if/04-if-false-two-args.scm +7 -0
- data/flea-language-spec/test-cases/07-set/01-should-not-set-undefined-variable.scm +5 -0
- data/flea-language-spec/test-cases/07-set/02-set-previously-defined-variable.scm +8 -0
- data/flea-language-spec/test-cases/08-derived-expressions/01-begin/01-begin.scm +8 -0
- data/flea-language-spec/test-cases/09-list-manipulation/01-car.scm +7 -0
- data/flea-language-spec/test-cases/09-list-manipulation/02-cdr.scm +7 -0
- data/flea-language-spec/test-cases/09-list-manipulation/03-list-tail.scm +7 -0
- data/flea-language-spec/test-cases/09-list-manipulation/04-append.scm +10 -0
- data/flea-language-spec/test-cases/09-list-manipulation/05-list.scm +5 -0
- data/flea-language-spec/test-cases/10-functional-examples/countdown.scm +15 -0
- data/lib/flea.rb +5 -0
- data/lib/flea/environment.rb +38 -0
- data/lib/flea/interpreter.rb +67 -0
- data/lib/flea/standard_library/addition_operator.scm +7 -0
- data/lib/flea/standard_library/append.scm +7 -0
- data/lib/flea/standard_library/begin.scm +11 -0
- data/lib/flea/standard_library/car.scm +7 -0
- data/lib/flea/standard_library/cdr.scm +7 -0
- data/lib/flea/standard_library/cons.scm +13 -0
- data/lib/flea/standard_library/display.scm +8 -0
- data/lib/flea/standard_library/division_operator.scm +7 -0
- data/lib/flea/standard_library/equality_operator.scm +8 -0
- data/lib/flea/standard_library/gets.scm +6 -0
- data/lib/flea/standard_library/greater_than.scm +8 -0
- data/lib/flea/standard_library/if.scm +10 -0
- data/lib/flea/standard_library/lambda.scm +57 -0
- data/lib/flea/standard_library/less_than.scm +8 -0
- data/lib/flea/standard_library/list.scm +8 -0
- data/lib/flea/standard_library/list_predicate.scm +6 -0
- data/lib/flea/standard_library/list_tail.scm +5 -0
- data/lib/flea/standard_library/multiplication_operator.scm +7 -0
- data/lib/flea/standard_library/null.scm +3 -0
- data/lib/flea/standard_library/quote.scm +6 -0
- data/lib/flea/standard_library/rand.scm +6 -0
- data/lib/flea/standard_library/read.scm +6 -0
- data/lib/flea/standard_library/set.scm +9 -0
- data/lib/flea/standard_library/string_to_num.scm +6 -0
- data/lib/flea/standard_library/subtraction_operator.scm +7 -0
- data/spec/flea/environment_spec.rb +114 -0
- data/spec/flea/interpreter_spec.rb +85 -0
- data/spec/flea/standard_library/addition_operator_spec.rb +23 -0
- data/spec/flea/standard_library/append_spec.rb +17 -0
- data/spec/flea/standard_library/begin_spec.rb +20 -0
- data/spec/flea/standard_library/car_spec.rb +17 -0
- data/spec/flea/standard_library/cdr_spec.rb +17 -0
- data/spec/flea/standard_library/cons_spec.rb +25 -0
- data/spec/flea/standard_library/display_spec.rb +36 -0
- data/spec/flea/standard_library/division_operator_spec.rb +29 -0
- data/spec/flea/standard_library/equality_operator_spec.rb +45 -0
- data/spec/flea/standard_library/gets_spec.rb +23 -0
- data/spec/flea/standard_library/greater_than_spec.rb +29 -0
- data/spec/flea/standard_library/if_spec.rb +59 -0
- data/spec/flea/standard_library/lambda_spec.rb +70 -0
- data/spec/flea/standard_library/less_than_spec.rb +29 -0
- data/spec/flea/standard_library/list_predicate_spec.rb +25 -0
- data/spec/flea/standard_library/list_spec.rb +24 -0
- data/spec/flea/standard_library/list_tail_spec.rb +17 -0
- data/spec/flea/standard_library/mutiplication_operator_spec.rb +23 -0
- data/spec/flea/standard_library/null_spec.rb +26 -0
- data/spec/flea/standard_library/quote_spec.rb +20 -0
- data/spec/flea/standard_library/rand_spec.rb +25 -0
- data/spec/flea/standard_library/read_spec.rb +23 -0
- data/spec/flea/standard_library/set_spec.rb +23 -0
- data/spec/flea/standard_library/string_to_num_spec.rb +28 -0
- data/spec/flea/standard_library/subtraction_operator_spec.rb +24 -0
- data/spec/spec_helper.rb +10 -0
- metadata +231 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "list?" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should should return true for an empty list" do
|
10
|
+
result = @interpreter.run("(list? '())")
|
11
|
+
result.should == true
|
12
|
+
end
|
13
|
+
|
14
|
+
it "return true for a populated list" do
|
15
|
+
result = @interpreter.run("(list? '(a b c))")
|
16
|
+
result.should == true
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should return false for an atom" do
|
20
|
+
result = @interpreter.run("(list? 'a)")
|
21
|
+
result.should == false
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "list" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should create a list from it's arguments" do
|
10
|
+
result = @interpreter.run('(list 9 2 2)')
|
11
|
+
result.should == [9, 2, 2]
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should evaluate its arguments before creating the list" do
|
15
|
+
result = @interpreter.run('
|
16
|
+
(define a 2)
|
17
|
+
(define b 9)
|
18
|
+
(list b a a)
|
19
|
+
')
|
20
|
+
result.should == [9, 2, 2]
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "list-tail" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return trailing subset of list" do
|
10
|
+
result = @interpreter.run('
|
11
|
+
(list-tail (quote (1 2 3 4 5)) 2)
|
12
|
+
')
|
13
|
+
result.should == [3, 4, 5]
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "multiplication operator" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should multiply several numbers" do
|
10
|
+
result = @interpreter.run('(* 2 2 2)')
|
11
|
+
result.should == 8
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should evaluate its arguments before multiplying them" do
|
15
|
+
result = @interpreter.run('
|
16
|
+
(define a 2)
|
17
|
+
(* a a a)
|
18
|
+
')
|
19
|
+
result.should == 8
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "null?" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return true for an empty list" do
|
10
|
+
result = @interpreter.run('
|
11
|
+
(null? \'())
|
12
|
+
')
|
13
|
+
result.should == true
|
14
|
+
end
|
15
|
+
|
16
|
+
["1", '"abc"', "(1 2 3)"].each do |value|
|
17
|
+
it "should return false for #{value}" do
|
18
|
+
result = @interpreter.run("
|
19
|
+
(null? (quote #{value}))
|
20
|
+
")
|
21
|
+
result.should == false
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "quote" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should quote a list" do
|
10
|
+
result = @interpreter.run('(quote (1 2 3))')
|
11
|
+
result.should == [1, 2, 3]
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should quote a single literal" do
|
15
|
+
result = @interpreter.run('(quote 1)')
|
16
|
+
result.should == 1
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "rand" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
10.times do
|
10
|
+
it "should return a random number lower than or equal to 10" do
|
11
|
+
result = @interpreter.run('(rand 10)')
|
12
|
+
result.should < 11
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should evaluate its arguments" do
|
16
|
+
result = @interpreter.run('
|
17
|
+
(define a 10)
|
18
|
+
(rand a)
|
19
|
+
')
|
20
|
+
result.should < 11
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "read" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
@old_stdin = $stdin
|
8
|
+
@buffer = StringIO.new
|
9
|
+
$stdin = @buffer
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should read data structure from STDIN" do
|
13
|
+
@buffer.string = "(1 2.0 test (1 2 3))\n"
|
14
|
+
result = @interpreter.run('(read)')
|
15
|
+
result.should == [[1, 2.0, :test, [1, 2, 3]]]
|
16
|
+
end
|
17
|
+
|
18
|
+
after :each do
|
19
|
+
$stdin = @old_stdin
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "set!" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should change the value of an existing variable" do
|
10
|
+
@interpreter.run('
|
11
|
+
(define test 1)
|
12
|
+
(set! test 2)')
|
13
|
+
@interpreter.base_environment.find(:test).should == 2
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should raise error when attempting to set unbound variable" do
|
17
|
+
lambda {
|
18
|
+
@interpreter.run('(set! test 1)')
|
19
|
+
}.should raise_error
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "string-to-num" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should convert string to integer" do
|
10
|
+
result = @interpreter.run('(string-to-num "10")')
|
11
|
+
result.should == 10
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should convert string to float" do
|
15
|
+
result = @interpreter.run('(string-to-num "23.0")')
|
16
|
+
result.should == 23.0
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should evaluate its arguments" do
|
20
|
+
result = @interpreter.run('
|
21
|
+
(define a 2)
|
22
|
+
(string-to-num a)
|
23
|
+
')
|
24
|
+
result.should == 2
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Standard Library" do
|
4
|
+
describe "subtraction operator" do
|
5
|
+
before :each do
|
6
|
+
@interpreter = Flea::Interpreter.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should subtract several numbers" do
|
10
|
+
result = @interpreter.run('(- 9 2 2)')
|
11
|
+
result.should == 5
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should evaluate its arguments before subtracting them" do
|
15
|
+
result = @interpreter.run('
|
16
|
+
(define a 2)
|
17
|
+
(define b 9)
|
18
|
+
(- b a a)
|
19
|
+
')
|
20
|
+
result.should == 5
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,231 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: flea
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Aaron Gough
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-03-13 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: sexpistol
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
type: :runtime
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: any-spec
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :development
|
45
|
+
version_requirements: *id002
|
46
|
+
description: Flea is an extremely simple, but extremely extensible Lisp interpreter written in Ruby.
|
47
|
+
email: aaron@aarongough.com
|
48
|
+
executables:
|
49
|
+
- flea
|
50
|
+
- flea
|
51
|
+
extensions: []
|
52
|
+
|
53
|
+
extra_rdoc_files:
|
54
|
+
- MIT-LICENSE
|
55
|
+
- README.rdoc
|
56
|
+
files:
|
57
|
+
- .gitignore
|
58
|
+
- MIT-LICENSE
|
59
|
+
- README.rdoc
|
60
|
+
- Rakefile
|
61
|
+
- VERSION
|
62
|
+
- bin/flea
|
63
|
+
- examples/guess-the-number.scm
|
64
|
+
- flea-language-spec/README.rdoc
|
65
|
+
- flea-language-spec/flea-language-spec.yaml
|
66
|
+
- flea-language-spec/test-cases/01-display-and-basic-literals/01-display-string-literal.scm
|
67
|
+
- flea-language-spec/test-cases/01-display-and-basic-literals/02-display-integer-literal.scm
|
68
|
+
- flea-language-spec/test-cases/01-display-and-basic-literals/03-display-boolean-true-literal.scm
|
69
|
+
- flea-language-spec/test-cases/01-display-and-basic-literals/04-display-boolean-false-literal.scm
|
70
|
+
- flea-language-spec/test-cases/01-display-and-basic-literals/05-display-list-literal-using-quote.scm
|
71
|
+
- flea-language-spec/test-cases/01-display-and-basic-literals/06-display-identifier-quoted.scm
|
72
|
+
- flea-language-spec/test-cases/02-variables/01-define-with-string.scm
|
73
|
+
- flea-language-spec/test-cases/02-variables/02-define-with-integer.scm
|
74
|
+
- flea-language-spec/test-cases/02-variables/03-define-with-boolean-true.scm
|
75
|
+
- flea-language-spec/test-cases/02-variables/04-define-with-boolean-false.scm
|
76
|
+
- flea-language-spec/test-cases/02-variables/05-define-with-list.scm
|
77
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/01-addition.scm
|
78
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/02-subtraction.scm
|
79
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/03-multiplication.scm
|
80
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/04-division.scm
|
81
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/05-equality-true-integer.scm
|
82
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/06-equality-false-integer.scm
|
83
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/01-equal?-true-integer.scm
|
84
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/02-equal?-false-integer.scm
|
85
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/03-equal?-true-string.scm
|
86
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/04-equal?-false-string.scm
|
87
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/05-equal?-true-boolean.scm
|
88
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/06-equal?-false-boolean.scm
|
89
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/07-equal?-true-list.scm
|
90
|
+
- flea-language-spec/test-cases/03-basic-built-in-procedures/07-equal?/08-equal?-false-list.scm
|
91
|
+
- flea-language-spec/test-cases/04-comma-quoting/01-comma-quoting.scm
|
92
|
+
- flea-language-spec/test-cases/05-lambda/01-lambda.scm
|
93
|
+
- flea-language-spec/test-cases/05-lambda/02-call-in-place-lambda.scm
|
94
|
+
- flea-language-spec/test-cases/05-lambda/03-define-with-lambda.scm
|
95
|
+
- flea-language-spec/test-cases/05-lambda/04-define-and-call-lambda.scm
|
96
|
+
- flea-language-spec/test-cases/05-lambda/05-lambda-repeated-argument.scm
|
97
|
+
- flea-language-spec/test-cases/05-lambda/06-lambda-list-argument.scm
|
98
|
+
- flea-language-spec/test-cases/05-lambda/07-lambda-n-or-more-arguments.scm
|
99
|
+
- flea-language-spec/test-cases/05-lambda/08-lambda-should-return-last-result.scm
|
100
|
+
- flea-language-spec/test-cases/06-if/01-if-true-single-arg.scm
|
101
|
+
- flea-language-spec/test-cases/06-if/02-if-false-single-arg.scm
|
102
|
+
- flea-language-spec/test-cases/06-if/03-if-true-two-args.scm
|
103
|
+
- flea-language-spec/test-cases/06-if/04-if-false-two-args.scm
|
104
|
+
- flea-language-spec/test-cases/07-set/01-should-not-set-undefined-variable.scm
|
105
|
+
- flea-language-spec/test-cases/07-set/02-set-previously-defined-variable.scm
|
106
|
+
- flea-language-spec/test-cases/08-derived-expressions/01-begin/01-begin.scm
|
107
|
+
- flea-language-spec/test-cases/09-list-manipulation/01-car.scm
|
108
|
+
- flea-language-spec/test-cases/09-list-manipulation/02-cdr.scm
|
109
|
+
- flea-language-spec/test-cases/09-list-manipulation/03-list-tail.scm
|
110
|
+
- flea-language-spec/test-cases/09-list-manipulation/04-append.scm
|
111
|
+
- flea-language-spec/test-cases/09-list-manipulation/05-list.scm
|
112
|
+
- flea-language-spec/test-cases/10-functional-examples/countdown.scm
|
113
|
+
- lib/flea.rb
|
114
|
+
- lib/flea/environment.rb
|
115
|
+
- lib/flea/interpreter.rb
|
116
|
+
- lib/flea/standard_library/addition_operator.scm
|
117
|
+
- lib/flea/standard_library/append.scm
|
118
|
+
- lib/flea/standard_library/begin.scm
|
119
|
+
- lib/flea/standard_library/car.scm
|
120
|
+
- lib/flea/standard_library/cdr.scm
|
121
|
+
- lib/flea/standard_library/cons.scm
|
122
|
+
- lib/flea/standard_library/display.scm
|
123
|
+
- lib/flea/standard_library/division_operator.scm
|
124
|
+
- lib/flea/standard_library/equality_operator.scm
|
125
|
+
- lib/flea/standard_library/gets.scm
|
126
|
+
- lib/flea/standard_library/greater_than.scm
|
127
|
+
- lib/flea/standard_library/if.scm
|
128
|
+
- lib/flea/standard_library/lambda.scm
|
129
|
+
- lib/flea/standard_library/less_than.scm
|
130
|
+
- lib/flea/standard_library/list.scm
|
131
|
+
- lib/flea/standard_library/list_predicate.scm
|
132
|
+
- lib/flea/standard_library/list_tail.scm
|
133
|
+
- lib/flea/standard_library/multiplication_operator.scm
|
134
|
+
- lib/flea/standard_library/null.scm
|
135
|
+
- lib/flea/standard_library/quote.scm
|
136
|
+
- lib/flea/standard_library/rand.scm
|
137
|
+
- lib/flea/standard_library/read.scm
|
138
|
+
- lib/flea/standard_library/set.scm
|
139
|
+
- lib/flea/standard_library/string_to_num.scm
|
140
|
+
- lib/flea/standard_library/subtraction_operator.scm
|
141
|
+
- spec/flea/environment_spec.rb
|
142
|
+
- spec/flea/interpreter_spec.rb
|
143
|
+
- spec/flea/standard_library/addition_operator_spec.rb
|
144
|
+
- spec/flea/standard_library/append_spec.rb
|
145
|
+
- spec/flea/standard_library/begin_spec.rb
|
146
|
+
- spec/flea/standard_library/car_spec.rb
|
147
|
+
- spec/flea/standard_library/cdr_spec.rb
|
148
|
+
- spec/flea/standard_library/cons_spec.rb
|
149
|
+
- spec/flea/standard_library/display_spec.rb
|
150
|
+
- spec/flea/standard_library/division_operator_spec.rb
|
151
|
+
- spec/flea/standard_library/equality_operator_spec.rb
|
152
|
+
- spec/flea/standard_library/gets_spec.rb
|
153
|
+
- spec/flea/standard_library/greater_than_spec.rb
|
154
|
+
- spec/flea/standard_library/if_spec.rb
|
155
|
+
- spec/flea/standard_library/lambda_spec.rb
|
156
|
+
- spec/flea/standard_library/less_than_spec.rb
|
157
|
+
- spec/flea/standard_library/list_predicate_spec.rb
|
158
|
+
- spec/flea/standard_library/list_spec.rb
|
159
|
+
- spec/flea/standard_library/list_tail_spec.rb
|
160
|
+
- spec/flea/standard_library/mutiplication_operator_spec.rb
|
161
|
+
- spec/flea/standard_library/null_spec.rb
|
162
|
+
- spec/flea/standard_library/quote_spec.rb
|
163
|
+
- spec/flea/standard_library/rand_spec.rb
|
164
|
+
- spec/flea/standard_library/read_spec.rb
|
165
|
+
- spec/flea/standard_library/set_spec.rb
|
166
|
+
- spec/flea/standard_library/string_to_num_spec.rb
|
167
|
+
- spec/flea/standard_library/subtraction_operator_spec.rb
|
168
|
+
- spec/spec_helper.rb
|
169
|
+
has_rdoc: true
|
170
|
+
homepage: http://github.com/aarongough/flea
|
171
|
+
licenses: []
|
172
|
+
|
173
|
+
post_install_message:
|
174
|
+
rdoc_options:
|
175
|
+
- --charset=UTF-8
|
176
|
+
- --line-numbers
|
177
|
+
- --inline-source
|
178
|
+
require_paths:
|
179
|
+
- lib
|
180
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
segments:
|
186
|
+
- 0
|
187
|
+
version: "0"
|
188
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
|
+
none: false
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
segments:
|
194
|
+
- 0
|
195
|
+
version: "0"
|
196
|
+
requirements: []
|
197
|
+
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 1.3.7
|
200
|
+
signing_key:
|
201
|
+
specification_version: 3
|
202
|
+
summary: A tiny but flexible Lisp interpreter written in Ruby
|
203
|
+
test_files:
|
204
|
+
- spec/flea/environment_spec.rb
|
205
|
+
- spec/flea/interpreter_spec.rb
|
206
|
+
- spec/flea/standard_library/addition_operator_spec.rb
|
207
|
+
- spec/flea/standard_library/append_spec.rb
|
208
|
+
- spec/flea/standard_library/begin_spec.rb
|
209
|
+
- spec/flea/standard_library/car_spec.rb
|
210
|
+
- spec/flea/standard_library/cdr_spec.rb
|
211
|
+
- spec/flea/standard_library/cons_spec.rb
|
212
|
+
- spec/flea/standard_library/display_spec.rb
|
213
|
+
- spec/flea/standard_library/division_operator_spec.rb
|
214
|
+
- spec/flea/standard_library/equality_operator_spec.rb
|
215
|
+
- spec/flea/standard_library/gets_spec.rb
|
216
|
+
- spec/flea/standard_library/greater_than_spec.rb
|
217
|
+
- spec/flea/standard_library/if_spec.rb
|
218
|
+
- spec/flea/standard_library/lambda_spec.rb
|
219
|
+
- spec/flea/standard_library/less_than_spec.rb
|
220
|
+
- spec/flea/standard_library/list_predicate_spec.rb
|
221
|
+
- spec/flea/standard_library/list_spec.rb
|
222
|
+
- spec/flea/standard_library/list_tail_spec.rb
|
223
|
+
- spec/flea/standard_library/mutiplication_operator_spec.rb
|
224
|
+
- spec/flea/standard_library/null_spec.rb
|
225
|
+
- spec/flea/standard_library/quote_spec.rb
|
226
|
+
- spec/flea/standard_library/rand_spec.rb
|
227
|
+
- spec/flea/standard_library/read_spec.rb
|
228
|
+
- spec/flea/standard_library/set_spec.rb
|
229
|
+
- spec/flea/standard_library/string_to_num_spec.rb
|
230
|
+
- spec/flea/standard_library/subtraction_operator_spec.rb
|
231
|
+
- spec/spec_helper.rb
|