s-expression 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/MIT-LICENSE +19 -0
- data/README.md +15 -0
- data/Rakefile +6 -0
- data/lib/s-expression.rb +3 -0
- data/pool/s-expression.cut +21 -0
- data/pool/s-expression.jar +0 -0
- data/ruby/Sexp.rb +95 -0
- data/s-expression.gemspec +15 -0
- data/spec/spec_helper.rb +1 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 81e9596a8f9aabf8d7c3955e6ccdbd29dd64a7ff
|
4
|
+
data.tar.gz: 0617b85c7f30282f4932059c48c6d22c59f945f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 48d98b7400dd5830b01be4e9016899518d9202bde5de0ff43d4239e8932372d9342811adb94ec79a63cf40adec6761fe50df8bd36bd54b7c4181d6d8a7720af7
|
7
|
+
data.tar.gz: 527449f85c38eedb4b23e9246be538f97d6b3432e68c626c55cfaa3a8c5f713d40c1b460e38c2a25fa0490062c63de05bb6e58d6e02774c746fdcacb133e4a4c
|
data/Gemfile
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (C) 2011-2015 InfraRuby Vision
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
4
|
+
copy of this software and associated documentation files (the "Software"),
|
5
|
+
to deal in the Software without restriction, including without limitation
|
6
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
7
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
8
|
+
Software is furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
18
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
19
|
+
DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
InfraRuby s-expression
|
2
|
+
======================
|
3
|
+
|
4
|
+
This gem provides an s-expression class.
|
5
|
+
|
6
|
+
|
7
|
+
Support
|
8
|
+
-------
|
9
|
+
|
10
|
+
InfraRuby Vision
|
11
|
+
rubygems@infraruby.com
|
12
|
+
|
13
|
+
http://infraruby.com/
|
14
|
+
https://github.com/InfraRuby
|
15
|
+
https://twitter.com/InfraRuby
|
data/Rakefile
ADDED
data/lib/s-expression.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
## <>
|
2
|
+
## :initialize: Symbol -> void
|
3
|
+
## :initialize: Symbol, Array<java.lang.Object?> -> void
|
4
|
+
## :to_s: -> String
|
5
|
+
## :inspect: -> String
|
6
|
+
## :type: -> Symbol
|
7
|
+
## :args: -> Array<java.lang.Object?>
|
8
|
+
## :size: -> Fixnum
|
9
|
+
## :size_as_int32: -> int32
|
10
|
+
## :[]: int32 -> java.lang.Object?
|
11
|
+
## :[]: Fixnum -> java.lang.Object?
|
12
|
+
## :fetch: int32 -> java.lang.Object?
|
13
|
+
## :fetch: Fixnum -> java.lang.Object?
|
14
|
+
## :<<: java.lang.Object? -> self
|
15
|
+
## :push: java.lang.Object? -> void
|
16
|
+
## :concat: Array<*> -> void
|
17
|
+
## :concat: Enumerable<*> -> void
|
18
|
+
## :concat: java.lang.Iterable<*> -> void
|
19
|
+
class Sexp < Object
|
20
|
+
end
|
21
|
+
|
Binary file
|
data/ruby/Sexp.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
## <>
|
2
|
+
## @__type: Symbol
|
3
|
+
## @__args: Array<java.lang.Object?>
|
4
|
+
class Sexp
|
5
|
+
## Symbol -> void
|
6
|
+
## Symbol, Array<java.lang.Object?> -> void
|
7
|
+
def initialize(type, args = nix)
|
8
|
+
super()
|
9
|
+
@__type = type
|
10
|
+
if args.nix?
|
11
|
+
args = Array.new
|
12
|
+
end
|
13
|
+
@__args = args
|
14
|
+
return
|
15
|
+
end
|
16
|
+
|
17
|
+
# ===
|
18
|
+
|
19
|
+
## -> String
|
20
|
+
def __inspect
|
21
|
+
a = []
|
22
|
+
a.push(@__type.inspect)
|
23
|
+
@__args.each do |o|
|
24
|
+
a.push(o.inspect)
|
25
|
+
end
|
26
|
+
s = a.join(", ")
|
27
|
+
return "s(#{s})"
|
28
|
+
end
|
29
|
+
|
30
|
+
# ruby.Object methods
|
31
|
+
|
32
|
+
## -> String
|
33
|
+
def to_s
|
34
|
+
return __inspect
|
35
|
+
end
|
36
|
+
|
37
|
+
## -> String
|
38
|
+
def inspect
|
39
|
+
return __inspect
|
40
|
+
end
|
41
|
+
|
42
|
+
# ---
|
43
|
+
|
44
|
+
## -> Symbol
|
45
|
+
def type
|
46
|
+
return @__type
|
47
|
+
end
|
48
|
+
|
49
|
+
## -> Array<java.lang.Object?>
|
50
|
+
def args
|
51
|
+
return @__args
|
52
|
+
end
|
53
|
+
|
54
|
+
## -> Fixnum
|
55
|
+
def size
|
56
|
+
return @__args.size
|
57
|
+
end
|
58
|
+
|
59
|
+
## -> int32
|
60
|
+
def size_as_int32
|
61
|
+
return @__args.size_as_int32
|
62
|
+
end
|
63
|
+
|
64
|
+
## int32 -> java.lang.Object?
|
65
|
+
## Fixnum -> java.lang.Object?
|
66
|
+
def [](i)
|
67
|
+
return @__args[i]
|
68
|
+
end
|
69
|
+
|
70
|
+
## int32 -> java.lang.Object?
|
71
|
+
## Fixnum -> java.lang.Object?
|
72
|
+
def fetch(i)
|
73
|
+
return @__args.fetch(i)
|
74
|
+
end
|
75
|
+
|
76
|
+
## java.lang.Object? -> self
|
77
|
+
def <<(o)
|
78
|
+
@__args.push(o)
|
79
|
+
return self
|
80
|
+
end
|
81
|
+
|
82
|
+
## java.lang.Object? -> void
|
83
|
+
def push(o)
|
84
|
+
@__args.push(o)
|
85
|
+
return
|
86
|
+
end
|
87
|
+
|
88
|
+
## Array<*> -> void
|
89
|
+
## Enumerable<*> -> void
|
90
|
+
## java.lang.Iterable<*> -> void
|
91
|
+
def concat(args)
|
92
|
+
@__args.concat(args)
|
93
|
+
return
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.platform = "ruby"
|
3
|
+
s.name = "s-expression"
|
4
|
+
s.version = "3.1.0"
|
5
|
+
s.licenses = ["MIT"]
|
6
|
+
s.author = "InfraRuby Vision"
|
7
|
+
s.email = "rubygems@infraruby.com"
|
8
|
+
s.homepage = "http://infraruby.com/"
|
9
|
+
s.summary = "InfraRuby s-expression class"
|
10
|
+
s.description = "InfraRuby s-expression class"
|
11
|
+
s.files = Dir["**/*"]
|
12
|
+
s.add_runtime_dependency "infraruby-shim", "~> 3.7"
|
13
|
+
s.add_development_dependency "infraruby-task", "~> 3.7"
|
14
|
+
s.add_development_dependency "rspec", "~> 3.0"
|
15
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "s-expression"
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: s-expression
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- InfraRuby Vision
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: infraruby-shim
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: infraruby-task
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: InfraRuby s-expression class
|
56
|
+
email: rubygems@infraruby.com
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- Gemfile
|
62
|
+
- MIT-LICENSE
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- lib/s-expression.rb
|
66
|
+
- pool/s-expression.cut
|
67
|
+
- pool/s-expression.jar
|
68
|
+
- ruby/Sexp.rb
|
69
|
+
- s-expression.gemspec
|
70
|
+
- spec/spec_helper.rb
|
71
|
+
homepage: http://infraruby.com/
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.2.2
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: InfraRuby s-expression class
|
95
|
+
test_files: []
|