kdl 1.0.6 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +8 -1
  3. data/.gitignore +1 -0
  4. data/.gitmodules +4 -0
  5. data/Gemfile +6 -1
  6. data/README.md +67 -7
  7. data/Rakefile +6 -1
  8. data/bin/kdl +1 -1
  9. data/kdl.gemspec +2 -2
  10. data/lib/kdl/document.rb +60 -2
  11. data/lib/kdl/error.rb +24 -0
  12. data/lib/kdl/kdl.tab.rb +305 -231
  13. data/lib/kdl/kdl.yy +57 -49
  14. data/lib/kdl/node.rb +116 -13
  15. data/lib/kdl/parser_common.rb +28 -0
  16. data/lib/kdl/string_dumper.rb +32 -33
  17. data/lib/kdl/tokenizer.rb +387 -136
  18. data/lib/kdl/types/base64.rb +3 -1
  19. data/lib/kdl/types/country/iso3166_countries.rb +3 -1
  20. data/lib/kdl/types/country/iso3166_subdivisions.rb +3 -1
  21. data/lib/kdl/types/country.rb +4 -2
  22. data/lib/kdl/types/currency/iso4217_currencies.rb +3 -1
  23. data/lib/kdl/types/currency.rb +3 -1
  24. data/lib/kdl/types/date_time.rb +5 -3
  25. data/lib/kdl/types/decimal.rb +3 -1
  26. data/lib/kdl/types/duration/iso8601_parser.rb +3 -1
  27. data/lib/kdl/types/duration.rb +3 -1
  28. data/lib/kdl/types/email/parser.rb +10 -8
  29. data/lib/kdl/types/email.rb +3 -1
  30. data/lib/kdl/types/hostname/validator.rb +3 -1
  31. data/lib/kdl/types/hostname.rb +3 -1
  32. data/lib/kdl/types/ip.rb +3 -1
  33. data/lib/kdl/types/irl/parser.rb +10 -8
  34. data/lib/kdl/types/irl.rb +3 -1
  35. data/lib/kdl/types/regex.rb +3 -1
  36. data/lib/kdl/types/url.rb +3 -1
  37. data/lib/kdl/types/url_template.rb +6 -4
  38. data/lib/kdl/types/uuid.rb +3 -1
  39. data/lib/kdl/types.rb +2 -0
  40. data/lib/kdl/v1/document.rb +19 -0
  41. data/lib/kdl/v1/kdl.tab.rb +594 -0
  42. data/lib/kdl/v1/kdl.yy +89 -0
  43. data/lib/kdl/v1/node.rb +32 -0
  44. data/lib/kdl/v1/string_dumper.rb +30 -0
  45. data/lib/kdl/v1/tokenizer.rb +298 -0
  46. data/lib/kdl/v1/value.rb +91 -0
  47. data/lib/kdl/v1.rb +13 -0
  48. data/lib/kdl/value.rb +87 -15
  49. data/lib/kdl/version.rb +3 -1
  50. data/lib/kdl.rb +47 -1
  51. 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', 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
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
- private
19
+ def parser_version
20
+ 2
21
+ end
24
22
 
25
- def next_token
26
- @tokenizer.next_token
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
- -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 ]
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
- 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 ]
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, 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 ]
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
- -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 ]
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
- 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 ]
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
- 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 ]
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, 13, 3, 4, 5, -3, -2, 1, -22, nil,
105
- -2, 1, 2, -11, -6, -20, -6, -18, nil, -36,
106
- nil, -1 ]
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, 32, 37, 10, 11, 12, 13, 14,
110
- nil, 61, 48, 15, 40, nil, 30, nil, 33, 52,
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, 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,
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,
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
- 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 ]
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 = 55
193
+ racc_reduce_n = 64
171
194
 
172
- racc_shift_n = 80
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 = 21
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
- "node_term",
273
+ "ws_plus",
251
274
  "node_children",
252
- "empty_children",
275
+ "empty_childrens",
253
276
  "identifier",
254
- "ws",
255
277
  "value",
256
- "ws_star",
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', 14)
294
+ module_eval(<<'.,.,', 'kdl.yy', 12)
271
295
  def _reduce_1(val, _values)
272
- KDL::Document.new(val[0])
296
+ @output_module::Document.new(val[0])
273
297
  end
274
298
  .,.,
275
299
 
276
- module_eval(<<'.,.,', 'kdl.yy', 15)
300
+ module_eval(<<'.,.,', 'kdl.yy', 13)
277
301
  def _reduce_2(val, _values)
278
- KDL::Document.new([])
302
+ @output_module::Document.new([])
279
303
  end
280
304
  .,.,
281
305
 
282
- module_eval(<<'.,.,', 'kdl.yy', 17)
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', 18)
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', 19)
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', 20)
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', 21)
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', 22)
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', 23)
342
+ module_eval(<<'.,.,', 'kdl.yy', 21)
319
343
  def _reduce_9(val, _values)
