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