robolson-simplesem 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +18 -0
- data/README.textile +26 -24
- data/Rakefile +6 -8
- data/bin/simplesem +26 -45
- data/lib/simplesem/arithmetic.treetop +98 -96
- data/lib/simplesem/arithmetic_node_classes.rb +9 -5
- data/lib/simplesem/simple_sem.treetop +112 -111
- data/lib/simplesem/simplesem_program.rb +50 -48
- data/lib/simplesem/version.rb +5 -0
- data/lib/simplesem.rb +2 -2
- data/lib/trollop/trollop.rb +695 -0
- data/sample_programs/gcd.txt +1 -1
- data/sample_programs/hello-world.txt +1 -1
- data/sample_programs/while-loop.txt +1 -1
- data/simplesem.gemspec +9 -10
- data/test/simplesem_test.rb +10 -8
- data/test/test_helper.rb +2 -2
- metadata +15 -11
data/simplesem.gemspec
CHANGED
@@ -2,29 +2,28 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{simplesem}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Rob Olson"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-09-27}
|
10
10
|
s.default_executable = %q{simplesem}
|
11
|
-
s.description = %q{SIMPLESEM
|
12
|
-
s.email = %q{
|
11
|
+
s.description = %q{Interpreter for parsing and executing SIMPLESEM programs}
|
12
|
+
s.email = %q{rob@thinkingdigitally.com}
|
13
13
|
s.executables = ["simplesem"]
|
14
|
-
s.extra_rdoc_files = ["LICENSE", "README.textile", "bin/simplesem", "lib/simplesem/arithmetic.treetop", "lib/simplesem/arithmetic_node_classes.rb", "lib/simplesem/simple_sem.treetop", "lib/simplesem/simplesem_program.rb", "lib/simplesem.rb"]
|
15
|
-
s.files = ["LICENSE", "Manifest", "README.textile", "Rakefile", "bin/simplesem", "lib/simplesem/arithmetic.treetop", "lib/simplesem/arithmetic_node_classes.rb", "lib/simplesem/simple_sem.treetop", "lib/simplesem/simplesem_program.rb", "lib/simplesem.rb", "sample_programs/case-statement.txt", "sample_programs/gcd.txt", "sample_programs/hello-world.txt", "sample_programs/while-loop.txt", "simplesem.gemspec", "
|
16
|
-
s.has_rdoc = true
|
14
|
+
s.extra_rdoc_files = ["LICENSE", "README.textile", "bin/simplesem", "lib/simplesem.rb", "lib/simplesem/arithmetic.treetop", "lib/simplesem/arithmetic_node_classes.rb", "lib/simplesem/simple_sem.treetop", "lib/simplesem/simplesem_program.rb", "lib/simplesem/version.rb", "lib/trollop/trollop.rb"]
|
15
|
+
s.files = ["LICENSE", "Manifest", "README.textile", "Rakefile", "bin/simplesem", "lib/simplesem.rb", "lib/simplesem/arithmetic.treetop", "lib/simplesem/arithmetic_node_classes.rb", "lib/simplesem/simple_sem.treetop", "lib/simplesem/simplesem_program.rb", "lib/simplesem/version.rb", "lib/trollop/trollop.rb", "sample_programs/case-statement.txt", "sample_programs/gcd.txt", "sample_programs/hello-world.txt", "sample_programs/while-loop.txt", "simplesem.gemspec", "test/simplesem_test.rb", "test/test_helper.rb"]
|
17
16
|
s.homepage = %q{http://github.com/robolson/simplesem}
|
18
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Simplesem", "--main", "README.textile"]
|
19
18
|
s.require_paths = ["lib"]
|
20
19
|
s.rubyforge_project = %q{simplesem}
|
21
|
-
s.rubygems_version = %q{1.3.
|
20
|
+
s.rubygems_version = %q{1.3.5}
|
22
21
|
s.summary = %q{SIMPLESEM Interpreter}
|
23
|
-
s.test_files = ["test/
|
22
|
+
s.test_files = ["test/test_helper.rb", "test/simplesem_test.rb"]
|
24
23
|
|
25
24
|
if s.respond_to? :specification_version then
|
26
25
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
27
|
-
s.specification_version =
|
26
|
+
s.specification_version = 3
|
28
27
|
|
29
28
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
30
29
|
s.add_runtime_dependency(%q<treetop>, [">= 1.2.4"])
|
data/test/simplesem_test.rb
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
libdir = dir + "/../lib"
|
4
|
-
require File.expand_path("#{libdir}/simplesem")
|
1
|
+
require 'test_helper'
|
2
|
+
require 'simplesem'
|
5
3
|
|
6
4
|
class SimpleSemParserTest < Test::Unit::TestCase
|
7
5
|
include ParserTestHelper
|
8
6
|
|
9
7
|
def setup
|
10
|
-
@parser = SimpleSemParser.new
|
11
|
-
@ssp =
|
8
|
+
@parser = SimpleSem::SimpleSemParser.new
|
9
|
+
@ssp = SimpleSem::Program.new
|
12
10
|
@ssp.data[0] = [1]
|
13
11
|
end
|
12
|
+
|
13
|
+
def test_version_constant_is_set
|
14
|
+
assert_not_nil SimpleSem::VERSION
|
15
|
+
end
|
14
16
|
|
15
17
|
def test_set_stmt_assign
|
16
18
|
parse('set 1, D[0]').execute(@ssp)
|
@@ -131,8 +133,8 @@ class SimpleSemParserTest < Test::Unit::TestCase
|
|
131
133
|
end
|
132
134
|
|
133
135
|
def test_halt
|
134
|
-
assert_raise ProgramHalt do
|
136
|
+
assert_raise SimpleSem::ProgramHalt do
|
135
137
|
parse('halt').execute(@ssp)
|
136
138
|
end
|
137
139
|
end
|
138
|
-
end
|
140
|
+
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robolson-simplesem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Olson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-27 00:00:00 -07:00
|
13
13
|
default_executable: simplesem
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,8 +22,8 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.2.4
|
24
24
|
version:
|
25
|
-
description: SIMPLESEM
|
26
|
-
email:
|
25
|
+
description: Interpreter for parsing and executing SIMPLESEM programs
|
26
|
+
email: rob@thinkingdigitally.com
|
27
27
|
executables:
|
28
28
|
- simplesem
|
29
29
|
extensions: []
|
@@ -32,32 +32,36 @@ extra_rdoc_files:
|
|
32
32
|
- LICENSE
|
33
33
|
- README.textile
|
34
34
|
- bin/simplesem
|
35
|
+
- lib/simplesem.rb
|
35
36
|
- lib/simplesem/arithmetic.treetop
|
36
37
|
- lib/simplesem/arithmetic_node_classes.rb
|
37
38
|
- lib/simplesem/simple_sem.treetop
|
38
39
|
- lib/simplesem/simplesem_program.rb
|
39
|
-
- lib/simplesem.rb
|
40
|
+
- lib/simplesem/version.rb
|
41
|
+
- lib/trollop/trollop.rb
|
40
42
|
files:
|
41
43
|
- LICENSE
|
42
44
|
- Manifest
|
43
45
|
- README.textile
|
44
46
|
- Rakefile
|
45
47
|
- bin/simplesem
|
48
|
+
- lib/simplesem.rb
|
46
49
|
- lib/simplesem/arithmetic.treetop
|
47
50
|
- lib/simplesem/arithmetic_node_classes.rb
|
48
51
|
- lib/simplesem/simple_sem.treetop
|
49
52
|
- lib/simplesem/simplesem_program.rb
|
50
|
-
- lib/simplesem.rb
|
53
|
+
- lib/simplesem/version.rb
|
54
|
+
- lib/trollop/trollop.rb
|
51
55
|
- sample_programs/case-statement.txt
|
52
56
|
- sample_programs/gcd.txt
|
53
57
|
- sample_programs/hello-world.txt
|
54
58
|
- sample_programs/while-loop.txt
|
55
59
|
- simplesem.gemspec
|
56
|
-
- simplesem.tmproj
|
57
60
|
- test/simplesem_test.rb
|
58
61
|
- test/test_helper.rb
|
59
|
-
has_rdoc:
|
62
|
+
has_rdoc: false
|
60
63
|
homepage: http://github.com/robolson/simplesem
|
64
|
+
licenses:
|
61
65
|
post_install_message:
|
62
66
|
rdoc_options:
|
63
67
|
- --line-numbers
|
@@ -83,10 +87,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
87
|
requirements: []
|
84
88
|
|
85
89
|
rubyforge_project: simplesem
|
86
|
-
rubygems_version: 1.
|
90
|
+
rubygems_version: 1.3.5
|
87
91
|
signing_key:
|
88
|
-
specification_version:
|
92
|
+
specification_version: 3
|
89
93
|
summary: SIMPLESEM Interpreter
|
90
94
|
test_files:
|
91
|
-
- test/simplesem_test.rb
|
92
95
|
- test/test_helper.rb
|
96
|
+
- test/simplesem_test.rb
|