1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** Contact: Qt Software Information ([email protected])
|
---|
5 | **
|
---|
6 | ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
|
---|
7 | **
|
---|
8 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
9 | ** Commercial Usage
|
---|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
11 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
12 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
13 | ** a written agreement between you and Nokia.
|
---|
14 | **
|
---|
15 | ** GNU Lesser General Public License Usage
|
---|
16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
17 | ** General Public License version 2.1 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
19 | ** packaging of this file. Please review the following information to
|
---|
20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
22 | **
|
---|
23 | ** In addition, as a special exception, Nokia gives you certain
|
---|
24 | ** additional rights. These rights are described in the Nokia Qt LGPL
|
---|
25 | ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
---|
26 | ** 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 are unsure which license is appropriate for your use, please
|
---|
37 | ** contact the sales department 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 |
|
---|
46 | QT_BEGIN_NAMESPACE
|
---|
47 |
|
---|
48 | using namespace QPatternist;
|
---|
49 |
|
---|
50 | XSLTTokenLookup::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 | };
|
---|
|
---|