kdl 1.0.6 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +8 -1
- data/.gitignore +1 -0
- data/.gitmodules +4 -0
- data/Gemfile +6 -1
- data/README.md +67 -7
- data/Rakefile +6 -1
- data/bin/kdl +1 -1
- data/kdl.gemspec +2 -2
- data/lib/kdl/document.rb +60 -2
- data/lib/kdl/error.rb +24 -0
- data/lib/kdl/kdl.tab.rb +305 -231
- data/lib/kdl/kdl.yy +57 -49
- data/lib/kdl/node.rb +116 -13
- data/lib/kdl/parser_common.rb +28 -0
- data/lib/kdl/string_dumper.rb +32 -33
- data/lib/kdl/tokenizer.rb +387 -136
- data/lib/kdl/types/base64.rb +3 -1
- data/lib/kdl/types/country/iso3166_countries.rb +3 -1
- data/lib/kdl/types/country/iso3166_subdivisions.rb +3 -1
- data/lib/kdl/types/country.rb +4 -2
- data/lib/kdl/types/currency/iso4217_currencies.rb +3 -1
- data/lib/kdl/types/currency.rb +3 -1
- data/lib/kdl/types/date_time.rb +5 -3
- data/lib/kdl/types/decimal.rb +3 -1
- data/lib/kdl/types/duration/iso8601_parser.rb +3 -1
- data/lib/kdl/types/duration.rb +3 -1
- data/lib/kdl/types/email/parser.rb +10 -8
- data/lib/kdl/types/email.rb +3 -1
- data/lib/kdl/types/hostname/validator.rb +3 -1
- data/lib/kdl/types/hostname.rb +3 -1
- data/lib/kdl/types/ip.rb +3 -1
- data/lib/kdl/types/irl/parser.rb +10 -8
- data/lib/kdl/types/irl.rb +3 -1
- data/lib/kdl/types/regex.rb +3 -1
- data/lib/kdl/types/url.rb +3 -1
- data/lib/kdl/types/url_template.rb +6 -4
- data/lib/kdl/types/uuid.rb +3 -1
- data/lib/kdl/types.rb +2 -0
- data/lib/kdl/v1/document.rb +19 -0
- data/lib/kdl/v1/kdl.tab.rb +594 -0
- data/lib/kdl/v1/kdl.yy +89 -0
- data/lib/kdl/v1/node.rb +32 -0
- data/lib/kdl/v1/string_dumper.rb +30 -0
- data/lib/kdl/v1/tokenizer.rb +298 -0
- data/lib/kdl/v1/value.rb +91 -0
- data/lib/kdl/v1.rb +13 -0
- data/lib/kdl/value.rb +87 -15
- data/lib/kdl/version.rb +3 -1
- data/lib/kdl.rb +47 -1
- metadata +14 -7
data/lib/kdl/kdl.tab.rb
CHANGED
@@ -8,168 +8,191 @@ require 'racc/parser.rb'
|
|
8
8
|
module KDL
|
9
9
|
class Parser < Racc::Parser
|
10
10
|
|
11
|
-
module_eval(<<'...end kdl.yy/module_eval...', 'kdl.yy',
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
@type_parsers = {}
|
18
|
-
end
|
19
|
-
@tokenizer = ::KDL::Tokenizer.new(str)
|
20
|
-
do_parse
|
11
|
+
module_eval(<<'...end kdl.yy/module_eval...', 'kdl.yy', 78)
|
12
|
+
|
13
|
+
include KDL::ParserCommon
|
14
|
+
|
15
|
+
def initialize(**options)
|
16
|
+
init(**options)
|
21
17
|
end
|
22
18
|
|
23
|
-
|
19
|
+
def parser_version
|
20
|
+
2
|
21
|
+
end
|
24
22
|
|
25
|
-
def
|
26
|
-
@tokenizer.
|
23
|
+
def parse(str)
|
24
|
+
@tokenizer = ::KDL::Tokenizer.new(str)
|
25
|
+
check_version
|
26
|
+
do_parse
|
27
27
|
end
|
28
28
|
...end kdl.yy/module_eval...
|
29
29
|
##### State transition tables begin ###
|
30
30
|
|
31
31
|
racc_action_table = [
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
32
|
+
20, 21, 22, 9, 33, 26, 20, 21, 22, 33,
|
33
|
+
33, 33, 19, 18, 5, 6, 33, 18, 19, 18,
|
34
|
+
18, 33, 7, 18, 48, 49, 50, 54, 55, 58,
|
35
|
+
59, 57, 33, 33, -63, -63, 19, 20, 21, 22,
|
36
|
+
71, 18, 18, -39, -40, 5, 6, -41, 85, 19,
|
37
|
+
20, 21, 22, 7, 18, 73, 20, 21, 22, 33,
|
38
|
+
33, 87, 19, 83, 5, 6, 33, 18, 19, 18,
|
39
|
+
91, 92, 7, 48, 49, 50, 54, 55, 58, 59,
|
40
|
+
57, 70, 6, nil, 33, 19, -54, -54, nil, 7,
|
41
|
+
75, 76, 77, 54, 55, 58, 59, 57, 33, 33,
|
42
|
+
nil, nil, 19, 5, 6, 5, 6, 18, 18, 5,
|
43
|
+
6, 7, 30, 7, 5, 6, nil, 7, 5, 6,
|
44
|
+
5, 6, 7, 70, 6, nil, 7, nil, 7, 5,
|
45
|
+
6, 7, 70, 6, 70, 6, nil, 7, nil, 30,
|
46
|
+
7, 30, 7, 75, 76, 77, 54, 55, 58, 59,
|
47
|
+
57, 20, 21, 22, 20, 21, 22 ]
|
46
48
|
|
47
49
|
racc_action_check = [
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
28,
|
60
|
-
|
61
|
-
|
50
|
+
2, 2, 2, 1, 40, 9, 3, 3, 3, 15,
|
51
|
+
46, 62, 2, 40, 3, 3, 19, 2, 3, 46,
|
52
|
+
62, 33, 3, 3, 32, 32, 32, 32, 32, 32,
|
53
|
+
32, 32, 32, 41, 32, 41, 32, 80, 80, 80,
|
54
|
+
45, 32, 41, 48, 49, 80, 80, 50, 80, 80,
|
55
|
+
81, 81, 81, 80, 80, 51, 17, 17, 17, 61,
|
56
|
+
64, 81, 81, 78, 17, 17, 83, 81, 17, 64,
|
57
|
+
89, 90, 17, 43, 43, 43, 43, 43, 43, 43,
|
58
|
+
43, 43, 43, nil, 70, 43, 70, 70, nil, 43,
|
59
|
+
73, 73, 73, 73, 73, 73, 73, 73, 65, 79,
|
60
|
+
nil, nil, 73, 0, 0, 12, 12, 65, 79, 28,
|
61
|
+
28, 0, 12, 12, 30, 30, nil, 28, 35, 35,
|
62
|
+
39, 39, 30, 63, 63, nil, 35, nil, 39, 71,
|
63
|
+
71, 63, 84, 84, 86, 86, nil, 71, nil, 84,
|
64
|
+
84, 86, 86, 53, 53, 53, 53, 53, 53, 53,
|
65
|
+
53, 14, 14, 14, 36, 36, 36 ]
|
62
66
|
|
63
67
|
racc_action_pointer = [
|
64
|
-
-2,
|
65
|
-
nil, nil, nil,
|
66
|
-
nil, nil, nil, nil, nil, nil, nil,
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
93, 3, -2, 4, nil, nil, nil, nil, nil, 5,
|
69
|
+
nil, nil, 95, nil, 149, -1, nil, 54, nil, 6,
|
70
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 99, nil,
|
71
|
+
104, nil, 22, 11, nil, 108, 152, nil, nil, 110,
|
72
|
+
-6, 23, nil, 71, nil, 28, 0, nil, 27, 28,
|
73
|
+
31, 39, nil, 141, nil, nil, nil, nil, nil, nil,
|
74
|
+
nil, 49, 1, 113, 50, 88, nil, nil, nil, nil,
|
75
|
+
74, 119, nil, 88, nil, nil, nil, nil, 48, 89,
|
76
|
+
35, 48, nil, 56, 122, nil, 124, nil, nil, 57,
|
77
|
+
58, nil, nil ]
|
72
78
|
|
73
79
|
racc_action_default = [
|
74
|
-
-
|
75
|
-
-6, -7,
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
-
|
80
|
-
-
|
81
|
-
-
|
80
|
+
-63, -64, -1, -2, -3, -58, -59, -60, -61, -64,
|
81
|
+
-6, -7, -64, -9, -64, -11, -17, -64, -36, -63,
|
82
|
+
-39, -40, -41, -4, -5, -62, 93, -8, -32, -33,
|
83
|
+
-34, -10, -22, -54, -23, -37, -64, -56, -57, -35,
|
84
|
+
-12, -13, -18, -63, -20, -64, -57, -30, -45, -46,
|
85
|
+
-47, -64, -43, -64, -48, -49, -50, -51, -52, -53,
|
86
|
+
-55, -63, -15, -63, -64, -14, -31, -19, -21, -28,
|
87
|
+
-58, -63, -29, -64, -44, -45, -46, -47, -64, -16,
|
88
|
+
-64, -64, -42, -63, -63, -25, -63, -24, -38, -64,
|
89
|
+
-64, -27, -26 ]
|
82
90
|
|
83
91
|
racc_goto_table = [
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
nil,
|
89
|
-
|
90
|
-
nil,
|
91
|
-
|
92
|
+
17, 17, 2, 23, 24, 3, 25, 36, 41, 53,
|
93
|
+
42, 4, 1, 44, 51, 31, 62, 34, 61, 74,
|
94
|
+
53, 67, 35, 66, 68, 51, nil, 40, 72, nil,
|
95
|
+
43, 25, 84, 86, nil, 39, 65, nil, 25, 32,
|
96
|
+
nil, 79, 25, nil, 66, nil, 72, nil, 35, 78,
|
97
|
+
53, 82, nil, nil, nil, nil, 46, 60, nil, nil,
|
98
|
+
nil, 66, nil, nil, 64, 46, nil, nil, 35, nil,
|
99
|
+
64, 88, 89, 81, 90, nil, 80, nil, 17, 17,
|
100
|
+
23, 24, 4, 25, nil, nil, 64, nil, 64, 64,
|
101
|
+
nil, nil, nil, nil, 60, nil, nil, nil, nil, nil,
|
102
|
+
nil, nil, nil, 64 ]
|
92
103
|
|
93
104
|
racc_goto_check = [
|
94
|
-
|
95
|
-
16,
|
96
|
-
|
97
|
-
|
98
|
-
nil, 14, nil, nil, nil,
|
99
|
-
|
100
|
-
nil,
|
101
|
-
|
105
|
+
17, 17, 2, 5, 6, 3, 24, 19, 14, 10,
|
106
|
+
16, 4, 1, 18, 15, 9, 14, 5, 15, 22,
|
107
|
+
10, 16, 3, 20, 18, 15, nil, 13, 20, nil,
|
108
|
+
17, 24, 7, 7, nil, 3, 13, nil, 24, 12,
|
109
|
+
nil, 14, 24, nil, 20, nil, 20, nil, 3, 19,
|
110
|
+
10, 16, nil, nil, nil, nil, 12, 12, nil, nil,
|
111
|
+
nil, 20, nil, nil, 12, 12, nil, nil, 3, nil,
|
112
|
+
12, 19, 19, 2, 19, nil, 3, nil, 17, 17,
|
113
|
+
5, 6, 4, 24, nil, nil, 12, nil, 12, 12,
|
114
|
+
nil, nil, nil, nil, 12, nil, nil, nil, nil, nil,
|
115
|
+
nil, nil, nil, 12 ]
|
102
116
|
|
103
117
|
racc_goto_pointer = [
|
104
|
-
nil,
|
105
|
-
|
106
|
-
nil,
|
118
|
+
nil, 12, 2, 5, 11, 0, 1, -48, nil, 1,
|
119
|
+
-23, nil, 24, -5, -24, -18, -22, -2, -19, -12,
|
120
|
+
-18, nil, -34, nil, 3 ]
|
107
121
|
|
108
122
|
racc_goto_default = [
|
109
|
-
nil, nil, nil,
|
110
|
-
|
111
|
-
56, 8 ]
|
123
|
+
nil, nil, nil, 28, 37, 10, 11, 12, 27, 13,
|
124
|
+
14, 15, 38, 69, nil, 16, nil, 63, nil, 45,
|
125
|
+
47, 29, 52, 56, 8 ]
|
112
126
|
|
113
127
|
racc_reduce_table = [
|
114
128
|
0, 0, :racc_error,
|
115
|
-
1,
|
116
|
-
1,
|
117
|
-
1,
|
118
|
-
2,
|
119
|
-
2,
|
120
|
-
2,
|
121
|
-
2,
|
122
|
-
|
123
|
-
|
124
|
-
2,
|
125
|
-
|
126
|
-
3,
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
3,
|
133
|
-
4,
|
134
|
-
|
135
|
-
|
136
|
-
2,
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
1, 34, :
|
145
|
-
|
146
|
-
1,
|
147
|
-
|
148
|
-
1,
|
149
|
-
|
150
|
-
1, 40, :_reduce_36,
|
151
|
-
1, 40, :_reduce_37,
|
152
|
-
1, 40, :_reduce_38,
|
153
|
-
1, 40, :_reduce_39,
|
154
|
-
1, 41, :_reduce_40,
|
155
|
-
1, 41, :_reduce_41,
|
156
|
-
1, 35, :_reduce_none,
|
157
|
-
1, 35, :_reduce_none,
|
158
|
-
2, 35, :_reduce_none,
|
159
|
-
2, 35, :_reduce_none,
|
160
|
-
3, 35, :_reduce_none,
|
129
|
+
1, 21, :_reduce_1,
|
130
|
+
1, 21, :_reduce_2,
|
131
|
+
1, 22, :_reduce_3,
|
132
|
+
2, 22, :_reduce_4,
|
133
|
+
2, 22, :_reduce_5,
|
134
|
+
2, 22, :_reduce_6,
|
135
|
+
2, 22, :_reduce_7,
|
136
|
+
2, 25, :_reduce_8,
|
137
|
+
1, 27, :_reduce_9,
|
138
|
+
2, 27, :_reduce_10,
|
139
|
+
1, 29, :_reduce_11,
|
140
|
+
3, 29, :_reduce_12,
|
141
|
+
3, 29, :_reduce_13,
|
142
|
+
4, 29, :_reduce_14,
|
143
|
+
4, 29, :_reduce_15,
|
144
|
+
5, 29, :_reduce_16,
|
145
|
+
1, 31, :_reduce_17,
|
146
|
+
3, 31, :_reduce_18,
|
147
|
+
4, 31, :_reduce_19,
|
148
|
+
3, 31, :_reduce_20,
|
149
|
+
4, 31, :_reduce_21,
|
150
|
+
2, 31, :_reduce_22,
|
151
|
+
2, 26, :_reduce_none,
|
152
|
+
4, 33, :_reduce_24,
|
153
|
+
4, 33, :_reduce_25,
|
154
|
+
6, 33, :_reduce_26,
|
155
|
+
6, 33, :_reduce_27,
|
156
|
+
2, 40, :_reduce_none,
|
157
|
+
2, 40, :_reduce_none,
|
158
|
+
1, 34, :_reduce_none,
|
159
|
+
2, 34, :_reduce_none,
|
160
|
+
1, 28, :_reduce_none,
|
161
|
+
1, 28, :_reduce_none,
|
162
|
+
1, 41, :_reduce_none,
|
163
|
+
2, 41, :_reduce_none,
|
161
164
|
1, 37, :_reduce_none,
|
162
|
-
|
163
|
-
|
164
|
-
1,
|
165
|
-
1,
|
166
|
-
1,
|
167
|
-
|
168
|
-
|
165
|
+
2, 37, :_reduce_none,
|
166
|
+
6, 30, :_reduce_38,
|
167
|
+
1, 35, :_reduce_39,
|
168
|
+
1, 35, :_reduce_40,
|
169
|
+
1, 35, :_reduce_41,
|
170
|
+
3, 38, :_reduce_42,
|
171
|
+
1, 36, :_reduce_none,
|
172
|
+
2, 36, :_reduce_44,
|
173
|
+
1, 42, :_reduce_45,
|
174
|
+
1, 42, :_reduce_46,
|
175
|
+
1, 42, :_reduce_47,
|
176
|
+
1, 42, :_reduce_48,
|
177
|
+
1, 42, :_reduce_49,
|
178
|
+
1, 42, :_reduce_50,
|
179
|
+
1, 42, :_reduce_51,
|
180
|
+
1, 43, :_reduce_52,
|
181
|
+
1, 43, :_reduce_53,
|
182
|
+
1, 32, :_reduce_none,
|
183
|
+
2, 32, :_reduce_none,
|
184
|
+
1, 39, :_reduce_none,
|
185
|
+
1, 39, :_reduce_none,
|
186
|
+
1, 44, :_reduce_none,
|
187
|
+
1, 44, :_reduce_none,
|
188
|
+
1, 44, :_reduce_none,
|
189
|
+
1, 23, :_reduce_none,
|
190
|
+
2, 23, :_reduce_none,
|
191
|
+
0, 24, :_reduce_63 ]
|
169
192
|
|
170
|
-
racc_reduce_n =
|
193
|
+
racc_reduce_n = 64
|
171
194
|
|
172
|
-
racc_shift_n =
|
195
|
+
racc_shift_n = 93
|
173
196
|
|
174
197
|
racc_token_table = {
|
175
198
|
false => 0,
|
@@ -191,10 +214,9 @@ racc_token_table = {
|
|
191
214
|
:EQUALS => 16,
|
192
215
|
:SEMICOLON => 17,
|
193
216
|
:EOF => 18,
|
194
|
-
:SLASHDASH => 19
|
195
|
-
:ESCLINE => 20 }
|
217
|
+
:SLASHDASH => 19 }
|
196
218
|
|
197
|
-
racc_nt_base =
|
219
|
+
racc_nt_base = 20
|
198
220
|
|
199
221
|
racc_use_result_var = false
|
200
222
|
|
@@ -236,7 +258,6 @@ Racc_token_to_s_table = [
|
|
236
258
|
"SEMICOLON",
|
237
259
|
"EOF",
|
238
260
|
"SLASHDASH",
|
239
|
-
"ESCLINE",
|
240
261
|
"$start",
|
241
262
|
"document",
|
242
263
|
"nodes",
|
@@ -244,17 +265,20 @@ Racc_token_to_s_table = [
|
|
244
265
|
"none",
|
245
266
|
"node",
|
246
267
|
"empty_node",
|
268
|
+
"unterm_node",
|
269
|
+
"node_term",
|
247
270
|
"untyped_node",
|
248
271
|
"type",
|
249
272
|
"node_decl",
|
250
|
-
"
|
273
|
+
"ws_plus",
|
251
274
|
"node_children",
|
252
|
-
"
|
275
|
+
"empty_childrens",
|
253
276
|
"identifier",
|
254
|
-
"ws",
|
255
277
|
"value",
|
256
|
-
"
|
278
|
+
"slashdash",
|
257
279
|
"property",
|
280
|
+
"ws_star",
|
281
|
+
"empty_children",
|
258
282
|
"semicolon_term",
|
259
283
|
"untyped_value",
|
260
284
|
"boolean",
|
@@ -267,246 +291,296 @@ Racc_debug_parser = false
|
|
267
291
|
|
268
292
|
# reduce 0 omitted
|
269
293
|
|
270
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
294
|
+
module_eval(<<'.,.,', 'kdl.yy', 12)
|
271
295
|
def _reduce_1(val, _values)
|
272
|
-
|
296
|
+
@output_module::Document.new(val[0])
|
273
297
|
end
|
274
298
|
.,.,
|
275
299
|
|
276
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
300
|
+
module_eval(<<'.,.,', 'kdl.yy', 13)
|
277
301
|
def _reduce_2(val, _values)
|
278
|
-
|
302
|
+
@output_module::Document.new([])
|
279
303
|
end
|
280
304
|
.,.,
|
281
305
|
|
282
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
306
|
+
module_eval(<<'.,.,', 'kdl.yy', 15)
|
283
307
|
def _reduce_3(val, _values)
|
284
308
|
[]
|
285
309
|
end
|
286
310
|
.,.,
|
287
311
|
|
288
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
312
|
+
module_eval(<<'.,.,', 'kdl.yy', 16)
|
289
313
|
def _reduce_4(val, _values)
|
290
314
|
[val[1]]
|
291
315
|
end
|
292
316
|
.,.,
|
293
317
|
|
294
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
318
|
+
module_eval(<<'.,.,', 'kdl.yy', 17)
|
295
319
|
def _reduce_5(val, _values)
|
296
320
|
[]
|
297
321
|
end
|
298
322
|
.,.,
|
299
323
|
|
300
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
324
|
+
module_eval(<<'.,.,', 'kdl.yy', 18)
|
301
325
|
def _reduce_6(val, _values)
|
302
326
|
[*val[0], val[1]]
|
303
327
|
end
|
304
328
|
.,.,
|
305
329
|
|
306
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
330
|
+
module_eval(<<'.,.,', 'kdl.yy', 19)
|
307
331
|
def _reduce_7(val, _values)
|
308
332
|
val[0]
|
309
333
|
end
|
310
334
|
.,.,
|
311
335
|
|
312
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
336
|
+
module_eval(<<'.,.,', 'kdl.yy', 20)
|
313
337
|
def _reduce_8(val, _values)
|
314
338
|
val[0]
|
315
339
|
end
|
316
340
|
.,.,
|
317
341
|
|
318
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
342
|
+
module_eval(<<'.,.,', 'kdl.yy', 21)
|
319
343
|
def _reduce_9(val, _values)
|
320
|
-
val[
|
344
|
+
val[0]
|
321
345
|
end
|
322
346
|
.,.,
|
323
347
|
|
324
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
348
|
+
module_eval(<<'.,.,', 'kdl.yy', 22)
|
325
349
|
def _reduce_10(val, _values)
|
326
|
-
val[0]
|
350
|
+
val[1].as_type(val[0], @type_parsers.fetch(val[0], nil))
|
327
351
|
end
|
328
352
|
.,.,
|
329
353
|
|
330
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
354
|
+
module_eval(<<'.,.,', 'kdl.yy', 23)
|
331
355
|
def _reduce_11(val, _values)
|
332
|
-
val[0].tap { |x| x.children =
|
356
|
+
val[0].tap { |x| x.children = [] }
|
333
357
|
end
|
334
358
|
.,.,
|
335
359
|
|
336
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
360
|
+
module_eval(<<'.,.,', 'kdl.yy', 24)
|
337
361
|
def _reduce_12(val, _values)
|
362
|
+
val[0].tap { |x| x.children = val[2] }
|
363
|
+
end
|
364
|
+
.,.,
|
365
|
+
|
366
|
+
module_eval(<<'.,.,', 'kdl.yy', 25)
|
367
|
+
def _reduce_13(val, _values)
|
338
368
|
val[0].tap { |x| x.children = [] }
|
339
369
|
end
|
340
370
|
.,.,
|
341
371
|
|
372
|
+
module_eval(<<'.,.,', 'kdl.yy', 26)
|
373
|
+
def _reduce_14(val, _values)
|
374
|
+
val[0].tap { |x| x.children = val[3] }
|
375
|
+
end
|
376
|
+
.,.,
|
377
|
+
|
342
378
|
module_eval(<<'.,.,', 'kdl.yy', 27)
|
343
|
-
def
|
344
|
-
|
379
|
+
def _reduce_15(val, _values)
|
380
|
+
val[0].tap { |x| x.children = val[2] }
|
345
381
|
end
|
346
382
|
.,.,
|
347
383
|
|
348
384
|
module_eval(<<'.,.,', 'kdl.yy', 28)
|
349
|
-
def
|
350
|
-
val[0].tap { |x| x.
|
385
|
+
def _reduce_16(val, _values)
|
386
|
+
val[0].tap { |x| x.children = val[3] }
|
351
387
|
end
|
352
388
|
.,.,
|
353
389
|
|
354
390
|
module_eval(<<'.,.,', 'kdl.yy', 29)
|
355
|
-
def
|
356
|
-
val[0]
|
391
|
+
def _reduce_17(val, _values)
|
392
|
+
@output_module::Node.new(val[0])
|
357
393
|
end
|
358
394
|
.,.,
|
359
395
|
|
360
396
|
module_eval(<<'.,.,', 'kdl.yy', 30)
|
361
|
-
def
|
362
|
-
val[0].tap { |x| x.
|
397
|
+
def _reduce_18(val, _values)
|
398
|
+
val[0].tap { |x| x.arguments << val[2] }
|
363
399
|
end
|
364
400
|
.,.,
|
365
401
|
|
366
402
|
module_eval(<<'.,.,', 'kdl.yy', 31)
|
367
|
-
def
|
403
|
+
def _reduce_19(val, _values)
|
368
404
|
val[0]
|
369
405
|
end
|
370
406
|
.,.,
|
371
407
|
|
372
|
-
|
408
|
+
module_eval(<<'.,.,', 'kdl.yy', 32)
|
409
|
+
def _reduce_20(val, _values)
|
410
|
+
val[0].tap { |x| x.properties[val[2][0]] = val[2][1] }
|
411
|
+
end
|
412
|
+
.,.,
|
373
413
|
|
374
414
|
module_eval(<<'.,.,', 'kdl.yy', 33)
|
375
|
-
def
|
376
|
-
val[
|
415
|
+
def _reduce_21(val, _values)
|
416
|
+
val[0]
|
377
417
|
end
|
378
418
|
.,.,
|
379
419
|
|
380
420
|
module_eval(<<'.,.,', 'kdl.yy', 34)
|
381
|
-
def
|
421
|
+
def _reduce_22(val, _values)
|
422
|
+
val[0]
|
423
|
+
end
|
424
|
+
.,.,
|
425
|
+
|
426
|
+
# reduce 23 omitted
|
427
|
+
|
428
|
+
module_eval(<<'.,.,', 'kdl.yy', 36)
|
429
|
+
def _reduce_24(val, _values)
|
430
|
+
val[2]
|
431
|
+
end
|
432
|
+
.,.,
|
433
|
+
|
434
|
+
module_eval(<<'.,.,', 'kdl.yy', 37)
|
435
|
+
def _reduce_25(val, _values)
|
382
436
|
[]
|
383
437
|
end
|
384
438
|
.,.,
|
385
439
|
|
386
|
-
|
440
|
+
module_eval(<<'.,.,', 'kdl.yy', 38)
|
441
|
+
def _reduce_26(val, _values)
|
442
|
+
[*val[2], val[3]]
|
443
|
+
end
|
444
|
+
.,.,
|
387
445
|
|
388
|
-
|
446
|
+
module_eval(<<'.,.,', 'kdl.yy', 39)
|
447
|
+
def _reduce_27(val, _values)
|
448
|
+
[val[3]]
|
449
|
+
end
|
450
|
+
.,.,
|
389
451
|
|
390
|
-
# reduce
|
452
|
+
# reduce 28 omitted
|
391
453
|
|
392
|
-
# reduce
|
454
|
+
# reduce 29 omitted
|
393
455
|
|
394
|
-
# reduce
|
456
|
+
# reduce 30 omitted
|
395
457
|
|
396
|
-
# reduce
|
458
|
+
# reduce 31 omitted
|
397
459
|
|
398
|
-
|
399
|
-
|
400
|
-
|
460
|
+
# reduce 32 omitted
|
461
|
+
|
462
|
+
# reduce 33 omitted
|
463
|
+
|
464
|
+
# reduce 34 omitted
|
465
|
+
|
466
|
+
# reduce 35 omitted
|
467
|
+
|
468
|
+
# reduce 36 omitted
|
469
|
+
|
470
|
+
# reduce 37 omitted
|
471
|
+
|
472
|
+
module_eval(<<'.,.,', 'kdl.yy', 47)
|
473
|
+
def _reduce_38(val, _values)
|
474
|
+
val[2]
|
401
475
|
end
|
402
476
|
.,.,
|
403
477
|
|
404
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
405
|
-
def
|
478
|
+
module_eval(<<'.,.,', 'kdl.yy', 49)
|
479
|
+
def _reduce_39(val, _values)
|
406
480
|
val[0].value
|
407
481
|
end
|
408
482
|
.,.,
|
409
483
|
|
410
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
411
|
-
def
|
484
|
+
module_eval(<<'.,.,', 'kdl.yy', 50)
|
485
|
+
def _reduce_40(val, _values)
|
412
486
|
val[0].value
|
413
487
|
end
|
414
488
|
.,.,
|
415
489
|
|
416
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
417
|
-
def
|
490
|
+
module_eval(<<'.,.,', 'kdl.yy', 51)
|
491
|
+
def _reduce_41(val, _values)
|
418
492
|
val[0].value
|
419
493
|
end
|
420
494
|
.,.,
|
421
495
|
|
422
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
423
|
-
def
|
496
|
+
module_eval(<<'.,.,', 'kdl.yy', 53)
|
497
|
+
def _reduce_42(val, _values)
|
424
498
|
[val[0], val[2]]
|
425
499
|
end
|
426
500
|
.,.,
|
427
501
|
|
428
|
-
# reduce
|
502
|
+
# reduce 43 omitted
|
429
503
|
|
430
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
431
|
-
def
|
504
|
+
module_eval(<<'.,.,', 'kdl.yy', 56)
|
505
|
+
def _reduce_44(val, _values)
|
432
506
|
val[1].as_type(val[0], @type_parsers.fetch(val[0], nil))
|
433
507
|
end
|
434
508
|
.,.,
|
435
509
|
|
436
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
437
|
-
def
|
438
|
-
|
510
|
+
module_eval(<<'.,.,', 'kdl.yy', 58)
|
511
|
+
def _reduce_45(val, _values)
|
512
|
+
@output_module::Value::String.new(val[0].value)
|
439
513
|
end
|
440
514
|
.,.,
|
441
515
|
|
442
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
443
|
-
def
|
444
|
-
|
516
|
+
module_eval(<<'.,.,', 'kdl.yy', 59)
|
517
|
+
def _reduce_46(val, _values)
|
518
|
+
@output_module::Value::String.new(val[0].value)
|
445
519
|
end
|
446
520
|
.,.,
|
447
521
|
|
448
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
449
|
-
def
|
450
|
-
|
522
|
+
module_eval(<<'.,.,', 'kdl.yy', 60)
|
523
|
+
def _reduce_47(val, _values)
|
524
|
+
@output_module::Value::String.new(val[0].value)
|
451
525
|
end
|
452
526
|
.,.,
|
453
527
|
|
454
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
455
|
-
def
|
456
|
-
|
528
|
+
module_eval(<<'.,.,', 'kdl.yy', 61)
|
529
|
+
def _reduce_48(val, _values)
|
530
|
+
@output_module::Value::Int.new(val[0].value)
|
457
531
|
end
|
458
532
|
.,.,
|
459
533
|
|
460
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
461
|
-
def
|
462
|
-
|
534
|
+
module_eval(<<'.,.,', 'kdl.yy', 62)
|
535
|
+
def _reduce_49(val, _values)
|
536
|
+
@output_module::Value::Float.new(val[0].value, format: val[0].meta[:format])
|
463
537
|
end
|
464
538
|
.,.,
|
465
539
|
|
466
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
467
|
-
def
|
468
|
-
|
540
|
+
module_eval(<<'.,.,', 'kdl.yy', 63)
|
541
|
+
def _reduce_50(val, _values)
|
542
|
+
@output_module::Value::Boolean.new(val[0])
|
469
543
|
end
|
470
544
|
.,.,
|
471
545
|
|
472
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
473
|
-
def
|
546
|
+
module_eval(<<'.,.,', 'kdl.yy', 64)
|
547
|
+
def _reduce_51(val, _values)
|
548
|
+
@output_module::Value::Null
|
549
|
+
end
|
550
|
+
.,.,
|
551
|
+
|
552
|
+
module_eval(<<'.,.,', 'kdl.yy', 66)
|
553
|
+
def _reduce_52(val, _values)
|
474
554
|
true
|
475
555
|
end
|
476
556
|
.,.,
|
477
557
|
|
478
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
479
|
-
def
|
558
|
+
module_eval(<<'.,.,', 'kdl.yy', 67)
|
559
|
+
def _reduce_53(val, _values)
|
480
560
|
false
|
481
561
|
end
|
482
562
|
.,.,
|
483
563
|
|
484
|
-
# reduce
|
485
|
-
|
486
|
-
# reduce 43 omitted
|
487
|
-
|
488
|
-
# reduce 44 omitted
|
564
|
+
# reduce 54 omitted
|
489
565
|
|
490
|
-
# reduce
|
566
|
+
# reduce 55 omitted
|
491
567
|
|
492
|
-
# reduce
|
568
|
+
# reduce 56 omitted
|
493
569
|
|
494
|
-
# reduce
|
570
|
+
# reduce 57 omitted
|
495
571
|
|
496
|
-
# reduce
|
572
|
+
# reduce 58 omitted
|
497
573
|
|
498
|
-
# reduce
|
574
|
+
# reduce 59 omitted
|
499
575
|
|
500
|
-
# reduce
|
576
|
+
# reduce 60 omitted
|
501
577
|
|
502
|
-
# reduce
|
578
|
+
# reduce 61 omitted
|
503
579
|
|
504
|
-
# reduce
|
580
|
+
# reduce 62 omitted
|
505
581
|
|
506
|
-
|
507
|
-
|
508
|
-
module_eval(<<'.,.,', 'kdl.yy', 66)
|
509
|
-
def _reduce_54(val, _values)
|
582
|
+
module_eval(<<'.,.,', 'kdl.yy', 74)
|
583
|
+
def _reduce_63(val, _values)
|
510
584
|
nil
|
511
585
|
end
|
512
586
|
.,.,
|