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