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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 LocationPath | 422 LocationPath |
423 { | 423 { |
424 $$ = $1; | 424 $$ = $1; |
425 } | 425 } |
426 | | 426 | |
427 FilterExpr | 427 FilterExpr |
428 | | 428 | |
429 FilterExpr '/' RelativeLocationPath | 429 FilterExpr '/' RelativeLocationPath |
430 { | 430 { |
431 $3->setAbsolute(true); | 431 $3->setAbsolute(true); |
432 $$ = new Path(static_cast<Filter*>($1), $3); | 432 $$ = new Path($1, $3); |
433 parser->unregisterParseNode($1); | 433 parser->unregisterParseNode($1); |
434 parser->unregisterParseNode($3); | 434 parser->unregisterParseNode($3); |
435 parser->registerParseNode($$); | 435 parser->registerParseNode($$); |
436 } | 436 } |
437 | | 437 | |
438 FilterExpr DescendantOrSelf RelativeLocationPath | 438 FilterExpr DescendantOrSelf RelativeLocationPath |
439 { | 439 { |
440 $3->insertFirstStep($2); | 440 $3->insertFirstStep($2); |
441 $3->setAbsolute(true); | 441 $3->setAbsolute(true); |
442 $$ = new Path(static_cast<Filter*>($1), $3); | 442 $$ = new Path($1, $3); |
443 parser->unregisterParseNode($1); | 443 parser->unregisterParseNode($1); |
444 parser->unregisterParseNode($2); | 444 parser->unregisterParseNode($2); |
445 parser->unregisterParseNode($3); | 445 parser->unregisterParseNode($3); |
446 parser->registerParseNode($$); | 446 parser->registerParseNode($$); |
447 } | 447 } |
448 ; | 448 ; |
449 | 449 |
450 FilterExpr: | 450 FilterExpr: |
451 PrimaryExpr | 451 PrimaryExpr |
452 | | 452 | |
(...skipping 92 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(adoptPtr($2)); | 548 $$->addSubExpression(adoptPtr($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 |