flor 0.9.5 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +10 -0
- data/Makefile +13 -5
- data/README.md +0 -35
- data/flor.gemspec +1 -0
- data/lib/flor.rb +6 -24
- data/lib/flor/changes.rb +26 -0
- data/lib/flor/colours.rb +65 -31
- data/lib/flor/conf.rb +84 -54
- data/lib/flor/core.rb +0 -23
- data/lib/flor/core/executor.rb +12 -42
- data/lib/flor/core/node.rb +19 -24
- data/lib/flor/core/procedure.rb +13 -24
- data/lib/flor/core/texecutor.rb +10 -28
- data/lib/flor/deep.rb +152 -0
- data/lib/flor/djan.rb +200 -0
- data/lib/flor/dollar.rb +0 -24
- data/lib/flor/errors.rb +0 -24
- data/lib/flor/flor.rb +43 -296
- data/lib/flor/id.rb +90 -0
- data/lib/flor/log.rb +12 -35
- data/lib/flor/migrations/0002_cunit_and_munit.rb +86 -0
- data/lib/flor/parser.rb +40 -46
- data/lib/flor/pcore/_arr.rb +0 -24
- data/lib/flor/pcore/_atom.rb +0 -24
- data/lib/flor/pcore/_att.rb +3 -25
- data/lib/flor/pcore/_dump.rb +0 -24
- data/lib/flor/pcore/_err.rb +0 -24
- data/lib/flor/pcore/_happly.rb +0 -24
- data/lib/flor/pcore/_obj.rb +0 -24
- data/lib/flor/pcore/_skip.rb +0 -24
- data/lib/flor/pcore/arith.rb +0 -24
- data/lib/flor/pcore/break.rb +0 -24
- data/lib/flor/pcore/case.rb +127 -0
- data/lib/flor/pcore/cmp.rb +0 -24
- data/lib/flor/pcore/cond.rb +24 -24
- data/lib/flor/pcore/cursor.rb +0 -24
- data/lib/flor/pcore/define.rb +0 -24
- data/lib/flor/pcore/fail.rb +0 -24
- data/lib/flor/pcore/if.rb +39 -0
- data/lib/flor/pcore/loop.rb +0 -24
- data/lib/flor/pcore/map.rb +0 -24
- data/lib/flor/pcore/match.rb +0 -24
- data/lib/flor/pcore/move.rb +0 -24
- data/lib/flor/pcore/noeval.rb +0 -24
- data/lib/flor/pcore/noret.rb +0 -24
- data/lib/flor/pcore/push.rb +1 -25
- data/lib/flor/pcore/rand.rb +59 -0
- data/lib/flor/pcore/sequence.rb +0 -24
- data/lib/flor/pcore/set.rb +0 -24
- data/lib/flor/pcore/stall.rb +0 -24
- data/lib/flor/pcore/until.rb +0 -24
- data/lib/flor/pcore/val.rb +0 -24
- data/lib/flor/punit/cancel.rb +0 -24
- data/lib/flor/punit/cmap.rb +0 -24
- data/lib/flor/punit/concurrence.rb +54 -24
- data/lib/flor/punit/every.rb +0 -24
- data/lib/flor/punit/graft.rb +41 -0
- data/lib/flor/punit/on.rb +0 -24
- data/lib/flor/punit/schedule.rb +0 -24
- data/lib/flor/punit/signal.rb +0 -24
- data/lib/flor/punit/sleep.rb +0 -24
- data/lib/flor/punit/task.rb +0 -26
- data/lib/flor/punit/trace.rb +0 -24
- data/lib/flor/punit/trap.rb +0 -24
- data/lib/flor/to_string.rb +4 -25
- data/lib/flor/tools/env.rb +0 -23
- data/lib/flor/tools/shell.rb +810 -0
- data/lib/flor/unit.rb +0 -23
- data/lib/flor/unit/executor.rb +35 -31
- data/lib/flor/unit/ganger.rb +9 -34
- data/lib/flor/unit/hooker.rb +5 -25
- data/lib/flor/unit/journal.rb +0 -23
- data/lib/flor/unit/loader.rb +63 -94
- data/lib/flor/unit/logger.rb +8 -27
- data/lib/flor/unit/models.rb +0 -24
- data/lib/flor/unit/models/execution.rb +13 -24
- data/lib/flor/unit/models/pointer.rb +0 -24
- data/lib/flor/unit/models/timer.rb +0 -24
- data/lib/flor/unit/models/trace.rb +0 -24
- data/lib/flor/unit/models/trap.rb +0 -24
- data/lib/flor/unit/scheduler.rb +157 -128
- data/lib/flor/unit/storage.rb +224 -167
- data/lib/flor/unit/taskers.rb +38 -25
- data/lib/flor/unit/waiter.rb +7 -26
- data/lib/flor/unit/wlist.rb +8 -24
- metadata +28 -7
- data/fail.txt +0 -16
- data/intercepted.txt +0 -123
- data/lib/flor/pcore/ife.rb +0 -56
- data/lib/flor/tools/repl.rb +0 -231
- data/out.txt +0 -206
data/lib/flor/log.rb
CHANGED
@@ -1,32 +1,10 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#
|
22
|
-
# Made in Japan.
|
23
|
-
#++
|
24
|
-
|
25
1
|
|
26
2
|
module Flor
|
27
3
|
|
28
4
|
def self.log_message(executor, m, opts={})
|
29
5
|
|
6
|
+
return if m['point'] == 'end'
|
7
|
+
|
30
8
|
_c = colours(opts)
|
31
9
|
|
32
10
|
nid = m['nid']
|
@@ -47,7 +25,7 @@ module Flor
|
|
47
25
|
a << _c.dg
|
48
26
|
|
49
27
|
if ex = (m['exid'] || '').split('.').last
|
50
|
-
a << ex[-
|
28
|
+
a << ex[-4..-1]
|
51
29
|
a << ' '
|
52
30
|
end
|
53
31
|
|
@@ -78,9 +56,9 @@ module Flor
|
|
78
56
|
t || Node.new(executor, nd, m).lookup_tree(nid)
|
79
57
|
t0 =
|
80
58
|
if t
|
81
|
-
" [#{rw}#{_c.yl}#{Flor.
|
59
|
+
" [#{rw}#{_c.yl}#{Flor.to_d(t[0], compact: true)}#{_c.dg} L#{t[2]}]"
|
82
60
|
elsif nt
|
83
|
-
" [#{_c.dg}#{Flor.
|
61
|
+
" [#{_c.dg}#{Flor.to_d(nt[0], compact: true)}#{_c.dg} L#{nt[2]}]"
|
84
62
|
else
|
85
63
|
''
|
86
64
|
end
|
@@ -98,7 +76,7 @@ module Flor
|
|
98
76
|
a << tri
|
99
77
|
|
100
78
|
cn = t ? " #{_c.dg}#{Flor.to_d(t[1], compact: true, inner: true)}" : ''
|
101
|
-
cn = cn
|
79
|
+
cn = Flor.truncate_string(cn, 49, "#{_c.dg}...#{_c.rs}")
|
102
80
|
a << cn
|
103
81
|
|
104
82
|
hp = nd && nd['heap']
|
@@ -112,7 +90,7 @@ module Flor
|
|
112
90
|
fr = m['from'] ? " from #{m['from']}" : ''
|
113
91
|
a << fr
|
114
92
|
|
115
|
-
rt = ret_to_s(executor, m)
|
93
|
+
rt = ret_to_s(executor, m, _c)
|
116
94
|
rt = rt.length > 0 ? " #{_c.lg}f.ret #{rt}" : ''
|
117
95
|
a << rt
|
118
96
|
|
@@ -172,7 +150,7 @@ module Flor
|
|
172
150
|
headers = opts[:headers]; headers = true if headers.nil?
|
173
151
|
headers = true if opts[:title]
|
174
152
|
|
175
|
-
h = "#{_c.yl}#{Flor.
|
153
|
+
h = "#{_c.yl}#{Flor.to_d(tree[0], compact: true)}"
|
176
154
|
c = tree[1].is_a?(Array) ? '' : " #{_c.yl}#{tree[1]}"
|
177
155
|
l = " #{_c.dg}L#{tree[2]}"
|
178
156
|
|
@@ -222,7 +200,7 @@ module Flor
|
|
222
200
|
end
|
223
201
|
|
224
202
|
s << ind << _c.dg << '| ' << nid << ' '
|
225
|
-
s << _c.yl << Flor.
|
203
|
+
s << _c.yl << Flor.to_d(tree[0], compact: true) << _c.dg << ' L' << tree[2]
|
226
204
|
|
227
205
|
atts.each_with_index do |ct, i|
|
228
206
|
print_flat_tree(ct, "_#{i}", opts)
|
@@ -241,12 +219,11 @@ module Flor
|
|
241
219
|
opts[:out].puts(s.string) if is_root
|
242
220
|
end
|
243
221
|
|
244
|
-
def self.ret_to_s(executor, m)
|
222
|
+
def self.ret_to_s(executor, m, c)
|
245
223
|
|
246
224
|
ret = (m['payload'] || {})['ret']
|
247
225
|
s = Flor.to_d(ret, compact: true)
|
248
|
-
|
249
|
-
l < 35 ? s : "#{s[0, 35]}(...L#{l})"
|
226
|
+
Flor.truncate_string(s, 35, Proc.new { |x| "#{c.dg}... (L#{x})#{c.rs}" })
|
250
227
|
end
|
251
228
|
|
252
229
|
def self.nod_to_s(executor, n, opts, here=false)
|
@@ -255,7 +232,7 @@ module Flor
|
|
255
232
|
|
256
233
|
t = n['tree'] || Node.new(executor, n, nil).lookup_tree(n['nid'])
|
257
234
|
t = Flor.to_d(t, compact: true) if t
|
258
|
-
t = t
|
235
|
+
t = Flor.truncate_string(t, 42);
|
259
236
|
|
260
237
|
h = {}
|
261
238
|
%w[ parent cnid noreply dbg removed ].each do |k|
|
@@ -0,0 +1,86 @@
|
|
1
|
+
|
2
|
+
Sequel.migration do
|
3
|
+
|
4
|
+
up do
|
5
|
+
|
6
|
+
alter_table :flor_messages do
|
7
|
+
|
8
|
+
add_column :cunit, String
|
9
|
+
add_column :munit, String
|
10
|
+
end
|
11
|
+
|
12
|
+
alter_table :flor_executions do
|
13
|
+
|
14
|
+
add_column :cunit, String
|
15
|
+
add_column :munit, String
|
16
|
+
end
|
17
|
+
|
18
|
+
alter_table :flor_timers do
|
19
|
+
|
20
|
+
add_column :cunit, String
|
21
|
+
add_column :munit, String
|
22
|
+
end
|
23
|
+
|
24
|
+
alter_table :flor_traps do
|
25
|
+
|
26
|
+
add_column :cunit, String
|
27
|
+
add_column :munit, String
|
28
|
+
end
|
29
|
+
|
30
|
+
alter_table :flor_pointers do
|
31
|
+
|
32
|
+
add_column :cunit, String
|
33
|
+
|
34
|
+
add_column :mtime, String
|
35
|
+
add_column :munit, String
|
36
|
+
#
|
37
|
+
# those 2 could prove useful later on
|
38
|
+
end
|
39
|
+
|
40
|
+
alter_table :flor_traces do
|
41
|
+
|
42
|
+
add_column :cunit, String
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
down do
|
47
|
+
|
48
|
+
alter_table :flor_messages do
|
49
|
+
|
50
|
+
drop_column :cunit
|
51
|
+
drop_column :munit
|
52
|
+
end
|
53
|
+
|
54
|
+
alter_table :flor_executions do
|
55
|
+
|
56
|
+
drop_column :cunit
|
57
|
+
drop_column :munit
|
58
|
+
end
|
59
|
+
|
60
|
+
alter_table :flor_timers do
|
61
|
+
|
62
|
+
drop_column :cunit
|
63
|
+
drop_column :munit
|
64
|
+
end
|
65
|
+
|
66
|
+
alter_table :flor_traps do
|
67
|
+
|
68
|
+
drop_column :cunit
|
69
|
+
drop_column :munit
|
70
|
+
end
|
71
|
+
|
72
|
+
alter_table :flor_pointers do
|
73
|
+
|
74
|
+
drop_column :cunit
|
75
|
+
|
76
|
+
drop_column :mtime
|
77
|
+
drop_column :munit
|
78
|
+
end
|
79
|
+
|
80
|
+
alter_table :flor_traces do
|
81
|
+
|
82
|
+
drop_column :cunit
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
data/lib/flor/parser.rb
CHANGED
@@ -1,27 +1,3 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#
|
22
|
-
# Made in Japan.
|
23
|
-
#++
|
24
|
-
|
25
1
|
|
26
2
|
module Flor
|
27
3
|
|
@@ -29,6 +5,20 @@ module Flor
|
|
29
5
|
|
30
6
|
# parsing
|
31
7
|
|
8
|
+
def ws_star(i); rex(nil, i, /[ \t]*/); end
|
9
|
+
def retnew(i); rex(nil, i, /[\r\n]*/); end
|
10
|
+
def dot(i); str(nil, i, '.'); end
|
11
|
+
def colon(i); str(nil, i, ':'); end
|
12
|
+
def comma(i); str(nil, i, ','); end
|
13
|
+
def bslash(i); str(nil, i, '\\'); end
|
14
|
+
|
15
|
+
def pstart(i); str(nil, i, '('); end
|
16
|
+
def pend(i); str(nil, i, ')'); end
|
17
|
+
def sbstart(i); str(nil, i, '['); end
|
18
|
+
def sbend(i); str(nil, i, ']'); end
|
19
|
+
def pbstart(i); str(nil, i, '{'); end
|
20
|
+
def pbend(i); str(nil, i, '}'); end
|
21
|
+
|
32
22
|
def null(i); str(:null, i, 'null'); end
|
33
23
|
def number(i); rex(:number, i, /-?[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?/); end
|
34
24
|
|
@@ -36,11 +26,18 @@ module Flor
|
|
36
26
|
def fls(i); str(nil, i, 'false'); end
|
37
27
|
def boolean(i); alt(:boolean, i, :tru, :fls); end
|
38
28
|
|
29
|
+
def rf_symbol(i); rex(nil, i, /[^.:;| \b\f\n\r\t"',()\[\]{}#\\]+/); end
|
30
|
+
def rf_square_index(i); alt(nil, i, :rf_symbol, :dqstring, :sqstring); end
|
31
|
+
def rf_square(i); seq(nil, i, :sbstart, :rf_square_index, :sbend); end
|
32
|
+
def rf_dot(i); seq(nil, i, :dot, :rf_symbol); end
|
33
|
+
def rf_index(i); alt(nil, i, :rf_dot, :rf_square); end
|
34
|
+
def reference(i); seq(:ref, i, :rf_symbol, :rf_index, '*'); end
|
35
|
+
|
39
36
|
def dqstring(i)
|
40
37
|
|
41
38
|
rex(:dqstring, i, %r{
|
42
39
|
"(
|
43
|
-
\\["bfnrt] |
|
40
|
+
\\["\\\/bfnrt] |
|
44
41
|
\\u[0-9a-fA-F]{4} |
|
45
42
|
[^"\\\b\f\n\r\t]
|
46
43
|
)*"
|
@@ -51,7 +48,7 @@ module Flor
|
|
51
48
|
|
52
49
|
rex(:sqstring, i, %r{
|
53
50
|
'(
|
54
|
-
\\['bfnrt] |
|
51
|
+
\\['\\\/bfnrt] |
|
55
52
|
\\u[0-9a-fA-F]{4} |
|
56
53
|
[^'\\\b\f\n\r\t]
|
57
54
|
)*'
|
@@ -69,23 +66,8 @@ module Flor
|
|
69
66
|
}x)
|
70
67
|
end
|
71
68
|
|
72
|
-
def symbol(i); rex(:symbol, i, /[^:;| \b\f\n\r\t"',()\[\]{}#\\]+/); end
|
73
|
-
|
74
69
|
def comment(i); rex(nil, i, /#[^\r\n]*/); end
|
75
70
|
|
76
|
-
def ws_star(i); rex(nil, i, /[ \t]*/); end
|
77
|
-
def retnew(i); rex(nil, i, /[\r\n]*/); end
|
78
|
-
def colon(i); str(nil, i, ':'); end
|
79
|
-
def comma(i); str(nil, i, ','); end
|
80
|
-
def bslash(i); str(nil, i, '\\'); end
|
81
|
-
|
82
|
-
def pstart(i); str(nil, i, '('); end
|
83
|
-
def pend(i); str(nil, i, ')'); end
|
84
|
-
def sbstart(i); str(nil, i, '['); end
|
85
|
-
def sbend(i); str(nil, i, ']'); end
|
86
|
-
def pbstart(i); str(nil, i, '{'); end
|
87
|
-
def pbend(i); str(nil, i, '}'); end
|
88
|
-
|
89
71
|
def eol(i); seq(nil, i, :ws_star, :comment, '?', :retnew); end
|
90
72
|
def postval(i); rep(nil, i, :eol, 0); end
|
91
73
|
|
@@ -109,7 +91,7 @@ module Flor
|
|
109
91
|
def val(i)
|
110
92
|
altg(:val, i,
|
111
93
|
:panode, :par,
|
112
|
-
:
|
94
|
+
:reference, :sqstring, :dqstring, :rxstring,
|
113
95
|
:arr, :obj,
|
114
96
|
:number, :boolean, :null)
|
115
97
|
end
|
@@ -172,10 +154,22 @@ module Flor
|
|
172
154
|
Nod.new(t.lookup(:node)).to_a
|
173
155
|
end
|
174
156
|
|
175
|
-
def
|
157
|
+
def rewrite_ref(t); [ t.string, [], ln(t) ]; end
|
158
|
+
|
159
|
+
UNESCAPE = {
|
160
|
+
"'" => "'", '"' => '"', '\\' => '\\', '/' => '/',
|
161
|
+
'b' => "\b", 'f' => "\f", 'n' => "\n", 'r' => "\r", 't' => "\t"
|
162
|
+
}
|
163
|
+
def restring(s)
|
164
|
+
s.gsub(
|
165
|
+
/\\(?:(['"\\\/bfnrt])|u([\da-fA-F]{4}))/
|
166
|
+
) {
|
167
|
+
$1 ? UNESCAPE[$1] : [ "#$2".hex ].pack('U*')
|
168
|
+
}
|
169
|
+
end
|
176
170
|
|
177
|
-
def
|
178
|
-
def
|
171
|
+
def rewrite_dqstring(t); [ '_dqs', restring(t.string[1..-2]), ln(t) ]; end
|
172
|
+
def rewrite_sqstring(t); [ '_sqs', restring(t.string[1..-2]), ln(t) ]; end
|
179
173
|
def rewrite_rxstring(t); [ '_rxs', t.string, ln(t) ]; end
|
180
174
|
|
181
175
|
def rewrite_boolean(t); [ '_boo', t.string == 'true', line_number(t) ]; end
|
@@ -290,7 +284,7 @@ module Flor
|
|
290
284
|
|
291
285
|
# rewrite if/unless suffix
|
292
286
|
|
293
|
-
t = [ atts[i][0][0] == 'if' ? '
|
287
|
+
t = [ atts[i][0][0] == 'if' ? 'if' : 'unless', [], @line ]
|
294
288
|
t[1].concat(atts[i + 1..-1].collect(&:first))
|
295
289
|
t[1].push([ @head, cn[0, i], @line ])
|
296
290
|
|
data/lib/flor/pcore/_arr.rb
CHANGED
@@ -1,27 +1,3 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#
|
22
|
-
# Made in Japan.
|
23
|
-
#++
|
24
|
-
|
25
1
|
|
26
2
|
class Flor::Pro::Arr < Flor::Procedure
|
27
3
|
|
data/lib/flor/pcore/_atom.rb
CHANGED
@@ -1,27 +1,3 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#
|
22
|
-
# Made in Japan.
|
23
|
-
#++
|
24
|
-
|
25
1
|
|
26
2
|
class Flor::Pro::Atom < Flor::Procedure
|
27
3
|
|
data/lib/flor/pcore/_att.rb
CHANGED
@@ -1,27 +1,3 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#
|
22
|
-
# Made in Japan.
|
23
|
-
#++
|
24
|
-
|
25
1
|
|
26
2
|
class Flor::Pro::Att < Flor::Procedure
|
27
3
|
|
@@ -57,7 +33,9 @@ class Flor::Pro::Att < Flor::Procedure
|
|
57
33
|
def receive_keyed
|
58
34
|
|
59
35
|
if Flor.child_id(@message['from']) == 0
|
60
|
-
|
36
|
+
ret = payload['ret']
|
37
|
+
ret = ret[1]['task'] if Flor.is_task_tree?(ret)
|
38
|
+
@node['key'] = k = ret
|
61
39
|
as = (parent_node || {})['atts_accepting_symbols'] || []
|
62
40
|
execute_child(1, nil, 'accept_symbol' => as.include?(k))
|
63
41
|
else
|
data/lib/flor/pcore/_dump.rb
CHANGED
@@ -1,27 +1,3 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2015-2017, John Mettraux, jmettraux+flor@gmail.com
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#
|
22
|
-
# Made in Japan.
|
23
|
-
#++
|
24
|
-
|
25
1
|
|
26
2
|
class Flor::Pro::Dump < Flor::Procedure
|
27
3
|
|