Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / src / declarative / qml / parser / qdeclarativejskeywords_p.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the QtDeclarative module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
16 **
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
20 **
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
28 **
29 ** Other Usage
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 #ifndef QDECLARATIVEJSKEYWORDS_P_H
43 #define QDECLARATIVEJSKEYWORDS_P_H
44
45 //
46 //  W A R N I N G
47 //  -------------
48 //
49 // This file is not part of the Qt API.  It exists purely as an
50 // implementation detail.  This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55
56 static inline int classify2(const QChar *s, bool qmlMode) {
57   if (s[0].unicode() == 'a') {
58     if (s[1].unicode() == 's') {
59       return qmlMode ? Lexer::T_AS : Lexer::T_RESERVED_WORD;
60     }
61   }
62   else if (s[0].unicode() == 'd') {
63     if (s[1].unicode() == 'o') {
64       return Lexer::T_DO;
65     }
66   }
67   else if (s[0].unicode() == 'i') {
68     if (s[1].unicode() == 'f') {
69       return Lexer::T_IF;
70     }
71     else if (s[1].unicode() == 'n') {
72       return Lexer::T_IN;
73     }
74   }
75   else if (qmlMode && s[0].unicode() == 'o') {
76     if (s[1].unicode() == 'n') {
77       return Lexer::T_ON;
78     }
79   }
80   return Lexer::T_IDENTIFIER;
81 }
82
83 static inline int classify3(const QChar *s, bool /*qmlMode*/) {
84   if (s[0].unicode() == 'f') {
85     if (s[1].unicode() == 'o') {
86       if (s[2].unicode() == 'r') {
87         return Lexer::T_FOR;
88       }
89     }
90   }
91   else if (s[0].unicode() == 'i') {
92     if (s[1].unicode() == 'n') {
93       if (s[2].unicode() == 't') {
94         return Lexer::T_INT;
95       }
96     }
97   }
98   else if (s[0].unicode() == 'n') {
99     if (s[1].unicode() == 'e') {
100       if (s[2].unicode() == 'w') {
101         return Lexer::T_NEW;
102       }
103     }
104   }
105   else if (s[0].unicode() == 't') {
106     if (s[1].unicode() == 'r') {
107       if (s[2].unicode() == 'y') {
108         return Lexer::T_TRY;
109       }
110     }
111   }
112   else if (s[0].unicode() == 'v') {
113     if (s[1].unicode() == 'a') {
114       if (s[2].unicode() == 'r') {
115         return Lexer::T_VAR;
116       }
117     }
118   }
119   return Lexer::T_IDENTIFIER;
120 }
121
122 static inline int classify4(const QChar *s, bool /*qmlMode*/) {
123   if (s[0].unicode() == 'b') {
124     if (s[1].unicode() == 'y') {
125       if (s[2].unicode() == 't') {
126         if (s[3].unicode() == 'e') {
127           return Lexer::T_BYTE;
128         }
129       }
130     }
131   }
132   else if (s[0].unicode() == 'c') {
133     if (s[1].unicode() == 'a') {
134       if (s[2].unicode() == 's') {
135         if (s[3].unicode() == 'e') {
136           return Lexer::T_CASE;
137         }
138       }
139     }
140     else if (s[1].unicode() == 'h') {
141       if (s[2].unicode() == 'a') {
142         if (s[3].unicode() == 'r') {
143           return Lexer::T_CHAR;
144         }
145       }
146     }
147   }
148   else if (s[0].unicode() == 'e') {
149     if (s[1].unicode() == 'l') {
150       if (s[2].unicode() == 's') {
151         if (s[3].unicode() == 'e') {
152           return Lexer::T_ELSE;
153         }
154       }
155     }
156     else if (s[1].unicode() == 'n') {
157       if (s[2].unicode() == 'u') {
158         if (s[3].unicode() == 'm') {
159           return Lexer::T_ENUM;
160         }
161       }
162     }
163   }
164   else if (s[0].unicode() == 'g') {
165     if (s[1].unicode() == 'o') {
166       if (s[2].unicode() == 't') {
167         if (s[3].unicode() == 'o') {
168           return Lexer::T_GOTO;
169         }
170       }
171     }
172   }
173   else if (s[0].unicode() == 'l') {
174     if (s[1].unicode() == 'o') {
175       if (s[2].unicode() == 'n') {
176         if (s[3].unicode() == 'g') {
177           return Lexer::T_LONG;
178         }
179       }
180     }
181   }
182   else if (s[0].unicode() == 'n') {
183     if (s[1].unicode() == 'u') {
184       if (s[2].unicode() == 'l') {
185         if (s[3].unicode() == 'l') {
186           return Lexer::T_NULL;
187         }
188       }
189     }
190   }
191   else if (s[0].unicode() == 't') {
192     if (s[1].unicode() == 'h') {
193       if (s[2].unicode() == 'i') {
194         if (s[3].unicode() == 's') {
195           return Lexer::T_THIS;
196         }
197       }
198     }
199     else if (s[1].unicode() == 'r') {
200       if (s[2].unicode() == 'u') {
201         if (s[3].unicode() == 'e') {
202           return Lexer::T_TRUE;
203         }
204       }
205     }
206   }
207   else if (s[0].unicode() == 'v') {
208     if (s[1].unicode() == 'o') {
209       if (s[2].unicode() == 'i') {
210         if (s[3].unicode() == 'd') {
211           return Lexer::T_VOID;
212         }
213       }
214     }
215   }
216   else if (s[0].unicode() == 'w') {
217     if (s[1].unicode() == 'i') {
218       if (s[2].unicode() == 't') {
219         if (s[3].unicode() == 'h') {
220           return Lexer::T_WITH;
221         }
222       }
223     }
224   }
225   return Lexer::T_IDENTIFIER;
226 }
227
228 static inline int classify5(const QChar *s, bool /*qmlMode*/) {
229   if (s[0].unicode() == 'b') {
230     if (s[1].unicode() == 'r') {
231       if (s[2].unicode() == 'e') {
232         if (s[3].unicode() == 'a') {
233           if (s[4].unicode() == 'k') {
234             return Lexer::T_BREAK;
235           }
236         }
237       }
238     }
239   }
240   else if (s[0].unicode() == 'c') {
241     if (s[1].unicode() == 'a') {
242       if (s[2].unicode() == 't') {
243         if (s[3].unicode() == 'c') {
244           if (s[4].unicode() == 'h') {
245             return Lexer::T_CATCH;
246           }
247         }
248       }
249     }
250     else if (s[1].unicode() == 'l') {
251       if (s[2].unicode() == 'a') {
252         if (s[3].unicode() == 's') {
253           if (s[4].unicode() == 's') {
254             return Lexer::T_CLASS;
255           }
256         }
257       }
258     }
259     else if (s[1].unicode() == 'o') {
260       if (s[2].unicode() == 'n') {
261         if (s[3].unicode() == 's') {
262           if (s[4].unicode() == 't') {
263             return Lexer::T_CONST;
264           }
265         }
266       }
267     }
268   }
269   else if (s[0].unicode() == 'f') {
270     if (s[1].unicode() == 'a') {
271       if (s[2].unicode() == 'l') {
272         if (s[3].unicode() == 's') {
273           if (s[4].unicode() == 'e') {
274             return Lexer::T_FALSE;
275           }
276         }
277       }
278     }
279     else if (s[1].unicode() == 'i') {
280       if (s[2].unicode() == 'n') {
281         if (s[3].unicode() == 'a') {
282           if (s[4].unicode() == 'l') {
283             return Lexer::T_FINAL;
284           }
285         }
286       }
287     }
288     else if (s[1].unicode() == 'l') {
289       if (s[2].unicode() == 'o') {
290         if (s[3].unicode() == 'a') {
291           if (s[4].unicode() == 't') {
292             return Lexer::T_FLOAT;
293           }
294         }
295       }
296     }
297   }
298   else if (s[0].unicode() == 's') {
299     if (s[1].unicode() == 'h') {
300       if (s[2].unicode() == 'o') {
301         if (s[3].unicode() == 'r') {
302           if (s[4].unicode() == 't') {
303             return Lexer::T_SHORT;
304           }
305         }
306       }
307     }
308     else if (s[1].unicode() == 'u') {
309       if (s[2].unicode() == 'p') {
310         if (s[3].unicode() == 'e') {
311           if (s[4].unicode() == 'r') {
312             return Lexer::T_SUPER;
313           }
314         }
315       }
316     }
317   }
318   else if (s[0].unicode() == 't') {
319     if (s[1].unicode() == 'h') {
320       if (s[2].unicode() == 'r') {
321         if (s[3].unicode() == 'o') {
322           if (s[4].unicode() == 'w') {
323             return Lexer::T_THROW;
324           }
325         }
326       }
327     }
328   }
329   else if (s[0].unicode() == 'w') {
330     if (s[1].unicode() == 'h') {
331       if (s[2].unicode() == 'i') {
332         if (s[3].unicode() == 'l') {
333           if (s[4].unicode() == 'e') {
334             return Lexer::T_WHILE;
335           }
336         }
337       }
338     }
339   }
340   return Lexer::T_IDENTIFIER;
341 }
342
343 static inline int classify6(const QChar *s, bool qmlMode) {
344   if (s[0].unicode() == 'd') {
345     if (s[1].unicode() == 'e') {
346       if (s[2].unicode() == 'l') {
347         if (s[3].unicode() == 'e') {
348           if (s[4].unicode() == 't') {
349             if (s[5].unicode() == 'e') {
350               return Lexer::T_DELETE;
351             }
352           }
353         }
354       }
355     }
356     else if (s[1].unicode() == 'o') {
357       if (s[2].unicode() == 'u') {
358         if (s[3].unicode() == 'b') {
359           if (s[4].unicode() == 'l') {
360             if (s[5].unicode() == 'e') {
361               return Lexer::T_DOUBLE;
362             }
363           }
364         }
365       }
366     }
367   }
368   else if (s[0].unicode() == 'e') {
369     if (s[1].unicode() == 'x') {
370       if (s[2].unicode() == 'p') {
371         if (s[3].unicode() == 'o') {
372           if (s[4].unicode() == 'r') {
373             if (s[5].unicode() == 't') {
374               return Lexer::T_EXPORT;
375             }
376           }
377         }
378       }
379     }
380   }
381   else if (s[0].unicode() == 'i') {
382     if (s[1].unicode() == 'm') {
383       if (s[2].unicode() == 'p') {
384         if (s[3].unicode() == 'o') {
385           if (s[4].unicode() == 'r') {
386             if (s[5].unicode() == 't') {
387               return qmlMode ? Lexer::T_IMPORT : Lexer::T_RESERVED_WORD;
388             }
389           }
390         }
391       }
392     }
393   }
394   else if (s[0].unicode() == 'n') {
395     if (s[1].unicode() == 'a') {
396       if (s[2].unicode() == 't') {
397         if (s[3].unicode() == 'i') {
398           if (s[4].unicode() == 'v') {
399             if (s[5].unicode() == 'e') {
400               return Lexer::T_NATIVE;
401             }
402           }
403         }
404       }
405     }
406   }
407   else if (s[0].unicode() == 'p') {
408     if (s[1].unicode() == 'u') {
409       if (s[2].unicode() == 'b') {
410         if (s[3].unicode() == 'l') {
411           if (s[4].unicode() == 'i') {
412             if (s[5].unicode() == 'c') {
413               return qmlMode ? Lexer::T_PUBLIC : Lexer::T_RESERVED_WORD;
414             }
415           }
416         }
417       }
418     }
419   }
420   else if (s[0].unicode() == 'r') {
421     if (s[1].unicode() == 'e') {
422       if (s[2].unicode() == 't') {
423         if (s[3].unicode() == 'u') {
424           if (s[4].unicode() == 'r') {
425             if (s[5].unicode() == 'n') {
426               return Lexer::T_RETURN;
427             }
428           }
429         }
430       }
431     }
432   }
433   else if (s[0].unicode() == 's') {
434     if (qmlMode && s[1].unicode() == 'i') {
435       if (s[2].unicode() == 'g') {
436         if (s[3].unicode() == 'n') {
437           if (s[4].unicode() == 'a') {
438             if (s[5].unicode() == 'l') {
439               return Lexer::T_SIGNAL;
440             }
441           }
442         }
443       }
444     }
445     else if (s[1].unicode() == 't') {
446       if (s[2].unicode() == 'a') {
447         if (s[3].unicode() == 't') {
448           if (s[4].unicode() == 'i') {
449             if (s[5].unicode() == 'c') {
450               return Lexer::T_STATIC;
451             }
452           }
453         }
454       }
455     }
456     else if (s[1].unicode() == 'w') {
457       if (s[2].unicode() == 'i') {
458         if (s[3].unicode() == 't') {
459           if (s[4].unicode() == 'c') {
460             if (s[5].unicode() == 'h') {
461               return Lexer::T_SWITCH;
462             }
463           }
464         }
465       }
466     }
467   }
468   else if (s[0].unicode() == 't') {
469     if (s[1].unicode() == 'h') {
470       if (s[2].unicode() == 'r') {
471         if (s[3].unicode() == 'o') {
472           if (s[4].unicode() == 'w') {
473             if (s[5].unicode() == 's') {
474               return Lexer::T_THROWS;
475             }
476           }
477         }
478       }
479     }
480     else if (s[1].unicode() == 'y') {
481       if (s[2].unicode() == 'p') {
482         if (s[3].unicode() == 'e') {
483           if (s[4].unicode() == 'o') {
484             if (s[5].unicode() == 'f') {
485               return Lexer::T_TYPEOF;
486             }
487           }
488         }
489       }
490     }
491   }
492   return Lexer::T_IDENTIFIER;
493 }
494
495 static inline int classify7(const QChar *s, bool /*qmlMode*/) {
496   if (s[0].unicode() == 'b') {
497     if (s[1].unicode() == 'o') {
498       if (s[2].unicode() == 'o') {
499         if (s[3].unicode() == 'l') {
500           if (s[4].unicode() == 'e') {
501             if (s[5].unicode() == 'a') {
502               if (s[6].unicode() == 'n') {
503                 return Lexer::T_BOOLEAN;
504               }
505             }
506           }
507         }
508       }
509     }
510   }
511   else if (s[0].unicode() == 'd') {
512     if (s[1].unicode() == 'e') {
513       if (s[2].unicode() == 'f') {
514         if (s[3].unicode() == 'a') {
515           if (s[4].unicode() == 'u') {
516             if (s[5].unicode() == 'l') {
517               if (s[6].unicode() == 't') {
518                 return Lexer::T_DEFAULT;
519               }
520             }
521           }
522         }
523       }
524     }
525   }
526   else if (s[0].unicode() == 'e') {
527     if (s[1].unicode() == 'x') {
528       if (s[2].unicode() == 't') {
529         if (s[3].unicode() == 'e') {
530           if (s[4].unicode() == 'n') {
531             if (s[5].unicode() == 'd') {
532               if (s[6].unicode() == 's') {
533                 return Lexer::T_EXTENDS;
534               }
535             }
536           }
537         }
538       }
539     }
540   }
541   else if (s[0].unicode() == 'f') {
542     if (s[1].unicode() == 'i') {
543       if (s[2].unicode() == 'n') {
544         if (s[3].unicode() == 'a') {
545           if (s[4].unicode() == 'l') {
546             if (s[5].unicode() == 'l') {
547               if (s[6].unicode() == 'y') {
548                 return Lexer::T_FINALLY;
549               }
550             }
551           }
552         }
553       }
554     }
555   }
556   else if (s[0].unicode() == 'p') {
557     if (s[1].unicode() == 'a') {
558       if (s[2].unicode() == 'c') {
559         if (s[3].unicode() == 'k') {
560           if (s[4].unicode() == 'a') {
561             if (s[5].unicode() == 'g') {
562               if (s[6].unicode() == 'e') {
563                 return Lexer::T_PACKAGE;
564               }
565             }
566           }
567         }
568       }
569     }
570     else if (s[1].unicode() == 'r') {
571       if (s[2].unicode() == 'i') {
572         if (s[3].unicode() == 'v') {
573           if (s[4].unicode() == 'a') {
574             if (s[5].unicode() == 't') {
575               if (s[6].unicode() == 'e') {
576                 return Lexer::T_PRIVATE;
577               }
578             }
579           }
580         }
581       }
582     }
583   }
584   return Lexer::T_IDENTIFIER;
585 }
586
587 static inline int classify8(const QChar *s, bool qmlMode) {
588   if (s[0].unicode() == 'a') {
589     if (s[1].unicode() == 'b') {
590       if (s[2].unicode() == 's') {
591         if (s[3].unicode() == 't') {
592           if (s[4].unicode() == 'r') {
593             if (s[5].unicode() == 'a') {
594               if (s[6].unicode() == 'c') {
595                 if (s[7].unicode() == 't') {
596                   return Lexer::T_ABSTRACT;
597                 }
598               }
599             }
600           }
601         }
602       }
603     }
604   }
605   else if (s[0].unicode() == 'c') {
606     if (s[1].unicode() == 'o') {
607       if (s[2].unicode() == 'n') {
608         if (s[3].unicode() == 't') {
609           if (s[4].unicode() == 'i') {
610             if (s[5].unicode() == 'n') {
611               if (s[6].unicode() == 'u') {
612                 if (s[7].unicode() == 'e') {
613                   return Lexer::T_CONTINUE;
614                 }
615               }
616             }
617           }
618         }
619       }
620     }
621   }
622   else if (s[0].unicode() == 'd') {
623     if (s[1].unicode() == 'e') {
624       if (s[2].unicode() == 'b') {
625         if (s[3].unicode() == 'u') {
626           if (s[4].unicode() == 'g') {
627             if (s[5].unicode() == 'g') {
628               if (s[6].unicode() == 'e') {
629                 if (s[7].unicode() == 'r') {
630                   return Lexer::T_DEBUGGER;
631                 }
632               }
633             }
634           }
635         }
636       }
637     }
638   }
639   else if (s[0].unicode() == 'f') {
640     if (s[1].unicode() == 'u') {
641       if (s[2].unicode() == 'n') {
642         if (s[3].unicode() == 'c') {
643           if (s[4].unicode() == 't') {
644             if (s[5].unicode() == 'i') {
645               if (s[6].unicode() == 'o') {
646                 if (s[7].unicode() == 'n') {
647                   return Lexer::T_FUNCTION;
648                 }
649               }
650             }
651           }
652         }
653       }
654     }
655   }
656   else if (qmlMode && s[0].unicode() == 'p') {
657     if (s[1].unicode() == 'r') {
658       if (s[2].unicode() == 'o') {
659         if (s[3].unicode() == 'p') {
660           if (s[4].unicode() == 'e') {
661             if (s[5].unicode() == 'r') {
662               if (s[6].unicode() == 't') {
663                 if (s[7].unicode() == 'y') {
664                   return Lexer::T_PROPERTY;
665                 }
666               }
667             }
668           }
669         }
670       }
671     }
672   }
673   else if (qmlMode && s[0].unicode() == 'r') {
674     if (s[1].unicode() == 'e') {
675       if (s[2].unicode() == 'a') {
676         if (s[3].unicode() == 'd') {
677           if (s[4].unicode() == 'o') {
678             if (s[5].unicode() == 'n') {
679               if (s[6].unicode() == 'l') {
680                 if (s[7].unicode() == 'y') {
681                   return Lexer::T_READONLY;
682                 }
683               }
684             }
685           }
686         }
687       }
688     }
689   }
690   else if (s[0].unicode() == 'v') {
691     if (s[1].unicode() == 'o') {
692       if (s[2].unicode() == 'l') {
693         if (s[3].unicode() == 'a') {
694           if (s[4].unicode() == 't') {
695             if (s[5].unicode() == 'i') {
696               if (s[6].unicode() == 'l') {
697                 if (s[7].unicode() == 'e') {
698                   return Lexer::T_VOLATILE;
699                 }
700               }
701             }
702           }
703         }
704       }
705     }
706   }
707   return Lexer::T_IDENTIFIER;
708 }
709
710 static inline int classify9(const QChar *s, bool /*qmlMode*/) {
711   if (s[0].unicode() == 'i') {
712     if (s[1].unicode() == 'n') {
713       if (s[2].unicode() == 't') {
714         if (s[3].unicode() == 'e') {
715           if (s[4].unicode() == 'r') {
716             if (s[5].unicode() == 'f') {
717               if (s[6].unicode() == 'a') {
718                 if (s[7].unicode() == 'c') {
719                   if (s[8].unicode() == 'e') {
720                     return Lexer::T_INTERFACE;
721                   }
722                 }
723               }
724             }
725           }
726         }
727       }
728     }
729   }
730   else if (s[0].unicode() == 'p') {
731     if (s[1].unicode() == 'r') {
732       if (s[2].unicode() == 'o') {
733         if (s[3].unicode() == 't') {
734           if (s[4].unicode() == 'e') {
735             if (s[5].unicode() == 'c') {
736               if (s[6].unicode() == 't') {
737                 if (s[7].unicode() == 'e') {
738                   if (s[8].unicode() == 'd') {
739                     return Lexer::T_PROTECTED;
740                   }
741                 }
742               }
743             }
744           }
745         }
746       }
747     }
748   }
749   else if (s[0].unicode() == 't') {
750     if (s[1].unicode() == 'r') {
751       if (s[2].unicode() == 'a') {
752         if (s[3].unicode() == 'n') {
753           if (s[4].unicode() == 's') {
754             if (s[5].unicode() == 'i') {
755               if (s[6].unicode() == 'e') {
756                 if (s[7].unicode() == 'n') {
757                   if (s[8].unicode() == 't') {
758                     return Lexer::T_TRANSIENT;
759                   }
760                 }
761               }
762             }
763           }
764         }
765       }
766     }
767   }
768   return Lexer::T_IDENTIFIER;
769 }
770
771 static inline int classify10(const QChar *s, bool /*qmlMode*/) {
772   if (s[0].unicode() == 'i') {
773     if (s[1].unicode() == 'm') {
774       if (s[2].unicode() == 'p') {
775         if (s[3].unicode() == 'l') {
776           if (s[4].unicode() == 'e') {
777             if (s[5].unicode() == 'm') {
778               if (s[6].unicode() == 'e') {
779                 if (s[7].unicode() == 'n') {
780                   if (s[8].unicode() == 't') {
781                     if (s[9].unicode() == 's') {
782                       return Lexer::T_IMPLEMENTS;
783                     }
784                   }
785                 }
786               }
787             }
788           }
789         }
790       }
791     }
792     else if (s[1].unicode() == 'n') {
793       if (s[2].unicode() == 's') {
794         if (s[3].unicode() == 't') {
795           if (s[4].unicode() == 'a') {
796             if (s[5].unicode() == 'n') {
797               if (s[6].unicode() == 'c') {
798                 if (s[7].unicode() == 'e') {
799                   if (s[8].unicode() == 'o') {
800                     if (s[9].unicode() == 'f') {
801                       return Lexer::T_INSTANCEOF;
802                     }
803                   }
804                 }
805               }
806             }
807           }
808         }
809       }
810     }
811   }
812   return Lexer::T_IDENTIFIER;
813 }
814
815 static inline int classify12(const QChar *s, bool /*qmlMode*/) {
816   if (s[0].unicode() == 's') {
817     if (s[1].unicode() == 'y') {
818       if (s[2].unicode() == 'n') {
819         if (s[3].unicode() == 'c') {
820           if (s[4].unicode() == 'h') {
821             if (s[5].unicode() == 'r') {
822               if (s[6].unicode() == 'o') {
823                 if (s[7].unicode() == 'n') {
824                   if (s[8].unicode() == 'i') {
825                     if (s[9].unicode() == 'z') {
826                       if (s[10].unicode() == 'e') {
827                         if (s[11].unicode() == 'd') {
828                           return Lexer::T_SYNCHRONIZED;
829                         }
830                       }
831                     }
832                   }
833                 }
834               }
835             }
836           }
837         }
838       }
839     }
840   }
841   return Lexer::T_IDENTIFIER;
842 }
843
844 int Lexer::classify(const QChar *s, int n, bool qmlMode) {
845   switch (n) {
846     case 2: return classify2(s, qmlMode);
847     case 3: return classify3(s, qmlMode);
848     case 4: return classify4(s, qmlMode);
849     case 5: return classify5(s, qmlMode);
850     case 6: return classify6(s, qmlMode);
851     case 7: return classify7(s, qmlMode);
852     case 8: return classify8(s, qmlMode);
853     case 9: return classify9(s, qmlMode);
854     case 10: return classify10(s, qmlMode);
855     case 12: return classify12(s, qmlMode);
856     default: return Lexer::T_IDENTIFIER;
857   } // switch
858 }
859
860 #endif // QDECLARATIVEJSKEYWORDS_P_H