wok-6.x view libwebkit-video/stuff/WebCore_xml_XPathGrammar.y_124099.diff @ rev 24442

created recipe for firefox-official-da
author Hans-G?nter Theisgen
date Mon Feb 14 07:26:07 2022 +0100 (2022-02-14)
parents
children
line source
1 Index: trunk/Source/WebCore/xml/XPathGrammar.y
2 ===================================================================
3 --- trunk/Source/WebCore/xml/XPathGrammar.y (revision 97771)
4 +++ trunk/Source/WebCore/xml/XPathGrammar.y (revision 124099)
5 @@ -35,4 +35,5 @@
6 #include "XPathPath.h"
7 #include "XPathPredicate.h"
8 +#include "XPathStep.h"
9 #include "XPathVariableReference.h"
10 #include <wtf/FastMalloc.h>
11 @@ -45,6 +46,4 @@
12 #define YYDEBUG 0
13 #define YYMAXDEPTH 10000
14 -#define YYPARSE_PARAM parserParameter
15 -#define PARSER static_cast<Parser*>(parserParameter)
17 using namespace WebCore;
18 @@ -54,4 +53,5 @@
20 %pure_parser
21 +%parse-param { WebCore::XPath::Parser* parser }
23 %union
24 @@ -72,5 +72,5 @@
26 static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); }
27 -static void xpathyyerror(const char*) { }
28 +static void xpathyyerror(void*, const char*) { }
30 %}
31 @@ -119,5 +119,5 @@
32 OrExpr
33 {
34 - PARSER->m_topExpr = $1;
35 + parser->m_topExpr = $1;
36 }
37 ;
38 @@ -139,5 +139,5 @@
39 {
40 $$ = new LocationPath;
41 - PARSER->registerParseNode($$);
42 + parser->registerParseNode($$);
43 }
44 |
45 @@ -151,5 +151,5 @@
46 $$ = $2;
47 $$->insertFirstStep($1);
48 - PARSER->unregisterParseNode($1);
49 + parser->unregisterParseNode($1);
50 }
51 ;
52 @@ -160,6 +160,6 @@
53 $$ = new LocationPath;
54 $$->appendStep($1);
55 - PARSER->unregisterParseNode($1);
56 - PARSER->registerParseNode($$);
57 + parser->unregisterParseNode($1);
58 + parser->registerParseNode($$);
59 }
60 |
61 @@ -167,5 +167,5 @@
62 {
63 $$->appendStep($3);
64 - PARSER->unregisterParseNode($3);
65 + parser->unregisterParseNode($3);
66 }
67 |
68 @@ -174,6 +174,6 @@
69 $$->appendStep($2);
70 $$->appendStep($3);
71 - PARSER->unregisterParseNode($2);
72 - PARSER->unregisterParseNode($3);
73 + parser->unregisterParseNode($2);
74 + parser->unregisterParseNode($3);
75 }
76 ;
77 @@ -184,9 +184,9 @@
78 if ($2) {
79 $$ = new Step(Step::ChildAxis, *$1, *$2);
80 - PARSER->deletePredicateVector($2);
81 + parser->deletePredicateVector($2);
82 } else
83 $$ = new Step(Step::ChildAxis, *$1);
84 - PARSER->deleteNodeTest($1);
85 - PARSER->registerParseNode($$);
86 + parser->deleteNodeTest($1);
87 + parser->registerParseNode($$);
88 }
89 |
90 @@ -195,6 +195,6 @@
91 String localName;
92 String namespaceURI;
93 - if (!PARSER->expandQName(*$1, localName, namespaceURI)) {
94 - PARSER->m_gotNamespaceError = true;
95 + if (!parser->expandQName(*$1, localName, namespaceURI)) {
96 + parser->m_gotNamespaceError = true;
97 YYABORT;
98 }
99 @@ -202,9 +202,9 @@
100 if ($2) {
101 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$2);
102 - PARSER->deletePredicateVector($2);
103 + parser->deletePredicateVector($2);
104 } else
105 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI));
106 - PARSER->deleteString($1);
107 - PARSER->registerParseNode($$);
108 + parser->deleteString($1);
109 + parser->registerParseNode($$);
110 }
111 |
112 @@ -213,9 +213,9 @@
113 if ($3) {
114 $$ = new Step($1, *$2, *$3);
115 - PARSER->deletePredicateVector($3);
116 + parser->deletePredicateVector($3);
117 } else
118 $$ = new Step($1, *$2);
119 - PARSER->deleteNodeTest($2);
120 - PARSER->registerParseNode($$);
121 + parser->deleteNodeTest($2);
122 + parser->registerParseNode($$);
123 }
124 |
125 @@ -224,6 +224,6 @@
126 String localName;
127 String namespaceURI;
128 - if (!PARSER->expandQName(*$2, localName, namespaceURI)) {
129 - PARSER->m_gotNamespaceError = true;
130 + if (!parser->expandQName(*$2, localName, namespaceURI)) {
131 + parser->m_gotNamespaceError = true;
132 YYABORT;
133 }
134 @@ -231,9 +231,9 @@
135 if ($3) {
136 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$3);
137 - PARSER->deletePredicateVector($3);
138 + parser->deletePredicateVector($3);
139 } else
140 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI));
141 - PARSER->deleteString($2);
142 - PARSER->registerParseNode($$);
143 + parser->deleteString($2);
144 + parser->registerParseNode($$);
145 }
146 |
147 @@ -260,6 +260,6 @@
148 $$ = new Step::NodeTest(Step::NodeTest::CommentNodeTest);
150 - PARSER->deleteString($1);
151 - PARSER->registerNodeTest($$);
152 + parser->deleteString($1);
153 + parser->registerNodeTest($$);
154 }
155 |
156 @@ -267,6 +267,6 @@
157 {
158 $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest);
159 - PARSER->deleteString($1);
160 - PARSER->registerNodeTest($$);
161 + parser->deleteString($1);
162 + parser->registerNodeTest($$);
163 }
164 |
165 @@ -274,7 +274,7 @@
166 {
167 $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, $3->stripWhiteSpace());
168 - PARSER->deleteString($1);
169 - PARSER->deleteString($3);
170 - PARSER->registerNodeTest($$);
171 + parser->deleteString($1);
172 + parser->deleteString($3);
173 + parser->registerNodeTest($$);
174 }
175 ;
176 @@ -294,6 +294,6 @@
177 $$ = new Vector<Predicate*>;
178 $$->append(new Predicate($1));
179 - PARSER->unregisterParseNode($1);
180 - PARSER->registerPredicateVector($$);
181 + parser->unregisterParseNode($1);
182 + parser->registerPredicateVector($$);
183 }
184 |
185 @@ -301,5 +301,5 @@
186 {
187 $$->append(new Predicate($2));
188 - PARSER->unregisterParseNode($2);
189 + parser->unregisterParseNode($2);
190 }
191 ;
192 @@ -316,5 +316,5 @@
193 {
194 $$ = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
195 - PARSER->registerParseNode($$);
196 + parser->registerParseNode($$);
197 }
198 ;
199 @@ -324,5 +324,5 @@
200 {
201 $$ = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
202 - PARSER->registerParseNode($$);
203 + parser->registerParseNode($$);
204 }
205 |
206 @@ -330,5 +330,5 @@
207 {
208 $$ = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
209 - PARSER->registerParseNode($$);
210 + parser->registerParseNode($$);
211 }
212 ;
213 @@ -338,6 +338,6 @@
214 {
215 $$ = new VariableReference(*$1);
216 - PARSER->deleteString($1);
217 - PARSER->registerParseNode($$);
218 + parser->deleteString($1);
219 + parser->registerParseNode($$);
220 }
221 |
222 @@ -350,6 +350,6 @@
223 {
224 $$ = new StringExpression(*$1);
225 - PARSER->deleteString($1);
226 - PARSER->registerParseNode($$);
227 + parser->deleteString($1);
228 + parser->registerParseNode($$);
229 }
230 |
231 @@ -357,6 +357,6 @@
232 {
233 $$ = new Number($1->toDouble());
234 - PARSER->deleteString($1);
235 - PARSER->registerParseNode($$);
236 + parser->deleteString($1);
237 + parser->registerParseNode($$);
238 }
239 |
240 @@ -370,6 +370,6 @@
241 if (!$$)
242 YYABORT;
243 - PARSER->deleteString($1);
244 - PARSER->registerParseNode($$);
245 + parser->deleteString($1);
246 + parser->registerParseNode($$);
247 }
248 |
249 @@ -379,7 +379,7 @@
250 if (!$$)
251 YYABORT;
252 - PARSER->deleteString($1);
253 - PARSER->deleteExpressionVector($3);
254 - PARSER->registerParseNode($$);
255 + parser->deleteString($1);
256 + parser->deleteExpressionVector($3);
257 + parser->registerParseNode($$);
258 }
259 ;
260 @@ -390,6 +390,6 @@
261 $$ = new Vector<Expression*>;
262 $$->append($1);
263 - PARSER->unregisterParseNode($1);
264 - PARSER->registerExpressionVector($$);
265 + parser->unregisterParseNode($1);
266 + parser->registerExpressionVector($$);
267 }
268 |
269 @@ -397,5 +397,5 @@
270 {
271 $$->append($3);
272 - PARSER->unregisterParseNode($3);
273 + parser->unregisterParseNode($3);
274 }
275 ;
276 @@ -413,7 +413,7 @@
277 $$->addSubExpression($1);
278 $$->addSubExpression($3);
279 - PARSER->unregisterParseNode($1);
280 - PARSER->unregisterParseNode($3);
281 - PARSER->registerParseNode($$);
282 + parser->unregisterParseNode($1);
283 + parser->unregisterParseNode($3);
284 + parser->registerParseNode($$);
285 }
286 ;
287 @@ -431,7 +431,7 @@
288 $3->setAbsolute(true);
289 $$ = new Path(static_cast<Filter*>($1), $3);
290 - PARSER->unregisterParseNode($1);
291 - PARSER->unregisterParseNode($3);
292 - PARSER->registerParseNode($$);
293 + parser->unregisterParseNode($1);
294 + parser->unregisterParseNode($3);
295 + parser->registerParseNode($$);
296 }
297 |
298 @@ -441,8 +441,8 @@
299 $3->setAbsolute(true);
300 $$ = new Path(static_cast<Filter*>($1), $3);
301 - PARSER->unregisterParseNode($1);
302 - PARSER->unregisterParseNode($2);
303 - PARSER->unregisterParseNode($3);
304 - PARSER->registerParseNode($$);
305 + parser->unregisterParseNode($1);
306 + parser->unregisterParseNode($2);
307 + parser->unregisterParseNode($3);
308 + parser->registerParseNode($$);
309 }
310 ;
311 @@ -454,7 +454,7 @@
312 {
313 $$ = new Filter($1, *$2);
314 - PARSER->unregisterParseNode($1);
315 - PARSER->deletePredicateVector($2);
316 - PARSER->registerParseNode($$);
317 + parser->unregisterParseNode($1);
318 + parser->deletePredicateVector($2);
319 + parser->registerParseNode($$);
320 }
321 ;
322 @@ -466,7 +466,7 @@
323 {
324 $$ = new LogicalOp(LogicalOp::OP_Or, $1, $3);
325 - PARSER->unregisterParseNode($1);
326 - PARSER->unregisterParseNode($3);
327 - PARSER->registerParseNode($$);
328 + parser->unregisterParseNode($1);
329 + parser->unregisterParseNode($3);
330 + parser->registerParseNode($$);
331 }
332 ;
333 @@ -478,7 +478,7 @@
334 {
335 $$ = new LogicalOp(LogicalOp::OP_And, $1, $3);
336 - PARSER->unregisterParseNode($1);
337 - PARSER->unregisterParseNode($3);
338 - PARSER->registerParseNode($$);
339 + parser->unregisterParseNode($1);
340 + parser->unregisterParseNode($3);
341 + parser->registerParseNode($$);
342 }
343 ;
344 @@ -490,7 +490,7 @@
345 {
346 $$ = new EqTestOp($2, $1, $3);
347 - PARSER->unregisterParseNode($1);
348 - PARSER->unregisterParseNode($3);
349 - PARSER->registerParseNode($$);
350 + parser->unregisterParseNode($1);
351 + parser->unregisterParseNode($3);
352 + parser->registerParseNode($$);
353 }
354 ;
355 @@ -502,7 +502,7 @@
356 {
357 $$ = new EqTestOp($2, $1, $3);
358 - PARSER->unregisterParseNode($1);
359 - PARSER->unregisterParseNode($3);
360 - PARSER->registerParseNode($$);
361 + parser->unregisterParseNode($1);
362 + parser->unregisterParseNode($3);
363 + parser->registerParseNode($$);
364 }
365 ;
366 @@ -514,7 +514,7 @@
367 {
368 $$ = new NumericOp(NumericOp::OP_Add, $1, $3);
369 - PARSER->unregisterParseNode($1);
370 - PARSER->unregisterParseNode($3);
371 - PARSER->registerParseNode($$);
372 + parser->unregisterParseNode($1);
373 + parser->unregisterParseNode($3);
374 + parser->registerParseNode($$);
375 }
376 |
377 @@ -522,7 +522,7 @@
378 {
379 $$ = new NumericOp(NumericOp::OP_Sub, $1, $3);
380 - PARSER->unregisterParseNode($1);
381 - PARSER->unregisterParseNode($3);
382 - PARSER->registerParseNode($$);
383 + parser->unregisterParseNode($1);
384 + parser->unregisterParseNode($3);
385 + parser->registerParseNode($$);
386 }
387 ;
388 @@ -534,7 +534,7 @@
389 {
390 $$ = new NumericOp($2, $1, $3);
391 - PARSER->unregisterParseNode($1);
392 - PARSER->unregisterParseNode($3);
393 - PARSER->registerParseNode($$);
394 + parser->unregisterParseNode($1);
395 + parser->unregisterParseNode($3);
396 + parser->registerParseNode($$);
397 }
398 ;
399 @@ -547,6 +547,6 @@
400 $$ = new Negative;
401 $$->addSubExpression($2);
402 - PARSER->unregisterParseNode($2);
403 - PARSER->registerParseNode($$);
404 + parser->unregisterParseNode($2);
405 + parser->registerParseNode($$);
406 }
407 ;