nendo 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/text/tree.nnd CHANGED
@@ -1,9 +1,11 @@
1
+ ;;-*- mode: nendo; syntax: scheme -*-;;
1
2
  ;;;
2
- ;;; test/tree.scm - lightweight text generation
3
+ ;;; text/tree.scm - lightweight text generation
3
4
  ;;;
4
5
  ;;; Public Domain.
5
- ;;; $Id: tree.scm,v 1.5 2003-07-05 03:29:12 shirok Exp $
6
+ ;;; $Id:
6
7
  ;;;
8
+ ;;; ported for Nendo language by Kiyoka Nishiyama.
7
9
 
8
10
  (require "stringio")
9
11
 
data/lib/text/tree.nndc CHANGED
@@ -1,215 +1,221 @@
1
1
 
2
2
  callProcedure( 'require',
3
3
  begin
4
- if (self.instance_variables.include?(:@_require)) then
4
+ if @global_lisp_binding.has_key?('_require') then
5
5
  @_require
6
6
  else raise NameError.new( "Error: undefined variable _require", "_require" ) end
7
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:8"] + __e.backtrace ) ; raise __e
7
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:10"] + __e.backtrace ) ; raise __e
8
8
  end ,
9
9
  Cell.new(
10
10
  "stringio"
11
11
  ))
12
12
  #--------------------
13
13
 
