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