1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4// auto generated by qtbase/util/lexgen/. DO NOT EDIT.
5class QCssScanner_Generated
6{
7public:
8 QCssScanner_Generated(const QString &inp);
9
10 inline QChar next() {
11 return (pos < input.size()) ? input.at(i: pos++) : QChar();
12 }
13 int handleCommentStart();
14 int lex();
15
16 QString input;
17 int pos;
18 int lexemStart;
19 int lexemLength;
20};
21
22QCssScanner_Generated::QCssScanner_Generated(const QString &inp)
23{
24 input = inp;
25 pos = 0;
26 lexemStart = 0;
27 lexemLength = 0;
28}
29
30
31int QCssScanner_Generated::lex()
32{
33 lexemStart = pos;
34 lexemLength = 0;
35 int lastAcceptingPos = -1;
36 int token = -1;
37 QChar ch;
38
39 // initial state
40 ch = next();
41 if (ch.unicode() >= 9 && ch.unicode() <= 10)
42 goto state_4;
43 if (ch.unicode() >= 12 && ch.unicode() <= 13)
44 goto state_4;
45 if (ch.unicode() == 32)
46 goto state_4;
47 if (ch.unicode() == 33) {
48 token = QCss::EXCLAMATION_SYM;
49 goto found;
50 }
51 if (ch.unicode() == 34)
52 goto state_2;
53 if (ch.unicode() == 35)
54 goto state_1;
55 if (ch.unicode() == 36)
56 goto state_6;
57 if (ch.unicode() == 39)
58 goto state_5;
59 if (ch.unicode() == 40) {
60 token = QCss::LPAREN;
61 goto found;
62 }
63 if (ch.unicode() == 41) {
64 token = QCss::RPAREN;
65 goto found;
66 }
67 if (ch.unicode() == 42)
68 goto state_8;
69 if (ch.unicode() == 43)
70 goto state_7;
71 if (ch.unicode() == 44)
72 goto state_14;
73 if (ch.unicode() == 45)
74 goto state_13;
75 if (ch.unicode() == 46)
76 goto state_12;
77 if (ch.unicode() == 47)
78 goto state_11;
79 if (ch.unicode() >= 48 && ch.unicode() <= 57)
80 goto state_15;
81 if (ch.unicode() == 58) {
82 token = QCss::COLON;
83 goto found;
84 }
85 if (ch.unicode() == 59) {
86 token = QCss::SEMICOLON;
87 goto found;
88 }
89 if (ch.unicode() == 60)
90 goto state_20;
91 if (ch.unicode() == 61) {
92 token = QCss::EQUAL;
93 goto found;
94 }
95 if (ch.unicode() == 62)
96 goto state_18;
97 if (ch.unicode() == 64)
98 goto state_26;
99 if (ch.unicode() == 91) {
100 token = QCss::LBRACKET;
101 goto found;
102 }
103 if (ch.unicode() == 92)
104 goto state_30;
105 if (ch.unicode() == 93) {
106 token = QCss::RBRACKET;
107 goto found;
108 }
109 if (ch.unicode() == 94)
110 goto state_28;
111 if (ch.unicode() == 95)
112 goto state_21;
113 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
114 goto state_21;
115 if (ch.unicode() == 123)
116 goto state_22;
117 if (ch.unicode() == 124)
118 goto state_25;
119 if (ch.unicode() == 125) {
120 token = QCss::RBRACE;
121 goto found;
122 }
123 if (ch.unicode() == 126)
124 goto state_23;
125 goto out;
126 state_1:
127 ch = next();
128 if (ch.unicode() == 45)
129 goto state_31;
130 if (ch.unicode() >= 48 && ch.unicode() <= 57)
131 goto state_31;
132 if (ch.unicode() == 92)
133 goto state_32;
134 if (ch.unicode() == 95)
135 goto state_31;
136 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
137 goto state_31;
138 goto out;
139 state_2:
140 lastAcceptingPos = pos;
141 token = QCss::INVALID;
142 ch = next();
143 if (ch.unicode() >= 1 && ch.unicode() <= 9)
144 goto state_33;
145 if (ch.unicode() == 11)
146 goto state_33;
147 if (ch.unicode() >= 14 && ch.unicode() <= 33)
148 goto state_33;
149 if (ch.unicode() == 34)
150 goto state_34;
151 if (ch.unicode() >= 35 && ch.unicode() <= 91)
152 goto state_33;
153 if (ch.unicode() == 92)
154 goto state_35;
155 if (ch.unicode() >= 93 && ch.unicode() <= 96)
156 goto state_33;
157 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
158 goto state_33;
159 if (ch.unicode() >= 123)
160 goto state_33;
161 goto out;
162 state_4:
163 lastAcceptingPos = pos;
164 token = QCss::S;
165 ch = next();
166 if (ch.unicode() >= 9 && ch.unicode() <= 10)
167 goto state_36;
168 if (ch.unicode() >= 12 && ch.unicode() <= 13)
169 goto state_36;
170 if (ch.unicode() == 32)
171 goto state_36;
172 if (ch.unicode() == 43)
173 goto state_7;
174 if (ch.unicode() == 44)
175 goto state_14;
176 if (ch.unicode() == 62)
177 goto state_18;
178 if (ch.unicode() == 123)
179 goto state_22;
180 if (ch.unicode() == 126)
181 goto state_37;
182 goto out;
183 state_5:
184 lastAcceptingPos = pos;
185 token = QCss::INVALID;
186 ch = next();
187 if (ch.unicode() >= 1 && ch.unicode() <= 9)
188 goto state_38;
189 if (ch.unicode() == 11)
190 goto state_38;
191 if (ch.unicode() >= 14 && ch.unicode() <= 38)
192 goto state_38;
193 if (ch.unicode() == 39)
194 goto state_39;
195 if (ch.unicode() >= 40 && ch.unicode() <= 91)
196 goto state_38;
197 if (ch.unicode() == 92)
198 goto state_40;
199 if (ch.unicode() >= 93 && ch.unicode() <= 96)
200 goto state_38;
201 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
202 goto state_38;
203 if (ch.unicode() >= 123)
204 goto state_38;
205 goto out;
206 state_6:
207 ch = next();
208 if (ch.unicode() == 61) {
209 token = QCss::ENDSWITH;
210 goto found;
211 }
212 goto out;
213 state_7:
214 lastAcceptingPos = pos;
215 token = QCss::PLUS;
216 goto out;
217 state_8:
218 lastAcceptingPos = pos;
219 token = QCss::STAR;
220 ch = next();
221 if (ch.unicode() == 61) {
222 token = QCss::CONTAINS;
223 goto found;
224 }
225 goto out;
226 state_11:
227 lastAcceptingPos = pos;
228 token = QCss::SLASH;
229 ch = next();
230 if (ch.unicode() == 42) {
231 token = handleCommentStart();
232 goto found;
233 }
234 goto out;
235 state_12:
236 lastAcceptingPos = pos;
237 token = QCss::DOT;
238 ch = next();
239 if (ch.unicode() >= 48 && ch.unicode() <= 57)
240 goto state_44;
241 goto out;
242 state_13:
243 lastAcceptingPos = pos;
244 token = QCss::MINUS;
245 ch = next();
246 if (ch.unicode() == 45)
247 goto state_45;
248 if (ch.unicode() == 92)
249 goto state_30;
250 if (ch.unicode() == 95)
251 goto state_21;
252 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
253 goto state_21;
254 goto out;
255 state_14:
256 lastAcceptingPos = pos;
257 token = QCss::COMMA;
258 goto out;
259 state_15:
260 lastAcceptingPos = pos;
261 token = QCss::NUMBER;
262 ch = next();
263 if (ch.unicode() == 37)
264 goto state_46;
265 if (ch.unicode() == 45)
266 goto state_48;
267 if (ch.unicode() == 46)
268 goto state_47;
269 if (ch.unicode() >= 48 && ch.unicode() <= 57)
270 goto state_49;
271 if (ch.unicode() == 92)
272 goto state_51;
273 if (ch.unicode() == 95)
274 goto state_50;
275 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
276 goto state_50;
277 goto out;
278 state_18:
279 lastAcceptingPos = pos;
280 token = QCss::GREATER;
281 goto out;
282 state_20:
283 ch = next();
284 if (ch.unicode() == 33)
285 goto state_52;
286 goto out;
287 state_21:
288 lastAcceptingPos = pos;
289 token = QCss::IDENT;
290 ch = next();
291 if (ch.unicode() == 40)
292 goto state_53;
293 if (ch.unicode() == 45)
294 goto state_54;
295 if (ch.unicode() >= 48 && ch.unicode() <= 57)
296 goto state_54;
297 if (ch.unicode() == 92)
298 goto state_55;
299 if (ch.unicode() == 95)
300 goto state_54;
301 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
302 goto state_54;
303 goto out;
304 state_22:
305 lastAcceptingPos = pos;
306 token = QCss::LBRACE;
307 goto out;
308 state_23:
309 lastAcceptingPos = pos;
310 token = QCss::TILDE;
311 ch = next();
312 if (ch.unicode() == 61) {
313 token = QCss::INCLUDES;
314 goto found;
315 }
316 goto out;
317 state_25:
318 lastAcceptingPos = pos;
319 token = QCss::OR;
320 ch = next();
321 if (ch.unicode() == 61) {
322 token = QCss::DASHMATCH;
323 goto found;
324 }
325 goto out;
326 state_26:
327 ch = next();
328 if (ch.unicode() == 45)
329 goto state_58;
330 if (ch.unicode() == 92)
331 goto state_60;
332 if (ch.unicode() == 95)
333 goto state_59;
334 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
335 goto state_59;
336 goto out;
337 state_28:
338 ch = next();
339 if (ch.unicode() == 61) {
340 token = QCss::BEGINSWITH;
341 goto found;
342 }
343 goto out;
344 state_30:
345 ch = next();
346 if (ch.unicode() >= 1 && ch.unicode() <= 9)
347 goto state_62;
348 if (ch.unicode() == 11)
349 goto state_62;
350 if (ch.unicode() >= 14 && ch.unicode() <= 47)
351 goto state_62;
352 if (ch.unicode() >= 58 && ch.unicode() <= 96)
353 goto state_62;
354 if (ch.unicode() >= 103)
355 goto state_62;
356 goto out;
357 state_31:
358 lastAcceptingPos = pos;
359 token = QCss::HASH;
360 ch = next();
361 if (ch.unicode() == 45)
362 goto state_63;
363 if (ch.unicode() >= 48 && ch.unicode() <= 57)
364 goto state_63;
365 if (ch.unicode() == 92)
366 goto state_64;
367 if (ch.unicode() == 95)
368 goto state_63;
369 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
370 goto state_63;
371 goto out;
372 state_32:
373 ch = next();
374 if (ch.unicode() >= 1 && ch.unicode() <= 9)
375 goto state_65;
376 if (ch.unicode() == 11)
377 goto state_65;
378 if (ch.unicode() >= 14 && ch.unicode() <= 47)
379 goto state_65;
380 if (ch.unicode() >= 58 && ch.unicode() <= 96)
381 goto state_65;
382 if (ch.unicode() >= 103)
383 goto state_65;
384 goto out;
385 state_33:
386 lastAcceptingPos = pos;
387 token = QCss::INVALID;
388 ch = next();
389 if (ch.unicode() >= 1 && ch.unicode() <= 9)
390 goto state_33;
391 if (ch.unicode() == 11)
392 goto state_33;
393 if (ch.unicode() >= 14 && ch.unicode() <= 33)
394 goto state_33;
395 if (ch.unicode() == 34)
396 goto state_34;
397 if (ch.unicode() >= 35 && ch.unicode() <= 91)
398 goto state_33;
399 if (ch.unicode() == 92)
400 goto state_35;
401 if (ch.unicode() >= 93 && ch.unicode() <= 96)
402 goto state_33;
403 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
404 goto state_33;
405 if (ch.unicode() >= 123)
406 goto state_33;
407 goto out;
408 state_34:
409 lastAcceptingPos = pos;
410 token = QCss::STRING;
411 goto out;
412 state_35:
413 ch = next();
414 if (ch.unicode() >= 1 && ch.unicode() <= 9)
415 goto state_66;
416 if (ch.unicode() == 10)
417 goto state_67;
418 if (ch.unicode() == 11)
419 goto state_66;
420 if (ch.unicode() == 12)
421 goto state_69;
422 if (ch.unicode() == 13)
423 goto state_68;
424 if (ch.unicode() >= 14 && ch.unicode() <= 47)
425 goto state_66;
426 if (ch.unicode() >= 58 && ch.unicode() <= 96)
427 goto state_66;
428 if (ch.unicode() >= 103)
429 goto state_66;
430 goto out;
431 state_36:
432 lastAcceptingPos = pos;
433 token = QCss::S;
434 ch = next();
435 if (ch.unicode() >= 9 && ch.unicode() <= 10)
436 goto state_36;
437 if (ch.unicode() >= 12 && ch.unicode() <= 13)
438 goto state_36;
439 if (ch.unicode() == 32)
440 goto state_36;
441 if (ch.unicode() == 43)
442 goto state_7;
443 if (ch.unicode() == 44)
444 goto state_14;
445 if (ch.unicode() == 62)
446 goto state_18;
447 if (ch.unicode() == 123)
448 goto state_22;
449 if (ch.unicode() == 126)
450 goto state_37;
451 goto out;
452 state_37:
453 lastAcceptingPos = pos;
454 token = QCss::TILDE;
455 goto out;
456 state_38:
457 lastAcceptingPos = pos;
458 token = QCss::INVALID;
459 ch = next();
460 if (ch.unicode() >= 1 && ch.unicode() <= 9)
461 goto state_38;
462 if (ch.unicode() == 11)
463 goto state_38;
464 if (ch.unicode() >= 14 && ch.unicode() <= 38)
465 goto state_38;
466 if (ch.unicode() == 39)
467 goto state_39;
468 if (ch.unicode() >= 40 && ch.unicode() <= 91)
469 goto state_38;
470 if (ch.unicode() == 92)
471 goto state_40;
472 if (ch.unicode() >= 93 && ch.unicode() <= 96)
473 goto state_38;
474 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
475 goto state_38;
476 if (ch.unicode() >= 123)
477 goto state_38;
478 goto out;
479 state_39:
480 lastAcceptingPos = pos;
481 token = QCss::STRING;
482 goto out;
483 state_40:
484 ch = next();
485 if (ch.unicode() >= 1 && ch.unicode() <= 9)
486 goto state_70;
487 if (ch.unicode() == 10)
488 goto state_71;
489 if (ch.unicode() == 11)
490 goto state_70;
491 if (ch.unicode() == 12)
492 goto state_73;
493 if (ch.unicode() == 13)
494 goto state_72;
495 if (ch.unicode() >= 14 && ch.unicode() <= 47)
496 goto state_70;
497 if (ch.unicode() >= 58 && ch.unicode() <= 96)
498 goto state_70;
499 if (ch.unicode() >= 103)
500 goto state_70;
501 goto out;
502 state_44:
503 lastAcceptingPos = pos;
504 token = QCss::NUMBER;
505 ch = next();
506 if (ch.unicode() == 37)
507 goto state_46;
508 if (ch.unicode() == 45)
509 goto state_48;
510 if (ch.unicode() >= 48 && ch.unicode() <= 57)
511 goto state_74;
512 if (ch.unicode() == 92)
513 goto state_51;
514 if (ch.unicode() == 95)
515 goto state_50;
516 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
517 goto state_50;
518 goto out;
519 state_45:
520 ch = next();
521 if (ch.unicode() == 62) {
522 token = QCss::CDC;
523 goto found;
524 }
525 goto out;
526 state_46:
527 lastAcceptingPos = pos;
528 token = QCss::PERCENTAGE;
529 goto out;
530 state_47:
531 ch = next();
532 if (ch.unicode() >= 48 && ch.unicode() <= 57)
533 goto state_44;
534 goto out;
535 state_48:
536 ch = next();
537 if (ch.unicode() == 92)
538 goto state_51;
539 if (ch.unicode() == 95)
540 goto state_50;
541 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
542 goto state_50;
543 goto out;
544 state_49:
545 lastAcceptingPos = pos;
546 token = QCss::NUMBER;
547 ch = next();
548 if (ch.unicode() == 37)
549 goto state_46;
550 if (ch.unicode() == 45)
551 goto state_48;
552 if (ch.unicode() == 46)
553 goto state_47;
554 if (ch.unicode() >= 48 && ch.unicode() <= 57)
555 goto state_49;
556 if (ch.unicode() == 92)
557 goto state_51;
558 if (ch.unicode() == 95)
559 goto state_50;
560 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
561 goto state_50;
562 goto out;
563 state_50:
564 lastAcceptingPos = pos;
565 token = QCss::LENGTH;
566 ch = next();
567 if (ch.unicode() == 45)
568 goto state_76;
569 if (ch.unicode() >= 48 && ch.unicode() <= 57)
570 goto state_76;
571 if (ch.unicode() == 92)
572 goto state_77;
573 if (ch.unicode() == 95)
574 goto state_76;
575 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
576 goto state_76;
577 goto out;
578 state_51:
579 ch = next();
580 if (ch.unicode() >= 1 && ch.unicode() <= 9)
581 goto state_78;
582 if (ch.unicode() == 11)
583 goto state_78;
584 if (ch.unicode() >= 14 && ch.unicode() <= 47)
585 goto state_78;
586 if (ch.unicode() >= 58 && ch.unicode() <= 96)
587 goto state_78;
588 if (ch.unicode() >= 103)
589 goto state_78;
590 goto out;
591 state_52:
592 ch = next();
593 if (ch.unicode() == 45)
594 goto state_79;
595 goto out;
596 state_53:
597 lastAcceptingPos = pos;
598 token = QCss::FUNCTION;
599 goto out;
600 state_54:
601 lastAcceptingPos = pos;
602 token = QCss::IDENT;
603 ch = next();
604 if (ch.unicode() == 40)
605 goto state_53;
606 if (ch.unicode() == 45)
607 goto state_54;
608 if (ch.unicode() >= 48 && ch.unicode() <= 57)
609 goto state_54;
610 if (ch.unicode() == 92)
611 goto state_55;
612 if (ch.unicode() == 95)
613 goto state_54;
614 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
615 goto state_54;
616 goto out;
617 state_55:
618 ch = next();
619 if (ch.unicode() >= 1 && ch.unicode() <= 9)
620 goto state_80;
621 if (ch.unicode() == 11)
622 goto state_80;
623 if (ch.unicode() >= 14 && ch.unicode() <= 47)
624 goto state_80;
625 if (ch.unicode() >= 58 && ch.unicode() <= 96)
626 goto state_80;
627 if (ch.unicode() >= 103)
628 goto state_80;
629 goto out;
630 state_58:
631 ch = next();
632 if (ch.unicode() == 92)
633 goto state_60;
634 if (ch.unicode() == 95)
635 goto state_59;
636 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
637 goto state_59;
638 goto out;
639 state_59:
640 lastAcceptingPos = pos;
641 token = QCss::ATKEYWORD_SYM;
642 ch = next();
643 if (ch.unicode() == 45)
644 goto state_81;
645 if (ch.unicode() >= 48 && ch.unicode() <= 57)
646 goto state_81;
647 if (ch.unicode() == 92)
648 goto state_82;
649 if (ch.unicode() == 95)
650 goto state_81;
651 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
652 goto state_81;
653 goto out;
654 state_60:
655 ch = next();
656 if (ch.unicode() >= 1 && ch.unicode() <= 9)
657 goto state_83;
658 if (ch.unicode() == 11)
659 goto state_83;
660 if (ch.unicode() >= 14 && ch.unicode() <= 47)
661 goto state_83;
662 if (ch.unicode() >= 58 && ch.unicode() <= 96)
663 goto state_83;
664 if (ch.unicode() >= 103)
665 goto state_83;
666 goto out;
667 state_62:
668 lastAcceptingPos = pos;
669 token = QCss::IDENT;
670 ch = next();
671 if (ch.unicode() == 40)
672 goto state_53;
673 if (ch.unicode() == 45)
674 goto state_54;
675 if (ch.unicode() >= 48 && ch.unicode() <= 57)
676 goto state_54;
677 if (ch.unicode() == 92)
678 goto state_55;
679 if (ch.unicode() == 95)
680 goto state_54;
681 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
682 goto state_54;
683 goto out;
684 state_63:
685 lastAcceptingPos = pos;
686 token = QCss::HASH;
687 ch = next();
688 if (ch.unicode() == 45)
689 goto state_63;
690 if (ch.unicode() >= 48 && ch.unicode() <= 57)
691 goto state_63;
692 if (ch.unicode() == 92)
693 goto state_64;
694 if (ch.unicode() == 95)
695 goto state_63;
696 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
697 goto state_63;
698 goto out;
699 state_64:
700 ch = next();
701 if (ch.unicode() >= 1 && ch.unicode() <= 9)
702 goto state_84;
703 if (ch.unicode() == 11)
704 goto state_84;
705 if (ch.unicode() >= 14 && ch.unicode() <= 47)
706 goto state_84;
707 if (ch.unicode() >= 58 && ch.unicode() <= 96)
708 goto state_84;
709 if (ch.unicode() >= 103)
710 goto state_84;
711 goto out;
712 state_65:
713 lastAcceptingPos = pos;
714 token = QCss::HASH;
715 ch = next();
716 if (ch.unicode() == 45)
717 goto state_63;
718 if (ch.unicode() >= 48 && ch.unicode() <= 57)
719 goto state_63;
720 if (ch.unicode() == 92)
721 goto state_64;
722 if (ch.unicode() == 95)
723 goto state_63;
724 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
725 goto state_63;
726 goto out;
727 state_66:
728 lastAcceptingPos = pos;
729 token = QCss::INVALID;
730 ch = next();
731 if (ch.unicode() >= 1 && ch.unicode() <= 9)
732 goto state_33;
733 if (ch.unicode() == 11)
734 goto state_33;
735 if (ch.unicode() >= 14 && ch.unicode() <= 33)
736 goto state_33;
737 if (ch.unicode() == 34)
738 goto state_34;
739 if (ch.unicode() >= 35 && ch.unicode() <= 91)
740 goto state_33;
741 if (ch.unicode() == 92)
742 goto state_35;
743 if (ch.unicode() >= 93 && ch.unicode() <= 96)
744 goto state_33;
745 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
746 goto state_33;
747 if (ch.unicode() >= 123)
748 goto state_33;
749 goto out;
750 state_67:
751 lastAcceptingPos = pos;
752 token = QCss::INVALID;
753 ch = next();
754 if (ch.unicode() >= 1 && ch.unicode() <= 9)
755 goto state_33;
756 if (ch.unicode() == 11)
757 goto state_33;
758 if (ch.unicode() >= 14 && ch.unicode() <= 33)
759 goto state_33;
760 if (ch.unicode() == 34)
761 goto state_34;
762 if (ch.unicode() >= 35 && ch.unicode() <= 91)
763 goto state_33;
764 if (ch.unicode() == 92)
765 goto state_35;
766 if (ch.unicode() >= 93 && ch.unicode() <= 96)
767 goto state_33;
768 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
769 goto state_33;
770 if (ch.unicode() >= 123)
771 goto state_33;
772 goto out;
773 state_68:
774 lastAcceptingPos = pos;
775 token = QCss::INVALID;
776 ch = next();
777 if (ch.unicode() >= 1 && ch.unicode() <= 9)
778 goto state_33;
779 if (ch.unicode() == 10)
780 goto state_85;
781 if (ch.unicode() == 11)
782 goto state_33;
783 if (ch.unicode() >= 14 && ch.unicode() <= 33)
784 goto state_33;
785 if (ch.unicode() == 34)
786 goto state_34;
787 if (ch.unicode() >= 35 && ch.unicode() <= 91)
788 goto state_33;
789 if (ch.unicode() == 92)
790 goto state_35;
791 if (ch.unicode() >= 93 && ch.unicode() <= 96)
792 goto state_33;
793 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
794 goto state_33;
795 if (ch.unicode() >= 123)
796 goto state_33;
797 goto out;
798 state_69:
799 lastAcceptingPos = pos;
800 token = QCss::INVALID;
801 ch = next();
802 if (ch.unicode() >= 1 && ch.unicode() <= 9)
803 goto state_33;
804 if (ch.unicode() == 11)
805 goto state_33;
806 if (ch.unicode() >= 14 && ch.unicode() <= 33)
807 goto state_33;
808 if (ch.unicode() == 34)
809 goto state_34;
810 if (ch.unicode() >= 35 && ch.unicode() <= 91)
811 goto state_33;
812 if (ch.unicode() == 92)
813 goto state_35;
814 if (ch.unicode() >= 93 && ch.unicode() <= 96)
815 goto state_33;
816 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
817 goto state_33;
818 if (ch.unicode() >= 123)
819 goto state_33;
820 goto out;
821 state_70:
822 lastAcceptingPos = pos;
823 token = QCss::INVALID;
824 ch = next();
825 if (ch.unicode() >= 1 && ch.unicode() <= 9)
826 goto state_38;
827 if (ch.unicode() == 11)
828 goto state_38;
829 if (ch.unicode() >= 14 && ch.unicode() <= 38)
830 goto state_38;
831 if (ch.unicode() == 39)
832 goto state_39;
833 if (ch.unicode() >= 40 && ch.unicode() <= 91)
834 goto state_38;
835 if (ch.unicode() == 92)
836 goto state_40;
837 if (ch.unicode() >= 93 && ch.unicode() <= 96)
838 goto state_38;
839 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
840 goto state_38;
841 if (ch.unicode() >= 123)
842 goto state_38;
843 goto out;
844 state_71:
845 lastAcceptingPos = pos;
846 token = QCss::INVALID;
847 ch = next();
848 if (ch.unicode() >= 1 && ch.unicode() <= 9)
849 goto state_38;
850 if (ch.unicode() == 11)
851 goto state_38;
852 if (ch.unicode() >= 14 && ch.unicode() <= 38)
853 goto state_38;
854 if (ch.unicode() == 39)
855 goto state_39;
856 if (ch.unicode() >= 40 && ch.unicode() <= 91)
857 goto state_38;
858 if (ch.unicode() == 92)
859 goto state_40;
860 if (ch.unicode() >= 93 && ch.unicode() <= 96)
861 goto state_38;
862 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
863 goto state_38;
864 if (ch.unicode() >= 123)
865 goto state_38;
866 goto out;
867 state_72:
868 lastAcceptingPos = pos;
869 token = QCss::INVALID;
870 ch = next();
871 if (ch.unicode() >= 1 && ch.unicode() <= 9)
872 goto state_38;
873 if (ch.unicode() == 10)
874 goto state_86;
875 if (ch.unicode() == 11)
876 goto state_38;
877 if (ch.unicode() >= 14 && ch.unicode() <= 38)
878 goto state_38;
879 if (ch.unicode() == 39)
880 goto state_39;
881 if (ch.unicode() >= 40 && ch.unicode() <= 91)
882 goto state_38;
883 if (ch.unicode() == 92)
884 goto state_40;
885 if (ch.unicode() >= 93 && ch.unicode() <= 96)
886 goto state_38;
887 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
888 goto state_38;
889 if (ch.unicode() >= 123)
890 goto state_38;
891 goto out;
892 state_73:
893 lastAcceptingPos = pos;
894 token = QCss::INVALID;
895 ch = next();
896 if (ch.unicode() >= 1 && ch.unicode() <= 9)
897 goto state_38;
898 if (ch.unicode() == 11)
899 goto state_38;
900 if (ch.unicode() >= 14 && ch.unicode() <= 38)
901 goto state_38;
902 if (ch.unicode() == 39)
903 goto state_39;
904 if (ch.unicode() >= 40 && ch.unicode() <= 91)
905 goto state_38;
906 if (ch.unicode() == 92)
907 goto state_40;
908 if (ch.unicode() >= 93 && ch.unicode() <= 96)
909 goto state_38;
910 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
911 goto state_38;
912 if (ch.unicode() >= 123)
913 goto state_38;
914 goto out;
915 state_74:
916 lastAcceptingPos = pos;
917 token = QCss::NUMBER;
918 ch = next();
919 if (ch.unicode() == 37)
920 goto state_46;
921 if (ch.unicode() == 45)
922 goto state_48;
923 if (ch.unicode() >= 48 && ch.unicode() <= 57)
924 goto state_74;
925 if (ch.unicode() == 92)
926 goto state_51;
927 if (ch.unicode() == 95)
928 goto state_50;
929 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
930 goto state_50;
931 goto out;
932 state_76:
933 lastAcceptingPos = pos;
934 token = QCss::LENGTH;
935 ch = next();
936 if (ch.unicode() == 45)
937 goto state_76;
938 if (ch.unicode() >= 48 && ch.unicode() <= 57)
939 goto state_76;
940 if (ch.unicode() == 92)
941 goto state_77;
942 if (ch.unicode() == 95)
943 goto state_76;
944 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
945 goto state_76;
946 goto out;
947 state_77:
948 ch = next();
949 if (ch.unicode() >= 1 && ch.unicode() <= 9)
950 goto state_87;
951 if (ch.unicode() == 11)
952 goto state_87;
953 if (ch.unicode() >= 14 && ch.unicode() <= 47)
954 goto state_87;
955 if (ch.unicode() >= 58 && ch.unicode() <= 96)
956 goto state_87;
957 if (ch.unicode() >= 103)
958 goto state_87;
959 goto out;
960 state_78:
961 lastAcceptingPos = pos;
962 token = QCss::LENGTH;
963 ch = next();
964 if (ch.unicode() == 45)
965 goto state_76;
966 if (ch.unicode() >= 48 && ch.unicode() <= 57)
967 goto state_76;
968 if (ch.unicode() == 92)
969 goto state_77;
970 if (ch.unicode() == 95)
971 goto state_76;
972 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
973 goto state_76;
974 goto out;
975 state_79:
976 ch = next();
977 if (ch.unicode() == 45) {
978 token = QCss::CDO;
979 goto found;
980 }
981 goto out;
982 state_80:
983 lastAcceptingPos = pos;
984 token = QCss::IDENT;
985 ch = next();
986 if (ch.unicode() == 40)
987 goto state_53;
988 if (ch.unicode() == 45)
989 goto state_54;
990 if (ch.unicode() >= 48 && ch.unicode() <= 57)
991 goto state_54;
992 if (ch.unicode() == 92)
993 goto state_55;
994 if (ch.unicode() == 95)
995 goto state_54;
996 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
997 goto state_54;
998 goto out;
999 state_81:
1000 lastAcceptingPos = pos;
1001 token = QCss::ATKEYWORD_SYM;
1002 ch = next();
1003 if (ch.unicode() == 45)
1004 goto state_81;
1005 if (ch.unicode() >= 48 && ch.unicode() <= 57)
1006 goto state_81;
1007 if (ch.unicode() == 92)
1008 goto state_82;
1009 if (ch.unicode() == 95)
1010 goto state_81;
1011 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1012 goto state_81;
1013 goto out;
1014 state_82:
1015 ch = next();
1016 if (ch.unicode() >= 1 && ch.unicode() <= 9)
1017 goto state_89;
1018 if (ch.unicode() == 11)
1019 goto state_89;
1020 if (ch.unicode() >= 14 && ch.unicode() <= 47)
1021 goto state_89;
1022 if (ch.unicode() >= 58 && ch.unicode() <= 96)
1023 goto state_89;
1024 if (ch.unicode() >= 103)
1025 goto state_89;
1026 goto out;
1027 state_83:
1028 lastAcceptingPos = pos;
1029 token = QCss::ATKEYWORD_SYM;
1030 ch = next();
1031 if (ch.unicode() == 45)
1032 goto state_81;
1033 if (ch.unicode() >= 48 && ch.unicode() <= 57)
1034 goto state_81;
1035 if (ch.unicode() == 92)
1036 goto state_82;
1037 if (ch.unicode() == 95)
1038 goto state_81;
1039 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1040 goto state_81;
1041 goto out;
1042 state_84:
1043 lastAcceptingPos = pos;
1044 token = QCss::HASH;
1045 ch = next();
1046 if (ch.unicode() == 45)
1047 goto state_63;
1048 if (ch.unicode() >= 48 && ch.unicode() <= 57)
1049 goto state_63;
1050 if (ch.unicode() == 92)
1051 goto state_64;
1052 if (ch.unicode() == 95)
1053 goto state_63;
1054 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1055 goto state_63;
1056 goto out;
1057 state_85:
1058 lastAcceptingPos = pos;
1059 token = QCss::INVALID;
1060 ch = next();
1061 if (ch.unicode() >= 1 && ch.unicode() <= 9)
1062 goto state_33;
1063 if (ch.unicode() == 11)
1064 goto state_33;
1065 if (ch.unicode() >= 14 && ch.unicode() <= 33)
1066 goto state_33;
1067 if (ch.unicode() == 34)
1068 goto state_34;
1069 if (ch.unicode() >= 35 && ch.unicode() <= 91)
1070 goto state_33;
1071 if (ch.unicode() == 92)
1072 goto state_35;
1073 if (ch.unicode() >= 93 && ch.unicode() <= 96)
1074 goto state_33;
1075 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1076 goto state_33;
1077 if (ch.unicode() >= 123)
1078 goto state_33;
1079 goto out;
1080 state_86:
1081 lastAcceptingPos = pos;
1082 token = QCss::INVALID;
1083 ch = next();
1084 if (ch.unicode() >= 1 && ch.unicode() <= 9)
1085 goto state_38;
1086 if (ch.unicode() == 11)
1087 goto state_38;
1088 if (ch.unicode() >= 14 && ch.unicode() <= 38)
1089 goto state_38;
1090 if (ch.unicode() == 39)
1091 goto state_39;
1092 if (ch.unicode() >= 40 && ch.unicode() <= 91)
1093 goto state_38;
1094 if (ch.unicode() == 92)
1095 goto state_40;
1096 if (ch.unicode() >= 93 && ch.unicode() <= 96)
1097 goto state_38;
1098 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1099 goto state_38;
1100 if (ch.unicode() >= 123)
1101 goto state_38;
1102 goto out;
1103 state_87:
1104 lastAcceptingPos = pos;
1105 token = QCss::LENGTH;
1106 ch = next();
1107 if (ch.unicode() == 45)
1108 goto state_76;
1109 if (ch.unicode() >= 48 && ch.unicode() <= 57)
1110 goto state_76;
1111 if (ch.unicode() == 92)
1112 goto state_77;
1113 if (ch.unicode() == 95)
1114 goto state_76;
1115 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1116 goto state_76;
1117 goto out;
1118 state_89:
1119 lastAcceptingPos = pos;
1120 token = QCss::ATKEYWORD_SYM;
1121 ch = next();
1122 if (ch.unicode() == 45)
1123 goto state_81;
1124 if (ch.unicode() >= 48 && ch.unicode() <= 57)
1125 goto state_81;
1126 if (ch.unicode() == 92)
1127 goto state_82;
1128 if (ch.unicode() == 95)
1129 goto state_81;
1130 if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
1131 goto state_81;
1132 goto out;
1133 found:
1134 lastAcceptingPos = pos;
1135
1136 out:
1137 if (lastAcceptingPos != -1) {
1138 lexemLength = lastAcceptingPos - lexemStart;
1139 pos = lastAcceptingPos;
1140 }
1141 return token;
1142}
1143

source code of qtbase/src/gui/text/qcssscanner.cpp