author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 3 | 41300fa6a67c |
child 8 | 3f74d0d4af4c |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
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 QtCore module 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 |
||
42 |
// |
|
43 |
// W A R N I N G |
|
44 |
// ------------- |
|
45 |
// |
|
46 |
// This file is not part of the Qt API. It exists for the convenience |
|
47 |
// of other Qt classes. This header file may change from version to |
|
48 |
// version without notice, or even be removed. |
|
49 |
// |
|
50 |
// We mean it. |
|
51 |
// |
|
52 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
53 |
// This file was generated by qlalr - DO NOT EDIT! |
0 | 54 |
#ifndef QXMLSTREAM_P_H |
55 |
#define QXMLSTREAM_P_H |
|
56 |
||
57 |
#if defined(Q_OS_VXWORKS) && defined(ERROR) |
|
58 |
# undef ERROR |
|
59 |
#endif |
|
60 |
||
61 |
class QXmlStreamReader_Table |
|
62 |
{ |
|
63 |
public: |
|
64 |
enum { |
|
65 |
EOF_SYMBOL = 0, |
|
66 |
AMPERSAND = 5, |
|
67 |
ANY = 41, |
|
68 |
ATTLIST = 31, |
|
69 |
BANG = 25, |
|
70 |
CDATA = 47, |
|
71 |
CDATA_START = 28, |
|
72 |
COLON = 17, |
|
73 |
COMMA = 19, |
|
74 |
DASH = 20, |
|
75 |
DBLQUOTE = 8, |
|
76 |
DIGIT = 27, |
|
77 |
DOCTYPE = 29, |
|
78 |
DOT = 23, |
|
79 |
ELEMENT = 30, |
|
80 |
EMPTY = 40, |
|
81 |
ENTITIES = 51, |
|
82 |
ENTITY = 32, |
|
83 |
ENTITY_DONE = 45, |
|
84 |
EQ = 14, |
|
85 |
ERROR = 43, |
|
86 |
FIXED = 39, |
|
87 |
HASH = 6, |
|
88 |
ID = 48, |
|
89 |
IDREF = 49, |
|
90 |
IDREFS = 50, |
|
91 |
IMPLIED = 38, |
|
92 |
LANGLE = 3, |
|
93 |
LBRACK = 9, |
|
94 |
LETTER = 26, |
|
95 |
LPAREN = 11, |
|
96 |
NDATA = 36, |
|
97 |
NMTOKEN = 52, |
|
98 |
NMTOKENS = 53, |
|
99 |
NOTATION = 33, |
|
100 |
NOTOKEN = 1, |
|
101 |
PARSE_ENTITY = 44, |
|
102 |
PCDATA = 42, |
|
103 |
PERCENT = 15, |
|
104 |
PIPE = 13, |
|
105 |
PLUS = 21, |
|
106 |
PUBLIC = 35, |
|
107 |
QUESTIONMARK = 24, |
|
108 |
QUOTE = 7, |
|
109 |
RANGLE = 4, |
|
110 |
RBRACK = 10, |
|
111 |
REQUIRED = 37, |
|
112 |
RPAREN = 12, |
|
113 |
SEMICOLON = 18, |
|
114 |
SHIFT_THERE = 56, |
|
115 |
SLASH = 16, |
|
116 |
SPACE = 2, |
|
117 |
STAR = 22, |
|
118 |
SYSTEM = 34, |
|
119 |
UNRESOLVED_ENTITY = 46, |
|
120 |
VERSION = 55, |
|
121 |
XML = 54, |
|
122 |
||
123 |
ACCEPT_STATE = 416, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
124 |
RULE_COUNT = 270, |
0 | 125 |
STATE_COUNT = 427, |
126 |
TERMINAL_COUNT = 57, |
|
127 |
NON_TERMINAL_COUNT = 84, |
|
128 |
||
129 |
GOTO_INDEX_OFFSET = 427, |
|
130 |
GOTO_INFO_OFFSET = 1017, |
|
131 |
GOTO_CHECK_OFFSET = 1017 |
|
132 |
}; |
|
133 |
||
134 |
static const char *const spell []; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
135 |
static const short lhs []; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
136 |
static const short rhs []; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
137 |
static const short goto_default []; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
138 |
static const short action_default []; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
139 |
static const short action_index []; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
140 |
static const short action_info []; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
141 |
static const short action_check []; |
0 | 142 |
|
143 |
static inline int nt_action (int state, int nt) |
|
144 |
{ |
|
145 |
const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt; |
|
146 |
if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt) |
|
147 |
return goto_default [nt]; |
|
148 |
||
149 |
return action_info [GOTO_INFO_OFFSET + yyn]; |
|
150 |
} |
|
151 |
||
152 |
static inline int t_action (int state, int token) |
|
153 |
{ |
|
154 |
const int yyn = action_index [state] + token; |
|
155 |
||
156 |
if (yyn < 0 || action_check [yyn] != token) |
|
157 |
return - action_default [state]; |
|
158 |
||
159 |
return action_info [yyn]; |
|
160 |
} |
|
161 |
}; |
|
162 |
||
163 |
||
164 |
const char *const QXmlStreamReader_Table::spell [] = { |
|
165 |
"end of file", 0, " ", "<", ">", "&", "#", "\'", "\"", "[", |
|
166 |
"]", "(", ")", "|", "=", "%", "/", ":", ";", ",", |
|
167 |
"-", "+", "*", ".", "?", "!", "[a-zA-Z]", "[0-9]", "[CDATA[", "DOCTYPE", |
|
168 |
"ELEMENT", "ATTLIST", "ENTITY", "NOTATION", "SYSTEM", "PUBLIC", "NDATA", "REQUIRED", "IMPLIED", "FIXED", |
|
169 |
"EMPTY", "ANY", "PCDATA", 0, 0, 0, 0, "CDATA", "ID", "IDREF", |
|
170 |
"IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", 0}; |
|
171 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
172 |
const short QXmlStreamReader_Table::lhs [] = { |
0 | 173 |
57, 57, 59, 59, 59, 59, 59, 59, 59, 59, |
174 |
67, 68, 64, 72, 72, 72, 75, 66, 66, 66, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
175 |
66, 79, 78, 80, 80, 80, 80, 80, 80, 80, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
176 |
81, 81, 81, 81, 81, 81, 81, 87, 83, 88, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
177 |
88, 88, 88, 91, 92, 93, 93, 93, 93, 94, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
178 |
94, 96, 96, 96, 97, 97, 98, 98, 99, 99, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
179 |
100, 100, 89, 89, 95, 90, 101, 101, 103, 103, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
180 |
103, 103, 103, 103, 103, 103, 103, 103, 104, 105, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
181 |
105, 105, 105, 107, 108, 109, 109, 84, 84, 110, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
182 |
110, 112, 112, 85, 85, 85, 65, 65, 76, 114, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
183 |
63, 115, 116, 86, 86, 86, 117, 117, 117, 117, |
0 | 184 |
117, 117, 117, 117, 117, 117, 117, 117, 117, 117, |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
185 |
117, 117, 117, 117, 117, 117, 117, 117, 117, 118, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
186 |
118, 119, 119, 119, 119, 119, 119, 119, 119, 122, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
187 |
70, 70, 70, 70, 123, 124, 123, 124, 123, 124, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
188 |
123, 124, 126, 126, 126, 126, 126, 126, 126, 126, |
0 | 189 |
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
190 |
126, 126, 126, 126, 125, 73, 113, 113, 113, 113, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
191 |
127, 128, 127, 128, 127, 128, 127, 128, 129, 129, |
0 | 192 |
129, 129, 129, 129, 129, 129, 129, 129, 129, 129, |
193 |
129, 129, 129, 129, 129, 129, 129, 129, 129, 129, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
194 |
129, 129, 129, 106, 106, 106, 106, 131, 132, 131, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
195 |
132, 131, 131, 132, 132, 133, 133, 133, 133, 135, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
196 |
71, 71, 71, 136, 136, 137, 62, 60, 61, 138, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
197 |
121, 82, 130, 134, 120, 139, 139, 139, 139, 58, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
198 |
58, 58, 58, 58, 58, 58, 58, 58, 58, 74, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
199 |
69, 69, 77, 111, 102, 102, 102, 102, 102, 140}; |
0 | 200 |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
201 |
const short QXmlStreamReader_Table::rhs [] = { |
0 | 202 |
2, 1, 4, 2, 2, 2, 2, 2, 2, 0, |
203 |
1, 1, 9, 2, 4, 0, 4, 4, 6, 6, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
204 |
4, 1, 3, 1, 1, 1, 2, 2, 2, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
205 |
1, 1, 1, 1, 1, 1, 1, 4, 4, 1, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
206 |
1, 1, 1, 1, 2, 1, 1, 1, 0, 2, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
207 |
2, 2, 6, 6, 1, 5, 1, 5, 3, 5, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
208 |
0, 1, 6, 8, 4, 2, 1, 5, 1, 1, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
209 |
1, 1, 1, 1, 1, 1, 6, 7, 1, 2, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
210 |
2, 1, 4, 3, 3, 1, 2, 5, 6, 4, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
211 |
6, 3, 5, 5, 3, 4, 4, 5, 2, 3, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
212 |
2, 2, 4, 5, 5, 7, 1, 1, 1, 1, |
0 | 213 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
214 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
215 |
1, 2, 2, 2, 2, 1, 1, 1, 1, 1, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
216 |
2, 2, 3, 3, 2, 2, 2, 2, 1, 1, |
0 | 217 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
218 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
219 |
1, 1, 1, 1, 1, 1, 2, 2, 3, 3, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
220 |
2, 2, 2, 2, 1, 1, 1, 1, 1, 1, |
0 | 221 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
222 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
223 |
1, 1, 1, 2, 2, 3, 3, 2, 2, 2, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
224 |
2, 1, 1, 1, 1, 1, 1, 1, 1, 5, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
225 |
0, 1, 3, 1, 3, 2, 4, 3, 5, 1, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
226 |
3, 3, 3, 3, 4, 1, 1, 2, 2, 2, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
227 |
4, 2, 2, 2, 2, 2, 2, 2, 0, 1, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
228 |
0, 1, 1, 1, 1, 1, 1, 1, 1, 2}; |
0 | 229 |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
230 |
const short QXmlStreamReader_Table::action_default [] = { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
231 |
10, 259, 0, 2, 1, 0, 125, 117, 119, 120, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
232 |
127, 129, 123, 11, 114, 108, 0, 109, 128, 111, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
233 |
115, 113, 121, 124, 126, 107, 110, 112, 118, 116, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
234 |
131, 122, 240, 12, 254, 136, 250, 253, 0, 130, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
235 |
140, 257, 16, 252, 138, 137, 0, 256, 139, 259, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
236 |
231, 258, 255, 0, 0, 264, 0, 247, 246, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
237 |
249, 248, 245, 241, 99, 263, 0, 236, 0, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
238 |
260, 97, 98, 101, 0, 132, 134, 133, 135, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
239 |
0, 261, 0, 0, 176, 0, 173, 165, 167, 168, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
240 |
142, 154, 171, 162, 156, 157, 153, 159, 163, 161, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
241 |
169, 172, 152, 155, 158, 160, 166, 164, 174, 170, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
242 |
150, 175, 0, 144, 148, 146, 151, 141, 149, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
243 |
147, 143, 145, 0, 15, 14, 262, 0, 22, 21, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
244 |
261, 30, 0, 20, 0, 0, 32, 37, 31, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
245 |
33, 261, 0, 34, 0, 24, 0, 35, 0, 26, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
246 |
36, 25, 0, 242, 41, 40, 261, 43, 49, 261, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
247 |
42, 0, 44, 261, 49, 261, 0, 261, 0, 49, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
248 |
0, 48, 46, 47, 51, 52, 261, 261, 0, 57, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
249 |
261, 54, 261, 0, 58, 0, 55, 261, 53, 261, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
250 |
0, 56, 65, 0, 261, 61, 261, 0, 59, 62, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
251 |
63, 0, 261, 0, 0, 60, 64, 45, 50, 66, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
252 |
0, 39, 0, 0, 261, 0, 94, 95, 0, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
253 |
0, 0, 261, 0, 210, 201, 203, 205, 178, 190, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
254 |
208, 199, 193, 191, 194, 189, 196, 198, 206, 209, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
255 |
188, 192, 195, 197, 202, 200, 204, 207, 211, 213, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
256 |
212, 186, 0, 0, 243, 180, 184, 182, 0, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
257 |
93, 187, 177, 185, 0, 183, 179, 181, 92, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
258 |
96, 0, 0, 0, 0, 0, 261, 86, 261, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
259 |
262, 0, 87, 0, 89, 69, 74, 73, 70, 71, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
260 |
72, 261, 75, 76, 0, 0, 0, 269, 268, 266, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
261 |
267, 265, 67, 261, 0, 261, 0, 0, 68, 77, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
262 |
261, 0, 261, 0, 0, 78, 0, 79, 0, 82, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
263 |
85, 0, 0, 215, 225, 224, 0, 227, 229, 228, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
264 |
226, 0, 244, 217, 221, 219, 223, 214, 222, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
265 |
220, 216, 218, 0, 81, 80, 0, 83, 0, 84, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
266 |
88, 100, 0, 38, 0, 0, 0, 0, 91, 90, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
267 |
0, 103, 23, 27, 29, 28, 0, 0, 261, 262, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
268 |
0, 261, 0, 106, 105, 261, 0, 104, 102, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
269 |
0, 18, 261, 17, 0, 19, 0, 0, 251, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
270 |
261, 0, 239, 0, 232, 238, 0, 237, 234, 261, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
271 |
261, 262, 233, 235, 0, 261, 0, 230, 261, 0, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
272 |
261, 0, 231, 0, 0, 13, 270, 9, 5, 8, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
273 |
4, 0, 7, 259, 6, 0, 3}; |
0 | 274 |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
275 |
const short QXmlStreamReader_Table::goto_default [] = { |
0 | 276 |
2, 4, 3, 49, 388, 43, 37, 52, 47, 41, |
277 |
249, 53, 127, 84, 393, 81, 85, 126, 42, 46, |
|
278 |
169, 130, 131, 146, 145, 149, 138, 136, 140, 147, |
|
279 |
139, 159, 160, 157, 168, 167, 209, 165, 164, 166, |
|
280 |
187, 180, 196, 200, 303, 302, 295, 321, 320, 319, |
|
281 |
279, 277, 278, 142, 56, 141, 222, 38, 34, 148, |
|
282 |
39, 48, 40, 248, 45, 36, 119, 112, 330, 111, |
|
283 |
264, 252, 251, 250, 339, 326, 325, 329, 398, 399, |
|
284 |
50, 51, 59, 0}; |
|
285 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
286 |
const short QXmlStreamReader_Table::action_index [] = { |
0 | 287 |
-21, -57, 33, 119, 960, 70, -57, -57, -57, -57, |
288 |
-57, -57, -57, -57, -57, -57, 105, -57, -57, -57, |
|
289 |
-57, -57, -57, -57, -57, -57, -57, -57, -57, -57, |
|
290 |
-57, -57, -57, -57, -57, -57, -57, -57, 40, -57, |
|
291 |
795, -57, 47, -57, -57, -57, 107, -57, -57, -57, |
|
292 |
84, -57, -57, -38, 80, -57, 12, -57, -57, 97, |
|
293 |
-57, -57, -57, -57, -57, -57, 13, -57, 56, 34, |
|
294 |
-57, -57, -57, -57, 51, -57, -57, -57, -57, 53, |
|
295 |
57, 84, 300, 255, -57, 84, -57, -57, -57, -57, |
|
296 |
-57, -57, -57, -57, -57, -57, -57, -57, -57, -57, |
|
297 |
-57, -57, -57, -57, -57, -57, -57, -57, -57, -57, |
|
298 |
-57, -57, 355, -57, -57, -57, -57, -57, -57, 326, |
|
299 |
-57, -57, -57, 48, -57, -57, -57, 50, -57, -57, |
|
300 |
84, 155, 32, -57, 38, 22, -57, -57, -57, 115, |
|
301 |
-57, 35, 156, -57, 173, -57, 245, -57, 44, -57, |
|
302 |
-57, -57, 16, -57, -57, -57, 29, -57, 116, 29, |
|
303 |
-57, 133, -57, 29, 129, 84, 15, 29, -22, 121, |
|
304 |
74, -57, -57, -57, -57, 82, 29, 29, 88, -57, |
|
305 |
29, 7, 29, 86, -57, 83, -57, 27, 19, 26, |
|
306 |
94, -57, -57, 106, 29, 3, 29, -8, -57, -57, |
|
307 |
-57, 104, 29, -6, -7, -57, -57, -57, -57, -57, |
|
308 |
17, -57, -2, 11, 29, 18, -57, -57, 850, 65, |
|
309 |
465, 67, 84, 135, -57, -57, -57, -57, -57, -57, |
|
310 |
-57, -57, -57, -57, -57, -57, -57, -57, -57, -57, |
|
311 |
-57, -57, -57, -57, -57, -57, -57, -57, -57, -57, |
|
312 |
-57, -57, 630, 24, -57, -57, -57, -57, 84, 76, |
|
313 |
-57, -57, -57, -57, 740, -57, -57, -57, -57, 39, |
|
314 |
-57, 23, 21, 14, 78, 22, 84, -57, 84, 184, |
|
315 |
20, 31, -57, 41, -57, -57, -57, -57, -57, -57, |
|
316 |
-57, 84, -57, -57, 36, 126, 162, -57, -57, -57, |
|
317 |
-57, -57, -57, 29, 79, 29, 29, 160, -57, -57, |
|
318 |
29, 145, 29, 75, 29, -57, 575, -57, 410, -57, |
|
319 |
-57, 110, 64, -57, -57, -57, 685, -57, -57, -57, |
|
320 |
-57, -17, -57, -57, -57, -57, -57, -57, -57, 520, |
|
321 |
-57, -57, -57, 29, -57, -57, 61, -57, 29, -57, |
|
322 |
-57, -57, 29, -57, 29, 29, -15, 29, -57, -57, |
|
323 |
29, -57, -57, -57, -57, -57, 95, 43, 29, 45, |
|
324 |
9, 29, 10, -57, -57, 29, 2, -57, -57, -24, |
|
325 |
190, -57, 29, -57, 1, -57, 905, 150, -57, -26, |
|
326 |
29, 0, -57, 109, -26, -57, 8, -57, -57, 29, |
|
327 |
29, -19, -57, -57, -11, 29, 59, -57, 29, -5, |
|
328 |
29, 103, 29, -16, 6, -57, -57, -57, -57, -57, |
|
329 |
-57, 69, -57, -57, -57, 905, -57, |
|
330 |
||
331 |
-84, -84, -84, 204, 75, -84, -84, -84, -84, -84, |
|
332 |
-84, -84, -84, -84, -84, -84, 7, -84, -84, -84, |
|
333 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
334 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
335 |
101, -84, -84, -84, -84, -84, -84, -84, -84, 64, |
|
336 |
54, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
337 |
-84, -84, -84, -84, -84, -84, 68, -84, 30, -84, |
|
338 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
339 |
32, -84, -16, -7, -84, 42, -84, -84, -84, -84, |
|
340 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
341 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
342 |
-84, -84, 45, -84, -84, -84, -84, -84, -84, 44, |
|
343 |
-84, -84, -84, 33, -84, -84, -84, -84, -84, -84, |
|
344 |
36, 108, -84, -84, -84, 69, -84, -84, -84, 62, |
|
345 |
-84, 63, -84, -84, -84, -84, 118, -84, -84, -84, |
|
346 |
-84, -84, -84, -84, -84, -84, -2, -84, -84, -10, |
|
347 |
-84, -84, -84, 25, -21, 11, -84, 20, -84, -25, |
|
348 |
-84, -84, -84, -84, -84, -84, 1, 2, -36, -84, |
|
349 |
-9, -84, 5, -13, -84, -8, -84, 6, -84, 8, |
|
350 |
12, -84, -84, -84, 23, -84, 4, -1, -84, -84, |
|
351 |
-84, -84, 0, -84, -14, -84, -84, -84, -84, -84, |
|
352 |
-84, -84, 55, -84, 58, -84, -84, -84, -84, 53, |
|
353 |
47, 123, 67, 66, -84, -84, -84, -84, -84, -84, |
|
354 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
355 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
356 |
-84, -84, -15, -84, -84, -84, -84, -84, 41, 40, |
|
357 |
-84, -84, -84, -84, -46, -84, -84, -84, -84, -84, |
|
358 |
-84, 35, -84, 34, 37, 18, 70, -84, 89, -84, |
|
359 |
43, -84, -84, -84, -84, -84, -84, -84, -84, -84, |
|
360 |
-84, 48, -84, -84, -84, -84, -84, -84, -84, -84, |
|
361 |
-84, -84, -84, 31, -84, 29, 27, 17, -84, -84, |
|
362 |
38, 24, 39, -84, 49, -84, 71, -84, 93, -84, |
|
363 |
-84, -84, -12, -84, -84, -84, 94, -84, -84, -84, |
|
364 |
-84, -84, -84, -84, -84, -84, -84, -84, -84, 78, |
|
365 |
-84, -84, -84, 50, -84, -84, 46, -84, 56, -84, |
|
366 |
-84, -84, 60, -84, 61, 59, 51, 57, -84, -84, |
|
367 |
14, -84, -84, -84, -84, -84, -11, -6, 72, -5, |
|
368 |
-84, -3, -84, -84, -84, 52, -84, -84, -84, -20, |
|
369 |
77, -84, 21, -84, -84, -84, 76, 16, -84, 19, |
|
370 |
26, -84, -84, -84, 10, -84, -84, -84, -84, 80, |
|
371 |
13, 73, -84, -84, -84, 22, -27, -84, 9, -84, |
|
372 |
28, 15, 82, -84, -84, -84, -84, -84, -84, -84, |
|
373 |
-84, -84, -84, 3, -84, 98, -84}; |
|
374 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
375 |
const short QXmlStreamReader_Table::action_info [] = { |
0 | 376 |
65, 332, 65, 405, 392, 385, 377, 65, 414, 410, |
377 |
415, 55, 397, 374, 373, 217, 206, 408, 65, 65, |
|
378 |
207, 211, 216, 1, 55, 199, 182, 192, 70, 70, |
|
379 |
63, 70, 189, 416, 153, 350, 133, 70, 72, 55, |
|
380 |
65, 351, 254, 270, 73, 284, 65, 310, 55, 65, |
|
381 |
83, 82, 83, 82, 129, 83, 82, 54, 70, 128, |
|
382 |
83, 82, 66, 64, 83, 82, 318, 316, 318, 316, |
|
383 |
54, 212, 83, 82, 83, 82, 54, 55, 367, 366, |
|
384 |
69, 80, 79, 83, 82, 163, 70, 314, 305, 272, |
|
385 |
55, 306, 305, 354, 163, 177, 55, 163, 379, 163, |
|
386 |
65, 176, 83, 82, 55, 163, 58, 57, 0, 65, |
|
387 |
83, 82, 65, 395, 65, 62, 203, 202, 195, 194, |
|
388 |
65, 417, 16, 61, 60, 396, 156, 272, 0, 66, |
|
389 |
64, 65, 317, 318, 316, 378, 379, 171, 173, 162, |
|
390 |
172, 54, 171, 173, 163, 172, 0, 345, 344, 343, |
|
391 |
171, 173, 0, 172, 0, 155, 154, 70, 134, 65, |
|
392 |
0, 55, 297, 220, 218, 298, 389, 0, 300, 0, |
|
393 |
135, 301, 299, 33, 66, 64, 65, 297, 0, 297, |
|
394 |
298, 0, 298, 300, 0, 300, 301, 299, 301, 299, |
|
395 |
221, 219, 70, 272, 381, 291, 0, 0, 0, 128, |
|
396 |
13, 0, 0, 273, 271, 274, 275, 0, 0, 0, |
|
397 |
0, 0, 0, 0, 0, 0, 287, 294, 0, 0, |
|
398 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
399 |
0, 285, 288, 289, 290, 286, 292, 293, 0, 0, |
|
400 |
0, 0, 0, 0, 0, 0, 0, 70, 134, 0, |
|
401 |
0, 0, 0, 0, 0, 362, 0, 108, 0, 103, |
|
402 |
135, 94, 117, 116, 95, 104, 97, 105, 99, 93, |
|
403 |
98, 107, 87, 106, 88, 89, 100, 109, 92, 101, |
|
404 |
86, 96, 91, 0, 0, 0, 0, 0, 0, 0, |
|
405 |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
406 |
0, 0, 108, 0, 103, 0, 94, 102, 90, 95, |
|
407 |
104, 97, 105, 99, 93, 98, 107, 87, 106, 88, |
|
408 |
89, 100, 109, 92, 101, 86, 96, 91, 108, 0, |
|
409 |
103, 0, 94, 121, 120, 95, 104, 97, 105, 99, |
|
410 |
93, 98, 107, 87, 106, 88, 89, 100, 109, 92, |
|
411 |
101, 86, 96, 91, 0, 0, 0, 108, 0, 103, |
|
412 |
0, 94, 114, 113, 95, 104, 97, 105, 99, 93, |
|
413 |
98, 107, 87, 106, 88, 89, 100, 109, 92, 101, |
|
414 |
86, 96, 91, 0, 0, 0, 0, 0, 0, 0, |
|
415 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
416 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
417 |
0, 0, 108, 0, 103, 322, 94, 337, 336, 95, |
|
418 |
104, 97, 105, 99, 93, 98, 107, 87, 106, 88, |
|
419 |
89, 100, 109, 92, 101, 86, 96, 91, 0, 0, |
|
420 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
421 |
0, 0, 0, 0, 0, 13, 0, 0, 0, 0, |
|
422 |
0, 0, 0, 0, 0, 0, 0, 246, 233, 241, |
|
423 |
223, 232, 262, 261, 234, 242, 236, 243, 237, 231, |
|
424 |
0, 245, 225, 244, 226, 227, 238, 247, 230, 239, |
|
425 |
224, 235, 229, 0, 0, 0, 0, 0, 0, 0, |
|
426 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
427 |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
428 |
0, 0, 108, 0, 103, 322, 94, 341, 340, 95, |
|
429 |
104, 97, 105, 99, 93, 98, 107, 87, 106, 88, |
|
430 |
89, 100, 109, 92, 101, 86, 96, 91, 0, 0, |
|
431 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
432 |
0, 0, 0, 0, 0, 13, 0, 0, 0, 0, |
|
433 |
0, 0, 0, 0, 0, 0, 0, 108, 0, 103, |
|
434 |
322, 94, 324, 323, 95, 104, 97, 105, 99, 93, |
|
435 |
98, 107, 87, 106, 88, 89, 100, 109, 92, 101, |
|
436 |
86, 96, 91, 0, 0, 0, 0, 0, 0, 0, |
|
437 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
438 |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
439 |
0, 0, 246, 233, 241, 223, 232, 256, 255, 234, |
|
440 |
242, 236, 243, 237, 231, 0, 245, 225, 244, 226, |
|
441 |
227, 238, 247, 230, 239, 224, 235, 229, 0, 0, |
|
442 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
443 |
0, 0, 0, 0, 0, 13, 0, 0, 0, 0, |
|
444 |
0, 0, 0, 0, 0, 0, 0, 108, 0, 103, |
|
445 |
322, 94, 334, 333, 95, 104, 97, 105, 99, 93, |
|
446 |
98, 107, 87, 106, 88, 89, 100, 109, 92, 101, |
|
447 |
86, 96, 91, 0, 0, 0, 0, 0, 0, 0, |
|
448 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
449 |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
450 |
0, 0, 246, 233, 241, 223, 232, 266, 265, 234, |
|
451 |
242, 236, 243, 237, 231, 0, 245, 225, 244, 226, |
|
452 |
227, 238, 247, 230, 239, 224, 235, 229, 0, 0, |
|
453 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
454 |
0, 0, 0, 0, 0, 13, 0, 0, 0, 0, |
|
455 |
0, 0, 0, 0, 0, 0, 0, 30, 0, 25, |
|
456 |
74, 15, 24, 10, 17, 26, 19, 27, 21, 14, |
|
457 |
20, 29, 7, 28, 8, 9, 22, 31, 12, 23, |
|
458 |
6, 18, 11, 0, 0, 0, 0, 0, 0, 0, |
|
459 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
460 |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
461 |
0, 0, 246, 233, 241, 223, 232, 240, 228, 234, |
|
462 |
242, 236, 243, 237, 231, 0, 245, 225, 244, 226, |
|
463 |
227, 238, 247, 230, 239, 224, 235, 229, 0, 0, |
|
464 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
465 |
0, 0, 0, 0, 0, 13, 0, 0, 0, 0, |
|
466 |
0, 0, 0, 0, 0, 0, 0, 30, 387, 25, |
|
467 |
5, 15, 24, 10, 17, 26, 19, 27, 21, 14, |
|
468 |
20, 29, 7, 28, 8, 9, 22, 31, 12, 23, |
|
469 |
6, 18, 11, 0, 0, 0, 0, 0, 0, 0, |
|
470 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
471 |
13, 32, 0, 0, 0, 0, 0, 0, 0, 33, |
|
472 |
0, 0, 30, 16, 25, 5, 15, 24, 10, 17, |
|
473 |
26, 19, 27, 21, 14, 20, 29, 7, 28, 8, |
|
474 |
9, 22, 31, 12, 23, 6, 18, 11, 0, 0, |
|
475 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
476 |
0, 0, 0, 0, 0, 13, 32, 0, 0, 0, |
|
477 |
0, 0, 0, 0, 33, 0, 0, |
|
478 |
||
479 |
380, 179, 210, 181, 425, 368, 205, 375, 371, 372, |
|
480 |
161, 208, 204, 178, 185, 174, 201, 183, 188, 198, |
|
481 |
190, 409, 407, 175, 184, 404, 267, 67, 412, 186, |
|
482 |
400, 361, 193, 384, 406, 197, 67, 170, 391, 390, |
|
483 |
411, 307, 331, 304, 309, 125, 124, 71, 132, 191, |
|
484 |
311, 313, 110, 260, 352, 276, 0, 257, 259, 123, |
|
485 |
296, 118, 308, 348, 376, 386, 315, 346, 312, 258, |
|
486 |
215, 394, 360, 349, 358, 213, 359, 353, 356, 269, |
|
487 |
0, 328, 281, 0, 370, 44, 44, 280, 328, 369, |
|
488 |
0, 355, 402, 400, 383, 347, 413, 401, 382, 394, |
|
489 |
158, 283, 426, 328, 328, 357, 280, 0, 44, 214, |
|
490 |
0, 76, 122, 115, 137, 0, 150, 0, 143, 263, |
|
491 |
253, 0, 68, 152, 137, 151, 150, 144, 143, 0, |
|
492 |
0, 0, 0, 0, 327, 365, 268, 144, 35, 35, |
|
493 |
282, 327, 363, 364, 0, 0, 0, 0, 0, 0, |
|
494 |
0, 403, 0, 0, 342, 0, 327, 327, 0, 0, |
|
495 |
0, 35, 78, 0, 75, 77, 0, 0, 0, 338, |
|
496 |
335, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
497 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
498 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
499 |
0, 0, 0, 0, 0, 0, 0, 423, 0, 420, |
|
500 |
418, 424, 422, 419, 0, 0, 0, 0, 0, 0, |
|
501 |
0, 0, 0, 421, 0, 0, 0, 0, 0, 0, |
|
502 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
503 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
504 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
505 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
506 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
507 |
0, 0, 0, 0, 0, 0, 0, 0}; |
|
508 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
509 |
const short QXmlStreamReader_Table::action_check [] = { |
0 | 510 |
26, 18, 26, 14, 4, 4, 4, 26, 24, 14, |
511 |
4, 26, 4, 4, 4, 4, 22, 55, 26, 26, |
|
512 |
42, 4, 4, 44, 26, 22, 19, 12, 2, 2, |
|
513 |
18, 2, 13, 0, 18, 4, 4, 2, 4, 26, |
|
514 |
26, 20, 18, 4, 4, 4, 26, 11, 26, 26, |
|
515 |
7, 8, 7, 8, 4, 7, 8, 6, 2, 9, |
|
516 |
7, 8, 24, 25, 7, 8, 7, 8, 7, 8, |
|
517 |
6, 36, 7, 8, 7, 8, 6, 26, 34, 35, |
|
518 |
24, 34, 35, 7, 8, 11, 2, 12, 13, 20, |
|
519 |
26, 12, 13, 15, 11, 13, 26, 11, 29, 11, |
|
520 |
26, 19, 7, 8, 26, 11, 26, 27, -1, 26, |
|
521 |
7, 8, 26, 4, 26, 18, 12, 13, 12, 13, |
|
522 |
26, 2, 3, 26, 27, 16, 11, 20, -1, 24, |
|
523 |
25, 26, 6, 7, 8, 28, 29, 21, 22, 6, |
|
524 |
24, 6, 21, 22, 11, 24, -1, 37, 38, 39, |
|
525 |
21, 22, -1, 24, -1, 40, 41, 2, 3, 26, |
|
526 |
-1, 26, 17, 7, 8, 20, 16, -1, 23, -1, |
|
527 |
15, 26, 27, 54, 24, 25, 26, 17, -1, 17, |
|
528 |
20, -1, 20, 23, -1, 23, 26, 27, 26, 27, |
|
529 |
34, 35, 2, 20, 4, 11, -1, -1, -1, 9, |
|
530 |
45, -1, -1, 30, 31, 32, 33, -1, -1, -1, |
|
531 |
-1, -1, -1, -1, -1, -1, 32, 33, -1, -1, |
|
532 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
533 |
-1, 47, 48, 49, 50, 51, 52, 53, -1, -1, |
|
534 |
-1, -1, -1, -1, -1, -1, -1, 2, 3, -1, |
|
535 |
-1, -1, -1, -1, -1, 10, -1, 2, -1, 4, |
|
536 |
15, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
537 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
538 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
539 |
45, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
540 |
-1, -1, 2, -1, 4, -1, 6, 7, 8, 9, |
|
541 |
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, |
|
542 |
20, 21, 22, 23, 24, 25, 26, 27, 2, -1, |
|
543 |
4, -1, 6, 7, 8, 9, 10, 11, 12, 13, |
|
544 |
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
|
545 |
24, 25, 26, 27, -1, -1, -1, 2, -1, 4, |
|
546 |
-1, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
547 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
548 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
549 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
550 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
551 |
-1, -1, 2, -1, 4, 5, 6, 7, 8, 9, |
|
552 |
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, |
|
553 |
20, 21, 22, 23, 24, 25, 26, 27, -1, -1, |
|
554 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
555 |
-1, -1, -1, -1, -1, 45, -1, -1, -1, -1, |
|
556 |
-1, -1, -1, -1, -1, -1, -1, 2, 3, 4, |
|
557 |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
558 |
-1, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
559 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
560 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
561 |
45, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
562 |
-1, -1, 2, -1, 4, 5, 6, 7, 8, 9, |
|
563 |
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, |
|
564 |
20, 21, 22, 23, 24, 25, 26, 27, -1, -1, |
|
565 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
566 |
-1, -1, -1, -1, -1, 45, -1, -1, -1, -1, |
|
567 |
-1, -1, -1, -1, -1, -1, -1, 2, -1, 4, |
|
568 |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
569 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
570 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
571 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
572 |
45, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
573 |
-1, -1, 2, 3, 4, 5, 6, 7, 8, 9, |
|
574 |
10, 11, 12, 13, 14, -1, 16, 17, 18, 19, |
|
575 |
20, 21, 22, 23, 24, 25, 26, 27, -1, -1, |
|
576 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
577 |
-1, -1, -1, -1, -1, 45, -1, -1, -1, -1, |
|
578 |
-1, -1, -1, -1, -1, -1, -1, 2, -1, 4, |
|
579 |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
580 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
581 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
582 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
583 |
45, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
584 |
-1, -1, 2, 3, 4, 5, 6, 7, 8, 9, |
|
585 |
10, 11, 12, 13, 14, -1, 16, 17, 18, 19, |
|
586 |
20, 21, 22, 23, 24, 25, 26, 27, -1, -1, |
|
587 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
588 |
-1, -1, -1, -1, -1, 45, -1, -1, -1, -1, |
|
589 |
-1, -1, -1, -1, -1, -1, -1, 2, -1, 4, |
|
590 |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
591 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
592 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
593 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
594 |
45, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
595 |
-1, -1, 2, 3, 4, 5, 6, 7, 8, 9, |
|
596 |
10, 11, 12, 13, 14, -1, 16, 17, 18, 19, |
|
597 |
20, 21, 22, 23, 24, 25, 26, 27, -1, -1, |
|
598 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
599 |
-1, -1, -1, -1, -1, 45, -1, -1, -1, -1, |
|
600 |
-1, -1, -1, -1, -1, -1, -1, 2, 3, 4, |
|
601 |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
|
602 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
|
603 |
25, 26, 27, -1, -1, -1, -1, -1, -1, -1, |
|
604 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
605 |
45, 46, -1, -1, -1, -1, -1, -1, -1, 54, |
|
606 |
-1, -1, 2, 3, 4, 5, 6, 7, 8, 9, |
|
607 |
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, |
|
608 |
20, 21, 22, 23, 24, 25, 26, 27, -1, -1, |
|
609 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
610 |
-1, -1, -1, -1, -1, 45, 46, -1, -1, -1, |
|
611 |
-1, -1, -1, -1, 54, -1, -1, |
|
612 |
||
613 |
20, 37, 12, 12, 1, 16, 20, 13, 13, 12, |
|
614 |
12, 36, 12, 12, 12, 36, 12, 12, 12, 20, |
|
615 |
12, 12, 49, 12, 37, 12, 72, 20, 13, 37, |
|
616 |
20, 17, 12, 12, 12, 12, 20, 12, 12, 20, |
|
617 |
12, 12, 54, 12, 17, 13, 13, 17, 12, 37, |
|
618 |
12, 12, 68, 13, 20, 20, -1, 72, 17, 17, |
|
619 |
12, 68, 45, 20, 12, 1, 17, 17, 44, 16, |
|
620 |
12, 17, 54, 17, 17, 12, 17, 17, 17, 12, |
|
621 |
-1, 10, 12, -1, 12, 10, 10, 17, 10, 17, |
|
622 |
-1, 54, 12, 20, 17, 49, 14, 17, 21, 17, |
|
623 |
38, 12, 4, 10, 10, 54, 17, -1, 10, 54, |
|
624 |
-1, 10, 68, 68, 6, -1, 8, -1, 10, 72, |
|
625 |
54, -1, 54, 54, 6, 17, 8, 19, 10, -1, |
|
626 |
-1, -1, -1, -1, 63, 17, 13, 19, 63, 63, |
|
627 |
51, 63, 24, 25, -1, -1, -1, -1, -1, -1, |
|
628 |
-1, 78, -1, -1, 76, -1, 63, 63, -1, -1, |
|
629 |
-1, 63, 61, -1, 63, 64, -1, -1, -1, 76, |
|
630 |
76, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
631 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
632 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
633 |
-1, -1, -1, -1, -1, -1, -1, 3, -1, 5, |
|
634 |
6, 7, 8, 9, -1, -1, -1, -1, -1, -1, |
|
635 |
-1, -1, -1, 19, -1, -1, -1, -1, -1, -1, |
|
636 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
637 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
638 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
639 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
640 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
641 |
-1, -1, -1, -1, -1, -1, -1, -1}; |
|
642 |
||
643 |
||
644 |
template <typename T> class QXmlStreamSimpleStack { |
|
645 |
T *data; |
|
646 |
int tos, cap; |
|
647 |
public: |
|
648 |
inline QXmlStreamSimpleStack():data(0), tos(-1), cap(0){} |
|
649 |
inline ~QXmlStreamSimpleStack(){ if (data) qFree(data); } |
|
650 |
||
651 |
inline void reserve(int extraCapacity) { |
|
652 |
if (tos + extraCapacity + 1 > cap) { |
|
653 |
cap = qMax(tos + extraCapacity + 1, cap << 1 ); |
|
654 |
data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T))); |
|
655 |
Q_CHECK_PTR(data); |
|
656 |
} |
|
657 |
} |
|
658 |
||
659 |
inline T &push() { reserve(1); return data[++tos]; } |
|
660 |
inline T &rawPush() { return data[++tos]; } |
|
661 |
inline const T &top() const { return data[tos]; } |
|
662 |
inline T &top() { return data[tos]; } |
|
663 |
inline T &pop() { return data[tos--]; } |
|
664 |
inline T &operator[](int index) { return data[index]; } |
|
665 |
inline const T &at(int index) const { return data[index]; } |
|
666 |
inline int size() const { return tos + 1; } |
|
667 |
inline void resize(int s) { tos = s - 1; } |
|
668 |
inline bool isEmpty() const { return tos < 0; } |
|
669 |
inline void clear() { tos = -1; } |
|
670 |
}; |
|
671 |
||
672 |
||
673 |
class QXmlStream |
|
674 |
{ |
|
675 |
Q_DECLARE_TR_FUNCTIONS(QXmlStream) |
|
676 |
}; |
|
677 |
||
678 |
class QXmlStreamPrivateTagStack { |
|
679 |
public: |
|
680 |
struct NamespaceDeclaration |
|
681 |
{ |
|
682 |
QStringRef prefix; |
|
683 |
QStringRef namespaceUri; |
|
684 |
}; |
|
685 |
||
686 |
struct Tag |
|
687 |
{ |
|
688 |
QStringRef name; |
|
689 |
QStringRef qualifiedName; |
|
690 |
NamespaceDeclaration namespaceDeclaration; |
|
691 |
int tagStackStringStorageSize; |
|
692 |
int namespaceDeclarationsSize; |
|
693 |
}; |
|
694 |
||
695 |
||
696 |
QXmlStreamPrivateTagStack(); |
|
697 |
QXmlStreamSimpleStack<NamespaceDeclaration> namespaceDeclarations; |
|
698 |
QString tagStackStringStorage; |
|
699 |
int tagStackStringStorageSize; |
|
700 |
bool tagsDone; |
|
701 |
||
702 |
inline QStringRef addToStringStorage(const QStringRef &s) { |
|
703 |
int pos = tagStackStringStorageSize; |
|
704 |
int sz = s.size(); |
|
705 |
if (pos != tagStackStringStorage.size()) |
|
706 |
tagStackStringStorage.resize(pos); |
|
707 |
tagStackStringStorage.insert(pos, s.unicode(), sz); |
|
708 |
tagStackStringStorageSize += sz; |
|
709 |
return QStringRef(&tagStackStringStorage, pos, sz); |
|
710 |
} |
|
711 |
inline QStringRef addToStringStorage(const QString &s) { |
|
712 |
int pos = tagStackStringStorageSize; |
|
713 |
int sz = s.size(); |
|
714 |
if (pos != tagStackStringStorage.size()) |
|
715 |
tagStackStringStorage.resize(pos); |
|
716 |
tagStackStringStorage.insert(pos, s.unicode(), sz); |
|
717 |
tagStackStringStorageSize += sz; |
|
718 |
return QStringRef(&tagStackStringStorage, pos, sz); |
|
719 |
} |
|
720 |
||
721 |
QXmlStreamSimpleStack<Tag> tagStack; |
|
722 |
||
723 |
||
724 |
inline Tag &tagStack_pop() { |
|
725 |
Tag& tag = tagStack.pop(); |
|
726 |
tagStackStringStorageSize = tag.tagStackStringStorageSize; |
|
727 |
namespaceDeclarations.resize(tag.namespaceDeclarationsSize); |
|
728 |
tagsDone = tagStack.isEmpty(); |
|
729 |
return tag; |
|
730 |
} |
|
731 |
inline Tag &tagStack_push() { |
|
732 |
Tag &tag = tagStack.push(); |
|
733 |
tag.tagStackStringStorageSize = tagStackStringStorageSize; |
|
734 |
tag.namespaceDeclarationsSize = namespaceDeclarations.size(); |
|
735 |
return tag; |
|
736 |
} |
|
737 |
}; |
|
738 |
||
739 |
||
740 |
class QXmlStreamEntityResolver; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
741 |
#ifndef QT_NO_XMLSTREAMREADER |
0 | 742 |
class QXmlStreamReaderPrivate : public QXmlStreamReader_Table, public QXmlStreamPrivateTagStack{ |
743 |
QXmlStreamReader *q_ptr; |
|
744 |
Q_DECLARE_PUBLIC(QXmlStreamReader) |
|
745 |
public: |
|
746 |
QXmlStreamReaderPrivate(QXmlStreamReader *q); |
|
747 |
~QXmlStreamReaderPrivate(); |
|
748 |
void init(); |
|
749 |
||
750 |
QByteArray rawReadBuffer; |
|
751 |
QByteArray dataBuffer; |
|
752 |
uchar firstByte; |
|
753 |
qint64 nbytesread; |
|
754 |
QString readBuffer; |
|
755 |
int readBufferPos; |
|
756 |
QXmlStreamSimpleStack<uint> putStack; |
|
757 |
struct Entity { |
|
758 |
Entity(const QString& str = QString()) |
|
759 |
:value(str), external(false), unparsed(false), literal(false), |
|
760 |
hasBeenParsed(false), isCurrentlyReferenced(false){} |
|
761 |
static inline Entity createLiteral(const QString &entity) |
|
762 |
{ Entity result(entity); result.literal = result.hasBeenParsed = true; return result; } |
|
763 |
QString value; |
|
764 |
uint external : 1; |
|
765 |
uint unparsed : 1; |
|
766 |
uint literal : 1; |
|
767 |
uint hasBeenParsed : 1; |
|
768 |
uint isCurrentlyReferenced : 1; |
|
769 |
}; |
|
770 |
QHash<QString, Entity> entityHash; |
|
771 |
QHash<QString, Entity> parameterEntityHash; |
|
772 |
QXmlStreamSimpleStack<Entity *>entityReferenceStack; |
|
773 |
inline bool referenceEntity(Entity &entity) { |
|
774 |
if (entity.isCurrentlyReferenced) { |
|
775 |
raiseWellFormedError(QXmlStream::tr("Recursive entity detected.")); |
|
776 |
return false; |
|
777 |
} |
|
778 |
entity.isCurrentlyReferenced = true; |
|
779 |
entityReferenceStack.push() = &entity; |
|
780 |
injectToken(ENTITY_DONE); |
|
781 |
return true; |
|
782 |
} |
|
783 |
||
784 |
||
785 |
QIODevice *device; |
|
786 |
bool deleteDevice; |
|
787 |
#ifndef QT_NO_TEXTCODEC |
|
788 |
QTextCodec *codec; |
|
789 |
QTextDecoder *decoder; |
|
790 |
#endif |
|
791 |
bool atEnd; |
|
792 |
||
793 |
/*! |
|
794 |
\sa setType() |
|
795 |
*/ |
|
796 |
QXmlStreamReader::TokenType type; |
|
797 |
QXmlStreamReader::Error error; |
|
798 |
QString errorString; |
|
799 |
QString unresolvedEntity; |
|
800 |
||
801 |
qint64 lineNumber, lastLineStart, characterOffset; |
|
802 |
||
803 |
||
804 |
void write(const QString &); |
|
805 |
void write(const char *); |
|
806 |
||
807 |
||
808 |
QXmlStreamAttributes attributes; |
|
809 |
QStringRef namespaceForPrefix(const QStringRef &prefix); |
|
810 |
void resolveTag(); |
|
811 |
void resolvePublicNamespaces(); |
|
812 |
void resolveDtd(); |
|
813 |
uint resolveCharRef(int symbolIndex); |
|
814 |
bool checkStartDocument(); |
|
815 |
void startDocument(); |
|
816 |
void parseError(); |
|
817 |
void checkPublicLiteral(const QStringRef &publicId); |
|
818 |
||
819 |
bool scanDtd; |
|
820 |
QStringRef lastAttributeValue; |
|
821 |
bool lastAttributeIsCData; |
|
822 |
struct DtdAttribute { |
|
823 |
QStringRef tagName; |
|
824 |
QStringRef attributeQualifiedName; |
|
825 |
QStringRef attributePrefix; |
|
826 |
QStringRef attributeName; |
|
827 |
QStringRef defaultValue; |
|
828 |
bool isCDATA; |
|
829 |
bool isNamespaceAttribute; |
|
830 |
}; |
|
831 |
QXmlStreamSimpleStack<DtdAttribute> dtdAttributes; |
|
832 |
struct NotationDeclaration { |
|
833 |
QStringRef name; |
|
834 |
QStringRef publicId; |
|
835 |
QStringRef systemId; |
|
836 |
}; |
|
837 |
QXmlStreamSimpleStack<NotationDeclaration> notationDeclarations; |
|
838 |
QXmlStreamNotationDeclarations publicNotationDeclarations; |
|
839 |
QXmlStreamNamespaceDeclarations publicNamespaceDeclarations; |
|
840 |
||
841 |
struct EntityDeclaration { |
|
842 |
QStringRef name; |
|
843 |
QStringRef notationName; |
|
844 |
QStringRef publicId; |
|
845 |
QStringRef systemId; |
|
846 |
QStringRef value; |
|
847 |
bool parameter; |
|
848 |
bool external; |
|
849 |
inline void clear() { |
|
850 |
name.clear(); |
|
851 |
notationName.clear(); |
|
852 |
publicId.clear(); |
|
853 |
systemId.clear(); |
|
854 |
value.clear(); |
|
855 |
parameter = external = false; |
|
856 |
} |
|
857 |
}; |
|
858 |
QXmlStreamSimpleStack<EntityDeclaration> entityDeclarations; |
|
859 |
QXmlStreamEntityDeclarations publicEntityDeclarations; |
|
860 |
||
861 |
QStringRef text; |
|
862 |
||
863 |
QStringRef prefix, namespaceUri, qualifiedName, name; |
|
864 |
QStringRef processingInstructionTarget, processingInstructionData; |
|
865 |
QStringRef dtdName, dtdPublicId, dtdSystemId; |
|
866 |
QStringRef documentVersion, documentEncoding; |
|
867 |
uint isEmptyElement : 1; |
|
868 |
uint isWhitespace : 1; |
|
869 |
uint isCDATA : 1; |
|
870 |
uint standalone : 1; |
|
871 |
uint hasCheckedStartDocument : 1; |
|
872 |
uint normalizeLiterals : 1; |
|
873 |
uint hasSeenTag : 1; |
|
874 |
uint inParseEntity : 1; |
|
875 |
uint referenceToUnparsedEntityDetected : 1; |
|
876 |
uint referenceToParameterEntityDetected : 1; |
|
877 |
uint hasExternalDtdSubset : 1; |
|
878 |
uint lockEncoding : 1; |
|
879 |
uint namespaceProcessing : 1; |
|
880 |
||
881 |
int resumeReduction; |
|
882 |
void resume(int rule); |
|
883 |
||
884 |
inline bool entitiesMustBeDeclared() const { |
|
885 |
return (!inParseEntity |
|
886 |
&& (standalone |
|
887 |
|| (!referenceToUnparsedEntityDetected |
|
888 |
&& !referenceToParameterEntityDetected // Errata 13 as of 2006-04-25 |
|
889 |
&& !hasExternalDtdSubset))); |
|
890 |
} |
|
891 |
||
892 |
// qlalr parser |
|
893 |
int tos; |
|
894 |
int stack_size; |
|
895 |
struct Value { |
|
896 |
int pos; |
|
897 |
int len; |
|
898 |
int prefix; |
|
899 |
ushort c; |
|
900 |
}; |
|
901 |
||
902 |
Value *sym_stack; |
|
903 |
int *state_stack; |
|
904 |
inline void reallocateStack(); |
|
905 |
inline Value &sym(int index) const |
|
906 |
{ return sym_stack[tos + index - 1]; } |
|
907 |
QString textBuffer; |
|
908 |
inline void clearTextBuffer() { |
|
909 |
if (!scanDtd) { |
|
910 |
textBuffer.resize(0); |
|
911 |
textBuffer.reserve(256); |
|
912 |
} |
|
913 |
} |
|
914 |
struct Attribute { |
|
915 |
Value key; |
|
916 |
Value value; |
|
917 |
}; |
|
918 |
QXmlStreamSimpleStack<Attribute> attributeStack; |
|
919 |
||
920 |
inline QStringRef symString(int index) { |
|
921 |
const Value &symbol = sym(index); |
|
922 |
return QStringRef(&textBuffer, symbol.pos + symbol.prefix, symbol.len - symbol.prefix); |
|
923 |
} |
|
924 |
inline QStringRef symName(int index) { |
|
925 |
const Value &symbol = sym(index); |
|
926 |
return QStringRef(&textBuffer, symbol.pos, symbol.len); |
|
927 |
} |
|
928 |
inline QStringRef symString(int index, int offset) { |
|
929 |
const Value &symbol = sym(index); |
|
930 |
return QStringRef(&textBuffer, symbol.pos + symbol.prefix + offset, symbol.len - symbol.prefix - offset); |
|
931 |
} |
|
932 |
inline QStringRef symPrefix(int index) { |
|
933 |
const Value &symbol = sym(index); |
|
934 |
if (symbol.prefix) |
|
935 |
return QStringRef(&textBuffer, symbol.pos, symbol.prefix - 1); |
|
936 |
return QStringRef(); |
|
937 |
} |
|
938 |
inline QStringRef symString(const Value &symbol) { |
|
939 |
return QStringRef(&textBuffer, symbol.pos + symbol.prefix, symbol.len - symbol.prefix); |
|
940 |
} |
|
941 |
inline QStringRef symName(const Value &symbol) { |
|
942 |
return QStringRef(&textBuffer, symbol.pos, symbol.len); |
|
943 |
} |
|
944 |
inline QStringRef symPrefix(const Value &symbol) { |
|
945 |
if (symbol.prefix) |
|
946 |
return QStringRef(&textBuffer, symbol.pos, symbol.prefix - 1); |
|
947 |
return QStringRef(); |
|
948 |
} |
|
949 |
||
950 |
inline void clearSym() { Value &val = sym(1); val.pos = textBuffer.size(); val.len = 0; } |
|
951 |
||
952 |
||
953 |
short token; |
|
954 |
ushort token_char; |
|
955 |
||
956 |
uint filterCarriageReturn(); |
|
957 |
inline uint getChar(); |
|
958 |
inline uint peekChar(); |
|
959 |
inline void putChar(uint c) { putStack.push() = c; } |
|
960 |
inline void putChar(QChar c) { putStack.push() = c.unicode(); } |
|
961 |
void putString(const QString &s, int from = 0); |
|
962 |
void putStringLiteral(const QString &s); |
|
963 |
void putReplacement(const QString &s); |
|
964 |
void putReplacementInAttributeValue(const QString &s); |
|
965 |
ushort getChar_helper(); |
|
966 |
||
967 |
bool scanUntil(const char *str, short tokenToInject = -1); |
|
968 |
bool scanString(const char *str, short tokenToInject, bool requireSpace = true); |
|
969 |
inline void injectToken(ushort tokenToInject) { |
|
970 |
putChar(int(tokenToInject) << 16); |
|
971 |
} |
|
972 |
||
973 |
QString resolveUndeclaredEntity(const QString &name); |
|
974 |
void parseEntity(const QString &value); |
|
975 |
QXmlStreamReaderPrivate *entityParser; |
|
976 |
||
977 |
bool scanAfterLangleBang(); |
|
978 |
bool scanPublicOrSystem(); |
|
979 |
bool scanNData(); |
|
980 |
bool scanAfterDefaultDecl(); |
|
981 |
bool scanAttType(); |
|
982 |
||
983 |
||
984 |
// scan optimization functions. Not strictly necessary but LALR is |
|
985 |
// not very well suited for scanning fast |
|
986 |
int fastScanLiteralContent(); |
|
987 |
int fastScanSpace(); |
|
988 |
int fastScanContentCharList(); |
|
989 |
int fastScanName(int *prefix = 0); |
|
990 |
inline int fastScanNMTOKEN(); |
|
991 |
||
992 |
||
993 |
bool parse(); |
|
994 |
inline void consumeRule(int); |
|
995 |
||
996 |
void raiseError(QXmlStreamReader::Error error, const QString& message = QString()); |
|
997 |
void raiseWellFormedError(const QString &message); |
|
998 |
||
999 |
QXmlStreamEntityResolver *entityResolver; |
|
1000 |
||
1001 |
private: |
|
1002 |
/*! \internal |
|
1003 |
Never assign to variable type directly. Instead use this function. |
|
1004 |
||
1005 |
This prevents errors from being ignored. |
|
1006 |
*/ |
|
1007 |
inline void setType(const QXmlStreamReader::TokenType t) |
|
1008 |
{ |
|
1009 |
if(type != QXmlStreamReader::Invalid) |
|
1010 |
type = t; |
|
1011 |
} |
|
1012 |
}; |
|
1013 |
||
1014 |
bool QXmlStreamReaderPrivate::parse() |
|
1015 |
{ |
|
1016 |
// cleanup currently reported token |
|
1017 |
||
1018 |
switch (type) { |
|
1019 |
case QXmlStreamReader::StartElement: |
|
1020 |
name.clear(); |
|
1021 |
prefix.clear(); |
|
1022 |
qualifiedName.clear(); |
|
1023 |
namespaceUri.clear(); |
|
1024 |
if (publicNamespaceDeclarations.size()) |
|
1025 |
publicNamespaceDeclarations.clear(); |
|
1026 |
if (attributes.size()) |
|
1027 |
attributes.resize(0); |
|
1028 |
if (isEmptyElement) { |
|
1029 |
setType(QXmlStreamReader::EndElement); |
|
1030 |
Tag &tag = tagStack_pop(); |
|
1031 |
namespaceUri = tag.namespaceDeclaration.namespaceUri; |
|
1032 |
name = tag.name; |
|
1033 |
qualifiedName = tag.qualifiedName; |
|
1034 |
isEmptyElement = false; |
|
1035 |
return true; |
|
1036 |
} |
|
1037 |
clearTextBuffer(); |
|
1038 |
break; |
|
1039 |
case QXmlStreamReader::EndElement: |
|
1040 |
name.clear(); |
|
1041 |
prefix.clear(); |
|
1042 |
qualifiedName.clear(); |
|
1043 |
namespaceUri.clear(); |
|
1044 |
clearTextBuffer(); |
|
1045 |
break; |
|
1046 |
case QXmlStreamReader::DTD: |
|
1047 |
publicNotationDeclarations.clear(); |
|
1048 |
publicEntityDeclarations.clear(); |
|
1049 |
dtdName.clear(); |
|
1050 |
dtdPublicId.clear(); |
|
1051 |
dtdSystemId.clear(); |
|
1052 |
// fall through |
|
1053 |
case QXmlStreamReader::Comment: |
|
1054 |
case QXmlStreamReader::Characters: |
|
1055 |
isCDATA = false; |
|
1056 |
isWhitespace = true; |
|
1057 |
text.clear(); |
|
1058 |
clearTextBuffer(); |
|
1059 |
break; |
|
1060 |
case QXmlStreamReader::EntityReference: |
|
1061 |
text.clear(); |
|
1062 |
name.clear(); |
|
1063 |
clearTextBuffer(); |
|
1064 |
break; |
|
1065 |
case QXmlStreamReader::ProcessingInstruction: |
|
1066 |
processingInstructionTarget.clear(); |
|
1067 |
processingInstructionData.clear(); |
|
1068 |
clearTextBuffer(); |
|
1069 |
break; |
|
1070 |
case QXmlStreamReader::NoToken: |
|
1071 |
case QXmlStreamReader::Invalid: |
|
1072 |
break; |
|
1073 |
case QXmlStreamReader::StartDocument: |
|
1074 |
lockEncoding = true; |
|
1075 |
documentVersion.clear(); |
|
1076 |
documentEncoding.clear(); |
|
1077 |
#ifndef QT_NO_TEXTCODEC |
|
1078 |
if(decoder->hasFailure()) { |
|
1079 |
raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); |
|
1080 |
readBuffer.clear(); |
|
1081 |
return false; |
|
1082 |
} |
|
1083 |
#endif |
|
1084 |
// fall through |
|
1085 |
default: |
|
1086 |
clearTextBuffer(); |
|
1087 |
; |
|
1088 |
} |
|
1089 |
||
1090 |
setType(QXmlStreamReader::NoToken); |
|
1091 |
||
1092 |
||
1093 |
// the main parse loop |
|
1094 |
int act, r; |
|
1095 |
||
1096 |
if (resumeReduction) { |
|
1097 |
act = state_stack[tos-1]; |
|
1098 |
r = resumeReduction; |
|
1099 |
resumeReduction = 0; |
|
1100 |
goto ResumeReduction; |
|
1101 |
} |
|
1102 |
||
1103 |
act = state_stack[tos]; |
|
1104 |
||
1105 |
forever { |
|
1106 |
if (token == -1 && - TERMINAL_COUNT != action_index[act]) { |
|
1107 |
uint cu = getChar(); |
|
1108 |
token = NOTOKEN; |
|
1109 |
token_char = cu; |
|
1110 |
if (cu & 0xff0000) { |
|
1111 |
token = cu >> 16; |
|
1112 |
} else switch (token_char) { |
|
1113 |
case 0xfffe: |
|
1114 |
case 0xffff: |
|
1115 |
token = ERROR; |
|
1116 |
break; |
|
1117 |
case '\r': |
|
1118 |
token = SPACE; |
|
1119 |
if (cu == '\r') { |
|
1120 |
if ((token_char = filterCarriageReturn())) { |
|
1121 |
++lineNumber; |
|
1122 |
lastLineStart = characterOffset + readBufferPos; |
|
1123 |
break; |
|
1124 |
} |
|
1125 |
} else { |
|
1126 |
break; |
|
1127 |
} |
|
1128 |
// fall through |
|
1129 |
case '\0': { |
|
1130 |
token = EOF_SYMBOL; |
|
1131 |
if (!tagsDone && !inParseEntity) { |
|
1132 |
int a = t_action(act, token); |
|
1133 |
if (a < 0) { |
|
1134 |
raiseError(QXmlStreamReader::PrematureEndOfDocumentError); |
|
1135 |
return false; |
|
1136 |
} |
|
1137 |
} |
|
1138 |
||
1139 |
} break; |
|
1140 |
case '\n': |
|
1141 |
++lineNumber; |
|
1142 |
lastLineStart = characterOffset + readBufferPos; |
|
1143 |
case ' ': |
|
1144 |
case '\t': |
|
1145 |
token = SPACE; |
|
1146 |
break; |
|
1147 |
case '&': |
|
1148 |
token = AMPERSAND; |
|
1149 |
break; |
|
1150 |
case '#': |
|
1151 |
token = HASH; |
|
1152 |
break; |
|
1153 |
case '\'': |
|
1154 |
token = QUOTE; |
|
1155 |
break; |
|
1156 |
case '\"': |
|
1157 |
token = DBLQUOTE; |
|
1158 |
break; |
|
1159 |
case '<': |
|
1160 |
token = LANGLE; |
|
1161 |
break; |
|
1162 |
case '>': |
|
1163 |
token = RANGLE; |
|
1164 |
break; |
|
1165 |
case '[': |
|
1166 |
token = LBRACK; |
|
1167 |
break; |
|
1168 |
case ']': |
|
1169 |
token = RBRACK; |
|
1170 |
break; |
|
1171 |
case '(': |
|
1172 |
token = LPAREN; |
|
1173 |
break; |
|
1174 |
case ')': |
|
1175 |
token = RPAREN; |
|
1176 |
break; |
|
1177 |
case '|': |
|
1178 |
token = PIPE; |
|
1179 |
break; |
|
1180 |
case '=': |
|
1181 |
token = EQ; |
|
1182 |
break; |
|
1183 |
case '%': |
|
1184 |
token = PERCENT; |
|
1185 |
break; |
|
1186 |
case '/': |
|
1187 |
token = SLASH; |
|
1188 |
break; |
|
1189 |
case ':': |
|
1190 |
token = COLON; |
|
1191 |
break; |
|
1192 |
case ';': |
|
1193 |
token = SEMICOLON; |
|
1194 |
break; |
|
1195 |
case ',': |
|
1196 |
token = COMMA; |
|
1197 |
break; |
|
1198 |
case '-': |
|
1199 |
token = DASH; |
|
1200 |
break; |
|
1201 |
case '+': |
|
1202 |
token = PLUS; |
|
1203 |
break; |
|
1204 |
case '*': |
|
1205 |
token = STAR; |
|
1206 |
break; |
|
1207 |
case '.': |
|
1208 |
token = DOT; |
|
1209 |
break; |
|
1210 |
case '?': |
|
1211 |
token = QUESTIONMARK; |
|
1212 |
break; |
|
1213 |
case '!': |
|
1214 |
token = BANG; |
|
1215 |
break; |
|
1216 |
case '0': |
|
1217 |
case '1': |
|
1218 |
case '2': |
|
1219 |
case '3': |
|
1220 |
case '4': |
|
1221 |
case '5': |
|
1222 |
case '6': |
|
1223 |
case '7': |
|
1224 |
case '8': |
|
1225 |
case '9': |
|
1226 |
token = DIGIT; |
|
1227 |
break; |
|
1228 |
default: |
|
1229 |
if (cu < 0x20) |
|
1230 |
token = NOTOKEN; |
|
1231 |
else |
|
1232 |
token = LETTER; |
|
1233 |
break; |
|
1234 |
} |
|
1235 |
} |
|
1236 |
||
1237 |
act = t_action (act, token); |
|
1238 |
if (act == ACCEPT_STATE) { |
|
1239 |
// reset the parser in case someone resumes (process instructions can follow a valid document) |
|
1240 |
tos = 0; |
|
1241 |
state_stack[tos++] = 0; |
|
1242 |
state_stack[tos] = 0; |
|
1243 |
return true; |
|
1244 |
} else if (act > 0) { |
|
1245 |
if (++tos == stack_size) |
|
1246 |
reallocateStack(); |
|
1247 |
||
1248 |
Value &val = sym_stack[tos]; |
|
1249 |
val.c = token_char; |
|
1250 |
val.pos = textBuffer.size(); |
|
1251 |
val.prefix = 0; |
|
1252 |
val.len = 1; |
|
1253 |
if (token_char) |
|
1254 |
textBuffer += QChar(token_char); |
|
1255 |
||
1256 |
state_stack[tos] = act; |
|
1257 |
token = -1; |
|
1258 |
||
1259 |
||
1260 |
} else if (act < 0) { |
|
1261 |
r = - act - 1; |
|
1262 |
||
1263 |
#if defined (QLALR_DEBUG) |
|
1264 |
int ridx = rule_index[r]; |
|
1265 |
printf ("%3d) %s ::=", r + 1, spell[rule_info[ridx]]); |
|
1266 |
++ridx; |
|
1267 |
for (int i = ridx; i < ridx + rhs[r]; ++i) { |
|
1268 |
int symbol = rule_info[i]; |
|
1269 |
if (const char *name = spell[symbol]) |
|
1270 |
printf (" %s", name); |
|
1271 |
else |
|
1272 |
printf (" #%d", symbol); |
|
1273 |
} |
|
1274 |
printf ("\n"); |
|
1275 |
#endif |
|
1276 |
||
1277 |
tos -= rhs[r]; |
|
1278 |
act = state_stack[tos++]; |
|
1279 |
ResumeReduction: |
|
1280 |
switch (r) { |
|
1281 |
||
1282 |
case 0: |
|
1283 |
setType(QXmlStreamReader::EndDocument); |
|
1284 |
break; |
|
1285 |
||
1286 |
case 1: |
|
1287 |
if (type != QXmlStreamReader::Invalid) { |
|
1288 |
if (hasSeenTag || inParseEntity) { |
|
1289 |
setType(QXmlStreamReader::EndDocument); |
|
1290 |
} else { |
|
1291 |
raiseError(QXmlStreamReader::NotWellFormedError, QXmlStream::tr("Start tag expected.")); |
|
1292 |
// reset the parser |
|
1293 |
tos = 0; |
|
1294 |
state_stack[tos++] = 0; |
|
1295 |
state_stack[tos] = 0; |
|
1296 |
return false; |
|
1297 |
} |
|
1298 |
} |
|
1299 |
break; |
|
1300 |
||
1301 |
case 10: |
|
1302 |
entityReferenceStack.pop()->isCurrentlyReferenced = false; |
|
1303 |
clearSym(); |
|
1304 |
break; |
|
1305 |
||
1306 |
case 11: |
|
1307 |
if (!scanString(spell[VERSION], VERSION, false) && atEnd) { |
|
1308 |
resume(11); |
|
1309 |
return false; |
|
1310 |
} |
|
1311 |
break; |
|
1312 |
||
1313 |
case 12: |
|
1314 |
setType(QXmlStreamReader::StartDocument); |
|
1315 |
documentVersion = symString(6); |
|
1316 |
startDocument(); |
|
1317 |
break; |
|
1318 |
||
1319 |
case 13: |
|
1320 |
hasExternalDtdSubset = true; |
|
1321 |
dtdSystemId = symString(2); |
|
1322 |
break; |
|
1323 |
||
1324 |
case 14: |
|
1325 |
checkPublicLiteral(symString(2)); |
|
1326 |
dtdPublicId = symString(2); |
|
1327 |
dtdSystemId = symString(4); |
|
1328 |
hasExternalDtdSubset = true; |
|
1329 |
break; |
|
1330 |
||
1331 |
case 16: |
|
1332 |
if (!scanPublicOrSystem() && atEnd) { |
|
1333 |
resume(16); |
|
1334 |
return false; |
|
1335 |
} |
|
1336 |
dtdName = symString(3); |
|
1337 |
break; |
|
1338 |
||
1339 |
case 17: |
|
1340 |
case 18: |
|
1341 |
dtdName = symString(3); |
|
1342 |
// fall through |
|
1343 |
||
1344 |
case 19: |
|
1345 |
case 20: |
|
1346 |
setType(QXmlStreamReader::DTD); |
|
1347 |
text = &textBuffer; |
|
1348 |
break; |
|
1349 |
||
1350 |
case 21: |
|
1351 |
scanDtd = true; |
|
1352 |
break; |
|
1353 |
||
1354 |
case 22: |
|
1355 |
scanDtd = false; |
|
1356 |
break; |
|
1357 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1358 |
case 37: |
0 | 1359 |
if (!scanString(spell[EMPTY], EMPTY, false) |
1360 |
&& !scanString(spell[ANY], ANY, false) |
|
1361 |
&& atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1362 |
resume(37); |
0 | 1363 |
return false; |
1364 |
} |
|
1365 |
break; |
|
1366 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1367 |
case 43: |
0 | 1368 |
if (!scanString(spell[PCDATA], PCDATA, false) && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1369 |
resume(43); |
0 | 1370 |
return false; |
1371 |
} |
|
1372 |
break; |
|
1373 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1374 |
case 68: { |
0 | 1375 |
lastAttributeIsCData = true; |
1376 |
} break; |
|
1377 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1378 |
case 78: |
0 | 1379 |
if (!scanAfterDefaultDecl() && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1380 |
resume(78); |
0 | 1381 |
return false; |
1382 |
} |
|
1383 |
break; |
|
1384 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1385 |
case 83: |
0 | 1386 |
sym(1) = sym(2); |
1387 |
lastAttributeValue.clear(); |
|
1388 |
lastAttributeIsCData = false; |
|
1389 |
if (!scanAttType() && atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1390 |
resume(83); |
0 | 1391 |
return false; |
1392 |
} |
|
1393 |
break; |
|
1394 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1395 |
case 84: { |
0 | 1396 |
DtdAttribute &dtdAttribute = dtdAttributes.push(); |
1397 |
dtdAttribute.tagName.clear(); |
|
1398 |
dtdAttribute.isCDATA = lastAttributeIsCData; |
|
1399 |
dtdAttribute.attributePrefix = addToStringStorage(symPrefix(1)); |
|
1400 |
dtdAttribute.attributeName = addToStringStorage(symString(1)); |
|
1401 |
dtdAttribute.attributeQualifiedName = addToStringStorage(symName(1)); |
|
1402 |
dtdAttribute.isNamespaceAttribute = (dtdAttribute.attributePrefix == QLatin1String("xmlns") |
|
1403 |
|| (dtdAttribute.attributePrefix.isEmpty() |
|
1404 |
&& dtdAttribute.attributeName == QLatin1String("xmlns"))); |
|
1405 |
if (lastAttributeValue.isNull()) { |
|
1406 |
dtdAttribute.defaultValue.clear(); |
|
1407 |
} else { |
|
1408 |
if (dtdAttribute.isCDATA) |
|
1409 |
dtdAttribute.defaultValue = addToStringStorage(lastAttributeValue); |
|
1410 |
else |
|
1411 |
dtdAttribute.defaultValue = addToStringStorage(lastAttributeValue.toString().simplified()); |
|
1412 |
||
1413 |
} |
|
1414 |
} break; |
|
1415 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1416 |
case 88: { |
0 | 1417 |
if (referenceToUnparsedEntityDetected && !standalone) |
1418 |
break; |
|
1419 |
int n = dtdAttributes.size(); |
|
1420 |
QStringRef tagName = addToStringStorage(symName(3)); |
|
1421 |
while (n--) { |
|
1422 |
DtdAttribute &dtdAttribute = dtdAttributes[n]; |
|
1423 |
if (!dtdAttribute.tagName.isNull()) |
|
1424 |
break; |
|
1425 |
dtdAttribute.tagName = tagName; |
|
1426 |
for (int i = 0; i < n; ++i) { |
|
1427 |
if ((dtdAttributes[i].tagName.isNull() || dtdAttributes[i].tagName == tagName) |
|
1428 |
&& dtdAttributes[i].attributeQualifiedName == dtdAttribute.attributeQualifiedName) { |
|
1429 |
dtdAttribute.attributeQualifiedName.clear(); // redefined, delete it |
|
1430 |
break; |
|
1431 |
} |
|
1432 |
} |
|
1433 |
} |
|
1434 |
} break; |
|
1435 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1436 |
case 89: { |
0 | 1437 |
if (!scanPublicOrSystem() && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1438 |
resume(89); |
0 | 1439 |
return false; |
1440 |
} |
|
1441 |
EntityDeclaration &entityDeclaration = entityDeclarations.push(); |
|
1442 |
entityDeclaration.clear(); |
|
1443 |
entityDeclaration.name = symString(3); |
|
1444 |
} break; |
|
1445 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1446 |
case 90: { |
0 | 1447 |
if (!scanPublicOrSystem() && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1448 |
resume(90); |
0 | 1449 |
return false; |
1450 |
} |
|
1451 |
EntityDeclaration &entityDeclaration = entityDeclarations.push(); |
|
1452 |
entityDeclaration.clear(); |
|
1453 |
entityDeclaration.name = symString(5); |
|
1454 |
entityDeclaration.parameter = true; |
|
1455 |
} break; |
|
1456 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1457 |
case 91: { |
0 | 1458 |
if (!scanNData() && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1459 |
resume(91); |
0 | 1460 |
return false; |
1461 |
} |
|
1462 |
EntityDeclaration &entityDeclaration = entityDeclarations.top(); |
|
1463 |
entityDeclaration.systemId = symString(3); |
|
1464 |
entityDeclaration.external = true; |
|
1465 |
} break; |
|
1466 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1467 |
case 92: { |
0 | 1468 |
if (!scanNData() && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1469 |
resume(92); |
0 | 1470 |
return false; |
1471 |
} |
|
1472 |
EntityDeclaration &entityDeclaration = entityDeclarations.top(); |
|
1473 |
checkPublicLiteral((entityDeclaration.publicId = symString(3))); |
|
1474 |
entityDeclaration.systemId = symString(5); |
|
1475 |
entityDeclaration.external = true; |
|
1476 |
} break; |
|
1477 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1478 |
case 93: { |
0 | 1479 |
EntityDeclaration &entityDeclaration = entityDeclarations.top(); |
1480 |
entityDeclaration.notationName = symString(3); |
|
1481 |
if (entityDeclaration.parameter) |
|
1482 |
raiseWellFormedError(QXmlStream::tr("NDATA in parameter entity declaration.")); |
|
1483 |
} |
|
1484 |
//fall through |
|
1485 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1486 |
case 94: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1487 |
case 95: { |
0 | 1488 |
if (referenceToUnparsedEntityDetected && !standalone) { |
1489 |
entityDeclarations.pop(); |
|
1490 |
break; |
|
1491 |
} |
|
1492 |
EntityDeclaration &entityDeclaration = entityDeclarations.top(); |
|
1493 |
if (!entityDeclaration.external) |
|
1494 |
entityDeclaration.value = symString(2); |
|
1495 |
QString entityName = entityDeclaration.name.toString(); |
|
1496 |
QHash<QString, Entity> &hash = entityDeclaration.parameter ? parameterEntityHash : entityHash; |
|
1497 |
if (!hash.contains(entityName)) { |
|
1498 |
Entity entity(entityDeclaration.value.toString()); |
|
1499 |
entity.unparsed = (!entityDeclaration.notationName.isNull()); |
|
1500 |
entity.external = entityDeclaration.external; |
|
1501 |
hash.insert(entityName, entity); |
|
1502 |
} |
|
1503 |
} break; |
|
1504 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1505 |
case 96: { |
0 | 1506 |
setType(QXmlStreamReader::ProcessingInstruction); |
1507 |
int pos = sym(4).pos + sym(4).len; |
|
1508 |
processingInstructionTarget = symString(3); |
|
1509 |
if (scanUntil("?>")) { |
|
1510 |
processingInstructionData = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 2); |
|
1511 |
const QString piTarget(processingInstructionTarget.toString()); |
|
1512 |
if (!piTarget.compare(QLatin1String("xml"), Qt::CaseInsensitive)) { |
|
1513 |
raiseWellFormedError(QXmlStream::tr("XML declaration not at start of document.")); |
|
1514 |
} |
|
1515 |
else if(!QXmlUtils::isNCName(piTarget)) |
|
1516 |
raiseWellFormedError(QXmlStream::tr("%1 is an invalid processing instruction name.").arg(piTarget)); |
|
1517 |
} else if (type != QXmlStreamReader::Invalid){ |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1518 |
resume(96); |
0 | 1519 |
return false; |
1520 |
} |
|
1521 |
} break; |
|
1522 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1523 |
case 97: |
0 | 1524 |
setType(QXmlStreamReader::ProcessingInstruction); |
1525 |
processingInstructionTarget = symString(3); |
|
1526 |
if (!processingInstructionTarget.toString().compare(QLatin1String("xml"), Qt::CaseInsensitive)) |
|
1527 |
raiseWellFormedError(QXmlStream::tr("Invalid processing instruction name.")); |
|
1528 |
break; |
|
1529 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1530 |
case 98: |
0 | 1531 |
if (!scanAfterLangleBang() && atEnd) { |
1532 |
resume(98); |
|
1533 |
return false; |
|
1534 |
} |
|
1535 |
break; |
|
1536 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1537 |
case 99: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1538 |
if (!scanUntil("--")) { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1539 |
resume(99); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1540 |
return false; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1541 |
} |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1542 |
break; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1543 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1544 |
case 100: { |
0 | 1545 |
setType(QXmlStreamReader::Comment); |
1546 |
int pos = sym(1).pos + 4; |
|
1547 |
text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); |
|
1548 |
} break; |
|
1549 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1550 |
case 101: { |
0 | 1551 |
setType(QXmlStreamReader::Characters); |
1552 |
isCDATA = true; |
|
1553 |
isWhitespace = false; |
|
1554 |
int pos = sym(2).pos; |
|
1555 |
if (scanUntil("]]>", -1)) { |
|
1556 |
text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); |
|
1557 |
} else { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1558 |
resume(101); |
0 | 1559 |
return false; |
1560 |
} |
|
1561 |
} break; |
|
1562 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1563 |
case 102: { |
0 | 1564 |
if (!scanPublicOrSystem() && atEnd) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1565 |
resume(102); |
0 | 1566 |
return false; |
1567 |
} |
|
1568 |
NotationDeclaration ¬ationDeclaration = notationDeclarations.push(); |
|
1569 |
notationDeclaration.name = symString(3); |
|
1570 |
} break; |
|
1571 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1572 |
case 103: { |
0 | 1573 |
NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); |
1574 |
notationDeclaration.systemId = symString(3); |
|
1575 |
notationDeclaration.publicId.clear(); |
|
1576 |
} break; |
|
1577 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1578 |
case 104: { |
0 | 1579 |
NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); |
1580 |
notationDeclaration.systemId.clear(); |
|
1581 |
checkPublicLiteral((notationDeclaration.publicId = symString(3))); |
|
1582 |
} break; |
|
1583 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1584 |
case 105: { |
0 | 1585 |
NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); |
1586 |
checkPublicLiteral((notationDeclaration.publicId = symString(3))); |
|
1587 |
notationDeclaration.systemId = symString(5); |
|
1588 |
} break; |
|
1589 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1590 |
case 129: |
0 | 1591 |
isWhitespace = false; |
1592 |
// fall through |
|
1593 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1594 |
case 130: |
0 | 1595 |
sym(1).len += fastScanContentCharList(); |
1596 |
if (atEnd && !inParseEntity) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1597 |
resume(130); |
0 | 1598 |
return false; |
1599 |
} |
|
1600 |
break; |
|
1601 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1602 |
case 139: |
0 | 1603 |
if (!textBuffer.isEmpty()) { |
1604 |
setType(QXmlStreamReader::Characters); |
|
1605 |
text = &textBuffer; |
|
1606 |
} |
|
1607 |
break; |
|
1608 |
||
1609 |
case 140: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1610 |
case 141: |
0 | 1611 |
clearSym(); |
1612 |
break; |
|
1613 |
||
1614 |
case 142: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1615 |
case 143: |
0 | 1616 |
sym(1) = sym(2); |
1617 |
break; |
|
1618 |
||
1619 |
case 144: |
|
1620 |
case 145: |
|
1621 |
case 146: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1622 |
case 147: |
0 | 1623 |
sym(1).len += sym(2).len; |
1624 |
break; |
|
1625 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1626 |
case 173: |
0 | 1627 |
if (normalizeLiterals) |
1628 |
textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' '); |
|
1629 |
break; |
|
1630 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1631 |
case 174: |
0 | 1632 |
sym(1).len += fastScanLiteralContent(); |
1633 |
if (atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1634 |
resume(174); |
0 | 1635 |
return false; |
1636 |
} |
|
1637 |
break; |
|
1638 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1639 |
case 175: { |
0 | 1640 |
if (!QXmlUtils::isPublicID(symString(1).toString())) { |
1641 |
raiseWellFormedError(QXmlStream::tr("%1 is an invalid PUBLIC identifier.").arg(symString(1).toString())); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1642 |
resume(175); |
0 | 1643 |
return false; |
1644 |
} |
|
1645 |
} break; |
|
1646 |
||
1647 |
case 176: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1648 |
case 177: |
0 | 1649 |
clearSym(); |
1650 |
break; |
|
1651 |
||
1652 |
case 178: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1653 |
case 179: |
0 | 1654 |
sym(1) = sym(2); |
1655 |
break; |
|
1656 |
||
1657 |
case 180: |
|
1658 |
case 181: |
|
1659 |
case 182: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1660 |
case 183: |
0 | 1661 |
sym(1).len += sym(2).len; |
1662 |
break; |
|
1663 |
||
1664 |
case 213: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1665 |
case 214: |
0 | 1666 |
clearSym(); |
1667 |
break; |
|
1668 |
||
1669 |
case 215: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1670 |
case 216: |
0 | 1671 |
sym(1) = sym(2); |
1672 |
lastAttributeValue = symString(1); |
|
1673 |
break; |
|
1674 |
||
1675 |
case 217: |
|
1676 |
case 218: |
|
1677 |
case 219: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1678 |
case 220: |
0 | 1679 |
sym(1).len += sym(2).len; |
1680 |
break; |
|
1681 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1682 |
case 229: { |
0 | 1683 |
QStringRef prefix = symPrefix(1); |
1684 |
if (prefix.isEmpty() && symString(1) == QLatin1String("xmlns") && namespaceProcessing) { |
|
1685 |
NamespaceDeclaration &namespaceDeclaration = namespaceDeclarations.push(); |
|
1686 |
namespaceDeclaration.prefix.clear(); |
|
1687 |
||
1688 |
const QStringRef ns(symString(5)); |
|
1689 |
if(ns == QLatin1String("http://www.w3.org/2000/xmlns/") || |
|
1690 |
ns == QLatin1String("http://www.w3.org/XML/1998/namespace")) |
|
1691 |
raiseWellFormedError(QXmlStream::tr("Illegal namespace declaration.")); |
|
1692 |
else |
|
1693 |
namespaceDeclaration.namespaceUri = addToStringStorage(ns); |
|
1694 |
} else { |
|
1695 |
Attribute &attribute = attributeStack.push(); |
|
1696 |
attribute.key = sym(1); |
|
1697 |
attribute.value = sym(5); |
|
1698 |
||
1699 |
QStringRef attributeQualifiedName = symName(1); |
|
1700 |
bool normalize = false; |
|
1701 |
for (int a = 0; a < dtdAttributes.size(); ++a) { |
|
1702 |
DtdAttribute &dtdAttribute = dtdAttributes[a]; |
|
1703 |
if (!dtdAttribute.isCDATA |
|
1704 |
&& dtdAttribute.tagName == qualifiedName |
|
1705 |
&& dtdAttribute.attributeQualifiedName == attributeQualifiedName |
|
1706 |
) { |
|
1707 |
normalize = true; |
|
1708 |
break; |
|
1709 |
} |
|
1710 |
} |
|
1711 |
if (normalize) { |
|
1712 |
// normalize attribute value (simplify and trim) |
|
1713 |
int pos = textBuffer.size(); |
|
1714 |
int n = 0; |
|
1715 |
bool wasSpace = true; |
|
1716 |
for (int i = 0; i < attribute.value.len; ++i) { |
|
1717 |
QChar c = textBuffer.at(attribute.value.pos + i); |
|
1718 |
if (c.unicode() == ' ') { |
|
1719 |
if (wasSpace) |
|
1720 |
continue; |
|
1721 |
wasSpace = true; |
|
1722 |
} else { |
|
1723 |
wasSpace = false; |
|
1724 |
} |
|
1725 |
textBuffer += textBuffer.at(attribute.value.pos + i); |
|
1726 |
++n; |
|
1727 |
} |
|
1728 |
if (wasSpace) |
|
1729 |
while (n && textBuffer.at(pos + n - 1).unicode() == ' ') |
|
1730 |
--n; |
|
1731 |
attribute.value.pos = pos; |
|
1732 |
attribute.value.len = n; |
|
1733 |
} |
|
1734 |
if (prefix == QLatin1String("xmlns") && namespaceProcessing) { |
|
1735 |
NamespaceDeclaration &namespaceDeclaration = namespaceDeclarations.push(); |
|
1736 |
QStringRef namespacePrefix = symString(attribute.key); |
|
1737 |
QStringRef namespaceUri = symString(attribute.value); |
|
1738 |
attributeStack.pop(); |
|
1739 |
if (((namespacePrefix == QLatin1String("xml")) |
|
1740 |
^ (namespaceUri == QLatin1String("http://www.w3.org/XML/1998/namespace"))) |
|
1741 |
|| namespaceUri == QLatin1String("http://www.w3.org/2000/xmlns/") |
|
1742 |
|| namespaceUri.isEmpty() |
|
1743 |
|| namespacePrefix == QLatin1String("xmlns")) |
|
1744 |
raiseWellFormedError(QXmlStream::tr("Illegal namespace declaration.")); |
|
1745 |
||
1746 |
namespaceDeclaration.prefix = addToStringStorage(namespacePrefix); |
|
1747 |
namespaceDeclaration.namespaceUri = addToStringStorage(namespaceUri); |
|
1748 |
} |
|
1749 |
} |
|
1750 |
} break; |
|
1751 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1752 |
case 235: { |
0 | 1753 |
normalizeLiterals = true; |
1754 |
Tag &tag = tagStack_push(); |
|
1755 |
prefix = tag.namespaceDeclaration.prefix = addToStringStorage(symPrefix(2)); |
|
1756 |
name = tag.name = addToStringStorage(symString(2)); |
|
1757 |
qualifiedName = tag.qualifiedName = addToStringStorage(symName(2)); |
|
1758 |
if ((!prefix.isEmpty() && !QXmlUtils::isNCName(prefix)) || !QXmlUtils::isNCName(name)) |
|
1759 |
raiseWellFormedError(QXmlStream::tr("Invalid XML name.")); |
|
1760 |
} break; |
|
1761 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1762 |
case 236: |
0 | 1763 |
isEmptyElement = true; |
1764 |
// fall through |
|
1765 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1766 |
case 237: |
0 | 1767 |
setType(QXmlStreamReader::StartElement); |
1768 |
resolveTag(); |
|
1769 |
if (tagStack.size() == 1 && hasSeenTag && !inParseEntity) |
|
1770 |
raiseWellFormedError(QXmlStream::tr("Extra content at end of document.")); |
|
1771 |
hasSeenTag = true; |
|
1772 |
break; |
|
1773 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1774 |
case 238: { |
0 | 1775 |
setType(QXmlStreamReader::EndElement); |
1776 |
Tag &tag = tagStack_pop(); |
|
1777 |
||
1778 |
namespaceUri = tag.namespaceDeclaration.namespaceUri; |
|
1779 |
name = tag.name; |
|
1780 |
qualifiedName = tag.qualifiedName; |
|
1781 |
if (qualifiedName != symName(3)) |
|
1782 |
raiseWellFormedError(QXmlStream::tr("Opening and ending tag mismatch.")); |
|
1783 |
} break; |
|
1784 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1785 |
case 239: |
0 | 1786 |
if (entitiesMustBeDeclared()) { |
1787 |
raiseWellFormedError(QXmlStream::tr("Entity '%1' not declared.").arg(unresolvedEntity)); |
|
1788 |
break; |
|
1789 |
} |
|
1790 |
setType(QXmlStreamReader::EntityReference); |
|
1791 |
name = &unresolvedEntity; |
|
1792 |
break; |
|
1793 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1794 |
case 240: { |
0 | 1795 |
sym(1).len += sym(2).len + 1; |
1796 |
QString reference = symString(2).toString(); |
|
1797 |
if (entityHash.contains(reference)) { |
|
1798 |
Entity &entity = entityHash[reference]; |
|
1799 |
if (entity.unparsed) { |
|
1800 |
raiseWellFormedError(QXmlStream::tr("Reference to unparsed entity '%1'.").arg(reference)); |
|
1801 |
} else { |
|
1802 |
if (!entity.hasBeenParsed) { |
|
1803 |
parseEntity(entity.value); |
|
1804 |
entity.hasBeenParsed = true; |
|
1805 |
} |
|
1806 |
if (entity.literal) |
|
1807 |
putStringLiteral(entity.value); |
|
1808 |
else if (referenceEntity(entity)) |
|
1809 |
putReplacement(entity.value); |
|
1810 |
textBuffer.chop(2 + sym(2).len); |
|
1811 |
clearSym(); |
|
1812 |
} |
|
1813 |
break; |
|
1814 |
} |
|
1815 |
||
1816 |
if (entityResolver) { |
|
1817 |
QString replacementText = resolveUndeclaredEntity(reference); |
|
1818 |
if (!replacementText.isNull()) { |
|
1819 |
putReplacement(replacementText); |
|
1820 |
textBuffer.chop(2 + sym(2).len); |
|
1821 |
clearSym(); |
|
1822 |
break; |
|
1823 |
} |
|
1824 |
} |
|
1825 |
||
1826 |
injectToken(UNRESOLVED_ENTITY); |
|
1827 |
unresolvedEntity = symString(2).toString(); |
|
1828 |
textBuffer.chop(2 + sym(2).len); |
|
1829 |
clearSym(); |
|
1830 |
||
1831 |
} break; |
|
1832 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1833 |
case 241: { |
0 | 1834 |
sym(1).len += sym(2).len + 1; |
1835 |
QString reference = symString(2).toString(); |
|
1836 |
if (parameterEntityHash.contains(reference)) { |
|
1837 |
referenceToParameterEntityDetected = true; |
|
1838 |
Entity &entity = parameterEntityHash[reference]; |
|
1839 |
if (entity.unparsed || entity.external) { |
|
1840 |
referenceToUnparsedEntityDetected = true; |
|
1841 |
} else { |
|
1842 |
if (referenceEntity(entity)) |
|
1843 |
putString(entity.value); |
|
1844 |
textBuffer.chop(2 + sym(2).len); |
|
1845 |
clearSym(); |
|
1846 |
} |
|
1847 |
} else if (entitiesMustBeDeclared()) { |
|
1848 |
raiseWellFormedError(QXmlStream::tr("Entity '%1' not declared.").arg(symString(2).toString())); |
|
1849 |
} |
|
1850 |
} break; |
|
1851 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1852 |
case 242: |
0 | 1853 |
sym(1).len += sym(2).len + 1; |
1854 |
break; |
|
1855 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1856 |
case 243: { |
0 | 1857 |
sym(1).len += sym(2).len + 1; |
1858 |
QString reference = symString(2).toString(); |
|
1859 |
if (entityHash.contains(reference)) { |
|
1860 |
Entity &entity = entityHash[reference]; |
|
1861 |
if (entity.unparsed || entity.value.isNull()) { |
|
1862 |
raiseWellFormedError(QXmlStream::tr("Reference to external entity '%1' in attribute value.").arg(reference)); |
|
1863 |
break; |
|
1864 |
} |
|
1865 |
if (!entity.hasBeenParsed) { |
|
1866 |
parseEntity(entity.value); |
|
1867 |
entity.hasBeenParsed = true; |
|
1868 |
} |
|
1869 |
if (entity.literal) |
|
1870 |
putStringLiteral(entity.value); |
|
1871 |
else if (referenceEntity(entity)) |
|
1872 |
putReplacementInAttributeValue(entity.value); |
|
1873 |
textBuffer.chop(2 + sym(2).len); |
|
1874 |
clearSym(); |
|
1875 |
break; |
|
1876 |
} |
|
1877 |
||
1878 |
if (entityResolver) { |
|
1879 |
QString replacementText = resolveUndeclaredEntity(reference); |
|
1880 |
if (!replacementText.isNull()) { |
|
1881 |
putReplacement(replacementText); |
|
1882 |
textBuffer.chop(2 + sym(2).len); |
|
1883 |
clearSym(); |
|
1884 |
break; |
|
1885 |
} |
|
1886 |
} |
|
1887 |
if (entitiesMustBeDeclared()) { |
|
1888 |
raiseWellFormedError(QXmlStream::tr("Entity '%1' not declared.").arg(reference)); |
|
1889 |
} |
|
1890 |
} break; |
|
1891 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1892 |
case 244: { |
0 | 1893 |
if (uint s = resolveCharRef(3)) { |
1894 |
if (s >= 0xffff) |
|
1895 |
putStringLiteral(QString::fromUcs4(&s, 1)); |
|
1896 |
else |
|
1897 |
putChar((LETTER << 16) | s); |
|
1898 |
||
1899 |
textBuffer.chop(3 + sym(3).len); |
|
1900 |
clearSym(); |
|
1901 |
} else { |
|
1902 |
raiseWellFormedError(QXmlStream::tr("Invalid character reference.")); |
|
1903 |
} |
|
1904 |
} break; |
|
1905 |
||
1906 |
case 247: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1907 |
case 248: |
0 | 1908 |
sym(1).len += sym(2).len; |
1909 |
break; |
|
1910 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1911 |
case 259: |
0 | 1912 |
sym(1).len += fastScanSpace(); |
1913 |
if (atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1914 |
resume(259); |
0 | 1915 |
return false; |
1916 |
} |
|
1917 |
break; |
|
1918 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1919 |
case 262: { |
0 | 1920 |
sym(1).len += fastScanName(&sym(1).prefix); |
1921 |
if (atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1922 |
resume(262); |
0 | 1923 |
return false; |
1924 |
} |
|
1925 |
} break; |
|
1926 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1927 |
case 263: |
0 | 1928 |
sym(1).len += fastScanName(); |
1929 |
if (atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1930 |
resume(263); |
0 | 1931 |
return false; |
1932 |
} |
|
1933 |
break; |
|
1934 |
||
1935 |
case 264: |
|
1936 |
case 265: |
|
1937 |
case 266: |
|
1938 |
case 267: |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1939 |
case 268: |
0 | 1940 |
sym(1).len += fastScanNMTOKEN(); |
1941 |
if (atEnd) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1942 |
resume(268); |
0 | 1943 |
return false; |
1944 |
} |
|
1945 |
||
1946 |
break; |
|
1947 |
||
1948 |
default: |
|
1949 |
; |
|
1950 |
} // switch |
|
1951 |
act = state_stack[tos] = nt_action (act, lhs[r] - TERMINAL_COUNT); |
|
1952 |
if (type != QXmlStreamReader::NoToken) |
|
1953 |
return true; |
|
1954 |
} else { |
|
1955 |
parseError(); |
|
1956 |
break; |
|
1957 |
} |
|
1958 |
} |
|
1959 |
return false; |
|
1960 |
} |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1961 |
#endif //QT_NO_XMLSTREAMREADER.xml |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1962 |
|
0 | 1963 |
|
1964 |
#endif // QXMLSTREAM_P_H |
|
1965 |