14
- @_write_MIMARKtree =
15
- Proc.new { |_tree,*__rest__| _out = __rest__[0] ;
16
- begin
17
- ___lambda = lambda { |_out|
18
- begin
19
- ___lambda = lambda { |_loop|
20
- _loop =
21
- Proc.new { |_tree|
22
- if (
23
- callProcedure( 'null?',
24
- begin
25
- if (self.instance_variables.include?(:@_null_QUMARK)) then
26
- @_null_QUMARK
27
- else raise NameError.new( "Error: undefined variable _null_QUMARK", "_null_QUMARK" ) end
28
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:15"] + __e.backtrace ) ; raise __e
29
- end ,
30
- Cell.new(
14
+ begin
15
+ @global_lisp_binding['_write_MIMARKtree'] = true
16
+ @_write_MIMARKtree =
17
+ Proc.new { |_tree,*__rest__| _out = __rest__[0] ;
18
+ begin
19
+ ___lambda = lambda { |_out|
20
+ begin
21
+ ___lambda = lambda { |_loop|
22
+ _loop =
23
+ Proc.new { |_tree|
24
+ if (
25
+ callProcedure( 'null?',
31
26
  begin
32
- _tree
33
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
34
- end
35
- ))
36
- ) then
37
- begin
38
- true
39
- end
40
- else
41
- if (
42
- callProcedure( 'pair?',
27
+ if @global_lisp_binding.has_key?('_null_QUMARK') then
28
+ @_null_QUMARK
29
+ else raise NameError.new( "Error: undefined variable _null_QUMARK", "_null_QUMARK" ) end
30
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:17"] + __e.backtrace ) ; raise __e
31
+ end ,
32
+ Cell.new(
43
33
  begin
44
- if (self.instance_variables.include?(:@_pair_QUMARK)) then
45
- @_pair_QUMARK
46
- else raise NameError.new( "Error: undefined variable _pair_QUMARK", "_pair_QUMARK" ) end
47
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
48
- end ,
49
- Cell.new(
34
+ _tree
35
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
36
+ end
37
+ ))
38
+ ) then
39
+ begin
40
+ true
41
+ end
42
+ else
43
+ if (
44
+ callProcedure( 'pair?',
50
45
  begin
51
- _tree
46
+ if @global_lisp_binding.has_key?('_pair_QUMARK') then
47
+ @_pair_QUMARK
48
+ else raise NameError.new( "Error: undefined variable _pair_QUMARK", "_pair_QUMARK" ) end
52
49
  rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
53
- end
54
- ))
55
- ) then
56
- begin
57
- callProcedure( 'write-tree',
58
- begin
59
- if (self.instance_variables.include?(:@_write_MIMARKtree)) then
60
- @_write_MIMARKtree
61
- else raise NameError.new( "Error: undefined variable _write_MIMARKtree", "_write_MIMARKtree" ) end
62
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
63
- end ,
64
- Cell.new(
65
- callProcedure( 'car',
66
- begin
67
- if (self.instance_variables.include?(:@_car)) then
68
- @_car
69
- else raise NameError.new( "Error: undefined variable _car", "_car" ) end
70
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
71
- end ,
72
- Cell.new(
50
+ end ,
51
+ Cell.new(
52
+ begin
53
+ _tree
54
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
55
+ end
56
+ ))
57
+ ) then
58
+ begin
59
+ callProcedure( 'write-tree',
60
+ begin
61
+ if @global_lisp_binding.has_key?('_write_MIMARKtree') then
62
+ @_write_MIMARKtree
63
+ else raise NameError.new( "Error: undefined variable _write_MIMARKtree", "_write_MIMARKtree" ) end
64
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
65
+ end ,
66
+ Cell.new(
67
+ callProcedure( 'car',
73
68
  begin
74
- _tree
69
+ if @global_lisp_binding.has_key?('_car') then
70
+ @_car
71
+ else raise NameError.new( "Error: undefined variable _car", "_car" ) end
75
72
  rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
76
- end
77
- )) ,Cell.new(
73
+ end ,
74
+ Cell.new(
75
+ begin
76
+ _tree
77
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
78
+ end
79
+ )) ,Cell.new(
80
+ begin
81
+ _out
82
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
83
+ end
84
+ )))
85
+ callProcedure( 'loop',
78
86
  begin
79
- _out
80
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
81
- end
82
- )))
83
- callProcedure( 'loop',
84
- begin
85
- _loop
86
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
87
- end ,
88
- Cell.new(
89
- callProcedure( 'cdr',
90
- begin
91
- if (self.instance_variables.include?(:@_cdr)) then
92
- @_cdr
93
- else raise NameError.new( "Error: undefined variable _cdr", "_cdr" ) end
94
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
95
- end ,
96
- Cell.new(
87
+ _loop
88
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
89
+ end ,
90
+ Cell.new(
91
+ callProcedure( 'cdr',
97
92
  begin
98
- _tree
93
+ if @global_lisp_binding.has_key?('_cdr') then
94
+ @_cdr
95
+ else raise NameError.new( "Error: undefined variable _cdr", "_cdr" ) end
99
96
  rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
100
- end
101
- ))
102
- ))
103
- end
104
- else
105
- if (
106
- true
107
- ) then
108
- begin
109
- begin
110
- _out.print(
97
+ end ,
98
+ Cell.new(
111
99
  begin
112
100
  _tree
113
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
101
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
114
102
  end
115
- )
116
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
117
- end
118
- end
119
- else
120
- Nil.new
121
- end
122
- end
123
- end
124
- }
125
- callProcedure( 'loop',
126
- begin
127
- _loop
128
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
129
- end ,
130
- Cell.new(
103
+ ))
104
+ ))
105
+ end
106
+ else
107
+ if (
108
+ true
109
+ ) then
110
+ begin
111
+ begin
112
+ _out.print(
113
+ begin
114
+ _tree
115
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
116
+ end
117
+ )
118
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
119
+ end
120
+ end
121
+ else
122
+ Nil.new
123
+ end
124
+ end
125
+ end
126
+ }
127
+ callProcedure( 'loop',
131
128
  begin
132
- _tree
129
+ _loop
133
130
  rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
134
- end
135
- ))
136
- } ; ___lambda.call(
137
- nil
138
- )
139
- end
140
- } ; ___lambda.call(
141
- if (
142
- callProcedure( 'null?',
143
- begin
144
- if (self.instance_variables.include?(:@_null_QUMARK)) then
145
- @_null_QUMARK
146
- else raise NameError.new( "Error: undefined variable _null_QUMARK", "_null_QUMARK" ) end
147
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:15"] + __e.backtrace ) ; raise __e
148
- end ,
149
- Cell.new(
150
- begin
151
- _out
152
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
153
- end
154
- ))
155
- ) then
156
- begin
157
- STDOUT
158
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:12"] + __e.backtrace ) ; raise __e
159
- end
160
- else
161
- callProcedure( 'car',
131
+ end ,
132
+ Cell.new(
133
+ begin
134
+ _tree
135
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:20"] + __e.backtrace ) ; raise __e
136
+ end
137
+ ))
138
+ } ; ___lambda.call(
139
+ nil
140
+ )
141
+ end
142
+ } ; ___lambda.call(
143
+ if (
144
+ callProcedure( 'null?',
162
145
  begin
163
- if (self.instance_variables.include?(:@_car)) then
164
- @_car
165
- else raise NameError.new( "Error: undefined variable _car", "_car" ) end
166
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
146
+ if @global_lisp_binding.has_key?('_null_QUMARK') then
147
+ @_null_QUMARK
148
+ else raise NameError.new( "Error: undefined variable _null_QUMARK", "_null_QUMARK" ) end
149
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:17"] + __e.backtrace ) ; raise __e
167
150
  end ,
168
151
  Cell.new(
169
152
  begin
170
153
  _out
171
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:16"] + __e.backtrace ) ; raise __e
154
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
172
155
  end
173
156
  ))
174
- end
175
- )
176
- end
177
- }
157
+ ) then
158
+ begin
159
+ STDOUT
160
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:14"] + __e.backtrace ) ; raise __e
161
+ end
162
+ else
163
+ callProcedure( 'car',
164
+ begin
165
+ if @global_lisp_binding.has_key?('_car') then
166
+ @_car
167
+ else raise NameError.new( "Error: undefined variable _car", "_car" ) end
168
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
169
+ end ,
170
+ Cell.new(
171
+ begin
172
+ _out
173
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:18"] + __e.backtrace ) ; raise __e
174
+ end
175
+ ))
176
+ end
177
+ )
178
+ end
179
+ }
180
+ end
178
181
  #--------------------
179
182
 
180
- @_tree_MIMARK_GTMARKstring =
181
- Proc.new { |_tree|
182
- begin
183
- ___lambda = lambda { |_sio|
184
- callProcedure( 'write-tree',
185
- begin
186
- if (self.instance_variables.include?(:@_write_MIMARKtree)) then
187
- @_write_MIMARKtree
188
- else raise NameError.new( "Error: undefined variable _write_MIMARKtree", "_write_MIMARKtree" ) end
189
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:22"] + __e.backtrace ) ; raise __e
190
- end ,
191
- Cell.new(
183
+ begin
184
+ @global_lisp_binding['_tree_MIMARK_GTMARKstring'] = true
185
+ @_tree_MIMARK_GTMARKstring =
186
+ Proc.new { |_tree|
187
+ begin
188
+ ___lambda = lambda { |_sio|
189
+ callProcedure( 'write-tree',
192
190
  begin
193
- _tree
194
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:22"] + __e.backtrace ) ; raise __e
195
- end ,Cell.new(
196
- begin
197
- _sio
198
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:22"] + __e.backtrace ) ; raise __e
199
- end
200
- )))
201
- begin
202
- _sio.string(
203
- )
204
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:23"] + __e.backtrace ) ; raise __e
205
- end
206
- } ; ___lambda.call(
191
+ if @global_lisp_binding.has_key?('_write_MIMARKtree') then
192
+ @_write_MIMARKtree
193
+ else raise NameError.new( "Error: undefined variable _write_MIMARKtree", "_write_MIMARKtree" ) end
194
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:24"] + __e.backtrace ) ; raise __e
195
+ end ,
196
+ Cell.new(
197
+ begin
198
+ _tree
199
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:24"] + __e.backtrace ) ; raise __e
200
+ end ,Cell.new(
201
+ begin
202
+ _sio
203
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:24"] + __e.backtrace ) ; raise __e
204
+ end
205
+ )))
207
206
  begin
208
- StringIO.new(
209
- ""
207
+ _sio.string(
210
208
  )
211
- rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:21"] + __e.backtrace ) ; raise __e
209
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:25"] + __e.backtrace ) ; raise __e
212
210
  end
213
- )
214
- end
215
- }
211
+ } ; ___lambda.call(
212
+ begin
213
+ StringIO.new(
214
+ ""
215
+ )
216
+ rescue => __e ; __e.set_backtrace( ["./lib/text/tree.nnd:23"] + __e.backtrace ) ; raise __e
217
+ end
218
+ )
219
+ end
220
+ }
221
+ end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nendo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 3
8
+ - 1
9
+ version: 0.3.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - Kiyoka Nishiyama
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-04-12 00:00:00 +09:00
17
+ date: 2010-04-30 00:00:00 +09:00
13
18
  default_executable: nendo
14
19
  dependencies: []
15
20
 
@@ -32,6 +37,8 @@ files:
32
37
  - example/html-lite-sample.nnd
33
38
  - example/scratch.nnd
34
39
  - example/tak.nnd
40
+ - lib/debug/syslog.nnd
41
+ - lib/debug/syslog.nndc
35
42
  - lib/init.nnd
36
43
  - lib/init.nndc
37
44
  - lib/nendo.rb
@@ -42,6 +49,8 @@ files:
42
49
  - README
43
50
  has_rdoc: true
44
51
  homepage: http://github.com/kiyoka/nendo
52
+ licenses: []
53
+
45
54
  post_install_message:
46
55
  rdoc_options:
47
56
  - --charset=UTF-8
@@ -51,20 +60,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
60
  requirements:
52
61
  - - ">="
53
62
  - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
54
65
  version: "0"
55
- version:
56
66
  required_rubygems_version: !ruby/object:Gem::Requirement
57
67
  requirements:
58
68
  - - ">="
59
69
  - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
60
72
  version: "0"
61
- version:
62
73
  requirements: []
63
74
 
64
75
  rubyforge_project:
65
- rubygems_version: 1.3.1
76
+ rubygems_version: 1.3.6
66
77
  signing_key:
67
- specification_version: 2
78
+ specification_version: 3
68
79
  summary: Nendo is a dialect of Lisp.
69
80
  test_files: []
70
81