| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
#line 1 "ragel/tstr_cparse_iso8601.rl" |
|
3
|
|
|
|
|
|
|
#include |
|
4
|
|
|
|
|
|
|
#include |
|
5
|
|
|
|
|
|
|
#include |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#include "tstr_parsed.h" |
|
8
|
|
|
|
|
|
|
#include "tstr_token_parse.h" |
|
9
|
|
|
|
|
|
|
#include "tstr_cparse.h" |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#line 49 "ragel/tstr_cparse_iso8601.rl" |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#line 17 "tstr_cparse_iso8601.c" |
|
17
|
|
|
|
|
|
|
static const int iso8601_start = 1; |
|
18
|
|
|
|
|
|
|
static const int iso8601_first_final = 32; |
|
19
|
|
|
|
|
|
|
static const int iso8601_error = 0; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
static const int iso8601_en_main = 1; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#line 52 "ragel/tstr_cparse_iso8601.rl" |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
tstr_parse_result_t tstr_cparse_iso8601(const char* p, |
|
27
|
|
|
|
|
|
|
size_t len, |
|
28
|
|
|
|
|
|
|
tstr_parsed_t* parsed) { |
|
29
|
|
|
|
|
|
|
int cs, v; |
|
30
|
|
|
|
|
|
|
const char* pe = p + len; |
|
31
|
|
|
|
|
|
|
const char* eof = pe; |
|
32
|
|
|
|
|
|
|
const char* mark = NULL; |
|
33
|
|
|
|
|
|
|
tstr_parse_result_t result = TSTR_PARSE_OK; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
(void)tstr_parsed_init(parsed); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
#line 39 "tstr_cparse_iso8601.c" |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
87
|
|
|
|
|
|
cs = iso8601_start; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
#line 65 "ragel/tstr_cparse_iso8601.rl" |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
#line 46 "tstr_cparse_iso8601.c" |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
87
|
50
|
|
|
|
|
if ( p == pe ) |
|
48
|
0
|
|
|
|
|
|
goto _test_eof; |
|
49
|
87
|
|
|
|
|
|
switch ( cs ) |
|
50
|
|
|
|
|
|
|
{ |
|
51
|
87
|
|
|
|
|
|
case 1: |
|
52
|
87
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
53
|
87
|
|
|
|
|
|
goto tr0; |
|
54
|
0
|
|
|
|
|
|
goto st0; |
|
55
|
0
|
|
|
|
|
|
st0: |
|
56
|
0
|
|
|
|
|
|
cs = 0; |
|
57
|
0
|
|
|
|
|
|
goto _out; |
|
58
|
87
|
|
|
|
|
|
tr0: |
|
59
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
60
|
|
|
|
|
|
|
{ mark = p; } |
|
61
|
|
|
|
|
|
|
goto st2; |
|
62
|
|
|
|
|
|
|
st2: |
|
63
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
64
|
|
|
|
|
|
|
goto _test_eof2; |
|
65
|
|
|
|
|
|
|
case 2: |
|
66
|
|
|
|
|
|
|
#line 67 "tstr_cparse_iso8601.c" |
|
67
|
87
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
68
|
87
|
|
|
|
|
|
goto st3; |
|
69
|
0
|
|
|
|
|
|
goto st0; |
|
70
|
87
|
|
|
|
|
|
st3: |
|
71
|
87
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
72
|
0
|
|
|
|
|
|
goto _test_eof3; |
|
73
|
|
|
|
|
|
|
case 3: |
|
74
|
87
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
75
|
87
|
|
|
|
|
|
goto st4; |
|
76
|
0
|
|
|
|
|
|
goto st0; |
|
77
|
87
|
|
|
|
|
|
st4: |
|
78
|
87
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
79
|
0
|
|
|
|
|
|
goto _test_eof4; |
|
80
|
|
|
|
|
|
|
case 4: |
|
81
|
87
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
82
|
87
|
|
|
|
|
|
goto st5; |
|
83
|
0
|
|
|
|
|
|
goto st0; |
|
84
|
87
|
|
|
|
|
|
st5: |
|
85
|
87
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
86
|
0
|
|
|
|
|
|
goto _test_eof5; |
|
87
|
|
|
|
|
|
|
case 5: |
|
88
|
87
|
100
|
|
|
|
|
if ( (*p) == 45 ) |
|
89
|
60
|
|
|
|
|
|
goto tr5; |
|
90
|
27
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
91
|
27
|
|
|
|
|
|
goto tr6; |
|
92
|
0
|
|
|
|
|
|
goto st0; |
|
93
|
60
|
|
|
|
|
|
tr5: |
|
94
|
|
|
|
|
|
|
#line 6 "ragel/tstr_common.rl" |
|
95
|
|
|
|
|
|
|
{ |
|
96
|
|
|
|
|
|
|
if (!tstr_token_parse_year(mark, p - mark, &v)) { |
|
97
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_YEAR; |
|
98
|
|
|
|
|
|
|
{p++; cs = 6; goto _out;} |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
tstr_parsed_set_year4(parsed, v); |
|
101
|
|
|
|
|
|
|
} |
|
102
|
|
|
|
|
|
|
goto st6; |
|
103
|
|
|
|
|
|
|
st6: |
|
104
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
105
|
|
|
|
|
|
|
goto _test_eof6; |
|
106
|
|
|
|
|
|
|
case 6: |
|
107
|
|
|
|
|
|
|
#line 108 "tstr_cparse_iso8601.c" |
|
108
|
60
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
109
|
60
|
|
|
|
|
|
goto tr7; |
|
110
|
0
|
|
|
|
|
|
goto st0; |
|
111
|
60
|
|
|
|
|
|
tr7: |
|
112
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
113
|
|
|
|
|
|
|
{ mark = p; } |
|
114
|
|
|
|
|
|
|
goto st7; |
|
115
|
|
|
|
|
|
|
st7: |
|
116
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
117
|
|
|
|
|
|
|
goto _test_eof7; |
|
118
|
|
|
|
|
|
|
case 7: |
|
119
|
|
|
|
|
|
|
#line 120 "tstr_cparse_iso8601.c" |
|
120
|
60
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
121
|
60
|
|
|
|
|
|
goto st8; |
|
122
|
0
|
|
|
|
|
|
goto st0; |
|
123
|
60
|
|
|
|
|
|
st8: |
|
124
|
60
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
125
|
0
|
|
|
|
|
|
goto _test_eof8; |
|
126
|
|
|
|
|
|
|
case 8: |
|
127
|
60
|
50
|
|
|
|
|
if ( (*p) == 45 ) |
|
128
|
60
|
|
|
|
|
|
goto tr9; |
|
129
|
0
|
|
|
|
|
|
goto st0; |
|
130
|
60
|
|
|
|
|
|
tr9: |
|
131
|
|
|
|
|
|
|
#line 22 "ragel/tstr_common.rl" |
|
132
|
|
|
|
|
|
|
{ |
|
133
|
|
|
|
|
|
|
if (!tstr_token_parse_month(mark, p - mark, &v)) { |
|
134
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MONTH; |
|
135
|
|
|
|
|
|
|
{p++; cs = 9; goto _out;} |
|
136
|
|
|
|
|
|
|
} |
|
137
|
|
|
|
|
|
|
tstr_parsed_set_month(parsed, v); |
|
138
|
|
|
|
|
|
|
} |
|
139
|
|
|
|
|
|
|
goto st9; |
|
140
|
|
|
|
|
|
|
st9: |
|
141
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
142
|
|
|
|
|
|
|
goto _test_eof9; |
|
143
|
|
|
|
|
|
|
case 9: |
|
144
|
|
|
|
|
|
|
#line 145 "tstr_cparse_iso8601.c" |
|
145
|
60
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
146
|
60
|
|
|
|
|
|
goto tr10; |
|
147
|
0
|
|
|
|
|
|
goto st0; |
|
148
|
60
|
|
|
|
|
|
tr10: |
|
149
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
150
|
|
|
|
|
|
|
{ mark = p; } |
|
151
|
|
|
|
|
|
|
goto st10; |
|
152
|
|
|
|
|
|
|
st10: |
|
153
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
154
|
|
|
|
|
|
|
goto _test_eof10; |
|
155
|
|
|
|
|
|
|
case 10: |
|
156
|
|
|
|
|
|
|
#line 157 "tstr_cparse_iso8601.c" |
|
157
|
60
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
158
|
60
|
|
|
|
|
|
goto st32; |
|
159
|
0
|
|
|
|
|
|
goto st0; |
|
160
|
60
|
|
|
|
|
|
st32: |
|
161
|
60
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
162
|
3
|
|
|
|
|
|
goto _test_eof32; |
|
163
|
|
|
|
|
|
|
case 32: |
|
164
|
57
|
50
|
|
|
|
|
if ( (*p) == 84 ) |
|
165
|
57
|
|
|
|
|
|
goto tr33; |
|
166
|
0
|
|
|
|
|
|
goto st0; |
|
167
|
57
|
|
|
|
|
|
tr33: |
|
168
|
|
|
|
|
|
|
#line 30 "ragel/tstr_common.rl" |
|
169
|
|
|
|
|
|
|
{ |
|
170
|
|
|
|
|
|
|
if (!tstr_token_parse_day(mark, p - mark, &v)) { |
|
171
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_DAY; |
|
172
|
|
|
|
|
|
|
{p++; cs = 11; goto _out;} |
|
173
|
|
|
|
|
|
|
} |
|
174
|
|
|
|
|
|
|
tstr_parsed_set_day(parsed, v); |
|
175
|
|
|
|
|
|
|
} |
|
176
|
|
|
|
|
|
|
goto st11; |
|
177
|
|
|
|
|
|
|
st11: |
|
178
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
179
|
|
|
|
|
|
|
goto _test_eof11; |
|
180
|
|
|
|
|
|
|
case 11: |
|
181
|
|
|
|
|
|
|
#line 182 "tstr_cparse_iso8601.c" |
|
182
|
57
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
183
|
57
|
|
|
|
|
|
goto tr12; |
|
184
|
0
|
|
|
|
|
|
goto st0; |
|
185
|
57
|
|
|
|
|
|
tr12: |
|
186
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
187
|
|
|
|
|
|
|
{ mark = p; } |
|
188
|
|
|
|
|
|
|
goto st12; |
|
189
|
|
|
|
|
|
|
st12: |
|
190
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
191
|
|
|
|
|
|
|
goto _test_eof12; |
|
192
|
|
|
|
|
|
|
case 12: |
|
193
|
|
|
|
|
|
|
#line 194 "tstr_cparse_iso8601.c" |
|
194
|
57
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
195
|
57
|
|
|
|
|
|
goto st33; |
|
196
|
0
|
|
|
|
|
|
goto st0; |
|
197
|
57
|
|
|
|
|
|
st33: |
|
198
|
57
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
199
|
1
|
|
|
|
|
|
goto _test_eof33; |
|
200
|
|
|
|
|
|
|
case 33: |
|
201
|
56
|
|
|
|
|
|
switch( (*p) ) { |
|
202
|
0
|
|
|
|
|
|
case 44: goto tr35; |
|
203
|
5
|
|
|
|
|
|
case 46: goto tr35; |
|
204
|
50
|
|
|
|
|
|
case 58: goto tr36; |
|
205
|
1
|
|
|
|
|
|
case 90: goto tr37; |
|
206
|
|
|
|
|
|
|
} |
|
207
|
0
|
0
|
|
|
|
|
if ( 43 <= (*p) && (*p) <= 45 ) |
|
|
|
0
|
|
|
|
|
|
|
208
|
0
|
|
|
|
|
|
goto tr34; |
|
209
|
0
|
|
|
|
|
|
goto st0; |
|
210
|
0
|
|
|
|
|
|
tr34: |
|
211
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
212
|
|
|
|
|
|
|
{ |
|
213
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
214
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
215
|
|
|
|
|
|
|
{p++; cs = 13; goto _out;} |
|
216
|
|
|
|
|
|
|
} |
|
217
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
218
|
|
|
|
|
|
|
} |
|
219
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
220
|
|
|
|
|
|
|
{ mark = p; } |
|
221
|
|
|
|
|
|
|
goto st13; |
|
222
|
|
|
|
|
|
|
tr39: |
|
223
|
|
|
|
|
|
|
#line 70 "ragel/tstr_common.rl" |
|
224
|
|
|
|
|
|
|
{ |
|
225
|
|
|
|
|
|
|
if (!tstr_token_parse_fraction(mark, p - mark, &v)) { |
|
226
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_FRACTION; |
|
227
|
|
|
|
|
|
|
{p++; cs = 13; goto _out;} |
|
228
|
|
|
|
|
|
|
} |
|
229
|
|
|
|
|
|
|
tstr_parsed_set_fraction(parsed, v); |
|
230
|
|
|
|
|
|
|
} |
|
231
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
232
|
|
|
|
|
|
|
{ mark = p; } |
|
233
|
|
|
|
|
|
|
goto st13; |
|
234
|
|
|
|
|
|
|
tr49: |
|
235
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
236
|
|
|
|
|
|
|
{ |
|
237
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
238
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
239
|
|
|
|
|
|
|
{p++; cs = 13; goto _out;} |
|
240
|
|
|
|
|
|
|
} |
|
241
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
242
|
|
|
|
|
|
|
} |
|
243
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
244
|
|
|
|
|
|
|
{ mark = p; } |
|
245
|
|
|
|
|
|
|
goto st13; |
|
246
|
|
|
|
|
|
|
tr53: |
|
247
|
|
|
|
|
|
|
#line 62 "ragel/tstr_common.rl" |
|
248
|
|
|
|
|
|
|
{ |
|
249
|
|
|
|
|
|
|
if (!tstr_token_parse_second(mark, p - mark, &v)) { |
|
250
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_SECOND; |
|
251
|
|
|
|
|
|
|
{p++; cs = 13; goto _out;} |
|
252
|
|
|
|
|
|
|
} |
|
253
|
|
|
|
|
|
|
tstr_parsed_set_second(parsed, v); |
|
254
|
|
|
|
|
|
|
} |
|
255
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
256
|
|
|
|
|
|
|
{ mark = p; } |
|
257
|
|
|
|
|
|
|
goto st13; |
|
258
|
|
|
|
|
|
|
st13: |
|
259
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
260
|
|
|
|
|
|
|
goto _test_eof13; |
|
261
|
|
|
|
|
|
|
case 13: |
|
262
|
|
|
|
|
|
|
#line 263 "tstr_cparse_iso8601.c" |
|
263
|
17
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
264
|
17
|
|
|
|
|
|
goto st14; |
|
265
|
0
|
|
|
|
|
|
goto st0; |
|
266
|
17
|
|
|
|
|
|
st14: |
|
267
|
17
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
268
|
0
|
|
|
|
|
|
goto _test_eof14; |
|
269
|
|
|
|
|
|
|
case 14: |
|
270
|
17
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
271
|
17
|
|
|
|
|
|
goto st34; |
|
272
|
0
|
|
|
|
|
|
goto st0; |
|
273
|
17
|
|
|
|
|
|
st34: |
|
274
|
17
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
275
|
3
|
|
|
|
|
|
goto _test_eof34; |
|
276
|
|
|
|
|
|
|
case 34: |
|
277
|
14
|
50
|
|
|
|
|
if ( (*p) == 58 ) |
|
278
|
14
|
|
|
|
|
|
goto st15; |
|
279
|
0
|
|
|
|
|
|
goto st0; |
|
280
|
14
|
|
|
|
|
|
st15: |
|
281
|
14
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
282
|
0
|
|
|
|
|
|
goto _test_eof15; |
|
283
|
|
|
|
|
|
|
case 15: |
|
284
|
14
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
285
|
14
|
|
|
|
|
|
goto st16; |
|
286
|
0
|
|
|
|
|
|
goto st0; |
|
287
|
22
|
|
|
|
|
|
st16: |
|
288
|
22
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
289
|
0
|
|
|
|
|
|
goto _test_eof16; |
|
290
|
|
|
|
|
|
|
case 16: |
|
291
|
22
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
292
|
22
|
|
|
|
|
|
goto st35; |
|
293
|
0
|
|
|
|
|
|
goto st0; |
|
294
|
22
|
|
|
|
|
|
st35: |
|
295
|
22
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
296
|
22
|
|
|
|
|
|
goto _test_eof35; |
|
297
|
|
|
|
|
|
|
case 35: |
|
298
|
0
|
|
|
|
|
|
goto st0; |
|
299
|
5
|
|
|
|
|
|
tr35: |
|
300
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
301
|
|
|
|
|
|
|
{ |
|
302
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
303
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
304
|
|
|
|
|
|
|
{p++; cs = 17; goto _out;} |
|
305
|
|
|
|
|
|
|
} |
|
306
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
307
|
|
|
|
|
|
|
} |
|
308
|
|
|
|
|
|
|
goto st17; |
|
309
|
|
|
|
|
|
|
tr50: |
|
310
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
311
|
|
|
|
|
|
|
{ |
|
312
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
313
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
314
|
|
|
|
|
|
|
{p++; cs = 17; goto _out;} |
|
315
|
|
|
|
|
|
|
} |
|
316
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
317
|
|
|
|
|
|
|
} |
|
318
|
|
|
|
|
|
|
goto st17; |
|
319
|
|
|
|
|
|
|
tr54: |
|
320
|
|
|
|
|
|
|
#line 62 "ragel/tstr_common.rl" |
|
321
|
|
|
|
|
|
|
{ |
|
322
|
|
|
|
|
|
|
if (!tstr_token_parse_second(mark, p - mark, &v)) { |
|
323
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_SECOND; |
|
324
|
|
|
|
|
|
|
{p++; cs = 17; goto _out;} |
|
325
|
|
|
|
|
|
|
} |
|
326
|
|
|
|
|
|
|
tstr_parsed_set_second(parsed, v); |
|
327
|
|
|
|
|
|
|
} |
|
328
|
|
|
|
|
|
|
goto st17; |
|
329
|
|
|
|
|
|
|
st17: |
|
330
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
331
|
|
|
|
|
|
|
goto _test_eof17; |
|
332
|
|
|
|
|
|
|
case 17: |
|
333
|
|
|
|
|
|
|
#line 334 "tstr_cparse_iso8601.c" |
|
334
|
32
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
335
|
32
|
|
|
|
|
|
goto tr18; |
|
336
|
0
|
|
|
|
|
|
goto st0; |
|
337
|
32
|
|
|
|
|
|
tr18: |
|
338
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
339
|
|
|
|
|
|
|
{ mark = p; } |
|
340
|
|
|
|
|
|
|
goto st36; |
|
341
|
|
|
|
|
|
|
st36: |
|
342
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
343
|
|
|
|
|
|
|
goto _test_eof36; |
|
344
|
|
|
|
|
|
|
case 36: |
|
345
|
|
|
|
|
|
|
#line 346 "tstr_cparse_iso8601.c" |
|
346
|
32
|
|
|
|
|
|
switch( (*p) ) { |
|
347
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
348
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
349
|
8
|
|
|
|
|
|
case 90: goto tr41; |
|
350
|
|
|
|
|
|
|
} |
|
351
|
24
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
352
|
24
|
|
|
|
|
|
goto st37; |
|
353
|
0
|
|
|
|
|
|
goto st0; |
|
354
|
24
|
|
|
|
|
|
st37: |
|
355
|
24
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
356
|
0
|
|
|
|
|
|
goto _test_eof37; |
|
357
|
|
|
|
|
|
|
case 37: |
|
358
|
24
|
|
|
|
|
|
switch( (*p) ) { |
|
359
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
360
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
361
|
5
|
|
|
|
|
|
case 90: goto tr41; |
|
362
|
|
|
|
|
|
|
} |
|
363
|
19
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
364
|
19
|
|
|
|
|
|
goto st38; |
|
365
|
0
|
|
|
|
|
|
goto st0; |
|
366
|
19
|
|
|
|
|
|
st38: |
|
367
|
19
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
368
|
0
|
|
|
|
|
|
goto _test_eof38; |
|
369
|
|
|
|
|
|
|
case 38: |
|
370
|
19
|
|
|
|
|
|
switch( (*p) ) { |
|
371
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
372
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
373
|
4
|
|
|
|
|
|
case 90: goto tr41; |
|
374
|
|
|
|
|
|
|
} |
|
375
|
15
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
376
|
15
|
|
|
|
|
|
goto st39; |
|
377
|
0
|
|
|
|
|
|
goto st0; |
|
378
|
15
|
|
|
|
|
|
st39: |
|
379
|
15
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
380
|
0
|
|
|
|
|
|
goto _test_eof39; |
|
381
|
|
|
|
|
|
|
case 39: |
|
382
|
15
|
|
|
|
|
|
switch( (*p) ) { |
|
383
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
384
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
385
|
1
|
|
|
|
|
|
case 90: goto tr41; |
|
386
|
|
|
|
|
|
|
} |
|
387
|
14
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
388
|
14
|
|
|
|
|
|
goto st40; |
|
389
|
0
|
|
|
|
|
|
goto st0; |
|
390
|
14
|
|
|
|
|
|
st40: |
|
391
|
14
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
392
|
0
|
|
|
|
|
|
goto _test_eof40; |
|
393
|
|
|
|
|
|
|
case 40: |
|
394
|
14
|
|
|
|
|
|
switch( (*p) ) { |
|
395
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
396
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
397
|
1
|
|
|
|
|
|
case 90: goto tr41; |
|
398
|
|
|
|
|
|
|
} |
|
399
|
13
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
400
|
13
|
|
|
|
|
|
goto st41; |
|
401
|
0
|
|
|
|
|
|
goto st0; |
|
402
|
13
|
|
|
|
|
|
st41: |
|
403
|
13
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
404
|
0
|
|
|
|
|
|
goto _test_eof41; |
|
405
|
|
|
|
|
|
|
case 41: |
|
406
|
13
|
|
|
|
|
|
switch( (*p) ) { |
|
407
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
408
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
409
|
2
|
|
|
|
|
|
case 90: goto tr41; |
|
410
|
|
|
|
|
|
|
} |
|
411
|
11
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
412
|
11
|
|
|
|
|
|
goto st42; |
|
413
|
0
|
|
|
|
|
|
goto st0; |
|
414
|
11
|
|
|
|
|
|
st42: |
|
415
|
11
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
416
|
0
|
|
|
|
|
|
goto _test_eof42; |
|
417
|
|
|
|
|
|
|
case 42: |
|
418
|
11
|
|
|
|
|
|
switch( (*p) ) { |
|
419
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
420
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
421
|
1
|
|
|
|
|
|
case 90: goto tr41; |
|
422
|
|
|
|
|
|
|
} |
|
423
|
10
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
424
|
10
|
|
|
|
|
|
goto st43; |
|
425
|
0
|
|
|
|
|
|
goto st0; |
|
426
|
10
|
|
|
|
|
|
st43: |
|
427
|
10
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
428
|
0
|
|
|
|
|
|
goto _test_eof43; |
|
429
|
|
|
|
|
|
|
case 43: |
|
430
|
10
|
|
|
|
|
|
switch( (*p) ) { |
|
431
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
432
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
433
|
1
|
|
|
|
|
|
case 90: goto tr41; |
|
434
|
|
|
|
|
|
|
} |
|
435
|
9
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
436
|
9
|
|
|
|
|
|
goto st44; |
|
437
|
0
|
|
|
|
|
|
goto st0; |
|
438
|
9
|
|
|
|
|
|
st44: |
|
439
|
9
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
440
|
0
|
|
|
|
|
|
goto _test_eof44; |
|
441
|
|
|
|
|
|
|
case 44: |
|
442
|
9
|
|
|
|
|
|
switch( (*p) ) { |
|
443
|
0
|
|
|
|
|
|
case 43: goto tr39; |
|
444
|
0
|
|
|
|
|
|
case 45: goto tr39; |
|
445
|
9
|
|
|
|
|
|
case 90: goto tr41; |
|
446
|
|
|
|
|
|
|
} |
|
447
|
0
|
|
|
|
|
|
goto st0; |
|
448
|
1
|
|
|
|
|
|
tr37: |
|
449
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
450
|
|
|
|
|
|
|
{ |
|
451
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
452
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
453
|
|
|
|
|
|
|
{p++; cs = 45; goto _out;} |
|
454
|
|
|
|
|
|
|
} |
|
455
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
456
|
|
|
|
|
|
|
} |
|
457
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
458
|
|
|
|
|
|
|
{ mark = p; } |
|
459
|
|
|
|
|
|
|
goto st45; |
|
460
|
|
|
|
|
|
|
tr41: |
|
461
|
|
|
|
|
|
|
#line 70 "ragel/tstr_common.rl" |
|
462
|
|
|
|
|
|
|
{ |
|
463
|
|
|
|
|
|
|
if (!tstr_token_parse_fraction(mark, p - mark, &v)) { |
|
464
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_FRACTION; |
|
465
|
|
|
|
|
|
|
{p++; cs = 45; goto _out;} |
|
466
|
|
|
|
|
|
|
} |
|
467
|
|
|
|
|
|
|
tstr_parsed_set_fraction(parsed, v); |
|
468
|
|
|
|
|
|
|
} |
|
469
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
470
|
|
|
|
|
|
|
{ mark = p; } |
|
471
|
|
|
|
|
|
|
goto st45; |
|
472
|
|
|
|
|
|
|
tr52: |
|
473
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
474
|
|
|
|
|
|
|
{ |
|
475
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
476
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
477
|
|
|
|
|
|
|
{p++; cs = 45; goto _out;} |
|
478
|
|
|
|
|
|
|
} |
|
479
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
480
|
|
|
|
|
|
|
} |
|
481
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
482
|
|
|
|
|
|
|
{ mark = p; } |
|
483
|
|
|
|
|
|
|
goto st45; |
|
484
|
|
|
|
|
|
|
tr55: |
|
485
|
|
|
|
|
|
|
#line 62 "ragel/tstr_common.rl" |
|
486
|
|
|
|
|
|
|
{ |
|
487
|
|
|
|
|
|
|
if (!tstr_token_parse_second(mark, p - mark, &v)) { |
|
488
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_SECOND; |
|
489
|
|
|
|
|
|
|
{p++; cs = 45; goto _out;} |
|
490
|
|
|
|
|
|
|
} |
|
491
|
|
|
|
|
|
|
tstr_parsed_set_second(parsed, v); |
|
492
|
|
|
|
|
|
|
} |
|
493
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
494
|
|
|
|
|
|
|
{ mark = p; } |
|
495
|
|
|
|
|
|
|
goto st45; |
|
496
|
|
|
|
|
|
|
st45: |
|
497
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
498
|
|
|
|
|
|
|
goto _test_eof45; |
|
499
|
|
|
|
|
|
|
case 45: |
|
500
|
|
|
|
|
|
|
#line 501 "tstr_cparse_iso8601.c" |
|
501
|
0
|
|
|
|
|
|
goto st0; |
|
502
|
50
|
|
|
|
|
|
tr36: |
|
503
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
504
|
|
|
|
|
|
|
{ |
|
505
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
506
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
507
|
|
|
|
|
|
|
{p++; cs = 18; goto _out;} |
|
508
|
|
|
|
|
|
|
} |
|
509
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
510
|
|
|
|
|
|
|
} |
|
511
|
|
|
|
|
|
|
goto st18; |
|
512
|
|
|
|
|
|
|
st18: |
|
513
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
514
|
|
|
|
|
|
|
goto _test_eof18; |
|
515
|
|
|
|
|
|
|
case 18: |
|
516
|
|
|
|
|
|
|
#line 517 "tstr_cparse_iso8601.c" |
|
517
|
50
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
518
|
50
|
|
|
|
|
|
goto tr19; |
|
519
|
0
|
|
|
|
|
|
goto st0; |
|
520
|
50
|
|
|
|
|
|
tr19: |
|
521
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
522
|
|
|
|
|
|
|
{ mark = p; } |
|
523
|
|
|
|
|
|
|
goto st19; |
|
524
|
|
|
|
|
|
|
st19: |
|
525
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
526
|
|
|
|
|
|
|
goto _test_eof19; |
|
527
|
|
|
|
|
|
|
case 19: |
|
528
|
|
|
|
|
|
|
#line 529 "tstr_cparse_iso8601.c" |
|
529
|
50
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
530
|
50
|
|
|
|
|
|
goto st46; |
|
531
|
0
|
|
|
|
|
|
goto st0; |
|
532
|
50
|
|
|
|
|
|
st46: |
|
533
|
50
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
534
|
1
|
|
|
|
|
|
goto _test_eof46; |
|
535
|
|
|
|
|
|
|
case 46: |
|
536
|
49
|
|
|
|
|
|
switch( (*p) ) { |
|
537
|
0
|
|
|
|
|
|
case 44: goto tr50; |
|
538
|
4
|
|
|
|
|
|
case 46: goto tr50; |
|
539
|
44
|
|
|
|
|
|
case 58: goto tr51; |
|
540
|
1
|
|
|
|
|
|
case 90: goto tr52; |
|
541
|
|
|
|
|
|
|
} |
|
542
|
0
|
0
|
|
|
|
|
if ( 43 <= (*p) && (*p) <= 45 ) |
|
|
|
0
|
|
|
|
|
|
|
543
|
0
|
|
|
|
|
|
goto tr49; |
|
544
|
0
|
|
|
|
|
|
goto st0; |
|
545
|
44
|
|
|
|
|
|
tr51: |
|
546
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
547
|
|
|
|
|
|
|
{ |
|
548
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
549
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
550
|
|
|
|
|
|
|
{p++; cs = 20; goto _out;} |
|
551
|
|
|
|
|
|
|
} |
|
552
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
553
|
|
|
|
|
|
|
} |
|
554
|
|
|
|
|
|
|
goto st20; |
|
555
|
|
|
|
|
|
|
st20: |
|
556
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
557
|
|
|
|
|
|
|
goto _test_eof20; |
|
558
|
|
|
|
|
|
|
case 20: |
|
559
|
|
|
|
|
|
|
#line 560 "tstr_cparse_iso8601.c" |
|
560
|
44
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
561
|
44
|
|
|
|
|
|
goto tr21; |
|
562
|
0
|
|
|
|
|
|
goto st0; |
|
563
|
44
|
|
|
|
|
|
tr21: |
|
564
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
565
|
|
|
|
|
|
|
{ mark = p; } |
|
566
|
|
|
|
|
|
|
goto st21; |
|
567
|
|
|
|
|
|
|
st21: |
|
568
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
569
|
|
|
|
|
|
|
goto _test_eof21; |
|
570
|
|
|
|
|
|
|
case 21: |
|
571
|
|
|
|
|
|
|
#line 572 "tstr_cparse_iso8601.c" |
|
572
|
44
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
573
|
44
|
|
|
|
|
|
goto st47; |
|
574
|
0
|
|
|
|
|
|
goto st0; |
|
575
|
44
|
|
|
|
|
|
st47: |
|
576
|
44
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
577
|
1
|
|
|
|
|
|
goto _test_eof47; |
|
578
|
|
|
|
|
|
|
case 47: |
|
579
|
43
|
|
|
|
|
|
switch( (*p) ) { |
|
580
|
1
|
|
|
|
|
|
case 44: goto tr54; |
|
581
|
22
|
|
|
|
|
|
case 46: goto tr54; |
|
582
|
3
|
|
|
|
|
|
case 90: goto tr55; |
|
583
|
|
|
|
|
|
|
} |
|
584
|
17
|
50
|
|
|
|
|
if ( 43 <= (*p) && (*p) <= 45 ) |
|
|
|
50
|
|
|
|
|
|
|
585
|
17
|
|
|
|
|
|
goto tr53; |
|
586
|
0
|
|
|
|
|
|
goto st0; |
|
587
|
27
|
|
|
|
|
|
tr6: |
|
588
|
|
|
|
|
|
|
#line 6 "ragel/tstr_common.rl" |
|
589
|
|
|
|
|
|
|
{ |
|
590
|
|
|
|
|
|
|
if (!tstr_token_parse_year(mark, p - mark, &v)) { |
|
591
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_YEAR; |
|
592
|
|
|
|
|
|
|
{p++; cs = 22; goto _out;} |
|
593
|
|
|
|
|
|
|
} |
|
594
|
|
|
|
|
|
|
tstr_parsed_set_year4(parsed, v); |
|
595
|
|
|
|
|
|
|
} |
|
596
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
597
|
|
|
|
|
|
|
{ mark = p; } |
|
598
|
|
|
|
|
|
|
goto st22; |
|
599
|
|
|
|
|
|
|
st22: |
|
600
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
601
|
|
|
|
|
|
|
goto _test_eof22; |
|
602
|
|
|
|
|
|
|
case 22: |
|
603
|
|
|
|
|
|
|
#line 604 "tstr_cparse_iso8601.c" |
|
604
|
27
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
605
|
27
|
|
|
|
|
|
goto st23; |
|
606
|
0
|
|
|
|
|
|
goto st0; |
|
607
|
27
|
|
|
|
|
|
st23: |
|
608
|
27
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
609
|
0
|
|
|
|
|
|
goto _test_eof23; |
|
610
|
|
|
|
|
|
|
case 23: |
|
611
|
27
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
612
|
27
|
|
|
|
|
|
goto tr24; |
|
613
|
0
|
|
|
|
|
|
goto st0; |
|
614
|
27
|
|
|
|
|
|
tr24: |
|
615
|
|
|
|
|
|
|
#line 22 "ragel/tstr_common.rl" |
|
616
|
|
|
|
|
|
|
{ |
|
617
|
|
|
|
|
|
|
if (!tstr_token_parse_month(mark, p - mark, &v)) { |
|
618
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MONTH; |
|
619
|
|
|
|
|
|
|
{p++; cs = 24; goto _out;} |
|
620
|
|
|
|
|
|
|
} |
|
621
|
|
|
|
|
|
|
tstr_parsed_set_month(parsed, v); |
|
622
|
|
|
|
|
|
|
} |
|
623
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
624
|
|
|
|
|
|
|
{ mark = p; } |
|
625
|
|
|
|
|
|
|
goto st24; |
|
626
|
|
|
|
|
|
|
st24: |
|
627
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
628
|
|
|
|
|
|
|
goto _test_eof24; |
|
629
|
|
|
|
|
|
|
case 24: |
|
630
|
|
|
|
|
|
|
#line 631 "tstr_cparse_iso8601.c" |
|
631
|
27
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
632
|
27
|
|
|
|
|
|
goto st48; |
|
633
|
0
|
|
|
|
|
|
goto st0; |
|
634
|
27
|
|
|
|
|
|
st48: |
|
635
|
27
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
636
|
3
|
|
|
|
|
|
goto _test_eof48; |
|
637
|
|
|
|
|
|
|
case 48: |
|
638
|
24
|
50
|
|
|
|
|
if ( (*p) == 84 ) |
|
639
|
24
|
|
|
|
|
|
goto tr56; |
|
640
|
0
|
|
|
|
|
|
goto st0; |
|
641
|
24
|
|
|
|
|
|
tr56: |
|
642
|
|
|
|
|
|
|
#line 30 "ragel/tstr_common.rl" |
|
643
|
|
|
|
|
|
|
{ |
|
644
|
|
|
|
|
|
|
if (!tstr_token_parse_day(mark, p - mark, &v)) { |
|
645
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_DAY; |
|
646
|
|
|
|
|
|
|
{p++; cs = 25; goto _out;} |
|
647
|
|
|
|
|
|
|
} |
|
648
|
|
|
|
|
|
|
tstr_parsed_set_day(parsed, v); |
|
649
|
|
|
|
|
|
|
} |
|
650
|
|
|
|
|
|
|
goto st25; |
|
651
|
|
|
|
|
|
|
st25: |
|
652
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
653
|
|
|
|
|
|
|
goto _test_eof25; |
|
654
|
|
|
|
|
|
|
case 25: |
|
655
|
|
|
|
|
|
|
#line 656 "tstr_cparse_iso8601.c" |
|
656
|
24
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
657
|
24
|
|
|
|
|
|
goto tr26; |
|
658
|
0
|
|
|
|
|
|
goto st0; |
|
659
|
24
|
|
|
|
|
|
tr26: |
|
660
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
661
|
|
|
|
|
|
|
{ mark = p; } |
|
662
|
|
|
|
|
|
|
goto st26; |
|
663
|
|
|
|
|
|
|
st26: |
|
664
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
665
|
|
|
|
|
|
|
goto _test_eof26; |
|
666
|
|
|
|
|
|
|
case 26: |
|
667
|
|
|
|
|
|
|
#line 668 "tstr_cparse_iso8601.c" |
|
668
|
24
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
669
|
24
|
|
|
|
|
|
goto st49; |
|
670
|
0
|
|
|
|
|
|
goto st0; |
|
671
|
24
|
|
|
|
|
|
st49: |
|
672
|
24
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
673
|
1
|
|
|
|
|
|
goto _test_eof49; |
|
674
|
|
|
|
|
|
|
case 49: |
|
675
|
23
|
|
|
|
|
|
switch( (*p) ) { |
|
676
|
0
|
|
|
|
|
|
case 44: goto tr58; |
|
677
|
2
|
|
|
|
|
|
case 46: goto tr58; |
|
678
|
0
|
|
|
|
|
|
case 90: goto tr37; |
|
679
|
|
|
|
|
|
|
} |
|
680
|
21
|
50
|
|
|
|
|
if ( (*p) > 45 ) { |
|
681
|
21
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
682
|
21
|
|
|
|
|
|
goto tr59; |
|
683
|
0
|
0
|
|
|
|
|
} else if ( (*p) >= 43 ) |
|
684
|
0
|
|
|
|
|
|
goto tr57; |
|
685
|
0
|
|
|
|
|
|
goto st0; |
|
686
|
0
|
|
|
|
|
|
tr57: |
|
687
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
688
|
|
|
|
|
|
|
{ |
|
689
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
690
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
691
|
|
|
|
|
|
|
{p++; cs = 27; goto _out;} |
|
692
|
|
|
|
|
|
|
} |
|
693
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
694
|
|
|
|
|
|
|
} |
|
695
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
696
|
|
|
|
|
|
|
{ mark = p; } |
|
697
|
|
|
|
|
|
|
goto st27; |
|
698
|
|
|
|
|
|
|
tr60: |
|
699
|
|
|
|
|
|
|
#line 70 "ragel/tstr_common.rl" |
|
700
|
|
|
|
|
|
|
{ |
|
701
|
|
|
|
|
|
|
if (!tstr_token_parse_fraction(mark, p - mark, &v)) { |
|
702
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_FRACTION; |
|
703
|
|
|
|
|
|
|
{p++; cs = 27; goto _out;} |
|
704
|
|
|
|
|
|
|
} |
|
705
|
|
|
|
|
|
|
tstr_parsed_set_fraction(parsed, v); |
|
706
|
|
|
|
|
|
|
} |
|
707
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
708
|
|
|
|
|
|
|
{ mark = p; } |
|
709
|
|
|
|
|
|
|
goto st27; |
|
710
|
|
|
|
|
|
|
tr69: |
|
711
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
712
|
|
|
|
|
|
|
{ |
|
713
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
714
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
715
|
|
|
|
|
|
|
{p++; cs = 27; goto _out;} |
|
716
|
|
|
|
|
|
|
} |
|
717
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
718
|
|
|
|
|
|
|
} |
|
719
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
720
|
|
|
|
|
|
|
{ mark = p; } |
|
721
|
|
|
|
|
|
|
goto st27; |
|
722
|
|
|
|
|
|
|
tr72: |
|
723
|
|
|
|
|
|
|
#line 62 "ragel/tstr_common.rl" |
|
724
|
|
|
|
|
|
|
{ |
|
725
|
|
|
|
|
|
|
if (!tstr_token_parse_second(mark, p - mark, &v)) { |
|
726
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_SECOND; |
|
727
|
|
|
|
|
|
|
{p++; cs = 27; goto _out;} |
|
728
|
|
|
|
|
|
|
} |
|
729
|
|
|
|
|
|
|
tstr_parsed_set_second(parsed, v); |
|
730
|
|
|
|
|
|
|
} |
|
731
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
732
|
|
|
|
|
|
|
{ mark = p; } |
|
733
|
|
|
|
|
|
|
goto st27; |
|
734
|
|
|
|
|
|
|
st27: |
|
735
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
736
|
|
|
|
|
|
|
goto _test_eof27; |
|
737
|
|
|
|
|
|
|
case 27: |
|
738
|
|
|
|
|
|
|
#line 739 "tstr_cparse_iso8601.c" |
|
739
|
11
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
740
|
11
|
|
|
|
|
|
goto st28; |
|
741
|
0
|
|
|
|
|
|
goto st0; |
|
742
|
11
|
|
|
|
|
|
st28: |
|
743
|
11
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
744
|
0
|
|
|
|
|
|
goto _test_eof28; |
|
745
|
|
|
|
|
|
|
case 28: |
|
746
|
11
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
747
|
11
|
|
|
|
|
|
goto st50; |
|
748
|
0
|
|
|
|
|
|
goto st0; |
|
749
|
11
|
|
|
|
|
|
st50: |
|
750
|
11
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
751
|
3
|
|
|
|
|
|
goto _test_eof50; |
|
752
|
|
|
|
|
|
|
case 50: |
|
753
|
8
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
754
|
8
|
|
|
|
|
|
goto st16; |
|
755
|
0
|
|
|
|
|
|
goto st0; |
|
756
|
2
|
|
|
|
|
|
tr58: |
|
757
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
758
|
|
|
|
|
|
|
{ |
|
759
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
760
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
761
|
|
|
|
|
|
|
{p++; cs = 29; goto _out;} |
|
762
|
|
|
|
|
|
|
} |
|
763
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
764
|
|
|
|
|
|
|
} |
|
765
|
|
|
|
|
|
|
goto st29; |
|
766
|
|
|
|
|
|
|
tr70: |
|
767
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
768
|
|
|
|
|
|
|
{ |
|
769
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
770
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
771
|
|
|
|
|
|
|
{p++; cs = 29; goto _out;} |
|
772
|
|
|
|
|
|
|
} |
|
773
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
774
|
|
|
|
|
|
|
} |
|
775
|
|
|
|
|
|
|
goto st29; |
|
776
|
|
|
|
|
|
|
tr73: |
|
777
|
|
|
|
|
|
|
#line 62 "ragel/tstr_common.rl" |
|
778
|
|
|
|
|
|
|
{ |
|
779
|
|
|
|
|
|
|
if (!tstr_token_parse_second(mark, p - mark, &v)) { |
|
780
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_SECOND; |
|
781
|
|
|
|
|
|
|
{p++; cs = 29; goto _out;} |
|
782
|
|
|
|
|
|
|
} |
|
783
|
|
|
|
|
|
|
tstr_parsed_set_second(parsed, v); |
|
784
|
|
|
|
|
|
|
} |
|
785
|
|
|
|
|
|
|
goto st29; |
|
786
|
|
|
|
|
|
|
st29: |
|
787
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
788
|
|
|
|
|
|
|
goto _test_eof29; |
|
789
|
|
|
|
|
|
|
case 29: |
|
790
|
|
|
|
|
|
|
#line 791 "tstr_cparse_iso8601.c" |
|
791
|
7
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
792
|
7
|
|
|
|
|
|
goto tr30; |
|
793
|
0
|
|
|
|
|
|
goto st0; |
|
794
|
7
|
|
|
|
|
|
tr30: |
|
795
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
796
|
|
|
|
|
|
|
{ mark = p; } |
|
797
|
|
|
|
|
|
|
goto st51; |
|
798
|
|
|
|
|
|
|
st51: |
|
799
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
800
|
|
|
|
|
|
|
goto _test_eof51; |
|
801
|
|
|
|
|
|
|
case 51: |
|
802
|
|
|
|
|
|
|
#line 803 "tstr_cparse_iso8601.c" |
|
803
|
7
|
|
|
|
|
|
switch( (*p) ) { |
|
804
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
805
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
806
|
2
|
|
|
|
|
|
case 90: goto tr41; |
|
807
|
|
|
|
|
|
|
} |
|
808
|
5
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
809
|
5
|
|
|
|
|
|
goto st52; |
|
810
|
0
|
|
|
|
|
|
goto st0; |
|
811
|
5
|
|
|
|
|
|
st52: |
|
812
|
5
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
813
|
0
|
|
|
|
|
|
goto _test_eof52; |
|
814
|
|
|
|
|
|
|
case 52: |
|
815
|
5
|
|
|
|
|
|
switch( (*p) ) { |
|
816
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
817
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
818
|
2
|
|
|
|
|
|
case 90: goto tr41; |
|
819
|
|
|
|
|
|
|
} |
|
820
|
3
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
821
|
3
|
|
|
|
|
|
goto st53; |
|
822
|
0
|
|
|
|
|
|
goto st0; |
|
823
|
3
|
|
|
|
|
|
st53: |
|
824
|
3
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
825
|
0
|
|
|
|
|
|
goto _test_eof53; |
|
826
|
|
|
|
|
|
|
case 53: |
|
827
|
3
|
|
|
|
|
|
switch( (*p) ) { |
|
828
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
829
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
830
|
2
|
|
|
|
|
|
case 90: goto tr41; |
|
831
|
|
|
|
|
|
|
} |
|
832
|
1
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
833
|
1
|
|
|
|
|
|
goto st54; |
|
834
|
0
|
|
|
|
|
|
goto st0; |
|
835
|
1
|
|
|
|
|
|
st54: |
|
836
|
1
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
837
|
0
|
|
|
|
|
|
goto _test_eof54; |
|
838
|
|
|
|
|
|
|
case 54: |
|
839
|
1
|
|
|
|
|
|
switch( (*p) ) { |
|
840
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
841
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
842
|
0
|
|
|
|
|
|
case 90: goto tr41; |
|
843
|
|
|
|
|
|
|
} |
|
844
|
1
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
845
|
1
|
|
|
|
|
|
goto st55; |
|
846
|
0
|
|
|
|
|
|
goto st0; |
|
847
|
1
|
|
|
|
|
|
st55: |
|
848
|
1
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
849
|
0
|
|
|
|
|
|
goto _test_eof55; |
|
850
|
|
|
|
|
|
|
case 55: |
|
851
|
1
|
|
|
|
|
|
switch( (*p) ) { |
|
852
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
853
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
854
|
0
|
|
|
|
|
|
case 90: goto tr41; |
|
855
|
|
|
|
|
|
|
} |
|
856
|
1
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
857
|
1
|
|
|
|
|
|
goto st56; |
|
858
|
0
|
|
|
|
|
|
goto st0; |
|
859
|
1
|
|
|
|
|
|
st56: |
|
860
|
1
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
861
|
0
|
|
|
|
|
|
goto _test_eof56; |
|
862
|
|
|
|
|
|
|
case 56: |
|
863
|
1
|
|
|
|
|
|
switch( (*p) ) { |
|
864
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
865
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
866
|
0
|
|
|
|
|
|
case 90: goto tr41; |
|
867
|
|
|
|
|
|
|
} |
|
868
|
1
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
869
|
1
|
|
|
|
|
|
goto st57; |
|
870
|
0
|
|
|
|
|
|
goto st0; |
|
871
|
1
|
|
|
|
|
|
st57: |
|
872
|
1
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
873
|
0
|
|
|
|
|
|
goto _test_eof57; |
|
874
|
|
|
|
|
|
|
case 57: |
|
875
|
1
|
|
|
|
|
|
switch( (*p) ) { |
|
876
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
877
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
878
|
0
|
|
|
|
|
|
case 90: goto tr41; |
|
879
|
|
|
|
|
|
|
} |
|
880
|
1
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
881
|
1
|
|
|
|
|
|
goto st58; |
|
882
|
0
|
|
|
|
|
|
goto st0; |
|
883
|
1
|
|
|
|
|
|
st58: |
|
884
|
1
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
885
|
0
|
|
|
|
|
|
goto _test_eof58; |
|
886
|
|
|
|
|
|
|
case 58: |
|
887
|
1
|
|
|
|
|
|
switch( (*p) ) { |
|
888
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
889
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
890
|
0
|
|
|
|
|
|
case 90: goto tr41; |
|
891
|
|
|
|
|
|
|
} |
|
892
|
1
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
893
|
1
|
|
|
|
|
|
goto st59; |
|
894
|
0
|
|
|
|
|
|
goto st0; |
|
895
|
1
|
|
|
|
|
|
st59: |
|
896
|
1
|
50
|
|
|
|
|
if ( ++p == pe ) |
|
897
|
0
|
|
|
|
|
|
goto _test_eof59; |
|
898
|
|
|
|
|
|
|
case 59: |
|
899
|
1
|
|
|
|
|
|
switch( (*p) ) { |
|
900
|
0
|
|
|
|
|
|
case 43: goto tr60; |
|
901
|
0
|
|
|
|
|
|
case 45: goto tr60; |
|
902
|
1
|
|
|
|
|
|
case 90: goto tr41; |
|
903
|
|
|
|
|
|
|
} |
|
904
|
0
|
|
|
|
|
|
goto st0; |
|
905
|
21
|
|
|
|
|
|
tr59: |
|
906
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
907
|
|
|
|
|
|
|
{ |
|
908
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
909
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
910
|
|
|
|
|
|
|
{p++; cs = 30; goto _out;} |
|
911
|
|
|
|
|
|
|
} |
|
912
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
913
|
|
|
|
|
|
|
} |
|
914
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
915
|
|
|
|
|
|
|
{ mark = p; } |
|
916
|
|
|
|
|
|
|
goto st30; |
|
917
|
|
|
|
|
|
|
st30: |
|
918
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
919
|
|
|
|
|
|
|
goto _test_eof30; |
|
920
|
|
|
|
|
|
|
case 30: |
|
921
|
|
|
|
|
|
|
#line 922 "tstr_cparse_iso8601.c" |
|
922
|
21
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
923
|
21
|
|
|
|
|
|
goto st60; |
|
924
|
0
|
|
|
|
|
|
goto st0; |
|
925
|
21
|
|
|
|
|
|
st60: |
|
926
|
21
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
927
|
1
|
|
|
|
|
|
goto _test_eof60; |
|
928
|
|
|
|
|
|
|
case 60: |
|
929
|
20
|
|
|
|
|
|
switch( (*p) ) { |
|
930
|
0
|
|
|
|
|
|
case 44: goto tr70; |
|
931
|
2
|
|
|
|
|
|
case 46: goto tr70; |
|
932
|
0
|
|
|
|
|
|
case 90: goto tr52; |
|
933
|
|
|
|
|
|
|
} |
|
934
|
18
|
50
|
|
|
|
|
if ( (*p) > 45 ) { |
|
935
|
18
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
936
|
18
|
|
|
|
|
|
goto tr71; |
|
937
|
0
|
0
|
|
|
|
|
} else if ( (*p) >= 43 ) |
|
938
|
0
|
|
|
|
|
|
goto tr69; |
|
939
|
0
|
|
|
|
|
|
goto st0; |
|
940
|
18
|
|
|
|
|
|
tr71: |
|
941
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
942
|
|
|
|
|
|
|
{ |
|
943
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
944
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
945
|
|
|
|
|
|
|
{p++; cs = 31; goto _out;} |
|
946
|
|
|
|
|
|
|
} |
|
947
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
948
|
|
|
|
|
|
|
} |
|
949
|
|
|
|
|
|
|
#line 4 "ragel/tstr_common.rl" |
|
950
|
|
|
|
|
|
|
{ mark = p; } |
|
951
|
|
|
|
|
|
|
goto st31; |
|
952
|
|
|
|
|
|
|
st31: |
|
953
|
|
|
|
|
|
|
if ( ++p == pe ) |
|
954
|
|
|
|
|
|
|
goto _test_eof31; |
|
955
|
|
|
|
|
|
|
case 31: |
|
956
|
|
|
|
|
|
|
#line 957 "tstr_cparse_iso8601.c" |
|
957
|
18
|
50
|
|
|
|
|
if ( 48 <= (*p) && (*p) <= 57 ) |
|
|
|
50
|
|
|
|
|
|
|
958
|
18
|
|
|
|
|
|
goto st61; |
|
959
|
0
|
|
|
|
|
|
goto st0; |
|
960
|
18
|
|
|
|
|
|
st61: |
|
961
|
18
|
100
|
|
|
|
|
if ( ++p == pe ) |
|
962
|
1
|
|
|
|
|
|
goto _test_eof61; |
|
963
|
|
|
|
|
|
|
case 61: |
|
964
|
17
|
|
|
|
|
|
switch( (*p) ) { |
|
965
|
1
|
|
|
|
|
|
case 44: goto tr73; |
|
966
|
2
|
|
|
|
|
|
case 46: goto tr73; |
|
967
|
3
|
|
|
|
|
|
case 90: goto tr55; |
|
968
|
|
|
|
|
|
|
} |
|
969
|
11
|
50
|
|
|
|
|
if ( 43 <= (*p) && (*p) <= 45 ) |
|
|
|
50
|
|
|
|
|
|
|
970
|
11
|
|
|
|
|
|
goto tr72; |
|
971
|
0
|
|
|
|
|
|
goto st0; |
|
972
|
|
|
|
|
|
|
} |
|
973
|
0
|
|
|
|
|
|
_test_eof2: cs = 2; goto _test_eof; |
|
974
|
0
|
|
|
|
|
|
_test_eof3: cs = 3; goto _test_eof; |
|
975
|
0
|
|
|
|
|
|
_test_eof4: cs = 4; goto _test_eof; |
|
976
|
0
|
|
|
|
|
|
_test_eof5: cs = 5; goto _test_eof; |
|
977
|
0
|
|
|
|
|
|
_test_eof6: cs = 6; goto _test_eof; |
|
978
|
0
|
|
|
|
|
|
_test_eof7: cs = 7; goto _test_eof; |
|
979
|
0
|
|
|
|
|
|
_test_eof8: cs = 8; goto _test_eof; |
|
980
|
0
|
|
|
|
|
|
_test_eof9: cs = 9; goto _test_eof; |
|
981
|
0
|
|
|
|
|
|
_test_eof10: cs = 10; goto _test_eof; |
|
982
|
3
|
|
|
|
|
|
_test_eof32: cs = 32; goto _test_eof; |
|
983
|
0
|
|
|
|
|
|
_test_eof11: cs = 11; goto _test_eof; |
|
984
|
0
|
|
|
|
|
|
_test_eof12: cs = 12; goto _test_eof; |
|
985
|
1
|
|
|
|
|
|
_test_eof33: cs = 33; goto _test_eof; |
|
986
|
0
|
|
|
|
|
|
_test_eof13: cs = 13; goto _test_eof; |
|
987
|
0
|
|
|
|
|
|
_test_eof14: cs = 14; goto _test_eof; |
|
988
|
3
|
|
|
|
|
|
_test_eof34: cs = 34; goto _test_eof; |
|
989
|
0
|
|
|
|
|
|
_test_eof15: cs = 15; goto _test_eof; |
|
990
|
0
|
|
|
|
|
|
_test_eof16: cs = 16; goto _test_eof; |
|
991
|
22
|
|
|
|
|
|
_test_eof35: cs = 35; goto _test_eof; |
|
992
|
0
|
|
|
|
|
|
_test_eof17: cs = 17; goto _test_eof; |
|
993
|
0
|
|
|
|
|
|
_test_eof36: cs = 36; goto _test_eof; |
|
994
|
0
|
|
|
|
|
|
_test_eof37: cs = 37; goto _test_eof; |
|
995
|
0
|
|
|
|
|
|
_test_eof38: cs = 38; goto _test_eof; |
|
996
|
0
|
|
|
|
|
|
_test_eof39: cs = 39; goto _test_eof; |
|
997
|
0
|
|
|
|
|
|
_test_eof40: cs = 40; goto _test_eof; |
|
998
|
0
|
|
|
|
|
|
_test_eof41: cs = 41; goto _test_eof; |
|
999
|
0
|
|
|
|
|
|
_test_eof42: cs = 42; goto _test_eof; |
|
1000
|
0
|
|
|
|
|
|
_test_eof43: cs = 43; goto _test_eof; |
|
1001
|
0
|
|
|
|
|
|
_test_eof44: cs = 44; goto _test_eof; |
|
1002
|
47
|
|
|
|
|
|
_test_eof45: cs = 45; goto _test_eof; |
|
1003
|
0
|
|
|
|
|
|
_test_eof18: cs = 18; goto _test_eof; |
|
1004
|
0
|
|
|
|
|
|
_test_eof19: cs = 19; goto _test_eof; |
|
1005
|
1
|
|
|
|
|
|
_test_eof46: cs = 46; goto _test_eof; |
|
1006
|
0
|
|
|
|
|
|
_test_eof20: cs = 20; goto _test_eof; |
|
1007
|
0
|
|
|
|
|
|
_test_eof21: cs = 21; goto _test_eof; |
|
1008
|
1
|
|
|
|
|
|
_test_eof47: cs = 47; goto _test_eof; |
|
1009
|
0
|
|
|
|
|
|
_test_eof22: cs = 22; goto _test_eof; |
|
1010
|
0
|
|
|
|
|
|
_test_eof23: cs = 23; goto _test_eof; |
|
1011
|
0
|
|
|
|
|
|
_test_eof24: cs = 24; goto _test_eof; |
|
1012
|
3
|
|
|
|
|
|
_test_eof48: cs = 48; goto _test_eof; |
|
1013
|
0
|
|
|
|
|
|
_test_eof25: cs = 25; goto _test_eof; |
|
1014
|
0
|
|
|
|
|
|
_test_eof26: cs = 26; goto _test_eof; |
|
1015
|
1
|
|
|
|
|
|
_test_eof49: cs = 49; goto _test_eof; |
|
1016
|
0
|
|
|
|
|
|
_test_eof27: cs = 27; goto _test_eof; |
|
1017
|
0
|
|
|
|
|
|
_test_eof28: cs = 28; goto _test_eof; |
|
1018
|
3
|
|
|
|
|
|
_test_eof50: cs = 50; goto _test_eof; |
|
1019
|
0
|
|
|
|
|
|
_test_eof29: cs = 29; goto _test_eof; |
|
1020
|
0
|
|
|
|
|
|
_test_eof51: cs = 51; goto _test_eof; |
|
1021
|
0
|
|
|
|
|
|
_test_eof52: cs = 52; goto _test_eof; |
|
1022
|
0
|
|
|
|
|
|
_test_eof53: cs = 53; goto _test_eof; |
|
1023
|
0
|
|
|
|
|
|
_test_eof54: cs = 54; goto _test_eof; |
|
1024
|
0
|
|
|
|
|
|
_test_eof55: cs = 55; goto _test_eof; |
|
1025
|
0
|
|
|
|
|
|
_test_eof56: cs = 56; goto _test_eof; |
|
1026
|
0
|
|
|
|
|
|
_test_eof57: cs = 57; goto _test_eof; |
|
1027
|
0
|
|
|
|
|
|
_test_eof58: cs = 58; goto _test_eof; |
|
1028
|
0
|
|
|
|
|
|
_test_eof59: cs = 59; goto _test_eof; |
|
1029
|
0
|
|
|
|
|
|
_test_eof30: cs = 30; goto _test_eof; |
|
1030
|
1
|
|
|
|
|
|
_test_eof60: cs = 60; goto _test_eof; |
|
1031
|
0
|
|
|
|
|
|
_test_eof31: cs = 31; goto _test_eof; |
|
1032
|
1
|
|
|
|
|
|
_test_eof61: cs = 61; goto _test_eof; |
|
1033
|
|
|
|
|
|
|
|
|
1034
|
87
|
|
|
|
|
|
_test_eof: {} |
|
1035
|
87
|
50
|
|
|
|
|
if ( p == eof ) |
|
1036
|
|
|
|
|
|
|
{ |
|
1037
|
87
|
|
|
|
|
|
switch ( cs ) { |
|
1038
|
6
|
|
|
|
|
|
case 32: |
|
1039
|
|
|
|
|
|
|
case 48: |
|
1040
|
|
|
|
|
|
|
#line 30 "ragel/tstr_common.rl" |
|
1041
|
|
|
|
|
|
|
{ |
|
1042
|
|
|
|
|
|
|
if (!tstr_token_parse_day(mark, p - mark, &v)) { |
|
1043
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_DAY; |
|
1044
|
|
|
|
|
|
|
{p++; cs = 0; goto _out;} |
|
1045
|
|
|
|
|
|
|
} |
|
1046
|
|
|
|
|
|
|
tstr_parsed_set_day(parsed, v); |
|
1047
|
|
|
|
|
|
|
} |
|
1048
|
|
|
|
|
|
|
break; |
|
1049
|
|
|
|
|
|
|
case 33: |
|
1050
|
|
|
|
|
|
|
case 49: |
|
1051
|
|
|
|
|
|
|
#line 46 "ragel/tstr_common.rl" |
|
1052
|
|
|
|
|
|
|
{ |
|
1053
|
|
|
|
|
|
|
if (!tstr_token_parse_hour(mark, p - mark, &v)) { |
|
1054
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_HOUR; |
|
1055
|
|
|
|
|
|
|
{p++; cs = 0; goto _out;} |
|
1056
|
|
|
|
|
|
|
} |
|
1057
|
|
|
|
|
|
|
tstr_parsed_set_hour(parsed, v); |
|
1058
|
|
|
|
|
|
|
} |
|
1059
|
|
|
|
|
|
|
break; |
|
1060
|
|
|
|
|
|
|
case 46: |
|
1061
|
|
|
|
|
|
|
case 60: |
|
1062
|
|
|
|
|
|
|
#line 54 "ragel/tstr_common.rl" |
|
1063
|
|
|
|
|
|
|
{ |
|
1064
|
|
|
|
|
|
|
if (!tstr_token_parse_minute(mark, p - mark, &v)) { |
|
1065
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_MINUTE; |
|
1066
|
|
|
|
|
|
|
{p++; cs = 0; goto _out;} |
|
1067
|
|
|
|
|
|
|
} |
|
1068
|
|
|
|
|
|
|
tstr_parsed_set_minute(parsed, v); |
|
1069
|
|
|
|
|
|
|
} |
|
1070
|
|
|
|
|
|
|
break; |
|
1071
|
|
|
|
|
|
|
case 47: |
|
1072
|
|
|
|
|
|
|
case 61: |
|
1073
|
|
|
|
|
|
|
#line 62 "ragel/tstr_common.rl" |
|
1074
|
|
|
|
|
|
|
{ |
|
1075
|
|
|
|
|
|
|
if (!tstr_token_parse_second(mark, p - mark, &v)) { |
|
1076
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_SECOND; |
|
1077
|
|
|
|
|
|
|
{p++; cs = 0; goto _out;} |
|
1078
|
|
|
|
|
|
|
} |
|
1079
|
|
|
|
|
|
|
tstr_parsed_set_second(parsed, v); |
|
1080
|
|
|
|
|
|
|
} |
|
1081
|
|
|
|
|
|
|
break; |
|
1082
|
|
|
|
|
|
|
case 36: |
|
1083
|
|
|
|
|
|
|
case 37: |
|
1084
|
|
|
|
|
|
|
case 38: |
|
1085
|
|
|
|
|
|
|
case 39: |
|
1086
|
|
|
|
|
|
|
case 40: |
|
1087
|
|
|
|
|
|
|
case 41: |
|
1088
|
|
|
|
|
|
|
case 42: |
|
1089
|
|
|
|
|
|
|
case 43: |
|
1090
|
|
|
|
|
|
|
case 44: |
|
1091
|
|
|
|
|
|
|
case 51: |
|
1092
|
|
|
|
|
|
|
case 52: |
|
1093
|
|
|
|
|
|
|
case 53: |
|
1094
|
|
|
|
|
|
|
case 54: |
|
1095
|
|
|
|
|
|
|
case 55: |
|
1096
|
|
|
|
|
|
|
case 56: |
|
1097
|
|
|
|
|
|
|
case 57: |
|
1098
|
|
|
|
|
|
|
case 58: |
|
1099
|
|
|
|
|
|
|
case 59: |
|
1100
|
|
|
|
|
|
|
#line 70 "ragel/tstr_common.rl" |
|
1101
|
|
|
|
|
|
|
{ |
|
1102
|
|
|
|
|
|
|
if (!tstr_token_parse_fraction(mark, p - mark, &v)) { |
|
1103
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_FRACTION; |
|
1104
|
|
|
|
|
|
|
{p++; cs = 0; goto _out;} |
|
1105
|
|
|
|
|
|
|
} |
|
1106
|
|
|
|
|
|
|
tstr_parsed_set_fraction(parsed, v); |
|
1107
|
|
|
|
|
|
|
} |
|
1108
|
|
|
|
|
|
|
break; |
|
1109
|
|
|
|
|
|
|
case 34: |
|
1110
|
|
|
|
|
|
|
case 35: |
|
1111
|
|
|
|
|
|
|
case 50: |
|
1112
|
|
|
|
|
|
|
#line 78 "ragel/tstr_common.rl" |
|
1113
|
|
|
|
|
|
|
{ |
|
1114
|
|
|
|
|
|
|
if (!tstr_token_parse_tz_offset(mark, p - mark, &v)) { |
|
1115
|
|
|
|
|
|
|
result = TSTR_PARSE_ERR_OFFSET; |
|
1116
|
|
|
|
|
|
|
{p++; cs = 0; goto _out;} |
|
1117
|
|
|
|
|
|
|
} |
|
1118
|
|
|
|
|
|
|
tstr_parsed_set_offset(parsed, v); |
|
1119
|
|
|
|
|
|
|
} |
|
1120
|
|
|
|
|
|
|
break; |
|
1121
|
|
|
|
|
|
|
case 45: |
|
1122
|
|
|
|
|
|
|
#line 86 "ragel/tstr_common.rl" |
|
1123
|
|
|
|
|
|
|
{ |
|
1124
|
|
|
|
|
|
|
tstr_parsed_set_tz_utc(parsed, mark, p - mark); |
|
1125
|
|
|
|
|
|
|
} |
|
1126
|
|
|
|
|
|
|
break; |
|
1127
|
|
|
|
|
|
|
#line 1128 "tstr_cparse_iso8601.c" |
|
1128
|
|
|
|
|
|
|
} |
|
1129
|
|
|
|
|
|
|
} |
|
1130
|
|
|
|
|
|
|
|
|
1131
|
87
|
50
|
|
|
|
|
_out: {} |
|
1132
|
|
|
|
|
|
|
} |
|
1133
|
|
|
|
|
|
|
|
|
1134
|
|
|
|
|
|
|
#line 66 "ragel/tstr_cparse_iso8601.rl" |
|
1135
|
|
|
|
|
|
|
|
|
1136
|
|
|
|
|
|
|
if (result != TSTR_PARSE_OK) |
|
1137
|
|
|
|
|
|
|
return result; |
|
1138
|
|
|
|
|
|
|
|
|
1139
|
|
|
|
|
|
|
return (cs >= iso8601_first_final) ? TSTR_PARSE_OK : TSTR_PARSE_NOMATCH; |
|
1140
|
|
|
|
|
|
|
} |