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