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 |
|
---|
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)
|
---|
|
---|