kdl 1.0.0.rc1 → 1.0.2
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 +1 -1
- data/.gitignore +1 -0
- data/README.md +16 -2
- data/bin/kdl +8 -0
- data/kdl.gemspec +2 -1
- data/lib/kdl/kdl.tab.rb +208 -179
- data/lib/kdl/kdl.yy +30 -22
- data/lib/kdl/node.rb +20 -5
- data/lib/kdl/tokenizer.rb +6 -19
- data/lib/kdl/types/base64.rb +21 -0
- data/lib/kdl/types/country/iso3166_countries.rb +512 -0
- data/lib/kdl/types/country/iso3166_subdivisions.rb +3927 -0
- data/lib/kdl/types/country.rb +69 -0
- data/lib/kdl/types/currency/iso4217_currencies.rb +189 -0
- data/lib/kdl/types/currency.rb +26 -0
- data/lib/kdl/types/date_time.rb +41 -0
- data/lib/kdl/types/decimal.rb +13 -0
- data/lib/kdl/types/duration/iso8601_parser.rb +147 -0
- data/lib/kdl/types/duration.rb +28 -0
- data/lib/kdl/types/email/parser.rb +151 -0
- data/lib/kdl/types/email.rb +47 -0
- data/lib/kdl/types/hostname/validator.rb +51 -0
- data/lib/kdl/types/hostname.rb +36 -0
- data/lib/kdl/types/ip.rb +32 -0
- data/lib/kdl/types/irl/parser.rb +123 -0
- data/lib/kdl/types/irl.rb +46 -0
- data/lib/kdl/types/regex.rb +13 -0
- data/lib/kdl/types/url.rb +30 -0
- data/lib/kdl/types/url_template.rb +328 -0
- data/lib/kdl/types/uuid.rb +17 -0
- data/lib/kdl/types.rb +22 -0
- data/lib/kdl/value.rb +13 -2
- data/lib/kdl/version.rb +1 -1
- data/lib/kdl.rb +3 -2
- metadata +43 -6
data/lib/kdl/kdl.tab.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
3
|
+
# This file is automatically generated by Racc 1.6.0
|
4
4
|
# from Racc grammar file "".
|
5
5
|
#
|
6
6
|
|
@@ -8,8 +8,14 @@ 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
|
-
|
11
|
+
module_eval(<<'...end kdl.yy/module_eval...', 'kdl.yy', 70)
|
12
|
+
|
13
|
+
def parse(str, options = {})
|
14
|
+
if options.fetch(:parse_types, true)
|
15
|
+
@type_parsers = ::KDL::Types::MAPPING.merge(options.fetch(:type_parsers, {}))
|
16
|
+
else
|
17
|
+
@type_parsers = {}
|
18
|
+
end
|
13
19
|
@tokenizer = ::KDL::Tokenizer.new(str)
|
14
20
|
do_parse
|
15
21
|
end
|
@@ -23,139 +29,147 @@ module_eval(<<'...end kdl.yy/module_eval...', 'kdl.yy', 68)
|
|
23
29
|
##### State transition tables begin ###
|
24
30
|
|
25
31
|
racc_action_table = [
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
-49, 9, 18, 19, 20, 18, 19, 20, 5, 6,
|
33
|
+
24, -49, 60, -49, 17, 64, 7, 17, -49, 16,
|
34
|
+
63, 18, 49, 50, 54, 55, 58, 59, 57, 39,
|
35
|
+
39, 39, 63, 17, 18, 19, 20, 66, 45, 36,
|
36
|
+
36, 36, 5, 6, 39, -29, 17, 18, 19, 20,
|
37
|
+
7, 16, -30, 68, 36, 5, 6, 74, 78, 17,
|
38
|
+
18, 19, 20, 7, 16, nil, 35, 6, 18, 19,
|
39
|
+
20, 79, 17, 34, 7, 31, 36, 16, 18, 49,
|
40
|
+
50, 54, 55, 58, 59, 57, nil, nil, 60, 39,
|
41
|
+
17, 70, 71, 54, 55, 58, 59, 57, 31, 36,
|
42
|
+
5, 6, 17, 5, 6, 5, 6, 34, 7, nil,
|
43
|
+
34, 7, nil, 7, 5, 6, 5, 6, 5, 6,
|
44
|
+
nil, nil, 7, nil, 7, nil, 7, 70, 71, 54,
|
45
|
+
55, 58, 59, 57, 18, 19, 20 ]
|
39
46
|
|
40
47
|
racc_action_check = [
|
41
|
-
|
42
|
-
|
43
|
-
29,
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
27,
|
52
|
-
|
53
|
-
|
48
|
+
35, 1, 2, 2, 2, 38, 38, 38, 0, 0,
|
49
|
+
9, 35, 30, 35, 2, 36, 0, 38, 35, 2,
|
50
|
+
35, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
51
|
+
16, 31, 39, 29, 3, 3, 3, 41, 29, 29,
|
52
|
+
16, 31, 3, 3, 45, 49, 3, 72, 72, 72,
|
53
|
+
3, 3, 50, 51, 45, 72, 72, 63, 72, 72,
|
54
|
+
73, 73, 73, 72, 72, nil, 14, 14, 13, 13,
|
55
|
+
13, 73, 73, 14, 14, 14, 14, 73, 67, 67,
|
56
|
+
67, 67, 67, 67, 67, 67, nil, nil, 67, 47,
|
57
|
+
67, 68, 68, 68, 68, 68, 68, 68, 47, 47,
|
58
|
+
27, 27, 68, 28, 28, 32, 32, 27, 27, nil,
|
59
|
+
28, 28, nil, 32, 34, 34, 60, 60, 62, 62,
|
60
|
+
nil, nil, 34, nil, 60, nil, 62, 53, 53, 53,
|
61
|
+
53, 53, 53, 53, 17, 17, 17 ]
|
54
62
|
|
55
63
|
racc_action_pointer = [
|
56
|
-
-2, 1, 0,
|
57
|
-
|
58
|
-
nil, nil, nil, nil, nil, nil,
|
59
|
-
|
60
|
-
nil, nil,
|
61
|
-
|
62
|
-
|
63
|
-
nil, nil, nil, nil, nil ]
|
64
|
+
-2, 1, 0, 32, nil, nil, nil, nil, nil, 10,
|
65
|
+
nil, nil, nil, 66, 56, nil, 20, 132, nil, nil,
|
66
|
+
nil, nil, nil, nil, nil, nil, nil, 90, 93, 19,
|
67
|
+
0, 21, 95, nil, 104, 0, 5, nil, 3, 12,
|
68
|
+
nil, 22, nil, nil, nil, 34, nil, 79, nil, 29,
|
69
|
+
36, 37, nil, 124, nil, nil, nil, nil, nil, nil,
|
70
|
+
106, nil, 108, 47, nil, nil, nil, 76, 88, nil,
|
71
|
+
nil, nil, 45, 58, nil, nil, nil, nil, nil, nil ]
|
64
72
|
|
65
73
|
racc_action_default = [
|
66
|
-
-
|
67
|
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
+
-54, -55, -1, -2, -3, -49, -50, -51, -52, -55,
|
75
|
+
-6, -7, -8, -55, -54, -13, -54, -55, -28, -29,
|
76
|
+
-30, -4, -5, -53, 80, -9, -10, -55, -55, -48,
|
77
|
+
-55, -54, -23, -24, -25, -42, -43, -47, -55, -42,
|
78
|
+
-48, -55, -11, -12, -14, -54, -16, -55, -22, -34,
|
79
|
+
-35, -55, -32, -55, -36, -37, -38, -39, -40, -41,
|
80
|
+
-54, -21, -26, -44, -45, -18, -27, -55, -55, -33,
|
81
|
+
-34, -35, -55, -55, -46, -15, -17, -31, -20, -19 ]
|
74
82
|
|
75
83
|
racc_goto_table = [
|
76
|
-
21, 22, 23, 2, 3, 4,
|
77
|
-
|
78
|
-
|
79
|
-
nil,
|
80
|
-
|
81
|
-
nil, nil, nil, nil,
|
82
|
-
|
84
|
+
21, 22, 23, 2, 3, 4, 41, 53, 29, 44,
|
85
|
+
38, 46, 26, 1, 25, 27, 28, 69, 51, nil,
|
86
|
+
nil, nil, nil, 47, nil, 42, 43, nil, nil, nil,
|
87
|
+
nil, 23, nil, nil, nil, 65, nil, nil, 62, 67,
|
88
|
+
nil, 47, nil, nil, nil, 53, 53, 75, 77, 76,
|
89
|
+
nil, nil, nil, nil, nil, nil, 51, nil, nil, nil,
|
90
|
+
nil, 23, nil, 73, 72, 4, nil, nil, nil, 21,
|
91
|
+
22, 23 ]
|
83
92
|
|
84
93
|
racc_goto_check = [
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
nil, nil,
|
89
|
-
|
90
|
-
nil, nil, nil, nil,
|
91
|
-
2, 3, 4,
|
94
|
+
5, 6, 21, 2, 3, 4, 13, 8, 14, 15,
|
95
|
+
16, 17, 10, 1, 7, 11, 12, 19, 13, nil,
|
96
|
+
nil, nil, nil, 14, nil, 10, 10, nil, nil, nil,
|
97
|
+
nil, 21, nil, nil, nil, 5, nil, nil, 3, 16,
|
98
|
+
nil, 14, nil, nil, nil, 8, 8, 15, 15, 17,
|
99
|
+
nil, nil, nil, nil, nil, nil, 13, nil, nil, nil,
|
100
|
+
nil, 21, nil, 2, 3, 4, nil, nil, nil, 5,
|
101
|
+
6, 21 ]
|
92
102
|
|
93
103
|
racc_goto_pointer = [
|
94
|
-
nil,
|
95
|
-
|
96
|
-
-
|
104
|
+
nil, 13, 3, 4, 5, -3, -2, 1, -22, nil,
|
105
|
+
-2, 1, 2, -11, -6, -20, -6, -18, nil, -36,
|
106
|
+
nil, -1 ]
|
97
107
|
|
98
108
|
racc_goto_default = [
|
99
|
-
nil, nil, nil,
|
100
|
-
|
101
|
-
|
109
|
+
nil, nil, nil, 32, 37, 10, 11, 12, 13, 14,
|
110
|
+
nil, 61, 48, 15, 40, nil, 30, nil, 33, 52,
|
111
|
+
56, 8 ]
|
102
112
|
|
103
113
|
racc_reduce_table = [
|
104
114
|
0, 0, :racc_error,
|
105
|
-
1,
|
106
|
-
1,
|
107
|
-
1,
|
108
|
-
2,
|
109
|
-
2,
|
110
|
-
2,
|
111
|
-
2,
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
115
|
+
1, 22, :_reduce_1,
|
116
|
+
1, 22, :_reduce_2,
|
117
|
+
1, 23, :_reduce_3,
|
118
|
+
2, 23, :_reduce_4,
|
119
|
+
2, 23, :_reduce_5,
|
120
|
+
2, 23, :_reduce_6,
|
121
|
+
2, 23, :_reduce_7,
|
122
|
+
1, 26, :_reduce_8,
|
123
|
+
2, 26, :_reduce_9,
|
124
|
+
2, 28, :_reduce_10,
|
125
|
+
3, 28, :_reduce_11,
|
126
|
+
3, 28, :_reduce_12,
|
127
|
+
1, 30, :_reduce_13,
|
128
|
+
3, 30, :_reduce_14,
|
129
|
+
5, 30, :_reduce_15,
|
130
|
+
3, 30, :_reduce_16,
|
131
|
+
5, 30, :_reduce_17,
|
121
132
|
3, 27, :_reduce_none,
|
122
|
-
4,
|
123
|
-
4,
|
124
|
-
2,
|
125
|
-
2,
|
126
|
-
1,
|
127
|
-
1,
|
128
|
-
1,
|
129
|
-
2,
|
130
|
-
3,
|
131
|
-
1,
|
132
|
-
1,
|
133
|
-
1,
|
134
|
-
3,
|
135
|
-
1,
|
136
|
-
2,
|
137
|
-
1,
|
138
|
-
1,
|
139
|
-
1,
|
140
|
-
1,
|
141
|
-
1,
|
142
|
-
1,
|
143
|
-
1,
|
144
|
-
1,
|
133
|
+
4, 32, :_reduce_19,
|
134
|
+
4, 32, :_reduce_20,
|
135
|
+
2, 33, :_reduce_none,
|
136
|
+
2, 33, :_reduce_none,
|
137
|
+
1, 31, :_reduce_none,
|
138
|
+
1, 31, :_reduce_none,
|
139
|
+
1, 39, :_reduce_none,
|
140
|
+
2, 39, :_reduce_none,
|
141
|
+
3, 29, :_reduce_27,
|
142
|
+
1, 34, :_reduce_28,
|
143
|
+
1, 34, :_reduce_29,
|
144
|
+
1, 34, :_reduce_30,
|
145
|
+
3, 38, :_reduce_31,
|
146
|
+
1, 36, :_reduce_none,
|
147
|
+
2, 36, :_reduce_33,
|
148
|
+
1, 40, :_reduce_34,
|
149
|
+
1, 40, :_reduce_35,
|
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,
|
145
156
|
1, 35, :_reduce_none,
|
146
157
|
1, 35, :_reduce_none,
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
1,
|
151
|
-
|
152
|
-
1,
|
153
|
-
1,
|
154
|
-
|
158
|
+
2, 35, :_reduce_none,
|
159
|
+
2, 35, :_reduce_none,
|
160
|
+
3, 35, :_reduce_none,
|
161
|
+
1, 37, :_reduce_none,
|
162
|
+
1, 37, :_reduce_none,
|
163
|
+
1, 42, :_reduce_none,
|
164
|
+
1, 42, :_reduce_none,
|
165
|
+
1, 42, :_reduce_none,
|
166
|
+
1, 24, :_reduce_none,
|
167
|
+
2, 24, :_reduce_none,
|
168
|
+
0, 25, :_reduce_54 ]
|
155
169
|
|
156
|
-
racc_reduce_n =
|
170
|
+
racc_reduce_n = 55
|
157
171
|
|
158
|
-
racc_shift_n =
|
172
|
+
racc_shift_n = 80
|
159
173
|
|
160
174
|
racc_token_table = {
|
161
175
|
false => 0,
|
@@ -177,9 +191,10 @@ racc_token_table = {
|
|
177
191
|
:EQUALS => 16,
|
178
192
|
:SEMICOLON => 17,
|
179
193
|
:EOF => 18,
|
180
|
-
:SLASHDASH => 19
|
194
|
+
:SLASHDASH => 19,
|
195
|
+
:ESCLINE => 20 }
|
181
196
|
|
182
|
-
racc_nt_base =
|
197
|
+
racc_nt_base = 21
|
183
198
|
|
184
199
|
racc_use_result_var = false
|
185
200
|
|
@@ -220,20 +235,22 @@ Racc_token_to_s_table = [
|
|
220
235
|
"SEMICOLON",
|
221
236
|
"EOF",
|
222
237
|
"SLASHDASH",
|
238
|
+
"ESCLINE",
|
223
239
|
"$start",
|
224
240
|
"document",
|
225
241
|
"nodes",
|
226
242
|
"linespaces",
|
227
243
|
"none",
|
228
|
-
"linespace_star",
|
229
244
|
"node",
|
230
245
|
"empty_node",
|
246
|
+
"untyped_node",
|
247
|
+
"type",
|
231
248
|
"node_decl",
|
232
249
|
"node_term",
|
233
250
|
"node_children",
|
234
251
|
"empty_children",
|
235
252
|
"identifier",
|
236
|
-
"
|
253
|
+
"ws",
|
237
254
|
"value",
|
238
255
|
"ws_star",
|
239
256
|
"property",
|
@@ -248,118 +265,122 @@ Racc_debug_parser = false
|
|
248
265
|
|
249
266
|
# reduce 0 omitted
|
250
267
|
|
251
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
268
|
+
module_eval(<<'.,.,', 'kdl.yy', 14)
|
252
269
|
def _reduce_1(val, _values)
|
253
270
|
KDL::Document.new(val[0])
|
254
271
|
end
|
255
272
|
.,.,
|
256
273
|
|
257
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
274
|
+
module_eval(<<'.,.,', 'kdl.yy', 15)
|
258
275
|
def _reduce_2(val, _values)
|
259
276
|
KDL::Document.new([])
|
260
277
|
end
|
261
278
|
.,.,
|
262
279
|
|
263
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
280
|
+
module_eval(<<'.,.,', 'kdl.yy', 17)
|
264
281
|
def _reduce_3(val, _values)
|
265
282
|
[]
|
266
283
|
end
|
267
284
|
.,.,
|
268
285
|
|
269
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
286
|
+
module_eval(<<'.,.,', 'kdl.yy', 18)
|
270
287
|
def _reduce_4(val, _values)
|
271
288
|
[val[1]]
|
272
289
|
end
|
273
290
|
.,.,
|
274
291
|
|
275
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
292
|
+
module_eval(<<'.,.,', 'kdl.yy', 19)
|
276
293
|
def _reduce_5(val, _values)
|
277
294
|
[]
|
278
295
|
end
|
279
296
|
.,.,
|
280
297
|
|
281
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
298
|
+
module_eval(<<'.,.,', 'kdl.yy', 20)
|
282
299
|
def _reduce_6(val, _values)
|
283
300
|
[*val[0], val[1]]
|
284
301
|
end
|
285
302
|
.,.,
|
286
303
|
|
287
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
304
|
+
module_eval(<<'.,.,', 'kdl.yy', 21)
|
288
305
|
def _reduce_7(val, _values)
|
289
306
|
val[0]
|
290
307
|
end
|
291
308
|
.,.,
|
292
309
|
|
293
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
310
|
+
module_eval(<<'.,.,', 'kdl.yy', 22)
|
294
311
|
def _reduce_8(val, _values)
|
295
|
-
val[0]
|
312
|
+
val[0]
|
296
313
|
end
|
297
314
|
.,.,
|
298
315
|
|
299
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
316
|
+
module_eval(<<'.,.,', 'kdl.yy', 23)
|
300
317
|
def _reduce_9(val, _values)
|
301
|
-
val[0]
|
318
|
+
val[1].as_type(val[0], @type_parsers.fetch(val[0], nil))
|
302
319
|
end
|
303
320
|
.,.,
|
304
321
|
|
305
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
322
|
+
module_eval(<<'.,.,', 'kdl.yy', 24)
|
306
323
|
def _reduce_10(val, _values)
|
307
|
-
val[0].tap { |x| x.children =
|
324
|
+
val[0].tap { |x| x.children = [] }
|
308
325
|
end
|
309
326
|
.,.,
|
310
327
|
|
311
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
328
|
+
module_eval(<<'.,.,', 'kdl.yy', 25)
|
312
329
|
def _reduce_11(val, _values)
|
313
|
-
|
330
|
+
val[0].tap { |x| x.children = val[1] }
|
314
331
|
end
|
315
332
|
.,.,
|
316
333
|
|
317
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
334
|
+
module_eval(<<'.,.,', 'kdl.yy', 26)
|
318
335
|
def _reduce_12(val, _values)
|
319
|
-
|
336
|
+
val[0].tap { |x| x.children = [] }
|
320
337
|
end
|
321
338
|
.,.,
|
322
339
|
|
323
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
340
|
+
module_eval(<<'.,.,', 'kdl.yy', 27)
|
324
341
|
def _reduce_13(val, _values)
|
325
|
-
val[0]
|
342
|
+
KDL::Node.new(val[0])
|
326
343
|
end
|
327
344
|
.,.,
|
328
345
|
|
329
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
346
|
+
module_eval(<<'.,.,', 'kdl.yy', 28)
|
330
347
|
def _reduce_14(val, _values)
|
331
|
-
val[0]
|
348
|
+
val[0].tap { |x| x.arguments << val[2] }
|
332
349
|
end
|
333
350
|
.,.,
|
334
351
|
|
335
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
352
|
+
module_eval(<<'.,.,', 'kdl.yy', 29)
|
336
353
|
def _reduce_15(val, _values)
|
337
|
-
val[0]
|
354
|
+
val[0]
|
338
355
|
end
|
339
356
|
.,.,
|
340
357
|
|
341
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
358
|
+
module_eval(<<'.,.,', 'kdl.yy', 30)
|
342
359
|
def _reduce_16(val, _values)
|
360
|
+
val[0].tap { |x| x.properties[val[2][0]] = val[2][1] }
|
361
|
+
end
|
362
|
+
.,.,
|
363
|
+
|
364
|
+
module_eval(<<'.,.,', 'kdl.yy', 31)
|
365
|
+
def _reduce_17(val, _values)
|
343
366
|
val[0]
|
344
367
|
end
|
345
368
|
.,.,
|
346
369
|
|
347
|
-
# reduce
|
370
|
+
# reduce 18 omitted
|
348
371
|
|
349
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
350
|
-
def
|
372
|
+
module_eval(<<'.,.,', 'kdl.yy', 33)
|
373
|
+
def _reduce_19(val, _values)
|
351
374
|
val[2]
|
352
375
|
end
|
353
376
|
.,.,
|
354
377
|
|
355
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
356
|
-
def
|
378
|
+
module_eval(<<'.,.,', 'kdl.yy', 34)
|
379
|
+
def _reduce_20(val, _values)
|
357
380
|
[]
|
358
381
|
end
|
359
382
|
.,.,
|
360
383
|
|
361
|
-
# reduce 20 omitted
|
362
|
-
|
363
384
|
# reduce 21 omitted
|
364
385
|
|
365
386
|
# reduce 22 omitted
|
@@ -370,25 +391,21 @@ module_eval(<<'.,.,', 'kdl.yy', 32)
|
|
370
391
|
|
371
392
|
# reduce 25 omitted
|
372
393
|
|
373
|
-
|
374
|
-
def _reduce_26(val, _values)
|
375
|
-
val[1]
|
376
|
-
end
|
377
|
-
.,.,
|
394
|
+
# reduce 26 omitted
|
378
395
|
|
379
396
|
module_eval(<<'.,.,', 'kdl.yy', 40)
|
380
397
|
def _reduce_27(val, _values)
|
381
|
-
val[
|
398
|
+
val[1]
|
382
399
|
end
|
383
400
|
.,.,
|
384
401
|
|
385
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
402
|
+
module_eval(<<'.,.,', 'kdl.yy', 42)
|
386
403
|
def _reduce_28(val, _values)
|
387
404
|
val[0].value
|
388
405
|
end
|
389
406
|
.,.,
|
390
407
|
|
391
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
408
|
+
module_eval(<<'.,.,', 'kdl.yy', 43)
|
392
409
|
def _reduce_29(val, _values)
|
393
410
|
val[0].value
|
394
411
|
end
|
@@ -396,67 +413,71 @@ module_eval(<<'.,.,', 'kdl.yy', 42)
|
|
396
413
|
|
397
414
|
module_eval(<<'.,.,', 'kdl.yy', 44)
|
398
415
|
def _reduce_30(val, _values)
|
399
|
-
|
416
|
+
val[0].value
|
400
417
|
end
|
401
418
|
.,.,
|
402
419
|
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
def _reduce_32(val, _values)
|
407
|
-
val[1].as_type(val[0])
|
420
|
+
module_eval(<<'.,.,', 'kdl.yy', 46)
|
421
|
+
def _reduce_31(val, _values)
|
422
|
+
[val[0], val[2]]
|
408
423
|
end
|
409
424
|
.,.,
|
410
425
|
|
426
|
+
# reduce 32 omitted
|
427
|
+
|
411
428
|
module_eval(<<'.,.,', 'kdl.yy', 49)
|
412
429
|
def _reduce_33(val, _values)
|
413
|
-
|
430
|
+
val[1].as_type(val[0], @type_parsers.fetch(val[0], nil))
|
414
431
|
end
|
415
432
|
.,.,
|
416
433
|
|
417
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
434
|
+
module_eval(<<'.,.,', 'kdl.yy', 51)
|
418
435
|
def _reduce_34(val, _values)
|
419
436
|
KDL::Value::String.new(val[0].value)
|
420
437
|
end
|
421
438
|
.,.,
|
422
439
|
|
423
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
440
|
+
module_eval(<<'.,.,', 'kdl.yy', 52)
|
424
441
|
def _reduce_35(val, _values)
|
425
|
-
KDL::Value::
|
442
|
+
KDL::Value::String.new(val[0].value)
|
426
443
|
end
|
427
444
|
.,.,
|
428
445
|
|
429
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
446
|
+
module_eval(<<'.,.,', 'kdl.yy', 53)
|
430
447
|
def _reduce_36(val, _values)
|
431
|
-
KDL::Value::
|
448
|
+
KDL::Value::Int.new(val[0].value)
|
432
449
|
end
|
433
450
|
.,.,
|
434
451
|
|
435
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
452
|
+
module_eval(<<'.,.,', 'kdl.yy', 54)
|
436
453
|
def _reduce_37(val, _values)
|
437
|
-
KDL::Value::
|
454
|
+
KDL::Value::Float.new(val[0].value, format: val[0].meta[:format])
|
438
455
|
end
|
439
456
|
.,.,
|
440
457
|
|
441
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
458
|
+
module_eval(<<'.,.,', 'kdl.yy', 55)
|
442
459
|
def _reduce_38(val, _values)
|
443
|
-
KDL::Value::
|
460
|
+
KDL::Value::Boolean.new(val[0])
|
444
461
|
end
|
445
462
|
.,.,
|
446
463
|
|
447
464
|
module_eval(<<'.,.,', 'kdl.yy', 56)
|
448
465
|
def _reduce_39(val, _values)
|
449
|
-
|
466
|
+
KDL::Value::Null
|
450
467
|
end
|
451
468
|
.,.,
|
452
469
|
|
453
|
-
module_eval(<<'.,.,', 'kdl.yy',
|
470
|
+
module_eval(<<'.,.,', 'kdl.yy', 58)
|
454
471
|
def _reduce_40(val, _values)
|
455
|
-
|
472
|
+
true
|
456
473
|
end
|
457
474
|
.,.,
|
458
475
|
|
459
|
-
|
476
|
+
module_eval(<<'.,.,', 'kdl.yy', 59)
|
477
|
+
def _reduce_41(val, _values)
|
478
|
+
false
|
479
|
+
end
|
480
|
+
.,.,
|
460
481
|
|
461
482
|
# reduce 42 omitted
|
462
483
|
|
@@ -474,8 +495,16 @@ module_eval(<<'.,.,', 'kdl.yy', 57)
|
|
474
495
|
|
475
496
|
# reduce 49 omitted
|
476
497
|
|
477
|
-
|
478
|
-
|
498
|
+
# reduce 50 omitted
|
499
|
+
|
500
|
+
# reduce 51 omitted
|
501
|
+
|
502
|
+
# reduce 52 omitted
|
503
|
+
|
504
|
+
# reduce 53 omitted
|
505
|
+
|
506
|
+
module_eval(<<'.,.,', 'kdl.yy', 66)
|
507
|
+
def _reduce_54(val, _values)
|
479
508
|
nil
|
480
509
|
end
|
481
510
|
.,.,
|