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 tools applications 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 | #include "token.h"
|
---|
43 |
|
---|
44 | QT_BEGIN_NAMESPACE
|
---|
45 |
|
---|
46 | #if defined(DEBUG_MOC)
|
---|
47 | const char *tokenTypeName(Token t)
|
---|
48 | {
|
---|
49 | switch (t) {
|
---|
50 | case NOTOKEN: return "NOTOKEN";
|
---|
51 | case IDENTIFIER: return "IDENTIFIER";
|
---|
52 | case INTEGER_LITERAL: return "INTEGER_LITERAL";
|
---|
53 | case CHARACTER_LITERAL: return "CHARACTER_LITERAL";
|
---|
54 | case STRING_LITERAL: return "STRING_LITERAL";
|
---|
55 | case BOOLEAN_LITERAL: return "BOOLEAN_LITERAL";
|
---|
56 | case HEADER_NAME: return "HEADER_NAME";
|
---|
57 | case LANGLE: return "LANGLE";
|
---|
58 | case RANGLE: return "RANGLE";
|
---|
59 | case LPAREN: return "LPAREN";
|
---|
60 | case RPAREN: return "RPAREN";
|
---|
61 | case ELIPSIS: return "ELIPSIS";
|
---|
62 | case LBRACK: return "LBRACK";
|
---|
63 | case RBRACK: return "RBRACK";
|
---|
64 | case LBRACE: return "LBRACE";
|
---|
65 | case RBRACE: return "RBRACE";
|
---|
66 | case EQ: return "EQ";
|
---|
67 | case SCOPE: return "SCOPE";
|
---|
68 | case SEMIC: return "SEMIC";
|
---|
69 | case COLON: return "COLON";
|
---|
70 | case DOTSTAR: return "DOTSTAR";
|
---|
71 | case QUESTION: return "QUESTION";
|
---|
72 | case DOT: return "DOT";
|
---|
73 | case DYNAMIC_CAST: return "DYNAMIC_CAST";
|
---|
74 | case STATIC_CAST: return "STATIC_CAST";
|
---|
75 | case REINTERPRET_CAST: return "REINTERPRET_CAST";
|
---|
76 | case CONST_CAST: return "CONST_CAST";
|
---|
77 | case TYPEID: return "TYPEID";
|
---|
78 | case THIS: return "THIS";
|
---|
79 | case TEMPLATE: return "TEMPLATE";
|
---|
80 | case THROW: return "THROW";
|
---|
81 | case TRY: return "TRY";
|
---|
82 | case CATCH: return "CATCH";
|
---|
83 | case TYPEDEF: return "TYPEDEF";
|
---|
84 | case FRIEND: return "FRIEND";
|
---|
85 | case CLASS: return "CLASS";
|
---|
86 | case NAMESPACE: return "NAMESPACE";
|
---|
87 | case ENUM: return "ENUM";
|
---|
88 | case STRUCT: return "STRUCT";
|
---|
89 | case UNION: return "UNION";
|
---|
90 | case VIRTUAL: return "VIRTUAL";
|
---|
91 | case PRIVATE: return "PRIVATE";
|
---|
92 | case PROTECTED: return "PROTECTED";
|
---|
93 | case PUBLIC: return "PUBLIC";
|
---|
94 | case EXPORT: return "EXPORT";
|
---|
95 | case AUTO: return "AUTO";
|
---|
96 | case REGISTER: return "REGISTER";
|
---|
97 | case EXTERN: return "EXTERN";
|
---|
98 | case MUTABLE: return "MUTABLE";
|
---|
99 | case ASM: return "ASM";
|
---|
100 | case USING: return "USING";
|
---|
101 | case INLINE: return "INLINE";
|
---|
102 | case EXPLICIT: return "EXPLICIT";
|
---|
103 | case STATIC: return "STATIC";
|
---|
104 | case CONST: return "CONST";
|
---|
105 | case VOLATILE: return "VOLATILE";
|
---|
106 | case OPERATOR: return "OPERATOR";
|
---|
107 | case SIZEOF: return "SIZEOF";
|
---|
108 | case NEW: return "NEW";
|
---|
109 | case DELETE: return "DELETE";
|
---|
110 | case PLUS: return "PLUS";
|
---|
111 | case MINUS: return "MINUS";
|
---|
112 | case STAR: return "STAR";
|
---|
113 | case SLASH: return "SLASH";
|
---|
114 | case PERCENT: return "PERCENT";
|
---|
115 | case HAT: return "HAT";
|
---|
116 | case AND: return "AND";
|
---|
117 | case OR: return "OR";
|
---|
118 | case TILDE: return "TILDE";
|
---|
119 | case NOT: return "NOT";
|
---|
120 | case PLUS_EQ: return "PLUS_EQ";
|
---|
121 | case MINUS_EQ: return "MINUS_EQ";
|
---|
122 | case STAR_EQ: return "STAR_EQ";
|
---|
123 | case SLASH_EQ: return "SLASH_EQ";
|
---|
124 | case PERCENT_EQ: return "PERCENT_EQ";
|
---|
125 | case HAT_EQ: return "HAT_EQ";
|
---|
126 | case AND_EQ: return "AND_EQ";
|
---|
127 | case OR_EQ: return "OR_EQ";
|
---|
128 | case LTLT: return "LTLT";
|
---|
129 | case GTGT: return "GTGT";
|
---|
130 | case GTGT_EQ: return "GTGT_EQ";
|
---|
131 | case LTLT_EQ: return "LTLT_EQ";
|
---|
132 | case EQEQ: return "EQEQ";
|
---|
133 | case NE: return "NE";
|
---|
134 | case LE: return "LE";
|
---|
135 | case GE: return "GE";
|
---|
136 | case ANDAND: return "ANDAND";
|
---|
137 | case OROR: return "OROR";
|
---|
138 | case INCR: return "INCR";
|
---|
139 | case DECR: return "DECR";
|
---|
140 | case COMMA: return "COMMA";
|
---|
141 | case ARROW_STAR: return "ARROW_STAR";
|
---|
142 | case ARROW: return "ARROW";
|
---|
143 | case CHAR: return "CHAR";
|
---|
144 | case WCHAR: return "WCHAR";
|
---|
145 | case BOOL: return "BOOL";
|
---|
146 | case SHORT: return "SHORT";
|
---|
147 | case INT: return "INT";
|
---|
148 | case LONG: return "LONG";
|
---|
149 | case SIGNED: return "SIGNED";
|
---|
150 | case UNSIGNED: return "UNSIGNED";
|
---|
151 | case FLOAT: return "FLOAT";
|
---|
152 | case DOUBLE: return "DOUBLE";
|
---|
153 | case VOID: return "VOID";
|
---|
154 | case CASE: return "CASE";
|
---|
155 | case DEFAULT: return "DEFAULT";
|
---|
156 | case IF: return "IF";
|
---|
157 | case ELSE: return "ELSE";
|
---|
158 | case SWITCH: return "SWITCH";
|
---|
159 | case WHILE: return "WHILE";
|
---|
160 | case DO: return "DO";
|
---|
161 | case FOR: return "FOR";
|
---|
162 | case BREAK: return "BREAK";
|
---|
163 | case CONTINUE: return "CONTINUE";
|
---|
164 | case GOTO: return "GOTO";
|
---|
165 | case SIGNALS: return "SIGNALS";
|
---|
166 | case SLOTS: return "SLOTS";
|
---|
167 | case RETURN: return "RETURN";
|
---|
168 | case Q_OBJECT_TOKEN: return "Q_OBJECT_TOKEN";
|
---|
169 | case Q_GADGET_TOKEN: return "Q_GADGET_TOKEN";
|
---|
170 | case Q_PROPERTY_TOKEN: return "Q_PROPERTY_TOKEN";
|
---|
171 | case Q_ENUMS_TOKEN: return "Q_ENUMS_TOKEN";
|
---|
172 | case Q_FLAGS_TOKEN: return "Q_FLAGS_TOKEN";
|
---|
173 | case Q_DECLARE_FLAGS_TOKEN: return "Q_DECLARE_FLAGS_TOKEN";
|
---|
174 | case Q_DECLARE_INTERFACE_TOKEN: return "Q_DECLARE_INTERFACE_TOKEN";
|
---|
175 | case Q_CLASSINFO_TOKEN: return "Q_CLASSINFO_TOKEN";
|
---|
176 | case Q_INTERFACES_TOKEN: return "Q_INTERFACES_TOKEN";
|
---|
177 | case Q_SIGNALS_TOKEN: return "Q_SIGNALS_TOKEN";
|
---|
178 | case Q_SLOTS_TOKEN: return "Q_SLOTS_TOKEN";
|
---|
179 | case Q_SIGNAL_TOKEN: return "Q_SIGNAL_TOKEN";
|
---|
180 | case Q_SLOT_TOKEN: return "Q_SLOT_TOKEN";
|
---|
181 | case Q_PRIVATE_SLOT_TOKEN: return "Q_PRIVATE_SLOT_TOKEN";
|
---|
182 | case SPECIAL_TREATMENT_MARK: return "SPECIAL_TREATMENT_MARK";
|
---|
183 | case MOC_INCLUDE_BEGIN: return "MOC_INCLUDE_BEGIN";
|
---|
184 | case MOC_INCLUDE_END: return "MOC_INCLUDE_END";
|
---|
185 | case CPP_COMMENT: return "CPP_COMMENT";
|
---|
186 | case C_COMMENT: return "C_COMMENT";
|
---|
187 | case FLOATING_LITERAL: return "FLOATING_LITERAL";
|
---|
188 | case HASH: return "HASH";
|
---|
189 | case QUOTE: return "QUOTE";
|
---|
190 | case SINGLEQUOTE: return "SINGLEQUOTE";
|
---|
191 | case DIGIT: return "DIGIT";
|
---|
192 | case CHARACTER: return "CHARACTER";
|
---|
193 | case NEWLINE: return "NEWLINE";
|
---|
194 | case WHITESPACE: return "WHITESPACE";
|
---|
195 | case BACKSLASH: return "BACKSLASH";
|
---|
196 | case INCOMPLETE: return "INCOMPLETE";
|
---|
197 | case PP_DEFINE: return "PP_DEFINE";
|
---|
198 | case PP_UNDEF: return "PP_UNDEF";
|
---|
199 | case PP_IF: return "PP_IF";
|
---|
200 | case PP_IFDEF: return "PP_IFDEF";
|
---|
201 | case PP_IFNDEF: return "PP_IFNDEF";
|
---|
202 | case PP_ELIF: return "PP_ELIF";
|
---|
203 | case PP_ELSE: return "PP_ELSE";
|
---|
204 | case PP_ENDIF: return "PP_ENDIF";
|
---|
205 | case PP_INCLUDE: return "PP_INCLUDE";
|
---|
206 | case PP_HASHHASH: return "PP_HASHHASH";
|
---|
207 | case PP_HASH: return "PP_HASH";
|
---|
208 | case PP_DEFINED: return "PP_DEFINED";
|
---|
209 | case PP_INCOMPLETE: return "PP_INCOMPLETE";
|
---|
210 | case PP_MOC_TRUE: return "PP_MOC_TRUE";
|
---|
211 | case PP_MOC_FALSE: return "PP_MOC_FALSE";
|
---|
212 | case Q_DECLARE_METATYPE_TOKEN: return "Q_DECLARE_METATYPE_TOKEN";
|
---|
213 | case Q_MOC_COMPAT_TOKEN: return "Q_MOC_COMPAT_TOKEN";
|
---|
214 | case Q_QT3_SUPPORT_TOKEN: return "Q_QT3_SUPPORT_TOKEN";
|
---|
215 | case Q_INVOKABLE_TOKEN: return "Q_INVOKABLE_TOKEN";
|
---|
216 | case Q_SCRIPTABLE_TOKEN: return "Q_SCRIPTABLE_TOKEN";
|
---|
217 | }
|
---|
218 | return "";
|
---|
219 | }
|
---|
220 | #endif
|
---|
221 |
|
---|
222 | QT_END_NAMESPACE
|
---|