320
- val[1].as_type(val[0], @type_parsers.fetch(val[0], nil))
344
+ val[0]
321
345
  end
322
346
  .,.,
323
347
 
324
- module_eval(<<'.,.,', 'kdl.yy', 24)
348
+ module_eval(<<'.,.,', 'kdl.yy', 22)
325
349
  def _reduce_10(val, _values)
326
- val[0].tap { |x| x.children = [] }
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', 25)
354
+ module_eval(<<'.,.,', 'kdl.yy', 23)
331
355
  def _reduce_11(val, _values)
332
- val[0].tap { |x| x.children = val[1] }
356
+ val[0].tap { |x| x.children = [] }
333
357
  end
334
358
  .,.,
335
359
 
336
- module_eval(<<'.,.,', 'kdl.yy', 26)
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 _reduce_13(val, _values)
344
- KDL::Node.new(val[0])
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 _reduce_14(val, _values)
350
- val[0].tap { |x| x.arguments << val[2] }
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 _reduce_15(val, _values)
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 _reduce_16(val, _values)
362
- val[0].tap { |x| x.properties[val[2][0]] = val[2][1] }
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 _reduce_17(val, _values)
403
+ def _reduce_19(val, _values)
368
404
  val[0]
369
405
  end
370
406
  .,.,
371
407
 
372
- # reduce 18 omitted
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 _reduce_19(val, _values)
376
- val[2]
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 _reduce_20(val, _values)
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
- # reduce 21 omitted
440
+ module_eval(<<'.,.,', 'kdl.yy', 38)
441
+ def _reduce_26(val, _values)
442
+ [*val[2], val[3]]
443
+ end
444
+ .,.,
387
445
 
388
- # reduce 22 omitted
446
+ module_eval(<<'.,.,', 'kdl.yy', 39)
447
+ def _reduce_27(val, _values)
448
+ [val[3]]
449
+ end
450
+ .,.,
389
451
 
390
- # reduce 23 omitted
452
+ # reduce 28 omitted
391
453
 
392
- # reduce 24 omitted
454
+ # reduce 29 omitted
393
455
 
394
- # reduce 25 omitted
456
+ # reduce 30 omitted
395
457
 
396
- # reduce 26 omitted
458
+ # reduce 31 omitted
397
459
 
398
- module_eval(<<'.,.,', 'kdl.yy', 40)
399
- def _reduce_27(val, _values)
400
- val[1]
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', 42)
405
- def _reduce_28(val, _values)
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', 43)
411
- def _reduce_29(val, _values)
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', 44)
417
- def _reduce_30(val, _values)
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', 46)
423
- def _reduce_31(val, _values)
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 32 omitted
502
+ # reduce 43 omitted
429
503
 
430
- module_eval(<<'.,.,', 'kdl.yy', 49)
431
- def _reduce_33(val, _values)
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', 51)
437
- def _reduce_34(val, _values)
438
- KDL::Value::String.new(val[0].value)
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', 52)
443
- def _reduce_35(val, _values)
444
- KDL::Value::String.new(val[0].value)
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', 53)
449
- def _reduce_36(val, _values)
450
- KDL::Value::Int.new(val[0].value)
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', 54)
455
- def _reduce_37(val, _values)
456
- KDL::Value::Float.new(val[0].value, format: val[0].meta[:format])
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', 55)
461
- def _reduce_38(val, _values)
462
- KDL::Value::Boolean.new(val[0])
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', 56)
467
- def _reduce_39(val, _values)
468
- KDL::Value::Null
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', 58)
473
- def _reduce_40(val, _values)
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', 59)
479
- def _reduce_41(val, _values)
558
+ module_eval(<<'.,.,', 'kdl.yy', 67)
559
+ def _reduce_53(val, _values)
480
560
  false
481
561
  end
482
562
  .,.,
483
563
 
484
- # reduce 42 omitted
485
-
486
- # reduce 43 omitted
487
-
488
- # reduce 44 omitted
564
+ # reduce 54 omitted
489
565
 
490
- # reduce 45 omitted
566
+ # reduce 55 omitted
491
567
 
492
- # reduce 46 omitted
568
+ # reduce 56 omitted
493
569
 
494
- # reduce 47 omitted
570
+ # reduce 57 omitted
495
571
 
496
- # reduce 48 omitted
572
+ # reduce 58 omitted
497
573
 
498
- # reduce 49 omitted
574
+ # reduce 59 omitted
499
575
 
500
- # reduce 50 omitted
576
+ # reduce 60 omitted
501
577
 
502
- # reduce 51 omitted
578
+ # reduce 61 omitted
503
579
 
504
- # reduce 52 omitted
580
+ # reduce 62 omitted
505
581
 
506
- # reduce 53 omitted
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
  .,.,