tomlrb 1.3.0 → 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/lib/tomlrb.rb +3 -0
- data/lib/tomlrb/generated_parser.rb +425 -248
- data/lib/tomlrb/handler.rb +155 -2
- data/lib/tomlrb/local_date.rb +33 -0
- data/lib/tomlrb/local_date_time.rb +40 -0
- data/lib/tomlrb/local_time.rb +38 -0
- data/lib/tomlrb/parser.y +83 -21
- data/lib/tomlrb/scanner.rb +49 -15
- data/lib/tomlrb/string_utils.rb +7 -1
- data/lib/tomlrb/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14e652fc5bed850a8eeca40457bf6e41239de4bb2680e82e02c962bfd69ec7ba
|
4
|
+
data.tar.gz: ffce44339d664c830873b002d0f236ee271e297b7a6f41dcefdce292ad872f72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d536f0eac4b0a13628368bf6b76bdb8a8e701807e9f4712b2dcb6805298a63c77d7774d1e9af5933404fbb5858b936bd4ed99dc55b0b0e0f4b519142f6dd5b0d
|
7
|
+
data.tar.gz: 97284454aa9099242a5050364b8fd8b95bdcde050ffcca5653dc02873e182066b6bfa6bfad643d6ca751365ebb788f600be42ef6f11736689aab3a4282c1ac24
|
data/lib/tomlrb.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc
|
3
|
+
# This file is automatically generated by Racc 1.5.1
|
4
|
+
# from Racc grammar file "".
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'racc/parser.rb'
|
@@ -10,160 +10,215 @@ module Tomlrb
|
|
10
10
|
##### State transition tables begin ###
|
11
11
|
|
12
12
|
racc_action_table = [
|
13
|
-
2,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
62,
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
nil,
|
28
|
-
|
29
|
-
nil,
|
30
|
-
|
31
|
-
|
13
|
+
2, 51, 16, 49, 17, 50, 18, 54, 55, 96,
|
14
|
+
95, 19, 20, 21, 22, 14, 23, 24, 25, 26,
|
15
|
+
8, 4, 10, 27, 44, 12, 52, 47, 81, 82,
|
16
|
+
83, 84, 77, 78, 79, 80, 71, 72, 73, 74,
|
17
|
+
68, 69, 70, 75, 76, 58, 47, 62, 87, 59,
|
18
|
+
12, 81, 82, 83, 84, 77, 78, 79, 80, 71,
|
19
|
+
72, 73, 74, 68, 69, 70, 75, 76, 92, 93,
|
20
|
+
62, 49, nil, 12, 81, 82, 83, 84, 77, 78,
|
21
|
+
79, 80, 71, 72, 73, 74, 68, 69, 70, 75,
|
22
|
+
76, 100, nil, 62, 98, nil, 12, 81, 82, 83,
|
23
|
+
84, 77, 78, 79, 80, 71, 72, 73, 74, 68,
|
24
|
+
69, 70, 75, 76, 100, nil, 62, 98, nil, 12,
|
25
|
+
81, 82, 83, 84, 77, 78, 79, 80, 71, 72,
|
26
|
+
73, 74, 68, 69, 70, 75, 76, 107, nil, 62,
|
27
|
+
98, nil, 12, 81, 82, 83, 84, 77, 78, 79,
|
28
|
+
80, 71, 72, 73, 74, 68, 69, 70, 75, 76,
|
29
|
+
100, nil, 62, 98, nil, 12, 81, 82, 83, 84,
|
30
|
+
77, 78, 79, 80, 71, 72, 73, 74, 68, 69,
|
31
|
+
70, 75, 76, 100, nil, 62, 98, 33, 12, 34,
|
32
|
+
nil, 35, nil, nil, nil, nil, 36, 37, 38, 39,
|
33
|
+
31, 40, 41, 42, 43, 33, nil, 34, 29, 35,
|
34
|
+
nil, nil, nil, nil, 36, 37, 38, 39, 90, 40,
|
35
|
+
41, 42, 43, 16, nil, 17, 29, 18, nil, nil,
|
36
|
+
nil, nil, 19, 20, 21, 22, 86, 23, 24, 25,
|
37
|
+
26, 105, nil, nil, 103, nil, nil, nil, 104 ]
|
32
38
|
|
33
39
|
racc_action_check = [
|
34
|
-
1,
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
nil,
|
49
|
-
|
50
|
-
nil,
|
51
|
-
|
52
|
-
|
40
|
+
1, 13, 1, 11, 1, 13, 1, 30, 30, 60,
|
41
|
+
60, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
42
|
+
1, 1, 1, 2, 10, 1, 29, 11, 50, 50,
|
43
|
+
50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
44
|
+
50, 50, 50, 50, 50, 48, 46, 50, 54, 48,
|
45
|
+
50, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
46
|
+
59, 59, 59, 59, 59, 59, 59, 59, 57, 58,
|
47
|
+
59, 92, nil, 59, 61, 61, 61, 61, 61, 61,
|
48
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
49
|
+
61, 61, nil, 61, 61, nil, 61, 100, 100, 100,
|
50
|
+
100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
51
|
+
100, 100, 100, 100, 100, nil, 100, 100, nil, 100,
|
52
|
+
104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
|
53
|
+
104, 104, 104, 104, 104, 104, 104, 104, nil, 104,
|
54
|
+
104, nil, 104, 105, 105, 105, 105, 105, 105, 105,
|
55
|
+
105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
|
56
|
+
105, nil, 105, 105, nil, 105, 107, 107, 107, 107,
|
57
|
+
107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
|
58
|
+
107, 107, 107, 107, nil, 107, 107, 9, 107, 9,
|
59
|
+
nil, 9, nil, nil, nil, nil, 9, 9, 9, 9,
|
60
|
+
9, 9, 9, 9, 9, 55, nil, 55, 9, 55,
|
61
|
+
nil, nil, nil, nil, 55, 55, 55, 55, 55, 55,
|
62
|
+
55, 55, 55, 51, nil, 51, 55, 51, nil, nil,
|
63
|
+
nil, nil, 51, 51, 51, 51, 51, 51, 51, 51,
|
64
|
+
51, 99, nil, nil, 99, nil, nil, nil, 99 ]
|
53
65
|
|
54
66
|
racc_action_pointer = [
|
55
|
-
nil, 0,
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
67
|
+
nil, 0, 23, nil, nil, nil, nil, nil, nil, 185,
|
68
|
+
2, 1, nil, -23, nil, nil, nil, nil, nil, nil,
|
69
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 3,
|
70
|
+
-16, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
71
|
+
nil, nil, nil, nil, nil, nil, 20, nil, 21, nil,
|
72
|
+
25, 221, nil, nil, 25, 203, nil, 41, 67, 48,
|
73
|
+
-11, 71, nil, nil, nil, nil, nil, nil, nil, nil,
|
60
74
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
61
75
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
62
|
-
nil, nil,
|
63
|
-
|
76
|
+
nil, nil, 69, nil, nil, nil, nil, nil, nil, 221,
|
77
|
+
94, nil, nil, nil, 117, 140, nil, 163, nil, nil,
|
78
|
+
nil ]
|
64
79
|
|
65
80
|
racc_action_default = [
|
66
|
-
-1, -
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
81
|
+
-1, -91, -91, -2, -3, -4, -5, -6, -7, -91,
|
82
|
+
-10, -91, -34, -91, -46, -47, -48, -49, -50, -51,
|
83
|
+
-52, -53, -54, -55, -56, -57, -58, 111, -8, -12,
|
84
|
+
-91, -19, -20, -21, -22, -23, -24, -25, -26, -27,
|
85
|
+
-28, -29, -30, -31, -9, -32, -91, -35, -91, -40,
|
86
|
+
-73, -91, -11, -13, -15, -91, -33, -36, -91, -73,
|
87
|
+
-91, -73, -67, -68, -69, -70, -71, -72, -74, -75,
|
88
|
+
-76, -77, -78, -79, -80, -81, -82, -83, -84, -85,
|
89
|
+
-86, -87, -88, -89, -90, -44, -45, -14, -16, -17,
|
90
|
+
-18, -37, -91, -39, -41, -42, -43, -59, -60, -91,
|
91
|
+
-73, -38, -61, -63, -73, -73, -62, -73, -64, -65,
|
92
|
+
-62 ]
|
75
93
|
|
76
94
|
racc_goto_table = [
|
77
|
-
|
78
|
-
|
95
|
+
46, 15, 28, 32, 45, 60, 1, 3, 5, 6,
|
96
|
+
7, 97, 9, 53, 94, 57, 91, 13, 102, nil,
|
79
97
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
80
|
-
nil, nil, nil, nil, nil, nil,
|
98
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 56,
|
99
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 88, 89,
|
100
|
+
106, 85, nil, nil, 108, 109, nil, 110, nil, nil,
|
81
101
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
82
102
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
83
|
-
nil,
|
103
|
+
nil, 101 ]
|
84
104
|
|
85
105
|
racc_goto_check = [
|
86
|
-
|
87
|
-
|
106
|
+
13, 19, 7, 10, 12, 17, 1, 2, 3, 4,
|
107
|
+
5, 22, 6, 9, 17, 15, 16, 18, 23, nil,
|
88
108
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
89
|
-
nil, nil, nil, nil, nil, nil,
|
109
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 12,
|
110
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 7, 10,
|
111
|
+
22, 19, nil, nil, 22, 22, nil, 22, nil, nil,
|
90
112
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
91
113
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
92
|
-
nil,
|
114
|
+
nil, 13 ]
|
93
115
|
|
94
116
|
racc_goto_pointer = [
|
95
|
-
nil,
|
96
|
-
|
97
|
-
nil, nil, nil ]
|
117
|
+
nil, 6, 6, 7, 8, 9, 11, -7, nil, -17,
|
118
|
+
-6, nil, -7, -11, nil, -33, -41, -45, 16, 0,
|
119
|
+
nil, nil, -50, -81, nil, nil, nil ]
|
98
120
|
|
99
121
|
racc_goto_default = [
|
100
|
-
nil, nil, nil, nil, nil,
|
101
|
-
|
102
|
-
|
122
|
+
nil, nil, nil, nil, nil, 65, nil, nil, 30, nil,
|
123
|
+
nil, 11, nil, nil, 48, nil, nil, 99, nil, nil,
|
124
|
+
64, 61, nil, nil, 63, 66, 67 ]
|
103
125
|
|
104
126
|
racc_reduce_table = [
|
105
127
|
0, 0, :racc_error,
|
106
|
-
0,
|
107
|
-
2, 22, :_reduce_none,
|
108
|
-
1, 23, :_reduce_none,
|
109
|
-
1, 23, :_reduce_none,
|
110
|
-
1, 23, :_reduce_none,
|
111
|
-
2, 24, :_reduce_none,
|
112
|
-
2, 27, :_reduce_7,
|
113
|
-
1, 27, :_reduce_8,
|
114
|
-
2, 28, :_reduce_9,
|
115
|
-
1, 28, :_reduce_10,
|
116
|
-
2, 28, :_reduce_none,
|
117
|
-
2, 30, :_reduce_12,
|
118
|
-
1, 30, :_reduce_13,
|
128
|
+
0, 30, :_reduce_none,
|
119
129
|
2, 30, :_reduce_none,
|
120
|
-
|
121
|
-
1,
|
122
|
-
1,
|
123
|
-
1,
|
124
|
-
1,
|
125
|
-
|
126
|
-
2,
|
127
|
-
1,
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
2,
|
132
|
-
1,
|
130
|
+
2, 30, :_reduce_none,
|
131
|
+
1, 31, :_reduce_none,
|
132
|
+
1, 31, :_reduce_none,
|
133
|
+
1, 31, :_reduce_none,
|
134
|
+
1, 31, :_reduce_none,
|
135
|
+
2, 32, :_reduce_none,
|
136
|
+
2, 35, :_reduce_9,
|
137
|
+
1, 35, :_reduce_10,
|
138
|
+
2, 36, :_reduce_11,
|
139
|
+
1, 36, :_reduce_12,
|
140
|
+
2, 36, :_reduce_none,
|
141
|
+
2, 38, :_reduce_14,
|
142
|
+
1, 38, :_reduce_15,
|
143
|
+
2, 38, :_reduce_none,
|
144
|
+
3, 37, :_reduce_17,
|
145
|
+
3, 37, :_reduce_18,
|
146
|
+
1, 37, :_reduce_19,
|
147
|
+
1, 37, :_reduce_20,
|
148
|
+
1, 39, :_reduce_none,
|
149
|
+
1, 39, :_reduce_none,
|
150
|
+
1, 39, :_reduce_none,
|
151
|
+
1, 39, :_reduce_none,
|
152
|
+
1, 39, :_reduce_none,
|
153
|
+
1, 39, :_reduce_none,
|
154
|
+
1, 39, :_reduce_none,
|
155
|
+
1, 39, :_reduce_none,
|
156
|
+
1, 39, :_reduce_none,
|
157
|
+
1, 39, :_reduce_none,
|
158
|
+
1, 39, :_reduce_none,
|
133
159
|
2, 34, :_reduce_none,
|
134
|
-
3,
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
3,
|
139
|
-
|
140
|
-
|
141
|
-
1,
|
142
|
-
2,
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
1,
|
148
|
-
1,
|
149
|
-
1,
|
150
|
-
1,
|
151
|
-
|
152
|
-
1,
|
153
|
-
1,
|
154
|
-
1,
|
155
|
-
1,
|
156
|
-
1,
|
157
|
-
1,
|
158
|
-
1,
|
159
|
-
1,
|
160
|
-
|
161
|
-
1,
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
160
|
+
3, 34, :_reduce_none,
|
161
|
+
1, 40, :_reduce_34,
|
162
|
+
1, 41, :_reduce_35,
|
163
|
+
2, 42, :_reduce_none,
|
164
|
+
3, 42, :_reduce_none,
|
165
|
+
2, 45, :_reduce_none,
|
166
|
+
3, 43, :_reduce_39,
|
167
|
+
1, 43, :_reduce_40,
|
168
|
+
2, 44, :_reduce_none,
|
169
|
+
4, 33, :_reduce_42,
|
170
|
+
4, 33, :_reduce_43,
|
171
|
+
3, 47, :_reduce_44,
|
172
|
+
3, 47, :_reduce_45,
|
173
|
+
1, 47, :_reduce_46,
|
174
|
+
1, 47, :_reduce_47,
|
175
|
+
1, 48, :_reduce_none,
|
176
|
+
1, 48, :_reduce_none,
|
177
|
+
1, 48, :_reduce_none,
|
178
|
+
1, 48, :_reduce_none,
|
179
|
+
1, 48, :_reduce_none,
|
180
|
+
1, 48, :_reduce_none,
|
181
|
+
1, 48, :_reduce_none,
|
182
|
+
1, 48, :_reduce_none,
|
183
|
+
1, 48, :_reduce_none,
|
184
|
+
1, 48, :_reduce_none,
|
185
|
+
1, 48, :_reduce_none,
|
186
|
+
2, 49, :_reduce_none,
|
187
|
+
1, 51, :_reduce_60,
|
188
|
+
2, 51, :_reduce_none,
|
189
|
+
2, 51, :_reduce_none,
|
190
|
+
1, 52, :_reduce_63,
|
191
|
+
2, 52, :_reduce_none,
|
192
|
+
2, 52, :_reduce_none,
|
193
|
+
3, 52, :_reduce_none,
|
194
|
+
1, 50, :_reduce_67,
|
195
|
+
1, 46, :_reduce_68,
|
196
|
+
1, 46, :_reduce_none,
|
197
|
+
1, 46, :_reduce_none,
|
198
|
+
1, 53, :_reduce_none,
|
199
|
+
1, 53, :_reduce_none,
|
200
|
+
0, 55, :_reduce_none,
|
201
|
+
1, 55, :_reduce_74,
|
202
|
+
1, 55, :_reduce_75,
|
203
|
+
1, 55, :_reduce_76,
|
204
|
+
1, 55, :_reduce_77,
|
205
|
+
1, 55, :_reduce_78,
|
206
|
+
1, 55, :_reduce_79,
|
207
|
+
1, 55, :_reduce_80,
|
208
|
+
1, 55, :_reduce_81,
|
209
|
+
1, 55, :_reduce_82,
|
210
|
+
1, 55, :_reduce_83,
|
211
|
+
1, 55, :_reduce_84,
|
212
|
+
1, 55, :_reduce_85,
|
213
|
+
1, 55, :_reduce_86,
|
214
|
+
1, 54, :_reduce_87,
|
215
|
+
1, 54, :_reduce_88,
|
216
|
+
1, 54, :_reduce_89,
|
217
|
+
1, 54, :_reduce_90 ]
|
218
|
+
|
219
|
+
racc_reduce_n = 91
|
220
|
+
|
221
|
+
racc_shift_n = 111
|
167
222
|
|
168
223
|
racc_token_table = {
|
169
224
|
false => 0,
|
@@ -174,21 +229,29 @@ racc_token_table = {
|
|
174
229
|
:STRING_LITERAL_MULTI => 5,
|
175
230
|
:STRING_LITERAL => 6,
|
176
231
|
:DATETIME => 7,
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
181
|
-
:
|
182
|
-
:
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
232
|
+
:LOCAL_DATETIME => 8,
|
233
|
+
:LOCAL_DATE => 9,
|
234
|
+
:LOCAL_TIME => 10,
|
235
|
+
:INTEGER => 11,
|
236
|
+
:HEX_INTEGER => 12,
|
237
|
+
:OCT_INTEGER => 13,
|
238
|
+
:BIN_INTEGER => 14,
|
239
|
+
:FLOAT => 15,
|
240
|
+
:FLOAT_INF => 16,
|
241
|
+
:FLOAT_NAN => 17,
|
242
|
+
:TRUE => 18,
|
243
|
+
:FALSE => 19,
|
244
|
+
:NEWLINE => 20,
|
245
|
+
:EOS => 21,
|
246
|
+
"[" => 22,
|
247
|
+
"]" => 23,
|
248
|
+
"." => 24,
|
249
|
+
"{" => 25,
|
250
|
+
"}" => 26,
|
251
|
+
"," => 27,
|
252
|
+
"=" => 28 }
|
253
|
+
|
254
|
+
racc_nt_base = 29
|
192
255
|
|
193
256
|
racc_use_result_var = true
|
194
257
|
|
@@ -217,12 +280,20 @@ Racc_token_to_s_table = [
|
|
217
280
|
"STRING_LITERAL_MULTI",
|
218
281
|
"STRING_LITERAL",
|
219
282
|
"DATETIME",
|
283
|
+
"LOCAL_DATETIME",
|
284
|
+
"LOCAL_DATE",
|
285
|
+
"LOCAL_TIME",
|
220
286
|
"INTEGER",
|
287
|
+
"HEX_INTEGER",
|
288
|
+
"OCT_INTEGER",
|
289
|
+
"BIN_INTEGER",
|
221
290
|
"FLOAT",
|
222
291
|
"FLOAT_INF",
|
223
292
|
"FLOAT_NAN",
|
224
293
|
"TRUE",
|
225
294
|
"FALSE",
|
295
|
+
"NEWLINE",
|
296
|
+
"EOS",
|
226
297
|
"\"[\"",
|
227
298
|
"\"]\"",
|
228
299
|
"\".\"",
|
@@ -240,12 +311,16 @@ Racc_token_to_s_table = [
|
|
240
311
|
"table_continued",
|
241
312
|
"table_identifier",
|
242
313
|
"table_next",
|
314
|
+
"table_identifier_component",
|
243
315
|
"inline_table_start",
|
316
|
+
"inline_table_end",
|
244
317
|
"inline_continued",
|
245
318
|
"inline_assignment_key",
|
246
319
|
"inline_assignment_value",
|
247
320
|
"inline_next",
|
248
321
|
"value",
|
322
|
+
"assignment_key",
|
323
|
+
"assignment_key_component",
|
249
324
|
"array",
|
250
325
|
"start_array",
|
251
326
|
"array_continued",
|
@@ -272,88 +347,81 @@ Racc_debug_parser = false
|
|
272
347
|
|
273
348
|
# reduce 6 omitted
|
274
349
|
|
275
|
-
|
276
|
-
|
350
|
+
# reduce 7 omitted
|
351
|
+
|
352
|
+
# reduce 8 omitted
|
353
|
+
|
354
|
+
module_eval(<<'.,.,', 'parser.y', 17)
|
355
|
+
def _reduce_9(val, _values, result)
|
277
356
|
@handler.start_(:array_of_tables)
|
278
357
|
result
|
279
358
|
end
|
280
359
|
.,.,
|
281
360
|
|
282
|
-
module_eval(<<'.,.,', 'parser.y',
|
283
|
-
def
|
361
|
+
module_eval(<<'.,.,', 'parser.y', 18)
|
362
|
+
def _reduce_10(val, _values, result)
|
284
363
|
@handler.start_(:table)
|
285
364
|
result
|
286
365
|
end
|
287
366
|
.,.,
|
288
367
|
|
289
|
-
module_eval(<<'.,.,', 'parser.y',
|
290
|
-
def
|
368
|
+
module_eval(<<'.,.,', 'parser.y', 21)
|
369
|
+
def _reduce_11(val, _values, result)
|
291
370
|
array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true)
|
292
371
|
result
|
293
372
|
end
|
294
373
|
.,.,
|
295
374
|
|
296
|
-
module_eval(<<'.,.,', 'parser.y',
|
297
|
-
def
|
375
|
+
module_eval(<<'.,.,', 'parser.y', 22)
|
376
|
+
def _reduce_12(val, _values, result)
|
298
377
|
array = @handler.end_(:table); @handler.set_context(array)
|
299
378
|
result
|
300
379
|
end
|
301
380
|
.,.,
|
302
381
|
|
303
|
-
# reduce
|
382
|
+
# reduce 13 omitted
|
304
383
|
|
305
|
-
module_eval(<<'.,.,', 'parser.y',
|
306
|
-
def
|
384
|
+
module_eval(<<'.,.,', 'parser.y', 26)
|
385
|
+
def _reduce_14(val, _values, result)
|
307
386
|
array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true)
|
308
387
|
result
|
309
388
|
end
|
310
389
|
.,.,
|
311
390
|
|
312
|
-
module_eval(<<'.,.,', 'parser.y',
|
313
|
-
def _reduce_13(val, _values, result)
|
314
|
-
array = @handler.end_(:table); @handler.set_context(array)
|
315
|
-
result
|
316
|
-
end
|
317
|
-
.,.,
|
318
|
-
|
319
|
-
# reduce 14 omitted
|
320
|
-
|
321
|
-
module_eval(<<'.,.,', 'parser.y', 29)
|
391
|
+
module_eval(<<'.,.,', 'parser.y', 27)
|
322
392
|
def _reduce_15(val, _values, result)
|
323
|
-
@handler.
|
393
|
+
array = @handler.end_(:table); @handler.set_context(array)
|
324
394
|
result
|
325
395
|
end
|
326
396
|
.,.,
|
327
397
|
|
328
|
-
|
329
|
-
def _reduce_16(val, _values, result)
|
330
|
-
@handler.push(val[0])
|
331
|
-
result
|
332
|
-
end
|
333
|
-
.,.,
|
398
|
+
# reduce 16 omitted
|
334
399
|
|
335
400
|
module_eval(<<'.,.,', 'parser.y', 31)
|
336
401
|
def _reduce_17(val, _values, result)
|
337
|
-
@handler.push(val[
|
402
|
+
@handler.push(val[2])
|
338
403
|
result
|
339
404
|
end
|
340
405
|
.,.,
|
341
406
|
|
342
407
|
module_eval(<<'.,.,', 'parser.y', 32)
|
343
408
|
def _reduce_18(val, _values, result)
|
344
|
-
@handler.push(
|
409
|
+
val[2].split('.').each { |k| @handler.push(k) }
|
345
410
|
result
|
346
411
|
end
|
347
412
|
.,.,
|
348
413
|
|
349
|
-
module_eval(<<'.,.,', 'parser.y',
|
414
|
+
module_eval(<<'.,.,', 'parser.y', 34)
|
350
415
|
def _reduce_19(val, _values, result)
|
351
|
-
|
416
|
+
keys = val[0].split('.')
|
417
|
+
@handler.start_(:table)
|
418
|
+
keys.each { |key| @handler.push(key) }
|
419
|
+
|
352
420
|
result
|
353
421
|
end
|
354
422
|
.,.,
|
355
423
|
|
356
|
-
module_eval(<<'.,.,', 'parser.y',
|
424
|
+
module_eval(<<'.,.,', 'parser.y', 38)
|
357
425
|
def _reduce_20(val, _values, result)
|
358
426
|
@handler.push(val[0])
|
359
427
|
result
|
@@ -362,201 +430,310 @@ module_eval(<<'.,.,', 'parser.y', 34)
|
|
362
430
|
|
363
431
|
# reduce 21 omitted
|
364
432
|
|
365
|
-
|
366
|
-
|
433
|
+
# reduce 22 omitted
|
434
|
+
|
435
|
+
# reduce 23 omitted
|
436
|
+
|
437
|
+
# reduce 24 omitted
|
438
|
+
|
439
|
+
# reduce 25 omitted
|
440
|
+
|
441
|
+
# reduce 26 omitted
|
442
|
+
|
443
|
+
# reduce 27 omitted
|
444
|
+
|
445
|
+
# reduce 28 omitted
|
446
|
+
|
447
|
+
# reduce 29 omitted
|
448
|
+
|
449
|
+
# reduce 30 omitted
|
450
|
+
|
451
|
+
# reduce 31 omitted
|
452
|
+
|
453
|
+
# reduce 32 omitted
|
454
|
+
|
455
|
+
# reduce 33 omitted
|
456
|
+
|
457
|
+
module_eval(<<'.,.,', 'parser.y', 58)
|
458
|
+
def _reduce_34(val, _values, result)
|
367
459
|
@handler.start_(:inline)
|
368
460
|
result
|
369
461
|
end
|
370
462
|
.,.,
|
371
463
|
|
372
|
-
module_eval(<<'.,.,', 'parser.y',
|
373
|
-
def
|
374
|
-
|
464
|
+
module_eval(<<'.,.,', 'parser.y', 62)
|
465
|
+
def _reduce_35(val, _values, result)
|
466
|
+
array = @handler.end_(:inline)
|
467
|
+
array.map!.with_index{ |n,i| i.even? ? n.to_sym : n } if @handler.symbolize_keys
|
468
|
+
@handler.push(Hash[*array])
|
469
|
+
|
375
470
|
result
|
376
471
|
end
|
377
472
|
.,.,
|
378
473
|
|
379
|
-
# reduce
|
474
|
+
# reduce 36 omitted
|
380
475
|
|
381
|
-
|
382
|
-
|
476
|
+
# reduce 37 omitted
|
477
|
+
|
478
|
+
# reduce 38 omitted
|
479
|
+
|
480
|
+
module_eval(<<'.,.,', 'parser.y', 76)
|
481
|
+
def _reduce_39(val, _values, result)
|
383
482
|
array = @handler.end_(:inline)
|
384
|
-
array.
|
385
|
-
@handler.
|
483
|
+
array.each { |key| @handler.push(key) }
|
484
|
+
@handler.start_(:inline)
|
485
|
+
@handler.push(val[2])
|
386
486
|
|
387
487
|
result
|
388
488
|
end
|
389
489
|
.,.,
|
390
490
|
|
391
|
-
|
392
|
-
|
393
|
-
module_eval(<<'.,.,', 'parser.y', 55)
|
394
|
-
def _reduce_27(val, _values, result)
|
491
|
+
module_eval(<<'.,.,', 'parser.y', 81)
|
492
|
+
def _reduce_40(val, _values, result)
|
395
493
|
@handler.push(val[0])
|
396
494
|
result
|
397
495
|
end
|
398
496
|
.,.,
|
399
497
|
|
400
|
-
# reduce
|
498
|
+
# reduce 41 omitted
|
499
|
+
|
500
|
+
module_eval(<<'.,.,', 'parser.y', 88)
|
501
|
+
def _reduce_42(val, _values, result)
|
502
|
+
keys = @handler.end_(:keys)
|
503
|
+
@handler.push(keys.pop)
|
504
|
+
@handler.assign(keys)
|
401
505
|
|
402
|
-
module_eval(<<'.,.,', 'parser.y', 61)
|
403
|
-
def _reduce_29(val, _values, result)
|
404
|
-
@handler.assign(val[0])
|
405
506
|
result
|
406
507
|
end
|
407
508
|
.,.,
|
408
509
|
|
409
|
-
module_eval(<<'.,.,', 'parser.y',
|
410
|
-
def
|
411
|
-
|
510
|
+
module_eval(<<'.,.,', 'parser.y', 93)
|
511
|
+
def _reduce_43(val, _values, result)
|
512
|
+
keys = @handler.end_(:keys)
|
513
|
+
@handler.push(keys.pop)
|
514
|
+
@handler.assign(keys)
|
515
|
+
|
412
516
|
result
|
413
517
|
end
|
414
518
|
.,.,
|
415
519
|
|
416
|
-
module_eval(<<'.,.,', 'parser.y',
|
417
|
-
def
|
418
|
-
@handler.
|
520
|
+
module_eval(<<'.,.,', 'parser.y', 99)
|
521
|
+
def _reduce_44(val, _values, result)
|
522
|
+
@handler.push(val[2])
|
419
523
|
result
|
420
524
|
end
|
421
525
|
.,.,
|
422
526
|
|
423
|
-
module_eval(<<'.,.,', 'parser.y',
|
424
|
-
def
|
425
|
-
@handler.
|
527
|
+
module_eval(<<'.,.,', 'parser.y', 100)
|
528
|
+
def _reduce_45(val, _values, result)
|
529
|
+
val[2].split('.').each { |k| @handler.push(k) }
|
426
530
|
result
|
427
531
|
end
|
428
532
|
.,.,
|
429
533
|
|
430
|
-
module_eval(<<'.,.,', 'parser.y',
|
431
|
-
def
|
432
|
-
|
534
|
+
module_eval(<<'.,.,', 'parser.y', 102)
|
535
|
+
def _reduce_46(val, _values, result)
|
536
|
+
keys = val[0].split('.')
|
537
|
+
@handler.start_(:keys)
|
538
|
+
keys.each { |key| @handler.push(key) }
|
539
|
+
|
433
540
|
result
|
434
541
|
end
|
435
542
|
.,.,
|
436
543
|
|
437
|
-
module_eval(<<'.,.,', 'parser.y',
|
438
|
-
def
|
439
|
-
@handler.
|
544
|
+
module_eval(<<'.,.,', 'parser.y', 106)
|
545
|
+
def _reduce_47(val, _values, result)
|
546
|
+
@handler.start_(:keys); @handler.push(val[0])
|
440
547
|
result
|
441
548
|
end
|
442
549
|
.,.,
|
443
550
|
|
444
|
-
# reduce
|
551
|
+
# reduce 48 omitted
|
552
|
+
|
553
|
+
# reduce 49 omitted
|
554
|
+
|
555
|
+
# reduce 50 omitted
|
556
|
+
|
557
|
+
# reduce 51 omitted
|
445
558
|
|
446
|
-
|
447
|
-
|
559
|
+
# reduce 52 omitted
|
560
|
+
|
561
|
+
# reduce 53 omitted
|
562
|
+
|
563
|
+
# reduce 54 omitted
|
564
|
+
|
565
|
+
# reduce 55 omitted
|
566
|
+
|
567
|
+
# reduce 56 omitted
|
568
|
+
|
569
|
+
# reduce 57 omitted
|
570
|
+
|
571
|
+
# reduce 58 omitted
|
572
|
+
|
573
|
+
# reduce 59 omitted
|
574
|
+
|
575
|
+
module_eval(<<'.,.,', 'parser.y', 125)
|
576
|
+
def _reduce_60(val, _values, result)
|
448
577
|
array = @handler.end_(:array); @handler.push(array)
|
449
578
|
result
|
450
579
|
end
|
451
580
|
.,.,
|
452
581
|
|
453
|
-
# reduce
|
582
|
+
# reduce 61 omitted
|
454
583
|
|
455
|
-
|
456
|
-
|
584
|
+
# reduce 62 omitted
|
585
|
+
|
586
|
+
module_eval(<<'.,.,', 'parser.y', 130)
|
587
|
+
def _reduce_63(val, _values, result)
|
457
588
|
array = @handler.end_(:array); @handler.push(array)
|
458
589
|
result
|
459
590
|
end
|
460
591
|
.,.,
|
461
592
|
|
462
|
-
# reduce
|
593
|
+
# reduce 64 omitted
|
463
594
|
|
464
|
-
|
465
|
-
|
595
|
+
# reduce 65 omitted
|
596
|
+
|
597
|
+
# reduce 66 omitted
|
598
|
+
|
599
|
+
module_eval(<<'.,.,', 'parser.y', 136)
|
600
|
+
def _reduce_67(val, _values, result)
|
466
601
|
@handler.start_(:array)
|
467
602
|
result
|
468
603
|
end
|
469
604
|
.,.,
|
470
605
|
|
471
|
-
module_eval(<<'.,.,', 'parser.y',
|
472
|
-
def
|
606
|
+
module_eval(<<'.,.,', 'parser.y', 139)
|
607
|
+
def _reduce_68(val, _values, result)
|
473
608
|
@handler.push(val[0])
|
474
609
|
result
|
475
610
|
end
|
476
611
|
.,.,
|
477
612
|
|
478
|
-
# reduce
|
613
|
+
# reduce 69 omitted
|
479
614
|
|
480
|
-
# reduce
|
615
|
+
# reduce 70 omitted
|
481
616
|
|
482
|
-
# reduce
|
617
|
+
# reduce 71 omitted
|
483
618
|
|
484
|
-
# reduce
|
619
|
+
# reduce 72 omitted
|
485
620
|
|
486
|
-
# reduce
|
621
|
+
# reduce 73 omitted
|
487
622
|
|
488
|
-
module_eval(<<'.,.,', 'parser.y',
|
489
|
-
def
|
623
|
+
module_eval(<<'.,.,', 'parser.y', 148)
|
624
|
+
def _reduce_74(val, _values, result)
|
490
625
|
result = val[0].to_f
|
491
626
|
result
|
492
627
|
end
|
493
628
|
.,.,
|
494
629
|
|
495
|
-
module_eval(<<'.,.,', 'parser.y',
|
496
|
-
def
|
630
|
+
module_eval(<<'.,.,', 'parser.y', 149)
|
631
|
+
def _reduce_75(val, _values, result)
|
497
632
|
result = (val[0][0] == '-' ? -1 : 1) * Float::INFINITY
|
498
633
|
result
|
499
634
|
end
|
500
635
|
.,.,
|
501
636
|
|
502
|
-
module_eval(<<'.,.,', 'parser.y',
|
503
|
-
def
|
637
|
+
module_eval(<<'.,.,', 'parser.y', 150)
|
638
|
+
def _reduce_76(val, _values, result)
|
504
639
|
result = Float::NAN
|
505
640
|
result
|
506
641
|
end
|
507
642
|
.,.,
|
508
643
|
|
509
|
-
module_eval(<<'.,.,', 'parser.y',
|
510
|
-
def
|
644
|
+
module_eval(<<'.,.,', 'parser.y', 151)
|
645
|
+
def _reduce_77(val, _values, result)
|
511
646
|
result = val[0].to_i
|
512
647
|
result
|
513
648
|
end
|
514
649
|
.,.,
|
515
650
|
|
516
|
-
module_eval(<<'.,.,', 'parser.y',
|
517
|
-
def
|
651
|
+
module_eval(<<'.,.,', 'parser.y', 152)
|
652
|
+
def _reduce_78(val, _values, result)
|
653
|
+
result = val[0].to_i(16)
|
654
|
+
result
|
655
|
+
end
|
656
|
+
.,.,
|
657
|
+
|
658
|
+
module_eval(<<'.,.,', 'parser.y', 153)
|
659
|
+
def _reduce_79(val, _values, result)
|
660
|
+
result = val[0].to_i(8)
|
661
|
+
result
|
662
|
+
end
|
663
|
+
.,.,
|
664
|
+
|
665
|
+
module_eval(<<'.,.,', 'parser.y', 154)
|
666
|
+
def _reduce_80(val, _values, result)
|
667
|
+
result = val[0].to_i(2)
|
668
|
+
result
|
669
|
+
end
|
670
|
+
.,.,
|
671
|
+
|
672
|
+
module_eval(<<'.,.,', 'parser.y', 155)
|
673
|
+
def _reduce_81(val, _values, result)
|
518
674
|
result = true
|
519
675
|
result
|
520
676
|
end
|
521
677
|
.,.,
|
522
678
|
|
523
|
-
module_eval(<<'.,.,', 'parser.y',
|
524
|
-
def
|
679
|
+
module_eval(<<'.,.,', 'parser.y', 156)
|
680
|
+
def _reduce_82(val, _values, result)
|
525
681
|
result = false
|
526
682
|
result
|
527
683
|
end
|
528
684
|
.,.,
|
529
685
|
|
530
|
-
module_eval(<<'.,.,', 'parser.y',
|
531
|
-
def
|
686
|
+
module_eval(<<'.,.,', 'parser.y', 157)
|
687
|
+
def _reduce_83(val, _values, result)
|
532
688
|
result = Time.new(*val[0])
|
533
689
|
result
|
534
690
|
end
|
535
691
|
.,.,
|
536
692
|
|
537
|
-
module_eval(<<'.,.,', 'parser.y',
|
538
|
-
def
|
693
|
+
module_eval(<<'.,.,', 'parser.y', 158)
|
694
|
+
def _reduce_84(val, _values, result)
|
695
|
+
result = LocalDateTime.new(*val[0])
|
696
|
+
result
|
697
|
+
end
|
698
|
+
.,.,
|
699
|
+
|
700
|
+
module_eval(<<'.,.,', 'parser.y', 159)
|
701
|
+
def _reduce_85(val, _values, result)
|
702
|
+
result = LocalDate.new(*val[0])
|
703
|
+
result
|
704
|
+
end
|
705
|
+
.,.,
|
706
|
+
|
707
|
+
module_eval(<<'.,.,', 'parser.y', 160)
|
708
|
+
def _reduce_86(val, _values, result)
|
709
|
+
result = LocalTime.new(*val[0])
|
710
|
+
result
|
711
|
+
end
|
712
|
+
.,.,
|
713
|
+
|
714
|
+
module_eval(<<'.,.,', 'parser.y', 163)
|
715
|
+
def _reduce_87(val, _values, result)
|
539
716
|
result = StringUtils.replace_escaped_chars(StringUtils.multiline_replacements(val[0]))
|
540
717
|
result
|
541
718
|
end
|
542
719
|
.,.,
|
543
720
|
|
544
|
-
module_eval(<<'.,.,', 'parser.y',
|
545
|
-
def
|
721
|
+
module_eval(<<'.,.,', 'parser.y', 164)
|
722
|
+
def _reduce_88(val, _values, result)
|
546
723
|
result = StringUtils.replace_escaped_chars(val[0])
|
547
724
|
result
|
548
725
|
end
|
549
726
|
.,.,
|
550
727
|
|
551
|
-
module_eval(<<'.,.,', 'parser.y',
|
552
|
-
def
|
728
|
+
module_eval(<<'.,.,', 'parser.y', 165)
|
729
|
+
def _reduce_89(val, _values, result)
|
553
730
|
result = StringUtils.strip_spaces(val[0])
|
554
731
|
result
|
555
732
|
end
|
556
733
|
.,.,
|
557
734
|
|
558
|
-
module_eval(<<'.,.,', 'parser.y',
|
559
|
-
def
|
735
|
+
module_eval(<<'.,.,', 'parser.y', 166)
|
736
|
+
def _reduce_90(val, _values, result)
|
560
737
|
result = val[0]
|
561
738
|
result
|
562
739
|
end
|