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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e20834bda3dbc4762e7d56591de51add2029e519b0a1ca66c618a9e7be835c28
4
- data.tar.gz: 267d7ced648a3d6e4d2838f72c046f946312aa3a20500e5329bd7188e49c7e4f
3
+ metadata.gz: 14e652fc5bed850a8eeca40457bf6e41239de4bb2680e82e02c962bfd69ec7ba
4
+ data.tar.gz: ffce44339d664c830873b002d0f236ee271e297b7a6f41dcefdce292ad872f72
5
5
  SHA512:
6
- metadata.gz: ce211ca850dc37f887fe221edbd99e76642241594a830ed2d6127e082a017f2d438fd5813cc2663f713f6733d9f92039434eb82b6cc7ede2e153cc6c96419509
7
- data.tar.gz: de744d50bbf6b8d8dbf718b5148aae265b69644f7f9c38e495174b7b0f42448c5dfc0e59629be305db5f282af9f57f02563602266d21d7d2da335d2007c16ac5
6
+ metadata.gz: d536f0eac4b0a13628368bf6b76bdb8a8e701807e9f4712b2dcb6805298a63c77d7774d1e9af5933404fbb5858b936bd4ed99dc55b0b0e0f4b519142f6dd5b0d
7
+ data.tar.gz: 97284454aa9099242a5050364b8fd8b95bdcde050ffcca5653dc02873e182066b6bfa6bfad643d6ca751365ebb788f600be42ef6f11736689aab3a4282c1ac24
@@ -1,6 +1,9 @@
1
1
  require 'time'
2
2
  require 'stringio'
3
3
  require "tomlrb/version"
4
+ require 'tomlrb/local_date_time'
5
+ require 'tomlrb/local_date'
6
+ require 'tomlrb/local_time'
4
7
  require 'tomlrb/string_utils'
5
8
  require "tomlrb/scanner"
6
9
  require "tomlrb/parser"
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.16.pre.1
4
- # from Racc grammer file "".
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, 17, 11, 31, 12, 31, 13, 79, 14, 40,
14
- 41, 80, 15, 16, 8, 71, 72, 10, 27, 29,
15
- 32, 29, 59, 60, 61, 62, 58, 55, 52, 53,
16
- 54, 56, 57, 46, 33, 34, 10, 59, 60, 61,
17
- 62, 58, 55, 52, 53, 54, 56, 57, 46, 35,
18
- 36, 10, 59, 60, 61, 62, 58, 55, 52, 53,
19
- 54, 56, 57, 46, 37, 38, 10, 59, 60, 61,
20
- 62, 58, 55, 52, 53, 54, 56, 57, 46, 43,
21
- 68, 10, 59, 60, 61, 62, 58, 55, 52, 53,
22
- 54, 56, 57, 46, nil, nil, 10, 59, 60, 61,
23
- 62, 58, 55, 52, 53, 54, 56, 57, 46, nil,
24
- nil, 10, 59, 60, 61, 62, 58, 55, 52, 53,
25
- 54, 56, 57, 46, nil, nil, 10, 59, 60, 61,
26
- 62, 58, 55, 52, 53, 54, 56, 57, 46, 75,
27
- nil, 10, 59, 60, 61, 62, 58, 55, 52, 53,
28
- 54, 56, 57, 46, 75, 21, 10, 22, nil, 23,
29
- nil, 24, nil, nil, nil, 25, 26, 21, 19, 22,
30
- nil, 23, nil, 24, nil, nil, nil, 25, 26, nil,
31
- 19 ]
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, 2, 1, 9, 1, 72, 1, 76, 1, 20,
35
- 20, 76, 1, 1, 1, 42, 42, 1, 8, 9,
36
- 11, 72, 32, 32, 32, 32, 32, 32, 32, 32,
37
- 32, 32, 32, 32, 12, 13, 32, 33, 33, 33,
38
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 14,
39
- 15, 33, 34, 34, 34, 34, 34, 34, 34, 34,
40
- 34, 34, 34, 34, 16, 19, 34, 35, 35, 35,
41
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 30,
42
- 40, 35, 36, 36, 36, 36, 36, 36, 36, 36,
43
- 36, 36, 36, 36, nil, nil, 36, 37, 37, 37,
44
- 37, 37, 37, 37, 37, 37, 37, 37, 37, nil,
45
- nil, 37, 43, 43, 43, 43, 43, 43, 43, 43,
46
- 43, 43, 43, 43, nil, nil, 43, 45, 45, 45,
47
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
48
- nil, 45, 80, 80, 80, 80, 80, 80, 80, 80,
49
- 80, 80, 80, 80, 80, 7, 80, 7, nil, 7,
50
- nil, 7, nil, nil, nil, 7, 7, 41, 7, 41,
51
- nil, 41, nil, 41, nil, nil, nil, 41, 41, nil,
52
- 41 ]
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, 1, nil, nil, nil, nil, 153, 4, 1,
56
- nil, 0, 14, 15, 29, 30, 44, nil, nil, 50,
57
- -6, nil, nil, nil, nil, nil, nil, nil, nil, nil,
58
- 59, nil, 19, 34, 49, 64, 79, 94, nil, nil,
59
- 65, 165, -3, 109, nil, 124, nil, nil, nil, nil,
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, 3, nil, nil, nil, -8, nil, nil, nil,
63
- 139, nil ]
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, -58, -58, -2, -3, -4, -5, -58, -8, -58,
67
- -22, -58, -58, -58, -58, -58, -58, 82, -6, -10,
68
- -58, -15, -16, -17, -18, -19, -20, -7, -21, -23,
69
- -58, -27, -46, -46, -46, -46, -46, -46, -9, -11,
70
- -13, -58, -58, -46, -29, -46, -40, -41, -42, -43,
71
- -44, -45, -47, -48, -49, -50, -51, -52, -53, -54,
72
- -55, -56, -57, -30, -31, -32, -33, -34, -12, -14,
73
- -24, -25, -58, -28, -35, -36, -58, -26, -37, -38,
74
- -46, -39 ]
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
- 28, 74, 1, 18, 44, 63, 64, 65, 66, 67,
78
- 3, 4, 5, 6, 7, 73, 39, 42, 70, 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, 81, 69, 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, nil, nil, 77 ]
103
+ nil, 101 ]
84
104
 
