Import upstream version 0.1.0+git20200608.85899cb
Debian Janitor
2 years ago
69 | 69 |
|
70 | 70 |
goto yystart1
|
71 | 71 |
|
|
72 |
goto yystate0 // silence unused label error
|
|
73 |
goto yystate1 // silence unused label error
|
72 | 74 |
yystate1:
|
73 | 75 |
l.next()
|
74 | 76 |
yystart1:
|
|
96 | 98 |
case l.current == 'n':
|
97 | 99 |
goto yystate13
|
98 | 100 |
case l.current == '|':
|
99 | |
goto yystate16
|
|
101 |
goto yystate17
|
100 | 102 |
case l.current >= '0' && l.current <= '9':
|
101 | 103 |
goto yystate8
|
102 | 104 |
case l.current >= '\x01' && l.current <= '\t' || l.current >= '\v' && l.current <= '*' || l.current == ',' || l.current >= ';' && l.current <= 'G' || l.current >= 'I' && l.current <= 'L' || l.current >= 'N' && l.current <= 'S' || l.current >= 'U' && l.current <= 'Y' || l.current >= '[' && l.current <= 'a' || l.current == 'c' || l.current >= 'e' && l.current <= 'g' || l.current >= 'i' && l.current <= 'l' || l.current >= 'o' && l.current <= 'r' || l.current >= 't' && l.current <= 'v' || l.current == 'x' || l.current == 'z' || l.current == '{' || l.current >= '}' && l.current <= 'ÿ':
|
|
109 | 111 |
|
110 | 112 |
yystate3:
|
111 | 113 |
l.next()
|
112 | |
goto yyrule13
|
|
114 |
goto yyrule14
|
113 | 115 |
|
114 | 116 |
yystate4:
|
115 | 117 |
l.next()
|
|
151 | 153 |
l.next()
|
152 | 154 |
switch {
|
153 | 155 |
default:
|
154 | |
goto yyrule13
|
|
156 |
goto yyrule14
|
155 | 157 |
case l.current == 'o':
|
156 | 158 |
goto yystate14
|
157 | 159 |
}
|
|
162 | 164 |
default:
|
163 | 165 |
goto yyabort
|
164 | 166 |
case l.current == 'w':
|
|
167 |
goto yystate16
|
|
168 |
case l.current >= '\x01' && l.current <= '\t' || l.current >= '\v' && l.current <= 'v' || l.current >= 'x' && l.current <= 'ÿ':
|
165 | 169 |
goto yystate15
|
166 | 170 |
}
|
167 | 171 |
|
168 | 172 |
yystate15:
|
169 | 173 |
l.next()
|
|
174 |
goto yyrule13
|
|
175 |
|
|
176 |
yystate16:
|
|
177 |
l.next()
|
170 | 178 |
goto yyrule2
|
171 | 179 |
|
172 | |
yystate16:
|
173 | |
l.next()
|
174 | |
switch {
|
175 | |
default:
|
176 | |
goto yyrule13
|
|
180 |
yystate17:
|
|
181 |
l.next()
|
|
182 |
switch {
|
|
183 |
default:
|
|
184 |
goto yyrule14
|
177 | 185 |
case l.current == '|':
|
178 | |
goto yystate17
|
179 | |
}
|
180 | |
|
181 | |
yystate17:
|
|
186 |
goto yystate18
|
|
187 |
}
|
|
188 |
|
|
189 |
yystate18:
|
182 | 190 |
l.next()
|
183 | 191 |
goto yyrule6
|
184 | 192 |
|
|
267 | 275 |
|
268 | 276 |
return eofCode
|
269 | 277 |
}
|
270 | |
yyrule13: // .
|
271 | |
if true { // avoid go vet determining the below panic will not be reached
|
|
278 |
yyrule13: // no.
|
|
279 |
{
|
272 | 280 |
|
273 | 281 |
return tINVALID_TOKEN
|
274 | 282 |
}
|
|
283 |
yyrule14: // .
|
|
284 |
{
|
|
285 |
|
|
286 |
return tINVALID_TOKEN
|
|
287 |
}
|
275 | 288 |
panic("unreachable")
|
276 | 289 |
|
|
290 |
goto yyabort // silence unused label error
|
|
291 |
|
277 | 292 |
yyabort: // no lexem recognized
|
278 | |
//
|
279 | |
// silence unused label errors for build and satisfy go vet reachability analysis
|
280 | |
//
|
281 | |
{
|
282 | |
if false {
|
283 | |
goto yyabort
|
284 | |
}
|
285 | |
if false {
|
286 | |
goto yystate0
|
287 | |
}
|
288 | |
if false {
|
289 | |
goto yystate1
|
290 | |
}
|
291 | |
}
|
292 | 293 |
|
293 | 294 |
// should never get here
|
294 | 295 |
panic("scanner internal error")
|
252 | 252 |
out: "2014-05-30T20:21:21Z",
|
253 | 253 |
|
254 | 254 |
err: fmt.Errorf(`day 35 out of bounds for month 5 at character 11 starting with "5"`),
|
|
255 |
},
|
|
256 |
{
|
|
257 |
in: "npe",
|
|
258 |
err: fmt.Errorf(`syntax error: unexpected tINVALID_TOKEN, expecting tNOW or tDIGIT at character 2 starting with "n"`),
|
|
259 |
},
|
|
260 |
{
|
|
261 |
in: "now-nope",
|
|
262 |
err: fmt.Errorf(`syntax error: unexpected tINVALID_TOKEN, expecting tUNIT at character 8 starting with "nop"`),
|
|
263 |
},
|
|
264 |
{
|
|
265 |
in: "definitely-nope",
|
|
266 |
err: fmt.Errorf(`syntax error: unexpected tUNIT, expecting tNOW or tDIGIT at character 2 starting with "d"`),
|
255 | 267 |
},
|
256 | 268 |
}
|
257 | 269 |
for _, tt := range tests {
|