OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright 2005 Frerich Raabe <raabe@kde.org> |
3 * Copyright (C) 2006 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 %parse-param { blink::XPath::Parser* parser } | 55 %parse-param { blink::XPath::Parser* parser } |
56 | 56 |
57 %union | 57 %union |
58 { | 58 { |
59 blink::XPath::Step::Axis axis; | 59 blink::XPath::Step::Axis axis; |
60 blink::XPath::Step::NodeTest* nodeTest; | 60 blink::XPath::Step::NodeTest* nodeTest; |
61 blink::XPath::NumericOp::Opcode numop; | 61 blink::XPath::NumericOp::Opcode numop; |
62 blink::XPath::EqTestOp::Opcode eqop; | 62 blink::XPath::EqTestOp::Opcode eqop; |
63 String* str; | 63 String* str; |
64 blink::XPath::Expression* expr; | 64 blink::XPath::Expression* expr; |
65 WillBeHeapVector<OwnPtrWillBeMember<blink::XPath::Predicate> >* predList; | 65 WillBeHeapVector<OwnPtrWillBeMember<blink::XPath::Predicate>>* predList; |
66 WillBeHeapVector<OwnPtrWillBeMember<blink::XPath::Expression> >* argList; | 66 WillBeHeapVector<OwnPtrWillBeMember<blink::XPath::Expression>>* argList; |
67 blink::XPath::Step* step; | 67 blink::XPath::Step* step; |
68 blink::XPath::LocationPath* locationPath; | 68 blink::XPath::LocationPath* locationPath; |
69 } | 69 } |
70 | 70 |
71 %{ | 71 %{ |
72 | 72 |
73 static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval);
} | 73 static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval);
} |
74 static void xpathyyerror(void*, const char*) { } | 74 static void xpathyyerror(void*, const char*) { } |
75 | 75 |
76 %} | 76 %} |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 { | 284 { |
285 $$ = 0; | 285 $$ = 0; |
286 } | 286 } |
287 | | 287 | |
288 PredicateList | 288 PredicateList |
289 ; | 289 ; |
290 | 290 |
291 PredicateList: | 291 PredicateList: |
292 Predicate | 292 Predicate |
293 { | 293 { |
294 $$ = new WillBeHeapVector<OwnPtrWillBeMember<Predicate> >; | 294 $$ = new WillBeHeapVector<OwnPtrWillBeMember<Predicate>>; |
295 $$->append(adoptPtrWillBeNoop(new Predicate(adoptPtrWillBeNoop($1)))); | 295 $$->append(adoptPtrWillBeNoop(new Predicate(adoptPtrWillBeNoop($1)))); |
296 parser->unregisterParseNode($1); | 296 parser->unregisterParseNode($1); |
297 parser->registerPredicateVector($$); | 297 parser->registerPredicateVector($$); |
298 } | 298 } |
299 | | 299 | |
300 PredicateList Predicate | 300 PredicateList Predicate |
301 { | 301 { |
302 $$->append(adoptPtrWillBeNoop(new Predicate(adoptPtrWillBeNoop($2)))); | 302 $$->append(adoptPtrWillBeNoop(new Predicate(adoptPtrWillBeNoop($2)))); |
303 parser->unregisterParseNode($2); | 303 parser->unregisterParseNode($2); |
304 } | 304 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 YYABORT; | 380 YYABORT; |
381 parser->deleteString($1); | 381 parser->deleteString($1); |
382 parser->deleteExpressionVector($3); | 382 parser->deleteExpressionVector($3); |
383 parser->registerParseNode($$); | 383 parser->registerParseNode($$); |
384 } | 384 } |
385 ; | 385 ; |
386 | 386 |
387 ArgumentList: | 387 ArgumentList: |
388 Argument | 388 Argument |
389 { | 389 { |
390 $$ = new WillBeHeapVector<OwnPtrWillBeMember<Expression> >; | 390 $$ = new WillBeHeapVector<OwnPtrWillBeMember<Expression>>; |
391 $$->append(adoptPtrWillBeNoop($1)); | 391 $$->append(adoptPtrWillBeNoop($1)); |
392 parser->unregisterParseNode($1); | 392 parser->unregisterParseNode($1); |
393 parser->registerExpressionVector($$); | 393 parser->registerExpressionVector($$); |
394 } | 394 } |
395 | | 395 | |
396 ArgumentList ',' Argument | 396 ArgumentList ',' Argument |
397 { | 397 { |
398 $$->append(adoptPtrWillBeNoop($3)); | 398 $$->append(adoptPtrWillBeNoop($3)); |
399 parser->unregisterParseNode($3); | 399 parser->unregisterParseNode($3); |
400 } | 400 } |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 MINUS UnaryExpr | 545 MINUS UnaryExpr |
546 { | 546 { |
547 $$ = new Negative; | 547 $$ = new Negative; |
548 $$->addSubExpression(adoptPtrWillBeNoop($2)); | 548 $$->addSubExpression(adoptPtrWillBeNoop($2)); |
549 parser->unregisterParseNode($2); | 549 parser->unregisterParseNode($2); |
550 parser->registerParseNode($$); | 550 parser->registerParseNode($$); |
551 } | 551 } |
552 ; | 552 ; |
553 | 553 |
554 %% | 554 %% |
OLD | NEW |