--- /home/cpdev/src/classpath/gnu/xml/xpath/XPathParser.java	2005-07-10 05:32:36.000000000 +0000
+++ gnu/xml/xpath/XPathParser.java	2005-06-30 05:34:23.000000000 +0000
@@ -1,50 +1,48 @@
 // created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
 
 					// line 2 "XPathParser.y"
-/*
- * XPathParser.java
- * Copyright (C) 2004 The Free Software Foundation
- * 
- * This file is part of GNU JAXP, a library.
- *
- * GNU JAXP is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * GNU JAXP is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Linking this library statically or dynamically with other modules is
- * making a combined work based on this library.  Thus, the terms and
- * conditions of the GNU General Public License cover the whole
- * combination.
- *
- * As a special exception, the copyright holders of this library give you
- * permission to link this library with independent modules to produce an
- * executable, regardless of the license terms of these independent
- * modules, and to copy and distribute the resulting executable under
- * terms of your choice, provided that you also meet, for each linked
- * independent module, the terms and conditions of the license of that
- * module.  An independent module is a module which is not derived from
- * or based on this library.  If you modify this library, you may extend
- * this exception to your version of the library, but you are not
- * obliged to do so.  If you do not wish to do so, delete this
- * exception statement from your version. 
- */
+/* XPathParser.java -- An XPath 1.0 parser.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
 
 package gnu.xml.xpath;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
 import javax.xml.xpath.XPathFunctionResolver;
@@ -207,7 +205,7 @@
     return new FunctionCall(functionResolver, name, args);
   }
 
-					// line 211 "-"
+					// line 210 "-"
 // %token constants
 
   public static final int LITERAL = 257;
@@ -476,13 +474,13 @@
         yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
         switch (yyN) {
 case 4:
-					// line 277 "XPathParser.y"
+					// line 276 "XPathParser.y"
   {
       yyVal = new Root();
     }
   break;
 case 5:
-					// line 281 "XPathParser.y"
+					// line 280 "XPathParser.y"
   {
       Steps steps;
       if (yyVals[0+yyTop] instanceof Steps)
@@ -500,7 +498,7 @@
     }
   break;
 case 6:
-					// line 297 "XPathParser.y"
+					// line 296 "XPathParser.y"
   {
       Test nt = new NodeTypeTest((short) 0);
       Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -523,7 +521,7 @@
     }
   break;
 case 8:
-					// line 322 "XPathParser.y"
+					// line 321 "XPathParser.y"
   {
       Steps steps;
       if (yyVals[-2+yyTop] instanceof Steps)
@@ -541,7 +539,7 @@
     }
   break;
 case 9:
-					// line 338 "XPathParser.y"
+					// line 337 "XPathParser.y"
   {
       Test nt = new NodeTypeTest((short) 0);
       Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -564,37 +562,37 @@
     }
   break;
 case 10:
-					// line 362 "XPathParser.y"
+					// line 361 "XPathParser.y"
   {
       yyVal = new Selector (Selector.CHILD, (List) yyVals[0+yyTop]);
     }
   break;
 case 11:
-					// line 366 "XPathParser.y"
+					// line 365 "XPathParser.y"
   {
       yyVal = new Selector (Selector.ATTRIBUTE, (List) yyVals[0+yyTop]);
     }
   break;
 case 12:
-					// line 370 "XPathParser.y"
+					// line 369 "XPathParser.y"
   {
       yyVal = new Selector (((Integer) yyVals[-2+yyTop]).intValue (), (List) yyVals[0+yyTop]);
     }
   break;
 case 13:
-					// line 374 "XPathParser.y"
+					// line 373 "XPathParser.y"
   {
       yyVal = new Selector (Selector.SELF, Collections.EMPTY_LIST);
     }
   break;
 case 14:
-					// line 378 "XPathParser.y"
+					// line 377 "XPathParser.y"
   {
       yyVal = new Selector (Selector.PARENT, Collections.EMPTY_LIST);
     }
   break;
 case 15:
-					// line 385 "XPathParser.y"
+					// line 384 "XPathParser.y"
   {
       List list = new ArrayList();
       list.add(yyVals[0+yyTop]);
@@ -602,7 +600,7 @@
     }
   break;
 case 16:
-					// line 391 "XPathParser.y"
+					// line 390 "XPathParser.y"
   {
       List list = (List)yyVals[-1+yyTop];
       list.add(yyVals[0+yyTop]);
@@ -610,133 +608,133 @@
     }
   break;
 case 17:
-					// line 415 "XPathParser.y"
+					// line 414 "XPathParser.y"
   {
       yyVal = new Integer(Selector.ANCESTOR);
     }
   break;
 case 18:
-					// line 419 "XPathParser.y"
+					// line 418 "XPathParser.y"
   {
       yyVal = new Integer(Selector.ANCESTOR_OR_SELF);
     }
   break;
 case 19:
-					// line 423 "XPathParser.y"
+					// line 422 "XPathParser.y"
   {
       yyVal = new Integer(Selector.ATTRIBUTE);
     }
   break;
 case 20:
-					// line 427 "XPathParser.y"
+					// line 426 "XPathParser.y"
   {
       yyVal = new Integer(Selector.CHILD);
     }
   break;
 case 21:
-					// line 431 "XPathParser.y"
+					// line 430 "XPathParser.y"
   {
       yyVal = new Integer(Selector.DESCENDANT);
     }
   break;
 case 22:
-					// line 435 "XPathParser.y"
+					// line 434 "XPathParser.y"
   {
       yyVal = new Integer(Selector.DESCENDANT_OR_SELF);
     }
   break;
 case 23:
-					// line 439 "XPathParser.y"
+					// line 438 "XPathParser.y"
   {
       yyVal = new Integer(Selector.FOLLOWING);
     }
   break;
 case 24:
-					// line 443 "XPathParser.y"
+					// line 442 "XPathParser.y"
   {
       yyVal = new Integer(Selector.FOLLOWING_SIBLING);
     }
   break;
 case 25:
-					// line 447 "XPathParser.y"
+					// line 446 "XPathParser.y"
   {
       yyVal = new Integer(Selector.NAMESPACE);
     }
   break;
 case 26:
-					// line 451 "XPathParser.y"
+					// line 450 "XPathParser.y"
   {
       yyVal = new Integer(Selector.PARENT);
     }
   break;
 case 27:
-					// line 455 "XPathParser.y"
+					// line 454 "XPathParser.y"
   {
       yyVal = new Integer(Selector.PRECEDING);
     }
   break;
 case 28:
-					// line 459 "XPathParser.y"
+					// line 458 "XPathParser.y"
   {
       yyVal = new Integer(Selector.PRECEDING_SIBLING);
     }
   break;
 case 29:
-					// line 463 "XPathParser.y"
+					// line 462 "XPathParser.y"
   {
       yyVal = new Integer(Selector.SELF);
     }
   break;
 case 31:
-					// line 472 "XPathParser.y"
+					// line 471 "XPathParser.y"
   {
       yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);
     }
   break;
 case 32:
-					// line 477 "XPathParser.y"
+					// line 476 "XPathParser.y"
   {
       yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());
     }
   break;
 case 33:
-					// line 484 "XPathParser.y"
+					// line 483 "XPathParser.y"
   {
       yyVal = new Predicate((Expr) yyVals[-1+yyTop]);
     }
   break;
 case 35:
-					// line 492 "XPathParser.y"
+					// line 491 "XPathParser.y"
   {
       yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);
     }
   break;
 case 36:
-					// line 496 "XPathParser.y"
+					// line 495 "XPathParser.y"
   {
       yyVal = new Constant(yyVals[0+yyTop]);
     }
   break;
 case 37:
-					// line 500 "XPathParser.y"
+					// line 499 "XPathParser.y"
   {
       yyVal = new Constant(yyVals[0+yyTop]);
     }
   break;
 case 39:
-					// line 508 "XPathParser.y"
+					// line 507 "XPathParser.y"
   {
       yyVal = lookupFunction((String) yyVals[-2+yyTop], Collections.EMPTY_LIST);
     }
   break;
 case 40:
-					// line 512 "XPathParser.y"
+					// line 511 "XPathParser.y"
   {
       yyVal = lookupFunction((String) yyVals[-3+yyTop], (List) yyVals[-1+yyTop]);
     }
   break;
 case 41:
-					// line 519 "XPathParser.y"
+					// line 518 "XPathParser.y"
   {
       List list = new ArrayList();
       list.add(yyVals[0+yyTop]);
@@ -744,7 +742,7 @@
     }
   break;
 case 42:
-					// line 525 "XPathParser.y"
+					// line 524 "XPathParser.y"
   {
       List list = (List) yyVals[0+yyTop];
       list.add(0, yyVals[-2+yyTop]);
@@ -752,13 +750,13 @@
     }
   break;
 case 44:
-					// line 535 "XPathParser.y"
+					// line 534 "XPathParser.y"
   {
       yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
     }
   break;
 case 47:
-					// line 544 "XPathParser.y"
+					// line 543 "XPathParser.y"
   {
       Steps steps;
       if (yyVals[0+yyTop] instanceof Steps)
@@ -776,7 +774,7 @@
     }
   break;
 case 48:
-					// line 560 "XPathParser.y"
+					// line 559 "XPathParser.y"
   {
       Test nt = new NodeTypeTest((short) 0);
       Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -799,7 +797,7 @@
     }
   break;
 case 50:
-					// line 585 "XPathParser.y"
+					// line 584 "XPathParser.y"
   {
       Predicate filter = (Predicate) yyVals[0+yyTop];
       Selector s = new Selector(Selector.SELF,
@@ -820,171 +818,170 @@
     }
   break;
 case 52:
-					// line 608 "XPathParser.y"
+					// line 607 "XPathParser.y"
   {
       yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
     }
   break;
 case 54:
-					// line 616 "XPathParser.y"
+					// line 615 "XPathParser.y"
   {
       yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
     }
   break;
 case 56:
-					// line 624 "XPathParser.y"
+					// line 623 "XPathParser.y"
   {
       yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);
     }
   break;
 case 57:
-					// line 628 "XPathParser.y"
+					// line 627 "XPathParser.y"
   {
       yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);
     }
   break;
 case 59:
-					// line 636 "XPathParser.y"
+					// line 635 "XPathParser.y"
   {
       yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);
     }
   break;
 case 60:
-					// line 640 "XPathParser.y"
+					// line 639 "XPathParser.y"
   {
       yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);
     }
   break;
 case 61:
-					// line 644 "XPathParser.y"
+					// line 643 "XPathParser.y"
   {
       yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);
     }
   break;
 case 62:
-					// line 648 "XPathParser.y"
+					// line 647 "XPathParser.y"
   {
       yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);
     }
   break;
 case 64:
-					// line 656 "XPathParser.y"
+					// line 655 "XPathParser.y"
   {
       yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);
     }
   break;
 case 65:
-					// line 660 "XPathParser.y"
+					// line 659 "XPathParser.y"
   {
       yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);
     }
   break;
 case 67:
-					// line 668 "XPathParser.y"
+					// line 667 "XPathParser.y"
   {
       yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);
     }
   break;
 case 68:
-					// line 672 "XPathParser.y"
+					// line 671 "XPathParser.y"
   {
       yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);
     }
   break;
 case 69:
-					// line 676 "XPathParser.y"
+					// line 675 "XPathParser.y"
   {
       yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);
     }
   break;
 case 71:
-					// line 684 "XPathParser.y"
+					// line 683 "XPathParser.y"
   {
       yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);
     }
   break;
 case 72:
-					// line 691 "XPathParser.y"
+					// line 690 "XPathParser.y"
   {
       yyVal = new Double((String) yyVals[0+yyTop] + ".0");
     }
   break;
 case 73:
-					// line 695 "XPathParser.y"
+					// line 694 "XPathParser.y"
   {
       yyVal = new Double((String) yyVals[-1+yyTop] + ".0");
     }
   break;
 case 74:
-					// line 699 "XPathParser.y"
+					// line 698 "XPathParser.y"
   {
       yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);
     }
   break;
 case 75:
-					// line 703 "XPathParser.y"
+					// line 702 "XPathParser.y"
   {
       yyVal = new Double("0." + (String) yyVals[0+yyTop]);
     }
   break;
 case 77:
-					// line 732 "XPathParser.y"
+					// line 731 "XPathParser.y"
   {
-      String name = (String) yyVals[0+yyTop];
-      yyVal = new VariableReference(variableResolver, getQName(name));
+      yyVal = new VariableReference(variableResolver, (String) yyVals[0+yyTop]);
     }
   break;
 case 78:
-					// line 740 "XPathParser.y"
+					// line 738 "XPathParser.y"
   {
       yyVal = new NameTest(null, true, true);
     }
   break;
 case 79:
-					// line 744 "XPathParser.y"
+					// line 742 "XPathParser.y"
   {
       QName qName = getQName((String) yyVals[-2+yyTop]);
       yyVal = new NameTest(qName, true, false);
     }
   break;
 case 80:
-					// line 749 "XPathParser.y"
+					// line 747 "XPathParser.y"
   {
       QName qName = getQName((String) yyVals[0+yyTop]);
       yyVal = new NameTest(qName, false, false);
     }
   break;
 case 82:
-					// line 758 "XPathParser.y"
+					// line 756 "XPathParser.y"
   {
       yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];
     }
   break;
 case 83:
-					// line 765 "XPathParser.y"
+					// line 763 "XPathParser.y"
   {
       yyVal = new Short(Node.COMMENT_NODE);
     }
   break;
 case 84:
-					// line 769 "XPathParser.y"
+					// line 767 "XPathParser.y"
   {
       yyVal = new Short(Node.TEXT_NODE);
     }
   break;
 case 85:
-					// line 773 "XPathParser.y"
+					// line 771 "XPathParser.y"
   {
       yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);
     }
   break;
 case 86:
-					// line 777 "XPathParser.y"
+					// line 775 "XPathParser.y"
   {
       yyVal = new Short((short) 0);
     }
   break;
-					// line 988 "-"
+					// line 986 "-"
         }
         yyTop -= YyLenClass.yyLen[yyN];
         yyState = yyStates[yyTop];
@@ -1458,7 +1455,7 @@
   } /* End of class YyNameClass */
 
 
-					// line 783 "XPathParser.y"
+					// line 781 "XPathParser.y"
 
 }
-					// line 1463 "-"
+					// line 1461 "-"
