tomlrb 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tomlrb/generated_parser.rb +322 -224
- data/lib/tomlrb/handler.rb +26 -13
- data/lib/tomlrb/local_date.rb +7 -4
- data/lib/tomlrb/local_date_time.rb +10 -6
- data/lib/tomlrb/local_time.rb +9 -6
- data/lib/tomlrb/parser.rb +3 -1
- data/lib/tomlrb/parser.y +64 -30
- data/lib/tomlrb/scanner.rb +44 -26
- data/lib/tomlrb/string_utils.rb +4 -3
- data/lib/tomlrb/version.rb +3 -1
- data/lib/tomlrb.rb +7 -5
- metadata +3 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# DO NOT MODIFY!!!!
|
|
3
|
-
# This file is automatically generated by Racc 1.
|
|
4
|
-
# from Racc grammar file "".
|
|
3
|
+
# This file is automatically generated by Racc 1.8.1
|
|
4
|
+
# from Racc grammar file "parser.y".
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
require 'racc/parser.rb'
|
|
@@ -10,100 +10,118 @@ module Tomlrb
|
|
|
10
10
|
##### State transition tables begin ###
|
|
11
11
|
|
|
12
12
|
racc_action_table = [
|
|
13
|
-
2,
|
|
14
|
-
20, 14, 21, 22, 8, 4, 10,
|
|
15
|
-
17,
|
|
16
|
-
|
|
17
|
-
75,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
12,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
nil,
|
|
24
|
-
|
|
25
|
-
nil, 12,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
nil,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
nil, nil,
|
|
33
|
-
|
|
13
|
+
2, 49, 16, 25, 17, 48, 18, 23, 24, 19,
|
|
14
|
+
20, 14, 21, 22, 8, 4, 10, 60, 16, 12,
|
|
15
|
+
17, 59, 18, 23, 24, 19, 20, 46, 21, 22,
|
|
16
|
+
28, 51, 54, 53, 54, 84, 43, 77, 78, 79,
|
|
17
|
+
80, 75, 76, 72, 73, 70, 71, 74, 93, 92,
|
|
18
|
+
63, 40, 55, 12, 77, 78, 79, 80, 75, 76,
|
|
19
|
+
72, 73, 70, 71, 74, 43, 58, 63, 87, 87,
|
|
20
|
+
12, 77, 78, 79, 80, 75, 76, 72, 73, 70,
|
|
21
|
+
71, 74, 54, nil, 63, 98, nil, 12, 77, 78,
|
|
22
|
+
79, 80, 75, 76, 72, 73, 70, 71, 74, 87,
|
|
23
|
+
nil, 63, 111, nil, 12, 77, 78, 79, 80, 75,
|
|
24
|
+
76, 72, 73, 70, 71, 74, 54, nil, 63, 98,
|
|
25
|
+
nil, 12, 77, 78, 79, 80, 75, 76, 72, 73,
|
|
26
|
+
70, 71, 74, 54, nil, 63, 98, nil, 12, 77,
|
|
27
|
+
78, 79, 80, 75, 76, 72, 73, 70, 71, 74,
|
|
28
|
+
87, nil, 63, 111, 31, 12, 32, nil, 33, 38,
|
|
29
|
+
39, 34, 35, 29, 36, 37, 16, nil, 17, 28,
|
|
30
|
+
18, 23, 24, 19, 20, 82, 21, 22, 31, nil,
|
|
31
|
+
32, nil, 33, 38, 39, 34, 35, 86, 36, 37,
|
|
32
|
+
16, nil, 17, nil, 18, 23, 24, 19, 20, 46,
|
|
33
|
+
21, 22, 16, nil, 17, nil, 18, 23, 24, 19,
|
|
34
|
+
20, 91, 21, 22, 54, 54, 87, 98, 98, 111,
|
|
35
|
+
nil, 109, 109, 118 ]
|
|
34
36
|
|
|
35
37
|
racc_action_check = [
|
|
36
|
-
1, 13, 1,
|
|
37
|
-
1, 1, 1, 1, 1, 1, 1,
|
|
38
|
-
11,
|
|
39
|
-
26, 26,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
nil,
|
|
47
|
-
|
|
48
|
-
nil,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
nil,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
nil, nil,
|
|
56
|
-
|
|
38
|
+
1, 13, 1, 2, 1, 13, 1, 1, 1, 1,
|
|
39
|
+
1, 1, 1, 1, 1, 1, 1, 45, 11, 1,
|
|
40
|
+
11, 45, 11, 11, 11, 11, 11, 11, 11, 11,
|
|
41
|
+
26, 26, 27, 27, 50, 50, 11, 48, 48, 48,
|
|
42
|
+
48, 48, 48, 48, 48, 48, 48, 48, 61, 61,
|
|
43
|
+
48, 10, 28, 48, 59, 59, 59, 59, 59, 59,
|
|
44
|
+
59, 59, 59, 59, 59, 42, 44, 59, 52, 83,
|
|
45
|
+
59, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
|
46
|
+
62, 62, 62, nil, 62, 62, nil, 62, 96, 96,
|
|
47
|
+
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
|
48
|
+
nil, 96, 96, nil, 96, 105, 105, 105, 105, 105,
|
|
49
|
+
105, 105, 105, 105, 105, 105, 105, nil, 105, 105,
|
|
50
|
+
nil, 105, 112, 112, 112, 112, 112, 112, 112, 112,
|
|
51
|
+
112, 112, 112, 112, nil, 112, 112, nil, 112, 116,
|
|
52
|
+
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
|
|
53
|
+
116, nil, 116, 116, 9, 116, 9, nil, 9, 9,
|
|
54
|
+
9, 9, 9, 9, 9, 9, 49, nil, 49, 9,
|
|
55
|
+
49, 49, 49, 49, 49, 49, 49, 49, 51, nil,
|
|
56
|
+
51, nil, 51, 51, 51, 51, 51, 51, 51, 51,
|
|
57
|
+
58, nil, 58, nil, 58, 58, 58, 58, 58, 58,
|
|
58
|
+
58, 58, 60, nil, 60, nil, 60, 60, 60, 60,
|
|
59
|
+
60, 60, 60, 60, 94, 104, 108, 94, 104, 108,
|
|
60
|
+
nil, 94, 104, 108 ]
|
|
57
61
|
|
|
58
62
|
racc_action_pointer = [
|
|
59
|
-
nil, 0,
|
|
60
|
-
|
|
61
|
-
nil, nil, nil, nil,
|
|
62
|
-
nil, nil, nil, nil, nil, nil, nil, nil, 14, nil,
|
|
63
|
-
14, -15, nil, nil, 34, 159, nil, nil, nil, nil,
|
|
64
|
-
31, 147, nil, nil, 171, 51, 183, 18, 68, nil,
|
|
63
|
+
nil, 0, 3, nil, nil, nil, nil, nil, nil, 152,
|
|
64
|
+
35, 16, nil, -17, nil, nil, nil, nil, nil, nil,
|
|
65
|
+
nil, nil, nil, nil, nil, nil, 13, 18, 35, nil,
|
|
65
66
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
67
|
+
nil, nil, 45, nil, 45, -1, nil, nil, 34, 164,
|
|
68
|
+
20, 176, 54, nil, nil, nil, nil, nil, 188, 51,
|
|
69
|
+
200, 34, 68, nil, nil, nil, nil, nil, nil, nil,
|
|
66
70
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
67
|
-
nil, nil, nil,
|
|
68
|
-
|
|
71
|
+
nil, nil, nil, 55, nil, nil, nil, nil, nil, nil,
|
|
72
|
+
nil, nil, nil, nil, 200, nil, 85, nil, nil, nil,
|
|
73
|
+
nil, nil, nil, nil, 201, 102, nil, nil, 202, nil,
|
|
74
|
+
nil, nil, 119, nil, nil, nil, 136, nil, nil, nil,
|
|
75
|
+
nil ]
|
|
69
76
|
|
|
70
77
|
racc_action_default = [
|
|
71
|
-
-1, -
|
|
72
|
-
-
|
|
73
|
-
-51, -52, -53,
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
78
|
+
-1, -97, -97, -2, -3, -4, -5, -6, -7, -97,
|
|
79
|
+
-13, -97, -31, -97, -45, -46, -47, -48, -49, -50,
|
|
80
|
+
-51, -52, -53, -54, -55, 121, -97, -97, -15, -18,
|
|
81
|
+
-19, -20, -21, -22, -23, -24, -25, -26, -27, -28,
|
|
82
|
+
-12, -29, -97, -32, -33, -97, -39, -40, -84, -97,
|
|
83
|
+
-97, -97, -10, -11, -73, -14, -30, -34, -97, -84,
|
|
84
|
+
-97, -97, -97, -67, -74, -75, -76, -80, -81, -85,
|
|
85
|
+
-86, -87, -88, -89, -90, -91, -92, -93, -94, -95,
|
|
86
|
+
-96, -43, -44, -8, -9, -16, -17, -72, -35, -36,
|
|
87
|
+
-37, -38, -41, -42, -97, -60, -97, -62, -69, -77,
|
|
88
|
+
-78, -79, -82, -83, -97, -97, -59, -64, -97, -71,
|
|
89
|
+
-61, -68, -97, -57, -63, -58, -97, -66, -70, -56,
|
|
90
|
+
-65 ]
|
|
81
91
|
|
|
82
92
|
racc_goto_table = [
|
|
83
|
-
15,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
nil, nil, nil, nil, nil,
|
|
93
|
+
52, 15, 97, 7, 42, 95, 61, 41, 27, 65,
|
|
94
|
+
30, 67, 1, 69, 3, 5, 105, 89, 107, 6,
|
|
95
|
+
65, 9, 67, 83, 69, 50, 112, 26, 114, 57,
|
|
96
|
+
13, 94, 104, nil, nil, 96, 110, 106, 56, nil,
|
|
97
|
+
nil, nil, nil, nil, nil, nil, nil, 113, 115, 81,
|
|
98
|
+
66, 88, 85, nil, nil, 119, 120, nil, nil, nil,
|
|
99
|
+
90, 66, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
100
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 116, nil,
|
|
101
|
+
nil, nil, nil, nil, nil, 116 ]
|
|
89
102
|
|
|
90
103
|
racc_goto_check = [
|
|
91
|
-
18,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
nil, nil, nil, nil, nil,
|
|
104
|
+
9, 18, 26, 5, 13, 25, 17, 12, 8, 20,
|
|
105
|
+
10, 30, 1, 32, 2, 3, 24, 17, 27, 4,
|
|
106
|
+
20, 6, 30, 9, 32, 8, 24, 7, 27, 15,
|
|
107
|
+
19, 22, 23, nil, nil, 9, 26, 25, 12, nil,
|
|
108
|
+
nil, nil, nil, nil, nil, nil, nil, 25, 25, 18,
|
|
109
|
+
5, 13, 10, nil, nil, 25, 26, nil, nil, nil,
|
|
110
|
+
18, 5, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
111
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 9, nil,
|
|
112
|
+
nil, nil, nil, nil, nil, 9 ]
|
|
97
113
|
|
|
98
114
|
racc_goto_pointer = [
|
|
99
|
-
nil,
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
nil, 12, 13, 14, 18, 2, 20, 18, -1, -27,
|
|
116
|
+
1, nil, -4, -7, nil, -15, nil, -42, 0, 29,
|
|
117
|
+
-39, nil, -31, -62, -78, -57, -60, -76, nil, nil,
|
|
118
|
+
-37, nil, -35 ]
|
|
102
119
|
|
|
103
120
|
racc_goto_default = [
|
|
104
|
-
nil, nil, nil, nil, nil,
|
|
105
|
-
nil, 11, nil, nil,
|
|
106
|
-
|
|
121
|
+
nil, nil, nil, nil, nil, 101, nil, nil, nil, 108,
|
|
122
|
+
nil, 11, nil, nil, 44, nil, 45, nil, 47, nil,
|
|
123
|
+
100, 62, nil, nil, nil, nil, 117, nil, 64, 99,
|
|
124
|
+
102, 68, 103 ]
|
|
107
125
|
|
|
108
126
|
racc_reduce_table = [
|
|
109
127
|
0, 0, :racc_error,
|
|
@@ -114,27 +132,27 @@ racc_reduce_table = [
|
|
|
114
132
|
1, 25, :_reduce_none,
|
|
115
133
|
1, 25, :_reduce_none,
|
|
116
134
|
1, 25, :_reduce_none,
|
|
135
|
+
4, 26, :_reduce_none,
|
|
136
|
+
4, 26, :_reduce_none,
|
|
117
137
|
3, 26, :_reduce_none,
|
|
118
138
|
3, 26, :_reduce_none,
|
|
119
|
-
2, 29, :
|
|
120
|
-
1, 29, :
|
|
121
|
-
2,
|
|
122
|
-
1,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
1,
|
|
126
|
-
|
|
127
|
-
3, 31, :_reduce_18,
|
|
128
|
-
3, 31, :_reduce_19,
|
|
129
|
-
1, 31, :_reduce_20,
|
|
130
|
-
1, 31, :_reduce_21,
|
|
139
|
+
2, 29, :_reduce_12,
|
|
140
|
+
1, 29, :_reduce_13,
|
|
141
|
+
2, 31, :_reduce_14,
|
|
142
|
+
1, 31, :_reduce_15,
|
|
143
|
+
3, 30, :_reduce_16,
|
|
144
|
+
3, 30, :_reduce_17,
|
|
145
|
+
1, 30, :_reduce_18,
|
|
146
|
+
1, 30, :_reduce_19,
|
|
131
147
|
1, 33, :_reduce_none,
|
|
132
|
-
1, 33, :
|
|
148
|
+
1, 33, :_reduce_21,
|
|
133
149
|
1, 33, :_reduce_none,
|
|
134
150
|
1, 33, :_reduce_none,
|
|
135
151
|
1, 33, :_reduce_none,
|
|
136
152
|
1, 33, :_reduce_none,
|
|
137
153
|
1, 33, :_reduce_none,
|
|
154
|
+
1, 33, :_reduce_27,
|
|
155
|
+
1, 33, :_reduce_28,
|
|
138
156
|
2, 28, :_reduce_none,
|
|
139
157
|
3, 28, :_reduce_none,
|
|
140
158
|
1, 34, :_reduce_31,
|
|
@@ -160,35 +178,53 @@ racc_reduce_table = [
|
|
|
160
178
|
1, 41, :_reduce_none,
|
|
161
179
|
1, 41, :_reduce_none,
|
|
162
180
|
1, 41, :_reduce_none,
|
|
181
|
+
1, 41, :_reduce_54,
|
|
182
|
+
1, 41, :_reduce_55,
|
|
183
|
+
5, 43, :_reduce_none,
|
|
184
|
+
4, 43, :_reduce_none,
|
|
185
|
+
4, 43, :_reduce_none,
|
|
186
|
+
3, 43, :_reduce_none,
|
|
163
187
|
2, 43, :_reduce_none,
|
|
164
|
-
1, 45, :_reduce_55,
|
|
165
188
|
2, 45, :_reduce_none,
|
|
166
|
-
|
|
167
|
-
1, 46, :_reduce_58,
|
|
168
|
-
2, 46, :_reduce_none,
|
|
189
|
+
1, 45, :_reduce_none,
|
|
169
190
|
2, 46, :_reduce_none,
|
|
170
|
-
1,
|
|
171
|
-
|
|
191
|
+
1, 46, :_reduce_none,
|
|
192
|
+
3, 50, :_reduce_none,
|
|
193
|
+
2, 50, :_reduce_none,
|
|
194
|
+
1, 44, :_reduce_67,
|
|
195
|
+
2, 48, :_reduce_68,
|
|
196
|
+
1, 48, :_reduce_69,
|
|
197
|
+
2, 47, :_reduce_none,
|
|
198
|
+
1, 47, :_reduce_none,
|
|
199
|
+
2, 32, :_reduce_none,
|
|
200
|
+
1, 32, :_reduce_none,
|
|
201
|
+
1, 40, :_reduce_74,
|
|
172
202
|
1, 40, :_reduce_none,
|
|
173
203
|
1, 40, :_reduce_none,
|
|
174
|
-
1,
|
|
175
|
-
1,
|
|
176
|
-
|
|
177
|
-
1,
|
|
178
|
-
1,
|
|
179
|
-
1,
|
|
180
|
-
1,
|
|
181
|
-
|
|
182
|
-
1,
|
|
183
|
-
1,
|
|
184
|
-
1,
|
|
185
|
-
1,
|
|
186
|
-
1,
|
|
187
|
-
1,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
204
|
+
1, 49, :_reduce_77,
|
|
205
|
+
1, 49, :_reduce_none,
|
|
206
|
+
1, 49, :_reduce_none,
|
|
207
|
+
1, 51, :_reduce_none,
|
|
208
|
+
1, 51, :_reduce_none,
|
|
209
|
+
1, 52, :_reduce_none,
|
|
210
|
+
1, 52, :_reduce_none,
|
|
211
|
+
0, 54, :_reduce_none,
|
|
212
|
+
1, 54, :_reduce_none,
|
|
213
|
+
1, 55, :_reduce_86,
|
|
214
|
+
1, 55, :_reduce_87,
|
|
215
|
+
1, 55, :_reduce_88,
|
|
216
|
+
1, 55, :_reduce_89,
|
|
217
|
+
1, 55, :_reduce_90,
|
|
218
|
+
1, 55, :_reduce_91,
|
|
219
|
+
1, 55, :_reduce_92,
|
|
220
|
+
1, 53, :_reduce_93,
|
|
221
|
+
1, 53, :_reduce_94,
|
|
222
|
+
1, 53, :_reduce_95,
|
|
223
|
+
1, 53, :_reduce_96 ]
|
|
224
|
+
|
|
225
|
+
racc_reduce_n = 97
|
|
226
|
+
|
|
227
|
+
racc_shift_n = 121
|
|
192
228
|
|
|
193
229
|
racc_token_table = {
|
|
194
230
|
false => 0,
|
|
@@ -234,6 +270,7 @@ Racc_arg = [
|
|
|
234
270
|
racc_shift_n,
|
|
235
271
|
racc_reduce_n,
|
|
236
272
|
racc_use_result_var ]
|
|
273
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
|
237
274
|
|
|
238
275
|
Racc_token_to_s_table = [
|
|
239
276
|
"$end",
|
|
@@ -266,9 +303,9 @@ Racc_token_to_s_table = [
|
|
|
266
303
|
"assignment",
|
|
267
304
|
"inline_table",
|
|
268
305
|
"table_start",
|
|
269
|
-
"table_continued",
|
|
270
306
|
"table_identifier",
|
|
271
|
-
"
|
|
307
|
+
"table_end",
|
|
308
|
+
"newlines",
|
|
272
309
|
"table_identifier_component",
|
|
273
310
|
"inline_table_start",
|
|
274
311
|
"inline_table_end",
|
|
@@ -281,11 +318,18 @@ Racc_token_to_s_table = [
|
|
|
281
318
|
"assignment_key",
|
|
282
319
|
"array",
|
|
283
320
|
"start_array",
|
|
284
|
-
"
|
|
285
|
-
"
|
|
321
|
+
"array_first_value",
|
|
322
|
+
"array_values",
|
|
323
|
+
"comma",
|
|
324
|
+
"end_array",
|
|
325
|
+
"non_nil_value",
|
|
326
|
+
"array_value",
|
|
286
327
|
"scalar",
|
|
328
|
+
"non_nil_scalar",
|
|
287
329
|
"string",
|
|
288
|
-
"literal"
|
|
330
|
+
"literal",
|
|
331
|
+
"non_nil_literal" ]
|
|
332
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
|
289
333
|
|
|
290
334
|
Racc_debug_parser = false
|
|
291
335
|
|
|
@@ -311,68 +355,54 @@ Racc_debug_parser = false
|
|
|
311
355
|
|
|
312
356
|
# reduce 9 omitted
|
|
313
357
|
|
|
314
|
-
|
|
315
|
-
def _reduce_10(val, _values, result)
|
|
316
|
-
@handler.start_(:array_of_tables)
|
|
317
|
-
result
|
|
318
|
-
end
|
|
319
|
-
.,.,
|
|
358
|
+
# reduce 10 omitted
|
|
320
359
|
|
|
321
|
-
|
|
322
|
-
def _reduce_11(val, _values, result)
|
|
323
|
-
@handler.start_(:table)
|
|
324
|
-
result
|
|
325
|
-
end
|
|
326
|
-
.,.,
|
|
360
|
+
# reduce 11 omitted
|
|
327
361
|
|
|
328
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
362
|
+
module_eval(<<'.,.,', 'parser.y', 20)
|
|
329
363
|
def _reduce_12(val, _values, result)
|
|
330
|
-
|
|
364
|
+
@handler.start_(:array_of_tables)
|
|
331
365
|
result
|
|
332
366
|
end
|
|
333
367
|
.,.,
|
|
334
368
|
|
|
335
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
369
|
+
module_eval(<<'.,.,', 'parser.y', 21)
|
|
336
370
|
def _reduce_13(val, _values, result)
|
|
337
|
-
|
|
371
|
+
@handler.start_(:table)
|
|
338
372
|
result
|
|
339
373
|
end
|
|
340
374
|
.,.,
|
|
341
375
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
module_eval(<<'.,.,', 'parser.y', 27)
|
|
345
|
-
def _reduce_15(val, _values, result)
|
|
376
|
+
module_eval(<<'.,.,', 'parser.y', 25)
|
|
377
|
+
def _reduce_14(val, _values, result)
|
|
346
378
|
array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true)
|
|
347
379
|
result
|
|
348
380
|
end
|
|
349
381
|
.,.,
|
|
350
382
|
|
|
351
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
352
|
-
def
|
|
383
|
+
module_eval(<<'.,.,', 'parser.y', 26)
|
|
384
|
+
def _reduce_15(val, _values, result)
|
|
353
385
|
array = @handler.end_(:table); @handler.set_context(array)
|
|
354
386
|
result
|
|
355
387
|
end
|
|
356
388
|
.,.,
|
|
357
389
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
module_eval(<<'.,.,', 'parser.y', 32)
|
|
361
|
-
def _reduce_18(val, _values, result)
|
|
390
|
+
module_eval(<<'.,.,', 'parser.y', 29)
|
|
391
|
+
def _reduce_16(val, _values, result)
|
|
362
392
|
@handler.push(val[2])
|
|
363
393
|
result
|
|
364
394
|
end
|
|
365
395
|
.,.,
|
|
366
396
|
|
|
367
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
368
|
-
def
|
|
397
|
+
module_eval(<<'.,.,', 'parser.y', 30)
|
|
398
|
+
def _reduce_17(val, _values, result)
|
|
369
399
|
val[2].split('.').each { |k| @handler.push(k) }
|
|
370
400
|
result
|
|
371
401
|
end
|
|
372
402
|
.,.,
|
|
373
403
|
|
|
374
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
375
|
-
def
|
|
404
|
+
module_eval(<<'.,.,', 'parser.y', 32)
|
|
405
|
+
def _reduce_18(val, _values, result)
|
|
376
406
|
keys = val[0].split('.')
|
|
377
407
|
@handler.start_(:table)
|
|
378
408
|
keys.each { |key| @handler.push(key) }
|
|
@@ -381,44 +411,58 @@ module_eval(<<'.,.,', 'parser.y', 35)
|
|
|
381
411
|
end
|
|
382
412
|
.,.,
|
|
383
413
|
|
|
384
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
385
|
-
def
|
|
414
|
+
module_eval(<<'.,.,', 'parser.y', 36)
|
|
415
|
+
def _reduce_19(val, _values, result)
|
|
386
416
|
@handler.push(val[0])
|
|
387
417
|
result
|
|
388
418
|
end
|
|
389
419
|
.,.,
|
|
390
420
|
|
|
391
|
-
# reduce
|
|
421
|
+
# reduce 20 omitted
|
|
392
422
|
|
|
393
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
394
|
-
def
|
|
423
|
+
module_eval(<<'.,.,', 'parser.y', 40)
|
|
424
|
+
def _reduce_21(val, _values, result)
|
|
395
425
|
result = StringUtils.replace_escaped_chars(val[0])
|
|
396
426
|
result
|
|
397
427
|
end
|
|
398
428
|
.,.,
|
|
399
429
|
|
|
430
|
+
# reduce 22 omitted
|
|
431
|
+
|
|
432
|
+
# reduce 23 omitted
|
|
433
|
+
|
|
400
434
|
# reduce 24 omitted
|
|
401
435
|
|
|
402
436
|
# reduce 25 omitted
|
|
403
437
|
|
|
404
438
|
# reduce 26 omitted
|
|
405
439
|
|
|
406
|
-
|
|
440
|
+
module_eval(<<'.,.,', 'parser.y', 46)
|
|
441
|
+
def _reduce_27(val, _values, result)
|
|
442
|
+
result = val[0][0]
|
|
443
|
+
result
|
|
444
|
+
end
|
|
445
|
+
.,.,
|
|
407
446
|
|
|
408
|
-
|
|
447
|
+
module_eval(<<'.,.,', 'parser.y', 47)
|
|
448
|
+
def _reduce_28(val, _values, result)
|
|
449
|
+
result = val[0][0]
|
|
450
|
+
result
|
|
451
|
+
end
|
|
452
|
+
.,.,
|
|
409
453
|
|
|
410
454
|
# reduce 29 omitted
|
|
411
455
|
|
|
412
456
|
# reduce 30 omitted
|
|
413
457
|
|
|
414
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
458
|
+
module_eval(<<'.,.,', 'parser.y', 54)
|
|
415
459
|
def _reduce_31(val, _values, result)
|
|
416
460
|
@handler.start_(:inline)
|
|
417
461
|
result
|
|
418
462
|
end
|
|
419
463
|
.,.,
|
|
420
464
|
|
|
421
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
465
|
+
module_eval(<<'.,.,', 'parser.y', 58)
|
|
422
466
|
def _reduce_32(val, _values, result)
|
|
423
467
|
array = @handler.end_(:inline)
|
|
424
468
|
@handler.push_inline(array)
|
|
@@ -433,7 +477,7 @@ module_eval(<<'.,.,', 'parser.y', 59)
|
|
|
433
477
|
|
|
434
478
|
# reduce 35 omitted
|
|
435
479
|
|
|
436
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
480
|
+
module_eval(<<'.,.,', 'parser.y', 71)
|
|
437
481
|
def _reduce_36(val, _values, result)
|
|
438
482
|
keys = @handler.end_(:inline_keys)
|
|
439
483
|
@handler.push(keys)
|
|
@@ -442,7 +486,7 @@ module_eval(<<'.,.,', 'parser.y', 72)
|
|
|
442
486
|
end
|
|
443
487
|
.,.,
|
|
444
488
|
|
|
445
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
489
|
+
module_eval(<<'.,.,', 'parser.y', 77)
|
|
446
490
|
def _reduce_37(val, _values, result)
|
|
447
491
|
@handler.push(val[2])
|
|
448
492
|
|
|
@@ -450,14 +494,14 @@ module_eval(<<'.,.,', 'parser.y', 78)
|
|
|
450
494
|
end
|
|
451
495
|
.,.,
|
|
452
496
|
|
|
453
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
497
|
+
module_eval(<<'.,.,', 'parser.y', 79)
|
|
454
498
|
def _reduce_38(val, _values, result)
|
|
455
499
|
val[2].split('.').each { |k| @handler.push(k) }
|
|
456
500
|
result
|
|
457
501
|
end
|
|
458
502
|
.,.,
|
|
459
503
|
|
|
460
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
504
|
+
module_eval(<<'.,.,', 'parser.y', 81)
|
|
461
505
|
def _reduce_39(val, _values, result)
|
|
462
506
|
keys = val[0].split('.')
|
|
463
507
|
@handler.start_(:inline_keys)
|
|
@@ -467,7 +511,7 @@ module_eval(<<'.,.,', 'parser.y', 82)
|
|
|
467
511
|
end
|
|
468
512
|
.,.,
|
|
469
513
|
|
|
470
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
514
|
+
module_eval(<<'.,.,', 'parser.y', 86)
|
|
471
515
|
def _reduce_40(val, _values, result)
|
|
472
516
|
@handler.start_(:inline_keys)
|
|
473
517
|
@handler.push(val[0])
|
|
@@ -476,7 +520,7 @@ module_eval(<<'.,.,', 'parser.y', 87)
|
|
|
476
520
|
end
|
|
477
521
|
.,.,
|
|
478
522
|
|
|
479
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
523
|
+
module_eval(<<'.,.,', 'parser.y', 92)
|
|
480
524
|
def _reduce_41(val, _values, result)
|
|
481
525
|
keys = @handler.end_(:keys)
|
|
482
526
|
value = keys.pop
|
|
@@ -488,7 +532,7 @@ module_eval(<<'.,.,', 'parser.y', 93)
|
|
|
488
532
|
end
|
|
489
533
|
.,.,
|
|
490
534
|
|
|
491
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
535
|
+
module_eval(<<'.,.,', 'parser.y', 99)
|
|
492
536
|
def _reduce_42(val, _values, result)
|
|
493
537
|
keys = @handler.end_(:keys)
|
|
494
538
|
value = keys.pop
|
|
@@ -500,21 +544,21 @@ module_eval(<<'.,.,', 'parser.y', 100)
|
|
|
500
544
|
end
|
|
501
545
|
.,.,
|
|
502
546
|
|
|
503
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
547
|
+
module_eval(<<'.,.,', 'parser.y', 107)
|
|
504
548
|
def _reduce_43(val, _values, result)
|
|
505
549
|
@handler.push(val[2])
|
|
506
550
|
result
|
|
507
551
|
end
|
|
508
552
|
.,.,
|
|
509
553
|
|
|
510
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
554
|
+
module_eval(<<'.,.,', 'parser.y', 108)
|
|
511
555
|
def _reduce_44(val, _values, result)
|
|
512
556
|
val[2].split('.').each { |k| @handler.push(k) }
|
|
513
557
|
result
|
|
514
558
|
end
|
|
515
559
|
.,.,
|
|
516
560
|
|
|
517
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
561
|
+
module_eval(<<'.,.,', 'parser.y', 110)
|
|
518
562
|
def _reduce_45(val, _values, result)
|
|
519
563
|
keys = val[0].split('.')
|
|
520
564
|
@handler.start_(:keys)
|
|
@@ -524,7 +568,7 @@ module_eval(<<'.,.,', 'parser.y', 111)
|
|
|
524
568
|
end
|
|
525
569
|
.,.,
|
|
526
570
|
|
|
527
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
571
|
+
module_eval(<<'.,.,', 'parser.y', 114)
|
|
528
572
|
def _reduce_46(val, _values, result)
|
|
529
573
|
@handler.start_(:keys); @handler.push(val[0])
|
|
530
574
|
result
|
|
@@ -533,7 +577,7 @@ module_eval(<<'.,.,', 'parser.y', 115)
|
|
|
533
577
|
|
|
534
578
|
# reduce 47 omitted
|
|
535
579
|
|
|
536
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
580
|
+
module_eval(<<'.,.,', 'parser.y', 118)
|
|
537
581
|
def _reduce_48(val, _values, result)
|
|
538
582
|
result = StringUtils.replace_escaped_chars(val[0])
|
|
539
583
|
result
|
|
@@ -550,11 +594,16 @@ module_eval(<<'.,.,', 'parser.y', 119)
|
|
|
550
594
|
|
|
551
595
|
# reduce 53 omitted
|
|
552
596
|
|
|
553
|
-
|
|
597
|
+
module_eval(<<'.,.,', 'parser.y', 124)
|
|
598
|
+
def _reduce_54(val, _values, result)
|
|
599
|
+
result = val[0][0]
|
|
600
|
+
result
|
|
601
|
+
end
|
|
602
|
+
.,.,
|
|
554
603
|
|
|
555
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
604
|
+
module_eval(<<'.,.,', 'parser.y', 125)
|
|
556
605
|
def _reduce_55(val, _values, result)
|
|
557
|
-
|
|
606
|
+
result = val[0][0]
|
|
558
607
|
result
|
|
559
608
|
end
|
|
560
609
|
.,.,
|
|
@@ -563,50 +612,96 @@ module_eval(<<'.,.,', 'parser.y', 130)
|
|
|
563
612
|
|
|
564
613
|
# reduce 57 omitted
|
|
565
614
|
|
|
566
|
-
|
|
567
|
-
|
|
615
|
+
# reduce 58 omitted
|
|
616
|
+
|
|
617
|
+
# reduce 59 omitted
|
|
618
|
+
|
|
619
|
+
# reduce 60 omitted
|
|
620
|
+
|
|
621
|
+
# reduce 61 omitted
|
|
622
|
+
|
|
623
|
+
# reduce 62 omitted
|
|
624
|
+
|
|
625
|
+
# reduce 63 omitted
|
|
626
|
+
|
|
627
|
+
# reduce 64 omitted
|
|
628
|
+
|
|
629
|
+
# reduce 65 omitted
|
|
630
|
+
|
|
631
|
+
# reduce 66 omitted
|
|
632
|
+
|
|
633
|
+
module_eval(<<'.,.,', 'parser.y', 147)
|
|
634
|
+
def _reduce_67(val, _values, result)
|
|
635
|
+
@handler.start_(:array)
|
|
636
|
+
result
|
|
637
|
+
end
|
|
638
|
+
.,.,
|
|
639
|
+
|
|
640
|
+
module_eval(<<'.,.,', 'parser.y', 150)
|
|
641
|
+
def _reduce_68(val, _values, result)
|
|
568
642
|
array = @handler.end_(:array); @handler.push(array.compact)
|
|
569
643
|
result
|
|
570
644
|
end
|
|
571
645
|
.,.,
|
|
572
646
|
|
|
573
|
-
|
|
647
|
+
module_eval(<<'.,.,', 'parser.y', 151)
|
|
648
|
+
def _reduce_69(val, _values, result)
|
|
649
|
+
array = @handler.end_(:array); @handler.push(array.compact)
|
|
650
|
+
result
|
|
651
|
+
end
|
|
652
|
+
.,.,
|
|
574
653
|
|
|
575
|
-
# reduce
|
|
654
|
+
# reduce 70 omitted
|
|
576
655
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
656
|
+
# reduce 71 omitted
|
|
657
|
+
|
|
658
|
+
# reduce 72 omitted
|
|
659
|
+
|
|
660
|
+
# reduce 73 omitted
|
|
661
|
+
|
|
662
|
+
module_eval(<<'.,.,', 'parser.y', 162)
|
|
663
|
+
def _reduce_74(val, _values, result)
|
|
664
|
+
@handler.push(val[0])
|
|
580
665
|
result
|
|
581
666
|
end
|
|
582
667
|
.,.,
|
|
583
668
|
|
|
584
|
-
|
|
585
|
-
|
|
669
|
+
# reduce 75 omitted
|
|
670
|
+
|
|
671
|
+
# reduce 76 omitted
|
|
672
|
+
|
|
673
|
+
module_eval(<<'.,.,', 'parser.y', 167)
|
|
674
|
+
def _reduce_77(val, _values, result)
|
|
586
675
|
@handler.push(val[0])
|
|
587
676
|
result
|
|
588
677
|
end
|
|
589
678
|
.,.,
|
|
590
679
|
|
|
591
|
-
# reduce
|
|
680
|
+
# reduce 78 omitted
|
|
592
681
|
|
|
593
|
-
# reduce
|
|
682
|
+
# reduce 79 omitted
|
|
594
683
|
|
|
595
|
-
# reduce
|
|
684
|
+
# reduce 80 omitted
|
|
596
685
|
|
|
597
|
-
# reduce
|
|
686
|
+
# reduce 81 omitted
|
|
598
687
|
|
|
599
|
-
# reduce
|
|
688
|
+
# reduce 82 omitted
|
|
600
689
|
|
|
601
|
-
|
|
602
|
-
|
|
690
|
+
# reduce 83 omitted
|
|
691
|
+
|
|
692
|
+
# reduce 84 omitted
|
|
693
|
+
|
|
694
|
+
# reduce 85 omitted
|
|
695
|
+
|
|
696
|
+
module_eval(<<'.,.,', 'parser.y', 183)
|
|
697
|
+
def _reduce_86(val, _values, result)
|
|
603
698
|
result = val[0].to_f
|
|
604
699
|
result
|
|
605
700
|
end
|
|
606
701
|
.,.,
|
|
607
702
|
|
|
608
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
609
|
-
def
|
|
703
|
+
module_eval(<<'.,.,', 'parser.y', 185)
|
|
704
|
+
def _reduce_87(val, _values, result)
|
|
610
705
|
v = val[0]
|
|
611
706
|
result = if v.end_with?('nan')
|
|
612
707
|
Float::NAN
|
|
@@ -618,19 +713,19 @@ module_eval(<<'.,.,', 'parser.y', 154)
|
|
|
618
713
|
end
|
|
619
714
|
.,.,
|
|
620
715
|
|
|
621
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
622
|
-
def
|
|
716
|
+
module_eval(<<'.,.,', 'parser.y', 192)
|
|
717
|
+
def _reduce_88(val, _values, result)
|
|
623
718
|
result = val[0].to_i
|
|
624
719
|
result
|
|
625
720
|
end
|
|
626
721
|
.,.,
|
|
627
722
|
|
|
628
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
629
|
-
def
|
|
723
|
+
module_eval(<<'.,.,', 'parser.y', 194)
|
|
724
|
+
def _reduce_89(val, _values, result)
|
|
630
725
|
base = case val[0][1]
|
|
631
|
-
when
|
|
632
|
-
when
|
|
633
|
-
when
|
|
726
|
+
when 'x' then 16
|
|
727
|
+
when 'o' then 8
|
|
728
|
+
when 'b' then 2
|
|
634
729
|
end
|
|
635
730
|
result = val[0].to_i(base)
|
|
636
731
|
|
|
@@ -638,65 +733,68 @@ module_eval(<<'.,.,', 'parser.y', 163)
|
|
|
638
733
|
end
|
|
639
734
|
.,.,
|
|
640
735
|
|
|
641
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
642
|
-
def
|
|
736
|
+
module_eval(<<'.,.,', 'parser.y', 201)
|
|
737
|
+
def _reduce_90(val, _values, result)
|
|
643
738
|
result = val[0] == 'true' ? true : false
|
|
644
739
|
result
|
|
645
740
|
end
|
|
646
741
|
.,.,
|
|
647
742
|
|
|
648
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
649
|
-
def
|
|
650
|
-
|
|
651
|
-
result = if
|
|
652
|
-
if
|
|
653
|
-
LocalDate.new(
|
|
743
|
+
module_eval(<<'.,.,', 'parser.y', 203)
|
|
744
|
+
def _reduce_91(val, _values, result)
|
|
745
|
+
_str, year, month, day, hour, min, sec, offset = val[0]
|
|
746
|
+
result = if offset.nil?
|
|
747
|
+
if hour.nil?
|
|
748
|
+
LocalDate.new(year, month, day)
|
|
654
749
|
else
|
|
655
|
-
LocalDateTime.new(
|
|
750
|
+
LocalDateTime.new(year, month, day, hour, min || 0, sec.to_f)
|
|
656
751
|
end
|
|
657
752
|
else
|
|
658
753
|
# Patch for 24:00:00 which Ruby parses
|
|
659
|
-
if
|
|
660
|
-
|
|
754
|
+
if hour.to_i == 24 && min.to_i == 0 && sec.to_i == 0
|
|
755
|
+
hour = (hour.to_i + 1).to_s
|
|
661
756
|
end
|
|
662
757
|
|
|
663
|
-
Time.new(
|
|
758
|
+
time = Time.new(year, month, day, hour || 0, min || 0, sec.to_f, offset)
|
|
759
|
+
# Should be out of parser.y?
|
|
760
|
+
raise ArgumentError, "Invalid Offset Date-Time: #{year}-#{month}-#{day}T#{hour}:#{min}:#{sec}#{offset}" unless min.to_i == time.min && hour.to_i == time.hour && day.to_i == time.day && month.to_i == time.month && year.to_i == time.year
|
|
761
|
+
time
|
|
664
762
|
end
|
|
665
763
|
|
|
666
764
|
result
|
|
667
765
|
end
|
|
668
766
|
.,.,
|
|
669
767
|
|
|
670
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
671
|
-
def
|
|
672
|
-
result = LocalTime.new(*val[0])
|
|
768
|
+
module_eval(<<'.,.,', 'parser.y', 222)
|
|
769
|
+
def _reduce_92(val, _values, result)
|
|
770
|
+
result = LocalTime.new(*val[0][1..-1])
|
|
673
771
|
result
|
|
674
772
|
end
|
|
675
773
|
.,.,
|
|
676
774
|
|
|
677
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
678
|
-
def
|
|
775
|
+
module_eval(<<'.,.,', 'parser.y', 225)
|
|
776
|
+
def _reduce_93(val, _values, result)
|
|
679
777
|
result = StringUtils.replace_escaped_chars(StringUtils.multiline_replacements(val[0]))
|
|
680
778
|
result
|
|
681
779
|
end
|
|
682
780
|
.,.,
|
|
683
781
|
|
|
684
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
685
|
-
def
|
|
782
|
+
module_eval(<<'.,.,', 'parser.y', 226)
|
|
783
|
+
def _reduce_94(val, _values, result)
|
|
686
784
|
result = StringUtils.replace_escaped_chars(val[0])
|
|
687
785
|
result
|
|
688
786
|
end
|
|
689
787
|
.,.,
|
|
690
788
|
|
|
691
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
692
|
-
def
|
|
789
|
+
module_eval(<<'.,.,', 'parser.y', 227)
|
|
790
|
+
def _reduce_95(val, _values, result)
|
|
693
791
|
result = StringUtils.strip_spaces(val[0])
|
|
694
792
|
result
|
|
695
793
|
end
|
|
696
794
|
.,.,
|
|
697
795
|
|
|
698
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
699
|
-
def
|
|
796
|
+
module_eval(<<'.,.,', 'parser.y', 228)
|
|
797
|
+
def _reduce_96(val, _values, result)
|
|
700
798
|
result = val[0]
|
|
701
799
|
result
|
|
702
800
|
end
|