85
105
  racc_goto_check = [
86
- 11, 18, 1, 7, 15, 15, 15, 15, 15, 15,
87
- 2, 3, 4, 5, 6, 15, 9, 13, 14, 19,
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, 18, 7, 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, nil, nil, 11 ]
114
+ nil, 13 ]
93
115
 
94
116
  racc_goto_pointer = [
95
- nil, 2, 9, 10, 11, 12, 13, -4, nil, -4,
96
- nil, -9, nil, -13, -24, -28, nil, nil, -44, -57,
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, 49, nil, nil, 20, nil,
101
- 9, nil, 30, nil, nil, 76, 48, 45, nil, nil,
102
- 47, 50, 51 ]
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, 22, :_reduce_none,
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
- 1, 29, :_reduce_15,
121
- 1, 29, :_reduce_16,
122
- 1, 29, :_reduce_17,
123
- 1, 29, :_reduce_18,
124
- 1, 29, :_reduce_19,
125
- 1, 29, :_reduce_20,
126
- 2, 26, :_reduce_none,
127
- 1, 31, :_reduce_22,
128
- 1, 32, :_reduce_23,
129
- 3, 32, :_reduce_none,
130
- 1, 35, :_reduce_25,
131
- 2, 35, :_reduce_none,
132
- 1, 33, :_reduce_27,
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, 25, :_reduce_29,
135
- 3, 25, :_reduce_30,
136
- 3, 25, :_reduce_31,
137
- 3, 25, :_reduce_32,
138
- 3, 25, :_reduce_33,
139
- 3, 25, :_reduce_34,
140
- 2, 37, :_reduce_none,
141
- 1, 39, :_reduce_36,
142
- 2, 39, :_reduce_none,
143
- 1, 40, :_reduce_38,
144
- 2, 40, :_reduce_none,
145
- 1, 38, :_reduce_40,
146
- 1, 36, :_reduce_41,
147
- 1, 36, :_reduce_none,
148
- 1, 36, :_reduce_none,
149
- 1, 41, :_reduce_none,
150
- 1, 41, :_reduce_none,
151
- 0, 43, :_reduce_none,
152
- 1, 43, :_reduce_47,
153
- 1, 43, :_reduce_48,
154
- 1, 43, :_reduce_49,
155
- 1, 43, :_reduce_50,
156
- 1, 43, :_reduce_51,
157
- 1, 43, :_reduce_52,
158
- 1, 43, :_reduce_53,
159
- 1, 42, :_reduce_54,
160
- 1, 42, :_reduce_55,
161
- 1, 42, :_reduce_56,
162
- 1, 42, :_reduce_57 ]
163
-
164
- racc_reduce_n = 58
165
-
166
- racc_shift_n = 82
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
- :INTEGER => 8,
178
- :FLOAT => 9,
179
- :FLOAT_INF => 10,
180
- :FLOAT_NAN => 11,
181
- :TRUE => 12,
182
- :FALSE => 13,
183
- "[" => 14,
184
- "]" => 15,
185
- "." => 16,
186
- "{" => 17,
187
- "}" => 18,
188
- "," => 19,
189
- "=" => 20 }
190
-
191
- racc_nt_base = 21
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
- module_eval(<<'.,.,', 'parser.y', 15)
276
- def _reduce_7(val, _values, result)
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', 16)
283
- def _reduce_8(val, _values, result)
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', 19)
290
- def _reduce_9(val, _values, result)
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', 20)
297
- def _reduce_10(val, _values, result)
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 11 omitted
382
+ # reduce 13 omitted
304
383
 
