author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Wed, 21 Apr 2010 11:15:19 +0300 | |
branch | RCL_3 |
changeset 11 | 25a739ee40f4 |
parent 4 | 3b1da2848fc7 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the test suite of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
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 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
/* NOTE: This file is AUTO GENERATED by qtokenautomaton2cpp.xsl. */ |
|
42 |
||
43 |
#include "noToString.h" |
|
44 |
||
45 |
QT_BEGIN_NAMESPACE |
|
46 |
||
47 |
using namespace NoToStringNS; |
|
48 |
||
49 |
NoToString::Token NoToString::classifier3(const QChar *data) |
|
50 |
||
51 |
{ |
|
52 |
if (data[0] == 100) |
|
53 |
||
54 |
||
55 |
{ |
|
56 |
||
57 |
static const unsigned short string[] = |
|
58 |
{ |
|
59 |
101, 102 |
|
60 |
}; |
|
61 |
if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0) |
|
62 |
||
63 |
||
64 |
return _111; |
|
65 |
||
66 |
} |
|
67 |
||
68 |
else if (data[0] == 97) |
|
69 |
||
70 |
||
71 |
{ |
|
72 |
||
73 |
static const unsigned short string[] = |
|
74 |
{ |
|
75 |
98, 99 |
|
76 |
}; |
|
77 |
if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0) |
|
78 |
||
79 |
||
80 |
return _; |
|
81 |
||
82 |
} |
|
83 |
||
84 |
else if (data[0] == 103) |
|
85 |
||
86 |
||
87 |
{ |
|
88 |
||
89 |
static const unsigned short string[] = |
|
90 |
{ |
|
91 |
104, 105 |
|
92 |
}; |
|
93 |
if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0) |
|
94 |
||
95 |
||
96 |
return wobbly; |
|
97 |
||
98 |
} |
|
99 |
||
100 |
||
101 |
||
102 |
return NoKeyword; |
|
103 |
} |
|
104 |
NoToString::Token NoToString::classifier4(const QChar *data) |
|
105 |
||
106 |
{ |
|
107 |
if (data[0] == 70) |
|
108 |
||
109 |
||
110 |
{ |
|
111 |
if (data[1] == 70) |
|
112 |
||
113 |
||
114 |
{ |
|
115 |
if (data[2] == 70) |
|
116 |
||
117 |
||
118 |
{ |
|
119 |
if (data[3] == 70) |
|
120 |
||
121 |
||
122 |
{ |
|
123 |
||
124 |
||
125 |
return FFFF; |
|
126 |
||
127 |
} |
|
128 |
||
129 |
else if (data[3] == 71) |
|
130 |
||
131 |
||
132 |
{ |
|
133 |
||
134 |
||
135 |
return FFFG; |
|
136 |
||
137 |
} |
|
138 |
||
139 |
||
140 |
} |
|
141 |
||
142 |
else if (data[2] == 71) |
|
143 |
||
144 |
||
145 |
{ |
|
146 |
if (data[3] == 70) |
|
147 |
||
148 |
||
149 |
{ |
|
150 |
||
151 |
||
152 |
return FFGF; |
|
153 |
||
154 |
} |
|
155 |
||
156 |
else if (data[3] == 71) |
|
157 |
||
158 |
||
159 |
{ |
|
160 |
||
161 |
||
162 |
return FFGG; |
|
163 |
||
164 |
} |
|
165 |
||
166 |
||
167 |
} |
|
168 |
||
169 |
else if (data[2] == 76) |
|
170 |
||
171 |
||
172 |
{ |
|
173 |
||
174 |
if(data[3] == 77) |
|
175 |
||
176 |
||
177 |
return FFLM; |
|
178 |
||
179 |
} |
|
180 |
||
181 |
||
182 |
} |
|
183 |
||
184 |
||
185 |
} |
|
186 |
||
187 |
||
188 |
||
189 |
return NoKeyword; |
|
190 |
} |
|
191 |
NoToString::Token NoToString::classifier14(const QChar *data) |
|
192 |
||
193 |
{ |
|
194 |
||
195 |
static const unsigned short string[] = |
|
196 |
{ |
|
197 |
99, 111, 108, 111, 110, 58, 105, 110, 58, 110, 97, 109, 101, 58 |
|
198 |
}; |
|
199 |
if(memcmp(&data[0], &string, sizeof(QChar) * 14) == 0) |
|
200 |
||
201 |
||
202 |
return ColonInName; |
|
203 |
||
204 |
||
205 |
return NoKeyword; |
|
206 |
} |
|
207 |
NoToString::Token NoToString::classifier44(const QChar *data) |
|
208 |
||
209 |
{ |
|
210 |
||
211 |
static const unsigned short string[] = |
|
212 |
{ |
|
213 |
97, 82, 101, 97, 108, 108, 121, 76, 111, 110, 103, 84, 111, 107, 101, 110, 73, 70, 114, 101, 97, 107, 105, 110, 77, 101, 97, 110, 73, 116, 85, 75, 110, 111, 119, 85, 75, 110, 111, 119, 75, 110, 111, 119 |
|
214 |
}; |
|
215 |
if(memcmp(&data[0], &string, sizeof(QChar) * 44) == 0) |
|
216 |
||
217 |
||
218 |
return AReallyLongTokenIFreakinMeanItUKnowUKnowKnow; |
|
219 |
||
220 |
||
221 |
return NoKeyword; |
|
222 |
} |
|
223 |
NoToString::Token NoToString::toToken(const QChar *data, int length) |
|
224 |
{ |
|
225 |
switch(length) |
|
226 |
{ |
|
227 |
||
228 |
case 3: |
|
229 |
return classifier3(data); |
|
230 |
||
231 |
||
232 |
case 4: |
|
233 |
return classifier4(data); |
|
234 |
||
235 |
||
236 |
case 14: |
|
237 |
return classifier14(data); |
|
238 |
||
239 |
||
240 |
case 44: |
|
241 |
return classifier44(data); |
|
242 |
||
243 |
||
244 |
default: |
|
245 |
return NoKeyword; |
|
246 |
} |
|
247 |
} |
|
248 |
||
249 |
||
250 |
QT_END_NAMESPACE |
|
251 |