source: trunk/src/xmlpatterns/parser/qxslttokenlookup.cpp@ 1054

Last change on this file since 1054 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 97.1 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtXmlPatterns module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/* NOTE: This file is AUTO GENERATED by qtokenautomaton2cpp.xsl. */
43
44#include "qxslttokenlookup_p.h"
45
46QT_BEGIN_NAMESPACE
47
48using namespace QPatternist;
49
50XSLTTokenLookup::NodeName XSLTTokenLookup::classifier2(const QChar *data)
51
52 {
53 if (data[0] == 97)
54
55
56 {
57
58 if(data[1] == 115)
59
60
61 return As;
62
63 }
64
65 else if (data[0] == 105)
66
67
68 {
69 if (data[1] == 100)
70
71
72 {
73
74
75 return Id;
76
77 }
78
79 else if (data[1] == 102)
80
81
82 {
83
84
85 return If;
86
87 }
88
89
90 }
91
92
93
94 return NoKeyword;
95 }
96 XSLTTokenLookup::NodeName XSLTTokenLookup::classifier3(const QChar *data)
97
98 {
99 if (data[0] == 107)
100
101
102 {
103
104 static const unsigned short string[] =
105 {
106 101, 121
107 };
108 if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0)
109
110
111 return Key;
112
113 }
114
115 else if (data[0] == 117)
116
117
118 {
119
120 static const unsigned short string[] =
121 {
122 115, 101
123 };
124 if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0)
125
126
127 return Use;
128
129 }
130
131
132
133 return NoKeyword;
134 }
135 XSLTTokenLookup::NodeName XSLTTokenLookup::classifier4(const QChar *data)
136
137 {
138 if (data[0] == 99)
139
140
141 {
142
143 static const unsigned short string[] =
144 {
145 111, 112, 121
146 };
147 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
148
149
150 return Copy;
151
152 }
153
154 else if (data[0] == 104)
155
156
157 {
158
159 static const unsigned short string[] =
160 {
161 114, 101, 102
162 };
163 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
164
165
166 return Href;
167
168 }
169
170 else if (data[0] == 108)
171
172
173 {
174
175 static const unsigned short string[] =
176 {
177 97, 110, 103
178 };
179 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
180
181
182 return Lang;
183
184 }
185
186 else if (data[0] == 109)
187
188
189 {
190
191 static const unsigned short string[] =
192 {
193 111, 100, 101
194 };
195 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
196
197
198 return Mode;
199
200 }
201
202 else if (data[0] == 110)
203
204
205 {
206
207 static const unsigned short string[] =
208 {
209 97, 109, 101
210 };
211 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
212
213
214 return Name;
215
216 }
217
218 else if (data[0] == 115)
219
220
221 {
222
223 static const unsigned short string[] =
224 {
225 111, 114, 116
226 };
227 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
228
229
230 return Sort;
231
232 }
233
234 else if (data[0] == 116)
235
236
237 {
238 if (data[1] == 101)
239
240
241 {
242 if (data[2] == 115)
243
244
245 {
246
247 if(data[3] == 116)
248
249
250 return Test;
251
252 }
253
254 else if (data[2] == 120)
255
256
257 {
258
259 if(data[3] == 116)
260
261
262 return Text;
263
264 }
265
266
267 }
268
269 else if (data[1] == 121)
270
271
272 {
273
274 static const unsigned short string[] =
275 {
276 112, 101
277 };
278 if(memcmp(&data[2], &string, sizeof(QChar) * 2) == 0)
279
280
281 return Type;
282
283 }
284
285
286 }
287
288 else if (data[0] == 119)
289
290
291 {
292
293 static const unsigned short string[] =
294 {
295 104, 101, 110
296 };
297 if(memcmp(&data[1], &string, sizeof(QChar) * 3) == 0)
298
299
300 return When;
301
302 }
303
304
305
306 return NoKeyword;
307 }
308 XSLTTokenLookup::NodeName XSLTTokenLookup::classifier5(const QChar *data)
309
310 {
311 if (data[0] == 102)
312
313
314 {
315
316 static const unsigned short string[] =
317 {
318 108, 97, 103, 115
319 };
320 if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
321
322
323 return Flags;
324
325 }
326
327 else if (data[0] == 109)
328
329
330 {
331
332 static const unsigned short string[] =
333 {
334 97, 116, 99, 104
335 };
336 if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
337
338
339 return Match;
340
341 }
342
343 else if (data[0] == 111)
344
345
346 {
347
348 static const unsigned short string[] =
349 {
350 114, 100, 101, 114
351 };
352 if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
353
354
355 return Order;
356
357 }
358
359 else if (data[0] == 112)
360
361
362 {
363
364 static const unsigned short string[] =
365 {
366 97, 114, 97, 109
367 };
368 if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
369
370
371 return Param;
372
373 }
374
375 else if (data[0] == 114)
376
377
378 {
379
380 static const unsigned short string[] =
381 {
382 101, 103, 101, 120
383 };
384 if(memcmp(&data[1], &string, sizeof(QChar) * 4) == 0)
385
386
387 return Regex;
388
389 }
390
391
392
393 return NoKeyword;
394 }
395 XSLTTokenLookup::NodeName XSLTTokenLookup::classifier6(const QChar *data)
396
397 {
398 if (data[0] == 99)
399
400
401 {
402
403 static const unsigned short string[] =
404 {
405 104, 111, 111, 115, 101
406 };
407 if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
408
409
410 return Choose;
411
412 }
413
414 else if (data[0] == 102)
415
416
417 {
418
419 static const unsigned short string[] =
420 {
421 111, 114, 109, 97, 116
422 };
423 if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
424
425
426 return Format;
427
428 }
429
430 else if (data[0] == 105)
431
432
433 {
434 if (data[1] == 109)
435
436
437 {
438
439 static const unsigned short string[] =
440 {
441 112, 111, 114, 116
442 };
443 if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
444
445
446 return Import;
447
448 }
449
450 else if (data[1] == 110)
451
452
453 {
454
455 static const unsigned short string[] =
456 {
457 100, 101, 110, 116
458 };
459 if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
460
461
462 return Indent;
463
464 }
465
466
467 }
468
469 else if (data[0] == 109)
470
471
472 {
473
474 static const unsigned short string[] =
475 {
476 101, 116, 104, 111, 100
477 };
478 if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
479
480
481 return Method;
482
483 }
484
485 else if (data[0] == 111)
486
487
488 {
489
490 static const unsigned short string[] =
491 {
492 117, 116, 112, 117, 116
493 };
494 if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
495
496
497 return Output;
498
499 }
500
501 else if (data[0] == 115)
502
503
504 {
505 if (data[1] == 101)
506
507
508 {
509
510 static const unsigned short string[] =
511 {
512 108, 101, 99, 116
513 };
514 if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
515
516
517 return Select;
518
519 }
520
521 else if (data[1] == 116)
522
523
524 {
525
526 static const unsigned short string[] =
527 {
528 97, 98, 108, 101
529 };
530 if(memcmp(&data[2], &string, sizeof(QChar) * 4) == 0)
531
532
533 return Stable;
534
535 }
536
537
538 }
539
540 else if (data[0] == 116)
541
542
543 {
544
545 static const unsigned short string[] =
546 {
547 117, 110, 110, 101, 108
548 };
549 if(memcmp(&data[1], &string, sizeof(QChar) * 5) == 0)
550
551
552 return Tunnel;
553
554 }
555
556
557
558 return NoKeyword;
559 }
560 XSLTTokenLookup::NodeName XSLTTokenLookup::classifier7(const QChar *data)
561
562 {
563 if (data[0] == 99)
564
565
566 {
567 if (data[1] == 111)
568
569
570 {
571 if (data[2] == 109)
572
573
574 {
575
576 static const unsigned short string[] =
577 {
578 109, 101, 110, 116
579 };
580 if(memcmp(&data[3], &string, sizeof(QChar) * 4) == 0)
581
582
583 return Comment;
584
585 }
586
587 else if (data[2] == 112)
588
589
590 {
591
592 static const unsigned short string[] =
593 {
594 121, 45, 111, 102
595 };
596 if(memcmp(&data[3], &string, sizeof(QChar) * 4) == 0)
597
598
599 return CopyOf;
600
601 }
602
603
604 }
605
606
607 }
608
609 else if (data[0] == 101)
610
611
612 {
613
614 static const unsigned short string[] =
615 {
616 108, 101, 109, 101, 110, 116
617 };
618 if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
619
620
621 return Element;
622
623 }
624
625 else if (data[0] == 105)
626
627
628 {
629
630 static const unsigned short string[] =
631 {
632 110, 99, 108, 117, 100, 101
633 };
634 if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
635
636
637 return Include;
638
639 }
640
641 else if (data[0] == 109)
642
643
644 {
645
646 static const unsigned short string[] =
647 {
648 101, 115, 115, 97, 103, 101
649 };
650 if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
651
652
653 return Message;
654
655 }
656
657 else if (data[0] == 118)
658
659
660 {
661
662 static const unsigned short string[] =
663 {
664 101, 114, 115, 105, 111, 110
665 };
666 if(memcmp(&data[1], &string, sizeof(QChar) * 6) == 0)
667
668
669 return Version;
670
671 }
672
673
674
675 return NoKeyword;
676 }
677 XSLTTokenLookup::NodeName XSLTTokenLookup::classifier8(const QChar *data)
678
679 {
680 if (data[0] == 100)
681
682
683 {
684
685 static const unsigned short string[] =
686 {
687 111, 99, 117, 109, 101, 110, 116
688 };
689 if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
690
691
692 return Document;
693
694 }
695
696 else if (data[0] == 101)
697
698
699 {
700 if (data[1] == 108)
701
702
703 {
704
705 static const unsigned short string[] =
706 {
707 101, 109, 101, 110, 116, 115
708 };
709 if(memcmp(&data[2], &string, sizeof(QChar) * 6) == 0)
710
711
712 return Elements;
713
714 }
715
716 else if (data[1] == 110)
717
718
719 {
720
721 static const unsigned short string[] =
722 {
723 99, 111, 100, 105, 110, 103
724 };
725 if(memcmp(&data[2], &string, sizeof(QChar) * 6) == 0)
726
727
728 return Encoding;
729
730 }
731
732
733 }
734
735 else if (data[0] == 102)
736
737
738 {
739 if (data[1] == 111)
740
741
742 {
743
744 static const unsigned short string[] =
745 {
746 114, 45, 101, 97, 99, 104
747 };
748 if(memcmp(&data[2], &string, sizeof(QChar) * 6) == 0)
749
750
751 return ForEach;
752
753 }
754
755 else if (data[1] == 117)
756
757
758 {
759
760 static const unsigned short string[] =
761 {
762 110, 99, 116, 105, 111, 110
763 };
764 if(memcmp(&data[2], &string, sizeof(QChar) * 6) == 0)
765
766
767 return Function;
768
769 }
770
771
772 }
773
774 else if (data[0] == 111)
775
776
777 {
778
779 static const unsigned short string[] =
780 {
781 118, 101, 114, 114, 105, 100, 101
782 };
783 if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
784
785
786 return Override;
787
788 }
789
790 else if (data[0] == 112)
791
792
793 {
794
795 static const unsigned short string[] =
796 {
797 114, 105, 111, 114, 105, 116, 121
798 };
799 if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
800
801
802 return Priority;
803
804 }
805
806 else if (data[0] == 114)
807
808
809 {
810
811 static const unsigned short string[] =
812 {
813 101, 113, 117, 105, 114, 101, 100
814 };
815 if(memcmp(&data[1], &string, sizeof(QChar) * 7) == 0)
816
817
818 return Required;
819
820 }
821
822 else if (data[0] == 115)
823
824
825 {
826
827 static const unsigned short string[] =
828 {
829 101, 113, 117, 101, 110, 99, 101
830 };