305
- module_eval(<<'.,.,', 'parser.y', 24)
306
- def _reduce_12(val, _values, result)
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', 25)
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.push(val[0])
393
+ array = @handler.end_(:table); @handler.set_context(array)
324
394
  result
325
395
  end
326
396
  .,.,
327
397
 
328
- module_eval(<<'.,.,', 'parser.y', 30)
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[0])
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(val[0])
409
+ val[2].split('.').each { |k| @handler.push(k) }
345
410
  result
346
411
  end
347
412
  .,.,
348
413
 
349
- module_eval(<<'.,.,', 'parser.y', 33)
414
+ module_eval(<<'.,.,', 'parser.y', 34)
350
415
  def _reduce_19(val, _values, result)
351
- @handler.push(val[0])
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', 34)
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
- module_eval(<<'.,.,', 'parser.y', 40)
366
- def _reduce_22(val, _values, result)
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', 43)
373
- def _reduce_23(val, _values, result)
374
- array = @handler.end_(:inline); @handler.push(Hash[*array])
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 24 omitted
474
+ # reduce 36 omitted
380
475
 
381
- module_eval(<<'.,.,', 'parser.y', 48)
382
- def _reduce_25(val, _values, result)
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.map!.with_index{ |n,i| i.even? ? n.to_sym : n } if @handler.symbolize_keys
385
- @handler.push(Hash[*array])
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
- # reduce 26 omitted
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 28 omitted
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', 62)
410
- def _reduce_30(val, _values, result)
411
- @handler.assign(val[0])
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', 63)
417
- def _reduce_31(val, _values, result)
418
- @handler.assign(val[0])
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', 64)
424
- def _reduce_32(val, _values, result)
425
- @handler.assign(val[0])
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', 65)
431
- def _reduce_33(val, _values, result)
432
- @handler.assign(val[0])
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', 66)
438
- def _reduce_34(val, _values, result)
439
- @handler.assign(val[0])
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 35 omitted
551
+ # reduce 48 omitted
552
+
553
+ # reduce 49 omitted
554
+
555
+ # reduce 50 omitted
556
+
557
+ # reduce 51 omitted
445
558
 
446
- module_eval(<<'.,.,', 'parser.y', 72)
447
- def _reduce_36(val, _values, result)
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 37 omitted
582
+ # reduce 61 omitted
454
583
 
455
- module_eval(<<'.,.,', 'parser.y', 76)
456
- def _reduce_38(val, _values, result)
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 39 omitted
593
+ # reduce 64 omitted
463
594
 
464
- module_eval(<<'.,.,', 'parser.y', 80)
465
- def _reduce_40(val, _values, result)
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', 83)
472
- def _reduce_41(val, _values, result)
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 42 omitted
613
+ # reduce 69 omitted
479
614
 
480
- # reduce 43 omitted
615
+ # reduce 70 omitted
481
616
 
482
- # reduce 44 omitted
617
+ # reduce 71 omitted
483
618
 
484
- # reduce 45 omitted
619
+ # reduce 72 omitted
485
620
 
486
- # reduce 46 omitted
621
+ # reduce 73 omitted
487
622
 
488
- module_eval(<<'.,.,', 'parser.y', 92)
489
- def _reduce_47(val, _values, result)
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', 93)
496
- def _reduce_48(val, _values, result)
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', 94)
503
- def _reduce_49(val, _values, result)
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', 95)
510
- def _reduce_50(val, _values, result)
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', 96)
517
- def _reduce_51(val, _values, result)
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', 97)
524
- def _reduce_52(val, _values, result)
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', 98)
531
- def _reduce_53(val, _values, result)
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', 101)
538
- def _reduce_54(val, _values, result)
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', 102)
545
- def _reduce_55(val, _values, result)
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', 103)
552
- def _reduce_56(val, _values, result)
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', 104)
559
- def _reduce_57(val, _values, result)
735
+ module_eval(<<'.,.,', 'parser.y', 166)
736
+ def _reduce_90(val, _values, result)
560
737
  result = val[0]
561
738
  result
562
739
  end