162e529bcf78aacafc254092bc7266b150e561b6
[nit.git] / lib / json / json_lexer.nit
1 # Lexer generated by nitcc for the grammar json
2 module json_lexer is no_warning "missing-doc"
3 import nitcc_runtime
4 import json_parser
5 class Lexer_json
6 super Lexer
7 redef fun start_state do return dfastate_0
8 end
9 redef class Object
10 private fun dfastate_0: DFAState0 do return once new DFAState0
11 private fun dfastate_1: DFAState1 do return once new DFAState1
12 private fun dfastate_2: DFAState2 do return once new DFAState2
13 private fun dfastate_3: DFAState3 do return once new DFAState3
14 private fun dfastate_4: DFAState4 do return once new DFAState4
15 private fun dfastate_5: DFAState5 do return once new DFAState5
16 private fun dfastate_6: DFAState6 do return once new DFAState6
17 private fun dfastate_7: DFAState7 do return once new DFAState7
18 private fun dfastate_8: DFAState8 do return once new DFAState8
19 private fun dfastate_9: DFAState9 do return once new DFAState9
20 private fun dfastate_10: DFAState10 do return once new DFAState10
21 private fun dfastate_11: DFAState11 do return once new DFAState11
22 private fun dfastate_12: DFAState12 do return once new DFAState12
23 private fun dfastate_13: DFAState13 do return once new DFAState13
24 private fun dfastate_14: DFAState14 do return once new DFAState14
25 private fun dfastate_15: DFAState15 do return once new DFAState15
26 private fun dfastate_16: DFAState16 do return once new DFAState16
27 private fun dfastate_17: DFAState17 do return once new DFAState17
28 private fun dfastate_18: DFAState18 do return once new DFAState18
29 private fun dfastate_19: DFAState19 do return once new DFAState19
30 private fun dfastate_20: DFAState20 do return once new DFAState20
31 private fun dfastate_21: DFAState21 do return once new DFAState21
32 private fun dfastate_22: DFAState22 do return once new DFAState22
33 private fun dfastate_23: DFAState23 do return once new DFAState23
34 private fun dfastate_24: DFAState24 do return once new DFAState24
35 private fun dfastate_25: DFAState25 do return once new DFAState25
36 private fun dfastate_26: DFAState26 do return once new DFAState26
37 private fun dfastate_27: DFAState27 do return once new DFAState27
38 private fun dfastate_28: DFAState28 do return once new DFAState28
39 private fun dfastate_29: DFAState29 do return once new DFAState29
40 private fun dfastate_30: DFAState30 do return once new DFAState30
41 private fun dfastate_31: DFAState31 do return once new DFAState31
42 private fun dfastate_32: DFAState32 do return once new DFAState32
43 private fun dfastate_33: DFAState33 do return once new DFAState33
44 private fun dfastate_34: DFAState34 do return once new DFAState34
45 end
46 class MyNToken
47 super NToken
48 end
49 private class DFAState0
50 super DFAState
51 redef fun trans(char) do
52 var c = char.ascii
53 if c <= 8 then return null
54 if c <= 10 then return dfastate_1
55 if c <= 31 then return null
56 if c <= 32 then return dfastate_1
57 if c <= 33 then return null
58 if c <= 34 then return dfastate_2
59 if c <= 43 then return null
60 if c <= 44 then return dfastate_3
61 if c <= 45 then return dfastate_4
62 if c <= 47 then return null
63 if c <= 57 then return dfastate_5
64 if c <= 58 then return dfastate_6
65 if c <= 90 then return null
66 if c <= 91 then return dfastate_7
67 if c <= 92 then return null
68 if c <= 93 then return dfastate_8
69 if c <= 101 then return null
70 if c <= 102 then return dfastate_9
71 if c <= 109 then return null
72 if c <= 110 then return dfastate_10
73 if c <= 115 then return null
74 if c <= 116 then return dfastate_11
75 if c <= 122 then return null
76 if c <= 123 then return dfastate_12
77 if c <= 124 then return null
78 if c <= 125 then return dfastate_13
79 return null
80 end
81 end
82 private class DFAState1
83 super DFAState
84 redef fun is_accept do return true
85 redef fun make_token(position, text) do
86 return null
87 end
88 redef fun trans(char) do
89 var c = char.ascii
90 if c <= 8 then return null
91 if c <= 10 then return dfastate_1
92 if c <= 31 then return null
93 if c <= 32 then return dfastate_1
94 return null
95 end
96 end
97 private class DFAState2
98 super DFAState
99 redef fun trans(char) do
100 var c = char.ascii
101 if c <= 33 then return dfastate_2
102 if c <= 34 then return dfastate_29
103 if c <= 91 then return dfastate_2
104 if c <= 92 then return dfastate_30
105 return dfastate_2
106 end
107 end
108 private class DFAState3
109 super DFAState
110 redef fun is_accept do return true
111 redef fun make_token(position, text) do
112 var t = new N_39d_44d_39d
113 t.position = position
114 t.text = text
115 return t
116 end
117 end
118 private class DFAState4
119 super DFAState
120 redef fun trans(char) do
121 var c = char.ascii
122 if c <= 47 then return null
123 if c <= 57 then return dfastate_5
124 return null
125 end
126 end
127 private class DFAState5
128 super DFAState
129 redef fun is_accept do return true
130 redef fun make_token(position, text) do
131 var t = new Nnumber
132 t.position = position
133 t.text = text
134 return t
135 end
136 redef fun trans(char) do
137 var c = char.ascii
138 if c <= 45 then return null
139 if c <= 46 then return dfastate_24
140 if c <= 47 then return null
141 if c <= 57 then return dfastate_5
142 if c <= 68 then return null
143 if c <= 69 then return dfastate_25
144 if c <= 100 then return null
145 if c <= 101 then return dfastate_25
146 return null
147 end
148 end
149 private class DFAState6
150 super DFAState
151 redef fun is_accept do return true
152 redef fun make_token(position, text) do
153 var t = new N_39d_58d_39d
154 t.position = position
155 t.text = text
156 return t
157 end
158 end
159 private class DFAState7
160 super DFAState
161 redef fun is_accept do return true
162 redef fun make_token(position, text) do
163 var t = new N_39d_91d_39d
164 t.position = position
165 t.text = text
166 return t
167 end
168 end
169 private class DFAState8
170 super DFAState
171 redef fun is_accept do return true
172 redef fun make_token(position, text) do
173 var t = new N_39d_93d_39d
174 t.position = position
175 t.text = text
176 return t
177 end
178 end
179 private class DFAState9
180 super DFAState
181 redef fun trans(char) do
182 var c = char.ascii
183 if c <= 96 then return null
184 if c <= 97 then return dfastate_20
185 return null
186 end
187 end
188 private class DFAState10
189 super DFAState
190 redef fun trans(char) do
191 var c = char.ascii
192 if c <= 116 then return null
193 if c <= 117 then return dfastate_17
194 return null
195 end
196 end
197 private class DFAState11
198 super DFAState
199 redef fun trans(char) do
200 var c = char.ascii
201 if c <= 113 then return null
202 if c <= 114 then return dfastate_14
203 return null
204 end
205 end
206 private class DFAState12
207 super DFAState
208 redef fun is_accept do return true
209 redef fun make_token(position, text) do
210 var t = new N_39d_123d_39d
211 t.position = position
212 t.text = text
213 return t
214 end
215 end
216 private class DFAState13
217 super DFAState
218 redef fun is_accept do return true
219 redef fun make_token(position, text) do
220 var t = new N_39d_125d_39d
221 t.position = position
222 t.text = text
223 return t
224 end
225 end
226 private class DFAState14
227 super DFAState
228 redef fun trans(char) do
229 var c = char.ascii
230 if c <= 116 then return null
231 if c <= 117 then return dfastate_15
232 return null
233 end
234 end
235 private class DFAState15
236 super DFAState
237 redef fun trans(char) do
238 var c = char.ascii
239 if c <= 100 then return null
240 if c <= 101 then return dfastate_16
241 return null
242 end
243 end
244 private class DFAState16
245 super DFAState
246 redef fun is_accept do return true
247 redef fun make_token(position, text) do
248 var t = new N_39dtrue_39d
249 t.position = position
250 t.text = text
251 return t
252 end
253 end
254 private class DFAState17
255 super DFAState
256 redef fun trans(char) do
257 var c = char.ascii
258 if c <= 107 then return null
259 if c <= 108 then return dfastate_18
260 return null
261 end
262 end
263 private class DFAState18
264 super DFAState
265 redef fun trans(char) do
266 var c = char.ascii
267 if c <= 107 then return null
268 if c <= 108 then return dfastate_19
269 return null
270 end
271 end
272 private class DFAState19
273 super DFAState
274 redef fun is_accept do return true
275 redef fun make_token(position, text) do
276 var t = new N_39dnull_39d
277 t.position = position
278 t.text = text
279 return t
280 end
281 end
282 private class DFAState20
283 super DFAState
284 redef fun trans(char) do
285 var c = char.ascii
286 if c <= 107 then return null
287 if c <= 108 then return dfastate_21
288 return null
289 end
290 end
291 private class DFAState21
292 super DFAState
293 redef fun trans(char) do
294 var c = char.ascii
295 if c <= 114 then return null
296 if c <= 115 then return dfastate_22
297 return null
298 end
299 end
300 private class DFAState22
301 super DFAState
302 redef fun trans(char) do
303 var c = char.ascii
304 if c <= 100 then return null
305 if c <= 101 then return dfastate_23
306 return null
307 end
308 end
309 private class DFAState23
310 super DFAState
311 redef fun is_accept do return true
312 redef fun make_token(position, text) do
313 var t = new N_39dfalse_39d
314 t.position = position
315 t.text = text
316 return t
317 end
318 end
319 private class DFAState24
320 super DFAState
321 redef fun trans(char) do
322 var c = char.ascii
323 if c <= 47 then return null
324 if c <= 57 then return dfastate_28
325 return null
326 end
327 end
328 private class DFAState25
329 super DFAState
330 redef fun trans(char) do
331 var c = char.ascii
332 if c <= 42 then return null
333 if c <= 43 then return dfastate_26
334 if c <= 44 then return null
335 if c <= 45 then return dfastate_26
336 if c <= 47 then return null
337 if c <= 57 then return dfastate_27
338 return null
339 end
340 end
341 private class DFAState26
342 super DFAState
343 redef fun trans(char) do
344 var c = char.ascii
345 if c <= 47 then return null
346 if c <= 57 then return dfastate_27
347 return null
348 end
349 end
350 private class DFAState27
351 super DFAState
352 redef fun is_accept do return true
353 redef fun make_token(position, text) do
354 var t = new Nnumber
355 t.position = position
356 t.text = text
357 return t
358 end
359 redef fun trans(char) do
360 var c = char.ascii
361 if c <= 47 then return null
362 if c <= 57 then return dfastate_27
363 return null
364 end
365 end
366 private class DFAState28
367 super DFAState
368 redef fun is_accept do return true
369 redef fun make_token(position, text) do
370 var t = new Nnumber
371 t.position = position
372 t.text = text
373 return t
374 end
375 redef fun trans(char) do
376 var c = char.ascii
377 if c <= 47 then return null
378 if c <= 57 then return dfastate_28
379 if c <= 68 then return null
380 if c <= 69 then return dfastate_25
381 if c <= 100 then return null
382 if c <= 101 then return dfastate_25
383 return null
384 end
385 end
386 private class DFAState29
387 super DFAState
388 redef fun is_accept do return true
389 redef fun make_token(position, text) do
390 var t = new Nstring
391 t.position = position
392 t.text = text
393 return t
394 end
395 end
396 private class DFAState30
397 super DFAState
398 redef fun trans(char) do
399 var c = char.ascii
400 if c <= 33 then return null
401 if c <= 34 then return dfastate_2
402 if c <= 46 then return null
403 if c <= 47 then return dfastate_2
404 if c <= 91 then return null
405 if c <= 92 then return dfastate_2
406 if c <= 97 then return null
407 if c <= 98 then return dfastate_2
408 if c <= 101 then return null
409 if c <= 102 then return dfastate_2
410 if c <= 109 then return null
411 if c <= 110 then return dfastate_2
412 if c <= 113 then return null
413 if c <= 114 then return dfastate_2
414 if c <= 115 then return null
415 if c <= 116 then return dfastate_2
416 if c <= 117 then return dfastate_31
417 return null
418 end
419 end
420 private class DFAState31
421 super DFAState
422 redef fun trans(char) do
423 var c = char.ascii
424 if c <= 47 then return null
425 if c <= 57 then return dfastate_32
426 if c <= 64 then return null
427 if c <= 90 then return dfastate_32
428 if c <= 96 then return null
429 if c <= 122 then return dfastate_32
430 return null
431 end
432 end
433 private class DFAState32
434 super DFAState
435 redef fun trans(char) do
436 var c = char.ascii
437 if c <= 47 then return null
438 if c <= 57 then return dfastate_33
439 if c <= 64 then return null
440 if c <= 90 then return dfastate_33
441 if c <= 96 then return null
442 if c <= 122 then return dfastate_33
443 return null
444 end
445 end
446 private class DFAState33
447 super DFAState
448 redef fun trans(char) do
449 var c = char.ascii
450 if c <= 47 then return null
451 if c <= 57 then return dfastate_34
452 if c <= 64 then return null
453 if c <= 90 then return dfastate_34
454 if c <= 96 then return null
455 if c <= 122 then return dfastate_34
456 return null
457 end
458 end
459 private class DFAState34
460 super DFAState
461 redef fun trans(char) do
462 var c = char.ascii
463 if c <= 47 then return null
464 if c <= 57 then return dfastate_2
465 if c <= 64 then return null
466 if c <= 90 then return dfastate_2
467 if c <= 96 then return null
468 if c <= 122 then return dfastate_2
469 return null
470 end
471 end