/[classpath]/classpath/gnu/xml/xpath/XPathParser.java
ViewVC logotype

Diff of /classpath/gnu/xml/xpath/XPathParser.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mark, Sat Jul 2 20:32:22 2005 UTC revision 1.4 by dog, Sat Jul 9 20:38:36 2005 UTC
# Line 1  Line 1 
1  // created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de  // created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
2    
3                                          // line 2 "XPathParser.y"                                          // line 2 "XPathParser.y"
4  /* XPathParser.java -- An XPath 1.0 parser.  /*
5     Copyright (C) 2004 Free Software Foundation, Inc.   * XPathParser.java
6     * Copyright (C) 2004 The Free Software Foundation
7  This file is part of GNU Classpath.   *
8     * This file is part of GNU JAXP, a library.
9  GNU Classpath is free software; you can redistribute it and/or modify   *
10  it under the terms of the GNU General Public License as published by   * GNU JAXP is free software; you can redistribute it and/or modify
11  the Free Software Foundation; either version 2, or (at your option)   * it under the terms of the GNU General Public License as published by
12  any later version.   * the Free Software Foundation; either version 2 of the License, or
13     * (at your option) any later version.
14  GNU Classpath is distributed in the hope that it will be useful, but   *
15  WITHOUT ANY WARRANTY; without even the implied warranty of   * GNU JAXP is distributed in the hope that it will be useful,
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  General Public License for more details.   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     * GNU General Public License for more details.
19  You should have received a copy of the GNU General Public License   *
20  along with GNU Classpath; see the file COPYING.  If not, write to the   * You should have received a copy of the GNU General Public License
21  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA   * along with this program; if not, write to the Free Software
22  02110-1301 USA.   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23     *
24  Linking this library statically or dynamically with other modules is   * Linking this library statically or dynamically with other modules is
25  making a combined work based on this library.  Thus, the terms and   * making a combined work based on this library.  Thus, the terms and
26  conditions of the GNU General Public License cover the whole   * conditions of the GNU General Public License cover the whole
27  combination.   * combination.
28     *
29  As a special exception, the copyright holders of this library give you   * As a special exception, the copyright holders of this library give you
30  permission to link this library with independent modules to produce an   * permission to link this library with independent modules to produce an
31  executable, regardless of the license terms of these independent   * executable, regardless of the license terms of these independent
32  modules, and to copy and distribute the resulting executable under   * modules, and to copy and distribute the resulting executable under
33  terms of your choice, provided that you also meet, for each linked   * terms of your choice, provided that you also meet, for each linked
34  independent module, the terms and conditions of the license of that   * independent module, the terms and conditions of the license of that
35  module.  An independent module is a module which is not derived from   * module.  An independent module is a module which is not derived from
36  or based on this library.  If you modify this library, you may extend   * or based on this library.  If you modify this library, you may extend
37  this exception to your version of the library, but you are not   * this exception to your version of the library, but you are not
38  obligated to do so.  If you do not wish to do so, delete this   * obliged to do so.  If you do not wish to do so, delete this
39  exception statement from your version. */   * exception statement from your version.
40     */
41    
42  package gnu.xml.xpath;  package gnu.xml.xpath;
43    
44  import java.util.ArrayList;  import java.util.ArrayList;
45  import java.util.Collections;  import java.util.Collections;
46  import java.util.List;  import java.util.List;
47    import java.util.Map;
48  import javax.xml.namespace.NamespaceContext;  import javax.xml.namespace.NamespaceContext;
49  import javax.xml.namespace.QName;  import javax.xml.namespace.QName;
50  import javax.xml.xpath.XPathFunctionResolver;  import javax.xml.xpath.XPathFunctionResolver;
# Line 205  public class XPathParser Line 207  public class XPathParser
207      return new FunctionCall(functionResolver, name, args);      return new FunctionCall(functionResolver, name, args);
208    }    }
209    
210                                          // line 210 "-"                                          // line 211 "-"
211  // %token constants  // %token constants
212    
213    public static final int LITERAL = 257;    public static final int LITERAL = 257;
# Line 474  public class XPathParser Line 476  public class XPathParser
476          yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);          yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
477          switch (yyN) {          switch (yyN) {
478  case 4:  case 4:
479                                          // line 276 "XPathParser.y"                                          // line 277 "XPathParser.y"
480    {    {
481        yyVal = new Root();        yyVal = new Root();
482      }      }
483    break;    break;
484  case 5:  case 5:
485                                          // line 280 "XPathParser.y"                                          // line 281 "XPathParser.y"
486    {    {
487        Steps steps;        Steps steps;
488        if (yyVals[0+yyTop] instanceof Steps)        if (yyVals[0+yyTop] instanceof Steps)
# Line 498  case 5: Line 500  case 5:
500      }      }
501    break;    break;
502  case 6:  case 6:
503                                          // line 296 "XPathParser.y"                                          // line 297 "XPathParser.y"
504    {    {
505        Test nt = new NodeTypeTest((short) 0);        Test nt = new NodeTypeTest((short) 0);
506        Selector s = new Selector(Selector.DESCENDANT_OR_SELF,        Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
# Line 521  case 6: Line 523  case 6:
523      }      }
524    break;    break;
525  case 8:  case 8:
526                                          // line 321 "XPathParser.y"                                          // line 322 "XPathParser.y"
527    {    {
528        Steps steps;        Steps steps;
529        if (yyVals[-2+yyTop] instanceof Steps)        if (yyVals[-2+yyTop] instanceof Steps)
# Line 539  case 8: Line 541  case 8:
541      }      }
542    break;    break;
543  case 9:  case 9:
544                                          // line 337 "XPathParser.y"                                          // line 338 "XPathParser.y"
545    {    {
546        Test nt = new NodeTypeTest((short) 0);        Test nt = new NodeTypeTest((short) 0);
547        Selector s = new Selector(Selector.DESCENDANT_OR_SELF,        Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
# Line 562  case 9: Line 564  case 9:
564      }      }
565    break;    break;
566  case 10:  case 10:
567                                          // line 361 "XPathParser.y"                                          // line 362 "XPathParser.y"
568    {    {
569        yyVal = new Selector (Selector.CHILD, (List) yyVals[0+yyTop]);        yyVal = new Selector (Selector.CHILD, (List) yyVals[0+yyTop]);
570      }      }
571    break;    break;
572  case 11:  case 11:
573                                          // line 365 "XPathParser.y"                                          // line 366 "XPathParser.y"
574    {    {
575        yyVal = new Selector (Selector.ATTRIBUTE, (List) yyVals[0+yyTop]);        yyVal = new Selector (Selector.ATTRIBUTE, (List) yyVals[0+yyTop]);
576      }      }
577    break;    break;
578  case 12:  case 12:
579                                          // line 369 "XPathParser.y"                                          // line 370 "XPathParser.y"
580    {    {
581        yyVal = new Selector (((Integer) yyVals[-2+yyTop]).intValue (), (List) yyVals[0+yyTop]);        yyVal = new Selector (((Integer) yyVals[-2+yyTop]).intValue (), (List) yyVals[0+yyTop]);
582      }      }
583    break;    break;
584  case 13:  case 13:
585                                          // line 373 "XPathParser.y"                                          // line 374 "XPathParser.y"
586    {    {
587        yyVal = new Selector (Selector.SELF, Collections.EMPTY_LIST);        yyVal = new Selector (Selector.SELF, Collections.EMPTY_LIST);
588      }      }
589    break;    break;
590  case 14:  case 14:
591                                          // line 377 "XPathParser.y"                                          // line 378 "XPathParser.y"
592    {    {
593        yyVal = new Selector (Selector.PARENT, Collections.EMPTY_LIST);        yyVal = new Selector (Selector.PARENT, Collections.EMPTY_LIST);
594      }      }
595    break;    break;
596  case 15:  case 15:
597                                          // line 384 "XPathParser.y"                                          // line 385 "XPathParser.y"
598    {    {
599        List list = new ArrayList();        List list = new ArrayList();
600        list.add(yyVals[0+yyTop]);        list.add(yyVals[0+yyTop]);
# Line 600  case 15: Line 602  case 15:
602      }      }
603    break;    break;
604  case 16:  case 16:
605                                          // line 390 "XPathParser.y"                                          // line 391 "XPathParser.y"
606    {    {
607        List list = (List)yyVals[-1+yyTop];        List list = (List)yyVals[-1+yyTop];
608        list.add(yyVals[0+yyTop]);        list.add(yyVals[0+yyTop]);
# Line 608  case 16: Line 610  case 16:
610      }      }
611    break;    break;
612  case 17:  case 17:
613                                          // line 414 "XPathParser.y"                                          // line 415 "XPathParser.y"
614    {    {
615        yyVal = new Integer(Selector.ANCESTOR);        yyVal = new Integer(Selector.ANCESTOR);
616      }      }
617    break;    break;
618  case 18:  case 18:
619                                          // line 418 "XPathParser.y"                                          // line 419 "XPathParser.y"
620    {    {
621        yyVal = new Integer(Selector.ANCESTOR_OR_SELF);        yyVal = new Integer(Selector.ANCESTOR_OR_SELF);
622      }      }
623    break;    break;
624  case 19:  case 19:
625                                          // line 422 "XPathParser.y"                                          // line 423 "XPathParser.y"
626    {    {
627        yyVal = new Integer(Selector.ATTRIBUTE);        yyVal = new Integer(Selector.ATTRIBUTE);
628      }      }
629    break;    break;
630  case 20:  case 20:
631                                          // line 426 "XPathParser.y"                                          // line 427 "XPathParser.y"
632    {    {
633        yyVal = new Integer(Selector.CHILD);        yyVal = new Integer(Selector.CHILD);
634      }      }
635    break;    break;
636  case 21:  case 21:
637                                          // line 430 "XPathParser.y"                                          // line 431 "XPathParser.y"
638    {    {
639        yyVal = new Integer(Selector.DESCENDANT);        yyVal = new Integer(Selector.DESCENDANT);
640      }      }
641    break;    break;
642  case 22:  case 22:
643                                          // line 434 "XPathParser.y"                                          // line 435 "XPathParser.y"
644    {    {
645        yyVal = new Integer(Selector.DESCENDANT_OR_SELF);        yyVal = new Integer(Selector.DESCENDANT_OR_SELF);
646      }      }
647    break;    break;
648  case 23:  case 23:
649                                          // line 438 "XPathParser.y"                                          // line 439 "XPathParser.y"
650    {    {
651        yyVal = new Integer(Selector.FOLLOWING);        yyVal = new Integer(Selector.FOLLOWING);
652      }      }
653    break;    break;
654  case 24:  case 24:
655                                          // line 442 "XPathParser.y"                                          // line 443 "XPathParser.y"
656    {    {
657        yyVal = new Integer(Selector.FOLLOWING_SIBLING);        yyVal = new Integer(Selector.FOLLOWING_SIBLING);
658      }      }
659    break;    break;
660  case 25:  case 25:
661                                          // line 446 "XPathParser.y"                                          // line 447 "XPathParser.y"
662    {    {
663        yyVal = new Integer(Selector.NAMESPACE);        yyVal = new Integer(Selector.NAMESPACE);
664      }      }
665    break;    break;
666  case 26:  case 26:
667                                          // line 450 "XPathParser.y"                                          // line 451 "XPathParser.y"
668    {    {
669        yyVal = new Integer(Selector.PARENT);        yyVal = new Integer(Selector.PARENT);
670      }      }
671    break;    break;
672  case 27:  case 27:
673                                          // line 454 "XPathParser.y"                                          // line 455 "XPathParser.y"
674    {    {
675        yyVal = new Integer(Selector.PRECEDING);        yyVal = new Integer(Selector.PRECEDING);
676      }      }
677    break;    break;
678  case 28:  case 28:
679                                          // line 458 "XPathParser.y"                                          // line 459 "XPathParser.y"
680    {    {
681        yyVal = new Integer(Selector.PRECEDING_SIBLING);        yyVal = new Integer(Selector.PRECEDING_SIBLING);
682      }      }
683    break;    break;
684  case 29:  case 29:
685                                          // line 462 "XPathParser.y"                                          // line 463 "XPathParser.y"
686    {    {
687        yyVal = new Integer(Selector.SELF);        yyVal = new Integer(Selector.SELF);
688      }      }
689    break;    break;
690  case 31:  case 31:
691                                          // line 471 "XPathParser.y"                                          // line 472 "XPathParser.y"
692    {    {
693        yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);        yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);
694      }      }
695    break;    break;
696  case 32:  case 32:
697                                          // line 476 "XPathParser.y"                                          // line 477 "XPathParser.y"
698    {    {
699        yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());        yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());
700      }      }
701    break;    break;
702  case 33:  case 33:
703                                          // line 483 "XPathParser.y"                                          // line 484 "XPathParser.y"
704    {    {
705        yyVal = new Predicate((Expr) yyVals[-1+yyTop]);        yyVal = new Predicate((Expr) yyVals[-1+yyTop]);
706      }      }
707    break;    break;
708  case 35:  case 35:
709                                          // line 491 "XPathParser.y"                                          // line 492 "XPathParser.y"
710    {    {
711        yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);        yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);
712      }      }
713    break;    break;
714  case 36:  case 36:
715                                          // line 495 "XPathParser.y"                                          // line 496 "XPathParser.y"
716    {    {
717        yyVal = new Constant(yyVals[0+yyTop]);        yyVal = new Constant(yyVals[0+yyTop]);
718      }      }
719    break;    break;
720  case 37:  case 37:
721                                          // line 499 "XPathParser.y"                                          // line 500 "XPathParser.y"
722    {    {
723        yyVal = new Constant(yyVals[0+yyTop]);        yyVal = new Constant(yyVals[0+yyTop]);
724      }      }
725    break;    break;
726  case 39:  case 39:
727                                          // line 507 "XPathParser.y"                                          // line 508 "XPathParser.y"
728    {    {
729        yyVal = lookupFunction((String) yyVals[-2+yyTop], Collections.EMPTY_LIST);        yyVal = lookupFunction((String) yyVals[-2+yyTop], Collections.EMPTY_LIST);
730      }      }
731    break;    break;
732  case 40:  case 40:
733                                          // line 511 "XPathParser.y"                                          // line 512 "XPathParser.y"
734    {    {
735        yyVal = lookupFunction((String) yyVals[-3+yyTop], (List) yyVals[-1+yyTop]);        yyVal = lookupFunction((String) yyVals[-3+yyTop], (List) yyVals[-1+yyTop]);
736      }      }
737    break;    break;
738  case 41:  case 41:
739                                          // line 518 "XPathParser.y"                                          // line 519 "XPathParser.y"
740    {    {
741        List list = new ArrayList();        List list = new ArrayList();
742        list.add(yyVals[0+yyTop]);        list.add(yyVals[0+yyTop]);
# Line 742  case 41: Line 744  case 41:
744      }      }
745    break;    break;
746  case 42:  case 42:
747                                          // line 524 "XPathParser.y"                                          // line 525 "XPathParser.y"
748    {    {
749        List list = (List) yyVals[0+yyTop];        List list = (List) yyVals[0+yyTop];
750        list.add(0, yyVals[-2+yyTop]);        list.add(0, yyVals[-2+yyTop]);
# Line 750  case 42: Line 752  case 42:
752      }      }
753    break;    break;
754  case 44:  case 44:
755                                          // line 534 "XPathParser.y"                                          // line 535 "XPathParser.y"
756    {    {
757        yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);        yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
758      }      }
759    break;    break;
760  case 47:  case 47:
761                                          // line 543 "XPathParser.y"                                          // line 544 "XPathParser.y"
762    {    {
763        Steps steps;        Steps steps;
764        if (yyVals[0+yyTop] instanceof Steps)        if (yyVals[0+yyTop] instanceof Steps)
# Line 774  case 47: Line 776  case 47:
776      }      }
777    break;    break;
778  case 48:  case 48:
779                                          // line 559 "XPathParser.y"                                          // line 560 "XPathParser.y"
780    {    {
781        Test nt = new NodeTypeTest((short) 0);        Test nt = new NodeTypeTest((short) 0);
782        Selector s = new Selector(Selector.DESCENDANT_OR_SELF,        Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
# Line 797  case 48: Line 799  case 48:
799      }      }
800    break;    break;
801  case 50:  case 50:
802                                          // line 584 "XPathParser.y"                                          // line 585 "XPathParser.y"
803    {    {
804        Predicate filter = (Predicate) yyVals[0+yyTop];        Predicate filter = (Predicate) yyVals[0+yyTop];
805        Selector s = new Selector(Selector.SELF,        Selector s = new Selector(Selector.SELF,
# Line 818  case 50: Line 820  case 50:
820      }      }
821    break;    break;
822  case 52:  case 52:
823                                          // line 607 "XPathParser.y"                                          // line 608 "XPathParser.y"
824    {    {
825        yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);        yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
826      }      }
827    break;    break;
828  case 54:  case 54:
829                                          // line 615 "XPathParser.y"                                          // line 616 "XPathParser.y"
830    {    {
831        yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);        yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
832      }      }
833    break;    break;
834  case 56:  case 56:
835                                          // line 623 "XPathParser.y"                                          // line 624 "XPathParser.y"
836    {    {
837        yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);        yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);
838      }      }
839    break;    break;
840  case 57:  case 57:
841                                          // line 627 "XPathParser.y"                                          // line 628 "XPathParser.y"
842    {    {
843        yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);        yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);
844      }      }
845    break;    break;
846  case 59:  case 59:
847                                          // line 635 "XPathParser.y"                                          // line 636 "XPathParser.y"
848    {    {
849        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);
850      }      }
851    break;    break;
852  case 60:  case 60:
853                                          // line 639 "XPathParser.y"                                          // line 640 "XPathParser.y"
854    {    {
855        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);
856      }      }
857    break;    break;
858  case 61:  case 61:
859                                          // line 643 "XPathParser.y"                                          // line 644 "XPathParser.y"
860    {    {
861        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);
862      }      }
863    break;    break;
864  case 62:  case 62:
865                                          // line 647 "XPathParser.y"                                          // line 648 "XPathParser.y"
866    {    {
867        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);        yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);
868      }      }
869    break;    break;
870  case 64:  case 64:
871                                          // line 655 "XPathParser.y"                                          // line 656 "XPathParser.y"
872    {    {
873        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);
874      }      }
875    break;    break;
876  case 65:  case 65:
877                                          // line 659 "XPathParser.y"                                          // line 660 "XPathParser.y"
878    {    {
879        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);
880      }      }
881    break;    break;
882  case 67:  case 67:
883                                          // line 667 "XPathParser.y"                                          // line 668 "XPathParser.y"
884    {    {
885        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);
886      }      }
887    break;    break;
888  case 68:  case 68:
889                                          // line 671 "XPathParser.y"                                          // line 672 "XPathParser.y"
890    {    {
891        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);
892      }      }
893    break;    break;
894  case 69:  case 69:
895                                          // line 675 "XPathParser.y"                                          // line 676 "XPathParser.y"
896    {    {
897        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);        yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);
898      }      }
899    break;    break;
900  case 71:  case 71:
901                                          // line 683 "XPathParser.y"                                          // line 684 "XPathParser.y"
902    {    {
903        yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);        yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);
904      }      }
905    break;    break;
906  case 72:  case 72:
907                                          // line 690 "XPathParser.y"                                          // line 691 "XPathParser.y"
908    {    {
909        yyVal = new Double((String) yyVals[0+yyTop] + ".0");        yyVal = new Double((String) yyVals[0+yyTop] + ".0");
910      }      }
911    break;    break;
912  case 73:  case 73:
913                                          // line 694 "XPathParser.y"                                          // line 695 "XPathParser.y"
914    {    {
915        yyVal = new Double((String) yyVals[-1+yyTop] + ".0");        yyVal = new Double((String) yyVals[-1+yyTop] + ".0");
916      }      }
917    break;    break;
918  case 74:  case 74:
919                                          // line 698 "XPathParser.y"                                          // line 699 "XPathParser.y"
920    {    {
921        yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);        yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);
922      }      }
923    break;    break;
924  case 75:  case 75:
925                                          // line 702 "XPathParser.y"                                          // line 703 "XPathParser.y"
926    {    {
927        yyVal = new Double("0." + (String) yyVals[0+yyTop]);        yyVal = new Double("0." + (String) yyVals[0+yyTop]);
928      }      }
929    break;    break;
930  case 77:  case 77:
931                                          // line 731 "XPathParser.y"                                          // line 732 "XPathParser.y"
932    {    {
933        yyVal = new VariableReference(variableResolver, (String) yyVals[0+yyTop]);        String name = (String) yyVals[0+yyTop];
934          yyVal = new VariableReference(variableResolver, getQName(name));
935      }      }
936    break;    break;
937  case 78:  case 78:
938                                          // line 738 "XPathParser.y"                                          // line 740 "XPathParser.y"
939    {    {
940        yyVal = new NameTest(null, true, true);        yyVal = new NameTest(null, true, true);
941      }      }
942    break;    break;
943  case 79:  case 79:
944                                          // line 742 "XPathParser.y"                                          // line 744 "XPathParser.y"
945    {    {
946        QName qName = getQName((String) yyVals[-2+yyTop]);        QName qName = getQName((String) yyVals[-2+yyTop]);
947        yyVal = new NameTest(qName, true, false);        yyVal = new NameTest(qName, true, false);
948      }      }
949    break;    break;
950  case 80:  case 80:
951                                          // line 747 "XPathParser.y"                                          // line 749 "XPathParser.y"
952    {    {
953        QName qName = getQName((String) yyVals[0+yyTop]);        QName qName = getQName((String) yyVals[0+yyTop]);
954        yyVal = new NameTest(qName, false, false);        yyVal = new NameTest(qName, false, false);
955      }      }
956    break;    break;
957  case 82:  case 82:
958                                          // line 756 "XPathParser.y"                                          // line 758 "XPathParser.y"
959    {    {
960        yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];        yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];
961      }      }
962    break;    break;
963  case 83:  case 83:
964                                          // line 763 "XPathParser.y"                                          // line 765 "XPathParser.y"
965    {    {
966        yyVal = new Short(Node.COMMENT_NODE);        yyVal = new Short(Node.COMMENT_NODE);
967      }      }
968    break;    break;
969  case 84:  case 84:
970                                          // line 767 "XPathParser.y"                                          // line 769 "XPathParser.y"
971    {    {
972        yyVal = new Short(Node.TEXT_NODE);        yyVal = new Short(Node.TEXT_NODE);
973      }      }
974    break;    break;
975  case 85:  case 85:
976                                          // line 771 "XPathParser.y"                                          // line 773 "XPathParser.y"
977    {    {
978        yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);        yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);
979      }      }
980    break;    break;
981  case 86:  case 86:
982                                          // line 775 "XPathParser.y"                                          // line 777 "XPathParser.y"
983    {    {
984        yyVal = new Short((short) 0);        yyVal = new Short((short) 0);
985      }      }
986    break;    break;
987                                          // line 986 "-"                                          // line 988 "-"
988          }          }
989          yyTop -= YyLenClass.yyLen[yyN];          yyTop -= YyLenClass.yyLen[yyN];
990          yyState = yyStates[yyTop];          yyState = yyStates[yyTop];
# Line 1455  case 86: Line 1458  case 86:
1458    } /* End of class YyNameClass */    } /* End of class YyNameClass */
1459    
1460    
1461                                          // line 781 "XPathParser.y"                                          // line 783 "XPathParser.y"
1462    
1463  }  }
1464                                          // line 1461 "-"                                          // line 1463 "-"

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26