commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser JavaCharStream.java ParseException.java Token.java TokenMgrError.java XPath.html XPath.jj XPathParser.java XPathParserConstants.java XPathParserTokenManager.java jcc.bat ASCII_UCodeESC_CharStream.java
Date Sat, 25 Jan 2003 01:49:20 GMT
dmitri      2003/01/24 17:49:20

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri/parser
                        ParseException.java Token.java TokenMgrError.java
                        XPath.html XPath.jj XPathParser.java
                        XPathParserConstants.java
                        XPathParserTokenManager.java jcc.bat
  Added:       jxpath/src/java/org/apache/commons/jxpath/ri/parser
                        JavaCharStream.java
  Removed:     jxpath/src/java/org/apache/commons/jxpath/ri/parser
                        ASCII_UCodeESC_CharStream.java
  Log:
  Upgraded to JavaCC 2.1
  
  Revision  Changes    Path
  1.2       +3 -2      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/ParseException.java
  
  Index: ParseException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/ParseException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParseException.java	23 Aug 2001 00:47:00 -0000	1.1
  +++ ParseException.java	25 Jan 2003 01:49:19 -0000	1.2
  @@ -1,4 +1,4 @@
  -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 0.7pre6 */
  +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 2.1 */
   package org.apache.commons.jxpath.ri.parser;
   
   /**
  @@ -123,7 +123,8 @@
         retval += add_escapes(tok.image);
         tok = tok.next; 
       }
  -    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn + "." + eol;
  +    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
  +    retval += "." + eol;
       if (expectedTokenSequences.length == 1) {
         retval += "Was expecting:" + eol + "    ";
       } else {
  
  
  
  1.2       +1 -1      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/Token.java
  
  Index: Token.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/Token.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Token.java	23 Aug 2001 00:47:00 -0000	1.1
  +++ Token.java	25 Jan 2003 01:49:19 -0000	1.2
  @@ -1,4 +1,4 @@
  -/* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */
  +/* Generated By:JavaCC: Do not edit this line. Token.java Version 2.1 */
   package org.apache.commons.jxpath.ri.parser;
   
   /**
  
  
  
  1.3       +15 -9     jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java
  
  Index: TokenMgrError.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TokenMgrError.java	26 Apr 2002 03:28:37 -0000	1.2
  +++ TokenMgrError.java	25 Jan 2003 01:49:19 -0000	1.3
  @@ -1,12 +1,11 @@
  -/* Generated By:JavaCC: Do not edit this line. MODIFIED BY DMITRI PLOTNIKOV - DO NOT REGENERATE */
  +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 2.1 *
  + * 
  + * !!!MODIFIED BY DMITRI PLOTNIKOV - DO NOT REGENERATE!!!
  + */
   package org.apache.commons.jxpath.ri.parser;
   
   public class TokenMgrError extends Error
   {
  -    private int position;
  -    private char character;
  -
  -
      /*
       * Ordinals for various reasons why an Error of this type can be thrown.
       */
  @@ -41,6 +40,8 @@
       * Replaces unprintable characters by their espaced (or unicode escaped)
       * equivalents in the given string
       */
  +   
  +   // MADE PUBLIC - DMITRI PLOTNIKOV
      public static final String addEscapes(String str) {
         StringBuffer retval = new StringBuffer();
         char ch;
  @@ -89,7 +90,7 @@
      /**
       * Returns a detailed message for the Error when it is thrown by the
       * token manager to indicate a lexical error.
  -    * Parameters :
  +    * Parameters : 
       *    EOFSeen     : indicates if EOF caused the lexicl error
       *    curLexState : lexical state in which this error occured
       *    errorLine   : line number when the error occured
  @@ -109,7 +110,7 @@
      /**
       * You can also modify the body of this method to customize your error messages.
       * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
  -    * of end-users concern, so you can return something like :
  +    * of end-users concern, so you can return something like : 
       *
       *     "Internal Error : Please file a bug report .... "
       *
  @@ -133,17 +134,22 @@
   
      public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
         this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
  +
  +      // ADDED BY ME FROM THIS POINT TO THE EOF - DMITRI PLOTNIKOV
         position = errorColumn - 1;
         character = curChar;
      }
  +   
  +
  +   private int position;
  +   private char character;
   
   
  -   // ADDED BY ME - DMITRI PLOTNIKOV
      public int getPosition(){
       return position;
      }
   
      public char getCharacter(){
       return character;
  -   }
  +   }   
   }
  
  
  
  1.3       +2 -2      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPath.html
  
  Index: XPath.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPath.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPath.html	8 Jun 2002 22:47:24 -0000	1.2
  +++ XPath.html	25 Jan 2003 01:49:19 -0000	1.3
  @@ -10,7 +10,7 @@
   <TR>
   <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod1">NCName</A></TD>
   <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
  -<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod2">NCName_Without_CoreFunctions</A> | &lt;NODE&gt; | &lt;TEXT&gt; | &lt;COMMENT&gt; | &lt;PI&gt; | &lt;FUNCTION_LAST&gt; | &lt;FUNCTION_POSITION&gt; | &lt;FUNCTION_COUNT&gt; | &lt;FUNCTION_ID&gt; | &lt;FUNCTION_LOCAL_NAME&gt; | &lt;FUNCTION_NAMESPACE_URI&gt; | &lt;FUNCTION_NAME&gt; | &lt;FUNCTION_STRING&gt; | &lt;FUNCTION_CONCAT&gt; | &lt;FUNCTION_STARTS_WITH&gt; | &lt;FUNCTION_CONTAINS&gt; | &lt;FUNCTION_SUBSTRING_BEFORE&gt; | &lt;FUNCTION_SUBSTRING_AFTER&gt; | &lt;FUNCTION_SUBSTRING&gt; | &lt;FUNCTION_STRING_LENGTH&gt; | &lt;FUNCTION_NORMALIZE_SPACE&gt; | &lt;FUNCTION_TRANSLATE&gt; | &lt;FUNCTION_BOOLEAN&gt; | &lt;FUNCTION_NOT&gt; | &lt;FUNCTION_TRUE&gt; | &lt;FUNCTION_FALSE&gt; | &lt;FUNCTION_NULL&gt; | &lt;FUNCTION_LANG&gt; | &lt;FUNCTION_NUMBER&gt; | &lt;FUNCTION_SUM&gt; | &lt;FUNCTION_FLOOR&gt; | &lt;FUNCTION_CEILING&gt; | &lt;FUNCTION_ROUND&gt; | &lt;FUNCTION_KEY&gt; )</TD>
  +<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod2">NCName_Without_CoreFunctions</A> | &lt;NODE&gt; | &lt;TEXT&gt; | &lt;COMMENT&gt; | &lt;PI&gt; | &lt;FUNCTION_LAST&gt; | &lt;FUNCTION_POSITION&gt; | &lt;FUNCTION_COUNT&gt; | &lt;FUNCTION_ID&gt; | &lt;FUNCTION_LOCAL_NAME&gt; | &lt;FUNCTION_NAMESPACE_URI&gt; | &lt;FUNCTION_NAME&gt; | &lt;FUNCTION_STRING&gt; | &lt;FUNCTION_CONCAT&gt; | &lt;FUNCTION_STARTS_WITH&gt; | &lt;FUNCTION_CONTAINS&gt; | &lt;FUNCTION_SUBSTRING_BEFORE&gt; | &lt;FUNCTION_SUBSTRING_AFTER&gt; | &lt;FUNCTION_SUBSTRING&gt; | &lt;FUNCTION_STRING_LENGTH&gt; | &lt;FUNCTION_NORMALIZE_SPACE&gt; | &lt;FUNCTION_TRANSLATE&gt; | &lt;FUNCTION_BOOLEAN&gt; | &lt;FUNCTION_NOT&gt; | &lt;FUNCTION_TRUE&gt; | &lt;FUNCTION_FALSE&gt; | &lt;FUNCTION_NULL&gt; | &lt;FUNCTION_LANG&gt; | &lt;FUNCTION_NUMBER&gt; | &lt;FUNCTION_SUM&gt; | &lt;FUNCTION_FLOOR&gt; | &lt;FUNCTION_CEILING&gt; | &lt;FUNCTION_ROUND&gt; | &lt;FUNCTION_KEY&gt; | &lt;FUNCTION_FORMAT_NUMBER&gt; )</TD>
   </TR>
   <TR>
   <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod2">NCName_Without_CoreFunctions</A></TD>
  @@ -20,7 +20,7 @@
   <TR>
   <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod3">CoreFunctionName</A></TD>
   <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
  -<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;FUNCTION_LAST&gt; | &lt;FUNCTION_POSITION&gt; | &lt;FUNCTION_COUNT&gt; | &lt;FUNCTION_ID&gt; | &lt;FUNCTION_LOCAL_NAME&gt; | &lt;FUNCTION_NAMESPACE_URI&gt; | &lt;FUNCTION_NAME&gt; | &lt;FUNCTION_STRING&gt; | &lt;FUNCTION_CONCAT&gt; | &lt;FUNCTION_STARTS_WITH&gt; | &lt;FUNCTION_CONTAINS&gt; | &lt;FUNCTION_SUBSTRING_BEFORE&gt; | &lt;FUNCTION_SUBSTRING_AFTER&gt; | &lt;FUNCTION_SUBSTRING&gt; | &lt;FUNCTION_STRING_LENGTH&gt; | &lt;FUNCTION_NORMALIZE_SPACE&gt; | &lt;FUNCTION_TRANSLATE&gt; | &lt;FUNCTION_BOOLEAN&gt; | &lt;FUNCTION_NOT&gt; | &lt;FUNCTION_TRUE&gt; | &lt;FUNCTION_FALSE&gt; | &lt;FUNCTION_NULL&gt; | &lt;FUNCTION_LANG&gt; | &lt;FUNCTION_NUMBER&gt; | &lt;FUNCTION_SUM&gt; | &lt;FUNCTION_FLOOR&gt; | &lt;FUNCTION_CEILING&gt; | &lt;FUNCTION_ROUND&gt; | &lt;FUNCTION_KEY&gt; )</TD>
  +<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;FUNCTION_LAST&gt; | &lt;FUNCTION_POSITION&gt; | &lt;FUNCTION_COUNT&gt; | &lt;FUNCTION_ID&gt; | &lt;FUNCTION_LOCAL_NAME&gt; | &lt;FUNCTION_NAMESPACE_URI&gt; | &lt;FUNCTION_NAME&gt; | &lt;FUNCTION_STRING&gt; | &lt;FUNCTION_CONCAT&gt; | &lt;FUNCTION_STARTS_WITH&gt; | &lt;FUNCTION_CONTAINS&gt; | &lt;FUNCTION_SUBSTRING_BEFORE&gt; | &lt;FUNCTION_SUBSTRING_AFTER&gt; | &lt;FUNCTION_SUBSTRING&gt; | &lt;FUNCTION_STRING_LENGTH&gt; | &lt;FUNCTION_NORMALIZE_SPACE&gt; | &lt;FUNCTION_TRANSLATE&gt; | &lt;FUNCTION_BOOLEAN&gt; | &lt;FUNCTION_NOT&gt; | &lt;FUNCTION_TRUE&gt; | &lt;FUNCTION_FALSE&gt; | &lt;FUNCTION_NULL&gt; | &lt;FUNCTION_LANG&gt; | &lt;FUNCTION_NUMBER&gt; | &lt;FUNCTION_SUM&gt; | &lt;FUNCTION_FLOOR&gt; | &lt;FUNCTION_CEILING&gt; | &lt;FUNCTION_ROUND&gt; | &lt;FUNCTION_KEY&gt; | &lt;FUNCTION_FORMAT_NUMBER&gt; )</TD>
   </TR>
   <TR>
   <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod4">QName</A></TD>
  
  
  
  1.4       +3 -1      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPath.jj
  
  Index: XPath.jj
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPath.jj,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XPath.jj	8 Jun 2002 22:47:24 -0000	1.3
  +++ XPath.jj	25 Jan 2003 01:49:19 -0000	1.4
  @@ -25,7 +25,6 @@
       OPTIMIZE_TOKEN_MANAGER = false;     // (default true)
       ERROR_REPORTING = true;             // (default true)
       JAVA_UNICODE_ESCAPE = true;         // (default false)
  -// @@@ Note: Unicode seems broken in JavaCC 1.1, else this should be true
       UNICODE_INPUT = false;              // (default false)
       IGNORE_CASE = false;                // (default false)
       COMMON_TOKEN_ACTION = false;        // (default false)
  @@ -294,6 +293,7 @@
   |   <FUNCTION_FLOOR: "floor">
   |   <FUNCTION_CEILING: "ceiling">
   |   <FUNCTION_ROUND: "round">
  +|   <FUNCTION_FORMAT_NUMBER: "format-number">
   |
       <NCName :
           (<Letter> | ["_"]) (<Letter> | <UnicodeDigit> | [".","-","_"] | <CombiningChar> | <Extender>)*
  @@ -339,6 +339,7 @@
       |   <FUNCTION_CEILING>
       |   <FUNCTION_ROUND>
       |   <FUNCTION_KEY>
  +    |   <FUNCTION_FORMAT_NUMBER>
       )
       {
           return token.image;
  @@ -395,6 +396,7 @@
       |   <FUNCTION_CEILING>          { code = Compiler.FUNCTION_CEILING; }
       |   <FUNCTION_ROUND>            { code = Compiler.FUNCTION_ROUND; }
       |   <FUNCTION_KEY>              { code = Compiler.FUNCTION_KEY; }
  +    |   <FUNCTION_FORMAT_NUMBER>    { code = Compiler.FUNCTION_FORMAT_NUMBER; }
       )
       {
           return code;
  
  
  
  1.4       +465 -431  jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPathParser.java
  
  Index: XPathParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPathParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XPathParser.java	8 Jun 2002 22:47:24 -0000	1.3
  +++ XPathParser.java	25 Jan 2003 01:49:19 -0000	1.4
  @@ -134,6 +134,9 @@
       case FUNCTION_KEY:
         jj_consume_token(FUNCTION_KEY);
         break;
  +    case FUNCTION_FORMAT_NUMBER:
  +      jj_consume_token(FUNCTION_FORMAT_NUMBER);
  +      break;
       default:
         jj_la1[0] = jj_gen;
         jj_consume_token(-1);
  @@ -288,6 +291,10 @@
         jj_consume_token(FUNCTION_KEY);
                                         code = Compiler.FUNCTION_KEY;
         break;
  +    case FUNCTION_FORMAT_NUMBER:
  +      jj_consume_token(FUNCTION_FORMAT_NUMBER);
  +                                      code = Compiler.FUNCTION_FORMAT_NUMBER;
  +      break;
       default:
         jj_la1[2] = jj_gen;
         jj_consume_token(-1);
  @@ -301,8 +308,8 @@
    String nc1, nc2 = null;
       nc1 = NCName();
       switch (jj_nt.kind) {
  -    case 74:
  -      jj_consume_token(74);
  +    case 75:
  +      jj_consume_token(75);
         nc2 = NCName();
         break;
       default:
  @@ -322,7 +329,7 @@
       String nc1, nc2 = null;
       if (jj_2_1(2147483647)) {
         nc1 = NCName();
  -      jj_consume_token(74);
  +      jj_consume_token(75);
         nc2 = NCName();
       } else {
         switch (jj_nt.kind) {
  @@ -480,11 +487,12 @@
       case FUNCTION_FLOOR:
       case FUNCTION_CEILING:
       case FUNCTION_ROUND:
  +    case FUNCTION_FORMAT_NUMBER:
       case NCName:
  -    case 77:
       case 78:
  -    case 81:
  -    case 83:
  +    case 79:
  +    case 82:
  +    case 84:
         ex = RelativeLocationPath();
         break;
       case SLASH:
  @@ -645,20 +653,21 @@
       case FUNCTION_FLOOR:
       case FUNCTION_CEILING:
       case FUNCTION_ROUND:
  +    case FUNCTION_FORMAT_NUMBER:
       case NCName:
  -    case 81:
  -    case 83:
  +    case 82:
  +    case 84:
         axis = AxisSpecifier();
         if (jj_2_3(2147483647)) {
           type = NodeType();
  -        jj_consume_token(75);
           jj_consume_token(76);
  +        jj_consume_token(77);
         } else if (jj_2_4(2147483647)) {
           jj_consume_token(PI);
  -        jj_consume_token(75);
  +        jj_consume_token(76);
           jj_consume_token(Literal);
                       instruction = unescape(token.image.substring(1, token.image.length() - 1));
  -        jj_consume_token(76);
  +        jj_consume_token(77);
         } else {
           switch (jj_nt.kind) {
           case OR:
  @@ -698,8 +707,9 @@
           case FUNCTION_FLOOR:
           case FUNCTION_CEILING:
           case FUNCTION_ROUND:
  +        case FUNCTION_FORMAT_NUMBER:
           case NCName:
  -        case 83:
  +        case 84:
             name = WildcardName();
             break;
           default:
  @@ -709,13 +719,13 @@
           }
         }
         break;
  -    case 77:
  -      jj_consume_token(77);
  +    case 78:
  +      jj_consume_token(78);
                       axis = Compiler.AXIS_SELF;
                       type = Compiler.NODE_TYPE_NODE;
         break;
  -    case 78:
  -      jj_consume_token(78);
  +    case 79:
  +      jj_consume_token(79);
                       axis = Compiler.AXIS_PARENT;
                       type = Compiler.NODE_TYPE_NODE;
         break;
  @@ -727,7 +737,7 @@
       label_3:
       while (true) {
         switch (jj_nt.kind) {
  -      case 79:
  +      case 80:
           ;
           break;
         default:
  @@ -860,9 +870,9 @@
   /* [9] PredicateExpr ::=  Expr  */
     final public Object Predicate() throws ParseException {
       Object ex;
  -    jj_consume_token(79);
  -    ex = Expression();
       jj_consume_token(80);
  +    ex = Expression();
  +    jj_consume_token(81);
           {if (true) return ex;}
       throw new Error("Missing return statement in function");
     }
  @@ -873,8 +883,8 @@
     final public int AbbreviatedAxisSpecifier() throws ParseException {
       int axis = Compiler.AXIS_CHILD;
       switch (jj_nt.kind) {
  -    case 81:
  -      jj_consume_token(81);
  +    case 82:
  +      jj_consume_token(82);
              axis = Compiler.AXIS_ATTRIBUTE;
         break;
       default:
  @@ -918,10 +928,10 @@
       case VARIABLE:
         ex = VariableReference();
         break;
  -    case 75:
  -      jj_consume_token(75);
  -      ex = Expression();
  +    case 76:
         jj_consume_token(76);
  +      ex = Expression();
  +      jj_consume_token(77);
         break;
       case Literal:
         jj_consume_token(Literal);
  @@ -974,6 +984,7 @@
           case FUNCTION_FLOOR:
           case FUNCTION_CEILING:
           case FUNCTION_ROUND:
  +        case FUNCTION_FORMAT_NUMBER:
           case NCName:
             ex = FunctionCall();
             break;
  @@ -1024,7 +1035,7 @@
     final public ArrayList ArgumentList() throws ParseException {
       ArrayList args = null;
       Object arg;
  -    jj_consume_token(75);
  +    jj_consume_token(76);
       switch (jj_nt.kind) {
       case SLASH:
       case SLASHSLASH:
  @@ -1082,25 +1093,26 @@
       case FUNCTION_FLOOR:
       case FUNCTION_CEILING:
       case FUNCTION_ROUND:
  +    case FUNCTION_FORMAT_NUMBER:
       case NCName:
  -    case 75:
  -    case 77:
  +    case 76:
       case 78:
  -    case 81:
  -    case 83:
  +    case 79:
  +    case 82:
  +    case 84:
         arg = Argument();
                                   args = new ArrayList(); args.add(arg);
         label_4:
         while (true) {
           switch (jj_nt.kind) {
  -        case 82:
  +        case 83:
             ;
             break;
           default:
             jj_la1[18] = jj_gen;
             break label_4;
           }
  -        jj_consume_token(82);
  +        jj_consume_token(83);
           arg = Argument();
                                          args.add(arg);
         }
  @@ -1109,7 +1121,7 @@
         jj_la1[19] = jj_gen;
         ;
       }
  -    jj_consume_token(76);
  +    jj_consume_token(77);
           {if (true) return args;}
       throw new Error("Missing return statement in function");
     }
  @@ -1216,11 +1228,12 @@
         case FUNCTION_FLOOR:
         case FUNCTION_CEILING:
         case FUNCTION_ROUND:
  +      case FUNCTION_FORMAT_NUMBER:
         case NCName:
  -      case 77:
         case 78:
  -      case 81:
  -      case 83:
  +      case 79:
  +      case 82:
  +      case 84:
           ex = LocationPath();
           break;
         default:
  @@ -1243,7 +1256,7 @@
       label_6:
       while (true) {
         switch (jj_nt.kind) {
  -      case 79:
  +      case 80:
           ;
           break;
         default:
  @@ -1491,7 +1504,7 @@
         switch (jj_nt.kind) {
         case MOD:
         case DIV:
  -      case 83:
  +      case 84:
           ;
           break;
         default:
  @@ -1499,8 +1512,8 @@
           break label_14;
         }
         switch (jj_nt.kind) {
  -      case 83:
  -        jj_consume_token(83);
  +      case 84:
  +        jj_consume_token(84);
           r = UnaryExpr();
                                       ex = compiler.multiply(ex, r);
           break;
  @@ -1583,12 +1596,13 @@
       case FUNCTION_FLOOR:
       case FUNCTION_CEILING:
       case FUNCTION_ROUND:
  +    case FUNCTION_FORMAT_NUMBER:
       case NCName:
  -    case 75:
  -    case 77:
  +    case 76:
       case 78:
  -    case 81:
  -    case 83:
  +    case 79:
  +    case 82:
  +    case 84:
         ex = UnionExpr();
         break;
       case MINUS:
  @@ -1660,8 +1674,8 @@
       Object qn;
       String nc1, nc2 = null;
       switch (jj_nt.kind) {
  -    case 83:
  -      jj_consume_token(83);
  +    case 84:
  +      jj_consume_token(84);
         break;
       case OR:
       case AND:
  @@ -1700,6 +1714,7 @@
       case FUNCTION_FLOOR:
       case FUNCTION_CEILING:
       case FUNCTION_ROUND:
  +    case FUNCTION_FORMAT_NUMBER:
       case NCName:
         NCName();
         break;
  @@ -1710,11 +1725,11 @@
       }
                              nc1 = token.image;
       switch (jj_nt.kind) {
  -    case 74:
  -      jj_consume_token(74);
  +    case 75:
  +      jj_consume_token(75);
         switch (jj_nt.kind) {
  -      case 83:
  -        jj_consume_token(83);
  +      case 84:
  +        jj_consume_token(84);
           break;
         case OR:
         case AND:
  @@ -1753,6 +1768,7 @@
         case FUNCTION_FLOOR:
         case FUNCTION_CEILING:
         case FUNCTION_ROUND:
  +      case FUNCTION_FORMAT_NUMBER:
         case NCName:
           NCName();
           break;
  @@ -1848,37 +1864,25 @@
       return retval;
     }
   
  -  final private boolean jj_3R_65() {
  -    if (jj_scan_token(FUNCTION_LOCAL_NAME)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
     final private boolean jj_3R_64() {
  -    if (jj_scan_token(FUNCTION_ID)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_63() {
       if (jj_scan_token(FUNCTION_COUNT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_62() {
  -    if (jj_scan_token(FUNCTION_POSITION)) return true;
  +  final private boolean jj_3R_104() {
  +    if (jj_3R_118()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_102() {
  -    if (jj_3R_116()) return true;
  +  final private boolean jj_3R_63() {
  +    if (jj_scan_token(FUNCTION_POSITION)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_61() {
  +  final private boolean jj_3R_62() {
       if (jj_scan_token(FUNCTION_LAST)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
  @@ -1887,8 +1891,6 @@
     final private boolean jj_3R_18() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_61()) {
  -    jj_scanpos = xsp;
       if (jj_3R_62()) {
       jj_scanpos = xsp;
       if (jj_3R_63()) {
  @@ -1943,7 +1945,11 @@
       jj_scanpos = xsp;
       if (jj_3R_88()) {
       jj_scanpos = xsp;
  -    if (jj_3R_89()) return true;
  +    if (jj_3R_89()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_90()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_91()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -1973,51 +1979,60 @@
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_109() {
  +  final private boolean jj_3R_111() {
       if (jj_scan_token(DIV)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_108() {
  +  final private boolean jj_3R_110() {
       if (jj_scan_token(MOD)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_107() {
  +  final private boolean jj_3R_109() {
       if (jj_scan_token(AND)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_106() {
  +  final private boolean jj_3R_108() {
       if (jj_scan_token(OR)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_105() {
  +  final private boolean jj_3R_107() {
       if (jj_scan_token(NCName)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_96() {
  +  final private boolean jj_3R_173() {
  +    if (jj_scan_token(MINUS)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_170()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_98() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_105()) {
  -    jj_scanpos = xsp;
  -    if (jj_3R_106()) {
  -    jj_scanpos = xsp;
       if (jj_3R_107()) {
       jj_scanpos = xsp;
       if (jj_3R_108()) {
       jj_scanpos = xsp;
  -    if (jj_3R_109()) return true;
  +    if (jj_3R_109()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_110()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_111()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2027,70 +2042,68 @@
     }
   
     final private boolean jj_3R_171() {
  -    if (jj_scan_token(MINUS)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_168()) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_169() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_172()) {
  +    if (jj_3R_174()) {
       jj_scanpos = xsp;
  -    if (jj_3R_173()) {
  +    if (jj_3R_175()) {
       jj_scanpos = xsp;
  -    if (jj_3R_174()) return true;
  +    if (jj_3R_176()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_170() {
  -    if (jj_3R_175()) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_151() {
  -    if (jj_scan_token(81)) return true;
  +  final private boolean jj_3R_172() {
  +    if (jj_3R_177()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_53() {
  -    if (jj_scan_token(FUNCTION_KEY)) return true;
  +  final private boolean jj_3R_153() {
  +    if (jj_scan_token(82)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_128() {
  +  final private boolean jj_3R_130() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_151()) jj_scanpos = xsp;
  +    if (jj_3R_153()) jj_scanpos = xsp;
       else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_52() {
  -    if (jj_scan_token(FUNCTION_ROUND)) return true;
  +  final private boolean jj_3R_54() {
  +    if (jj_scan_token(FUNCTION_FORMAT_NUMBER)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_168() {
  +  final private boolean jj_3R_170() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_170()) {
  +    if (jj_3R_172()) {
       jj_scanpos = xsp;
  -    if (jj_3R_171()) return true;
  +    if (jj_3R_173()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  +  final private boolean jj_3R_53() {
  +    if (jj_scan_token(FUNCTION_KEY)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_52() {
  +    if (jj_scan_token(FUNCTION_ROUND)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
     final private boolean jj_3R_51() {
       if (jj_scan_token(FUNCTION_CEILING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2115,50 +2128,50 @@
       return false;
     }
   
  -  final private boolean jj_3R_47() {
  -    if (jj_scan_token(FUNCTION_LANG)) return true;
  +  final private boolean jj_3R_176() {
  +    if (jj_scan_token(MOD)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_170()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_46() {
  -    if (jj_scan_token(FUNCTION_NULL)) return true;
  +  final private boolean jj_3R_47() {
  +    if (jj_scan_token(FUNCTION_LANG)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_174() {
  -    if (jj_scan_token(MOD)) return true;
  +  final private boolean jj_3R_175() {
  +    if (jj_scan_token(DIV)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_168()) return true;
  +    if (jj_3R_170()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_45() {
  -    if (jj_scan_token(FUNCTION_FALSE)) return true;
  +  final private boolean jj_3R_46() {
  +    if (jj_scan_token(FUNCTION_NULL)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_173() {
  -    if (jj_scan_token(DIV)) return true;
  +  final private boolean jj_3R_174() {
  +    if (jj_scan_token(84)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_168()) return true;
  +    if (jj_3R_170()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_44() {
  -    if (jj_scan_token(FUNCTION_TRUE)) return true;
  +  final private boolean jj_3R_45() {
  +    if (jj_scan_token(FUNCTION_FALSE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_172() {
  -    if (jj_scan_token(83)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_168()) return true;
  +  final private boolean jj_3R_44() {
  +    if (jj_scan_token(FUNCTION_TRUE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2181,24 +2194,24 @@
       return false;
     }
   
  -  final private boolean jj_3R_40() {
  -    if (jj_scan_token(FUNCTION_NORMALIZE_SPACE)) return true;
  +  final private boolean jj_3R_116() {
  +    if (jj_scan_token(80)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_104()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(81)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_39() {
  -    if (jj_scan_token(FUNCTION_STRING_LENGTH)) return true;
  +  final private boolean jj_3R_40() {
  +    if (jj_scan_token(FUNCTION_NORMALIZE_SPACE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_114() {
  -    if (jj_scan_token(79)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_102()) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(80)) return true;
  +  final private boolean jj_3R_39() {
  +    if (jj_scan_token(FUNCTION_STRING_LENGTH)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2221,27 +2234,27 @@
       return false;
     }
   
  -  final private boolean jj_3R_35() {
  -    if (jj_scan_token(FUNCTION_CONTAINS)) return true;
  +  final private boolean jj_3R_168() {
  +    if (jj_3R_170()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_171()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
       return false;
     }
   
  -  final private boolean jj_3R_34() {
  -    if (jj_scan_token(FUNCTION_STARTS_WITH)) return true;
  +  final private boolean jj_3R_35() {
  +    if (jj_scan_token(FUNCTION_CONTAINS)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_166() {
  -    if (jj_3R_168()) return true;
  +  final private boolean jj_3R_34() {
  +    if (jj_scan_token(FUNCTION_STARTS_WITH)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    Token xsp;
  -    while (true) {
  -      xsp = jj_scanpos;
  -      if (jj_3R_169()) { jj_scanpos = xsp; break; }
  -      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    }
       return false;
     }
   
  @@ -2275,6 +2288,14 @@
       return false;
     }
   
  +  final private boolean jj_3R_169() {
  +    if (jj_scan_token(MINUS)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_168()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
     final private boolean jj_3R_28() {
       if (jj_scan_token(FUNCTION_ID)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2287,10 +2308,8 @@
       return false;
     }
   
  -  final private boolean jj_3R_167() {
  -    if (jj_scan_token(MINUS)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_166()) return true;
  +  final private boolean jj_3R_152() {
  +    if (jj_scan_token(AXIS_DESCENDANT_OR_SELF)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2307,6 +2326,12 @@
       return false;
     }
   
  +  final private boolean jj_3R_151() {
  +    if (jj_scan_token(AXIS_PRECEDING_SIBLING)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
     final private boolean jj_3R_24() {
       if (jj_scan_token(PI)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2314,7 +2339,7 @@
     }
   
     final private boolean jj_3R_150() {
  -    if (jj_scan_token(AXIS_DESCENDANT_OR_SELF)) return true;
  +    if (jj_scan_token(AXIS_FOLLOWING_SIBLING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2326,7 +2351,15 @@
     }
   
     final private boolean jj_3R_149() {
  -    if (jj_scan_token(AXIS_PRECEDING_SIBLING)) return true;
  +    if (jj_scan_token(AXIS_ANCESTOR_OR_SELF)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_163() {
  +    if (jj_scan_token(PLUS)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_162()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2338,7 +2371,7 @@
     }
   
     final private boolean jj_3R_148() {
  -    if (jj_scan_token(AXIS_FOLLOWING_SIBLING)) return true;
  +    if (jj_scan_token(AXIS_DESCENDANT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2350,63 +2383,55 @@
     }
   
     final private boolean jj_3R_147() {
  -    if (jj_scan_token(AXIS_ANCESTOR_OR_SELF)) return true;
  +    if (jj_scan_token(AXIS_FOLLOWING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_161() {
  -    if (jj_scan_token(PLUS)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_160()) return true;
  +  final private boolean jj_3R_20() {
  +    if (jj_3R_98()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_20() {
  -    if (jj_3R_96()) return true;
  +  final private boolean jj_3R_146() {
  +    if (jj_scan_token(AXIS_PRECEDING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_146() {
  -    if (jj_scan_token(AXIS_DESCENDANT)) return true;
  +  final private boolean jj_3R_145() {
  +    if (jj_scan_token(AXIS_NAMESPACE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_145() {
  -    if (jj_scan_token(AXIS_FOLLOWING)) return true;
  +  final private boolean jj_3R_162() {
  +    if (jj_3R_168()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_169()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
       return false;
     }
   
     final private boolean jj_3R_144() {
  -    if (jj_scan_token(AXIS_PRECEDING)) return true;
  +    if (jj_scan_token(AXIS_ATTRIBUTE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
     final private boolean jj_3R_143() {
  -    if (jj_scan_token(AXIS_NAMESPACE)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_160() {
  -    if (jj_3R_166()) return true;
  +    if (jj_scan_token(AXIS_ANCESTOR)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    Token xsp;
  -    while (true) {
  -      xsp = jj_scanpos;
  -      if (jj_3R_167()) { jj_scanpos = xsp; break; }
  -      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    }
       return false;
     }
   
     final private boolean jj_3R_142() {
  -    if (jj_scan_token(AXIS_ATTRIBUTE)) return true;
  +    if (jj_scan_token(AXIS_PARENT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2480,7 +2505,9 @@
       jj_scanpos = xsp;
       if (jj_3R_52()) {
       jj_scanpos = xsp;
  -    if (jj_3R_53()) return true;
  +    if (jj_3R_53()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_54()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2515,40 +2542,25 @@
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
     final private boolean jj_3R_141() {
  -    if (jj_scan_token(AXIS_ANCESTOR)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_140() {
  -    if (jj_scan_token(AXIS_PARENT)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_139() {
       if (jj_scan_token(AXIS_CHILD)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_138() {
  +  final private boolean jj_3R_140() {
       if (jj_scan_token(AXIS_SELF)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_127() {
  +  final private boolean jj_3R_129() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_138()) {
  -    jj_scanpos = xsp;
  -    if (jj_3R_139()) {
  -    jj_scanpos = xsp;
       if (jj_3R_140()) {
       jj_scanpos = xsp;
       if (jj_3R_141()) {
  @@ -2569,7 +2581,11 @@
       jj_scanpos = xsp;
       if (jj_3R_149()) {
       jj_scanpos = xsp;
  -    if (jj_3R_150()) return true;
  +    if (jj_3R_150()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_151()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_152()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2586,16 +2602,16 @@
       return false;
     }
   
  -  final private boolean jj_3R_157() {
  +  final private boolean jj_3R_159() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_162()) {
  +    if (jj_3R_164()) {
       jj_scanpos = xsp;
  -    if (jj_3R_163()) {
  +    if (jj_3R_165()) {
       jj_scanpos = xsp;
  -    if (jj_3R_164()) {
  +    if (jj_3R_166()) {
       jj_scanpos = xsp;
  -    if (jj_3R_165()) return true;
  +    if (jj_3R_167()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -2603,114 +2619,114 @@
       return false;
     }
   
  -  final private boolean jj_3R_156() {
  -    if (jj_3R_160()) return true;
  +  final private boolean jj_3R_158() {
  +    if (jj_3R_162()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_161()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_163()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_120() {
  -    if (jj_3R_128()) return true;
  +  final private boolean jj_3R_122() {
  +    if (jj_3R_130()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_119() {
  -    if (jj_3R_127()) return true;
  +  final private boolean jj_3R_121() {
  +    if (jj_3R_129()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_165() {
  +  final private boolean jj_3R_167() {
       if (jj_scan_token(GTE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_156()) return true;
  +    if (jj_3R_158()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_110() {
  +  final private boolean jj_3R_112() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_119()) {
  +    if (jj_3R_121()) {
       jj_scanpos = xsp;
  -    if (jj_3R_120()) return true;
  +    if (jj_3R_122()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_164() {
  +  final private boolean jj_3R_166() {
       if (jj_scan_token(LTE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_156()) return true;
  +    if (jj_3R_158()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_163() {
  +  final private boolean jj_3R_165() {
       if (jj_scan_token(GT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_156()) return true;
  +    if (jj_3R_158()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_155() {
  +  final private boolean jj_3R_157() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_158()) {
  +    if (jj_3R_160()) {
       jj_scanpos = xsp;
  -    if (jj_3R_159()) return true;
  +    if (jj_3R_161()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_162() {
  +  final private boolean jj_3R_164() {
       if (jj_scan_token(LT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_156()) return true;
  +    if (jj_3R_158()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_154() {
  -    if (jj_3R_156()) return true;
  +  final private boolean jj_3R_156() {
  +    if (jj_3R_158()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_157()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_159()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_159() {
  +  final private boolean jj_3R_161() {
       if (jj_scan_token(NEQ)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_154()) return true;
  +    if (jj_3R_156()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_158() {
  +  final private boolean jj_3R_160() {
       if (jj_scan_token(EQ)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_154()) return true;
  +    if (jj_3R_156()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_100() {
  -    if (jj_3R_114()) return true;
  +  final private boolean jj_3R_102() {
  +    if (jj_3R_116()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2724,142 +2740,142 @@
     final private boolean jj_3_3() {
       if (jj_3R_17()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(75)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       if (jj_scan_token(76)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(77)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_99() {
  -    if (jj_scan_token(78)) return true;
  +  final private boolean jj_3R_101() {
  +    if (jj_scan_token(79)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_98() {
  -    if (jj_scan_token(77)) return true;
  +  final private boolean jj_3R_100() {
  +    if (jj_scan_token(78)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_113() {
  -    if (jj_3R_121()) return true;
  +  final private boolean jj_3R_115() {
  +    if (jj_3R_123()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_132() {
  -    if (jj_3R_154()) return true;
  +  final private boolean jj_3R_134() {
  +    if (jj_3R_156()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_155()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_157()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_112() {
  +  final private boolean jj_3R_114() {
       if (jj_scan_token(PI)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(75)) return true;
  +    if (jj_scan_token(76)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       if (jj_scan_token(Literal)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(76)) return true;
  +    if (jj_scan_token(77)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_111() {
  +  final private boolean jj_3R_113() {
       if (jj_3R_17()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(75)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       if (jj_scan_token(76)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(77)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_97() {
  -    if (jj_3R_110()) return true;
  +  final private boolean jj_3R_99() {
  +    if (jj_3R_112()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_111()) {
  +    if (jj_3R_113()) {
       jj_scanpos = xsp;
  -    if (jj_3R_112()) {
  +    if (jj_3R_114()) {
       jj_scanpos = xsp;
  -    if (jj_3R_113()) return true;
  +    if (jj_3R_115()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_133() {
  +  final private boolean jj_3R_135() {
       if (jj_scan_token(AND)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_132()) return true;
  +    if (jj_3R_134()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_56() {
  +  final private boolean jj_3R_57() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_97()) {
  +    if (jj_3R_99()) {
       jj_scanpos = xsp;
  -    if (jj_3R_98()) {
  +    if (jj_3R_100()) {
       jj_scanpos = xsp;
  -    if (jj_3R_99()) return true;
  +    if (jj_3R_101()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_100()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_102()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_123() {
  -    if (jj_3R_132()) return true;
  +  final private boolean jj_3R_125() {
  +    if (jj_3R_134()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_133()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_135()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_191() {
  +  final private boolean jj_3R_193() {
       if (jj_3R_16()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_55() {
  +  final private boolean jj_3R_56() {
       if (jj_scan_token(SLASHSLASH)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_54() {
  +  final private boolean jj_3R_55() {
       if (jj_scan_token(SLASH)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_124() {
  +  final private boolean jj_3R_126() {
       if (jj_scan_token(OR)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_123()) return true;
  +    if (jj_3R_125()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -2867,41 +2883,41 @@
     final private boolean jj_3R_16() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_54()) {
  +    if (jj_3R_55()) {
       jj_scanpos = xsp;
  -    if (jj_3R_55()) return true;
  +    if (jj_3R_56()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_56()) return true;
  +    if (jj_3R_57()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_188() {
  +  final private boolean jj_3R_190() {
       if (jj_3R_16()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_116() {
  -    if (jj_3R_123()) return true;
  +  final private boolean jj_3R_118() {
  +    if (jj_3R_125()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_124()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_126()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_186() {
  -    if (jj_3R_56()) return true;
  +  final private boolean jj_3R_188() {
  +    if (jj_3R_57()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_188()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_190()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
  @@ -2913,59 +2929,59 @@
       return false;
     }
   
  -  final private boolean jj_3R_183() {
  +  final private boolean jj_3R_185() {
       if (jj_3R_16()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_190() {
  +  final private boolean jj_3R_192() {
       if (jj_scan_token(SLASH)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_189() {
  +  final private boolean jj_3R_191() {
       if (jj_3R_16()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_191()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_193()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_182() {
  -    if (jj_3R_114()) return true;
  +  final private boolean jj_3R_184() {
  +    if (jj_3R_116()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_187() {
  +  final private boolean jj_3R_189() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_189()) {
  +    if (jj_3R_191()) {
       jj_scanpos = xsp;
  -    if (jj_3R_190()) return true;
  +    if (jj_3R_192()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_180() {
  +  final private boolean jj_3R_182() {
       if (jj_3R_19()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_182()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_184()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_183()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_185()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
  @@ -2977,129 +2993,129 @@
       return false;
     }
   
  -  final private boolean jj_3R_185() {
  -    if (jj_3R_187()) return true;
  +  final private boolean jj_3R_187() {
  +    if (jj_3R_189()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_184() {
  -    if (jj_3R_186()) return true;
  +  final private boolean jj_3R_186() {
  +    if (jj_3R_188()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_181() {
  +  final private boolean jj_3R_183() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_184()) {
  +    if (jj_3R_186()) {
       jj_scanpos = xsp;
  -    if (jj_3R_185()) return true;
  +    if (jj_3R_187()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_179() {
  -    if (jj_3R_181()) return true;
  +  final private boolean jj_3R_181() {
  +    if (jj_3R_183()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_178() {
  -    if (jj_3R_180()) return true;
  +  final private boolean jj_3R_180() {
  +    if (jj_3R_182()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_176() {
  +  final private boolean jj_3R_178() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_178()) {
  +    if (jj_3R_180()) {
       jj_scanpos = xsp;
  -    if (jj_3R_179()) return true;
  +    if (jj_3R_181()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_177() {
  +  final private boolean jj_3R_179() {
       if (jj_scan_token(UNION)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_176()) return true;
  +    if (jj_3R_178()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_175() {
  -    if (jj_3R_176()) return true;
  +  final private boolean jj_3R_177() {
  +    if (jj_3R_178()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_177()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_179()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_134() {
  -    if (jj_3R_102()) return true;
  +  final private boolean jj_3R_136() {
  +    if (jj_3R_104()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_135() {
  -    if (jj_scan_token(82)) return true;
  +  final private boolean jj_3R_137() {
  +    if (jj_scan_token(83)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_134()) return true;
  +    if (jj_3R_136()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_125() {
  -    if (jj_3R_134()) return true;
  +  final private boolean jj_3R_127() {
  +    if (jj_3R_136()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       while (true) {
         xsp = jj_scanpos;
  -      if (jj_3R_135()) { jj_scanpos = xsp; break; }
  +      if (jj_3R_137()) { jj_scanpos = xsp; break; }
         if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       }
       return false;
     }
   
  -  final private boolean jj_3R_117() {
  -    if (jj_scan_token(75)) return true;
  +  final private boolean jj_3R_119() {
  +    if (jj_scan_token(76)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_125()) jj_scanpos = xsp;
  +    if (jj_3R_127()) jj_scanpos = xsp;
       else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(76)) return true;
  +    if (jj_scan_token(77)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_60() {
  +  final private boolean jj_3R_61() {
       if (jj_scan_token(PI)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_59() {
  +  final private boolean jj_3R_60() {
       if (jj_scan_token(COMMENT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_58() {
  +  final private boolean jj_3R_59() {
       if (jj_scan_token(NODE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_57() {
  +  final private boolean jj_3R_58() {
       if (jj_scan_token(TEXT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
  @@ -3108,7 +3124,7 @@
     final private boolean jj_3_1() {
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(74)) return true;
  +    if (jj_scan_token(75)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -3116,13 +3132,13 @@
     final private boolean jj_3R_17() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_57()) {
  -    jj_scanpos = xsp;
       if (jj_3R_58()) {
       jj_scanpos = xsp;
       if (jj_3R_59()) {
       jj_scanpos = xsp;
  -    if (jj_3R_60()) return true;
  +    if (jj_3R_60()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_61()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -3130,114 +3146,114 @@
       return false;
     }
   
  -  final private boolean jj_3R_153() {
  +  final private boolean jj_3R_155() {
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_137() {
  -    if (jj_3R_96()) return true;
  +  final private boolean jj_3R_139() {
  +    if (jj_3R_98()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_136() {
  +  final private boolean jj_3R_138() {
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(74)) return true;
  +    if (jj_scan_token(75)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_152() {
  -    if (jj_scan_token(83)) return true;
  +  final private boolean jj_3R_154() {
  +    if (jj_scan_token(84)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_130() {
  +  final private boolean jj_3R_132() {
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_103() {
  +  final private boolean jj_3R_105() {
       if (jj_3R_18()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_117()) return true;
  +    if (jj_3R_119()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_122() {
  -    if (jj_scan_token(74)) return true;
  +  final private boolean jj_3R_124() {
  +    if (jj_scan_token(75)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_131() {
  -    if (jj_scan_token(74)) return true;
  +  final private boolean jj_3R_133() {
  +    if (jj_scan_token(75)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_152()) {
  +    if (jj_3R_154()) {
       jj_scanpos = xsp;
  -    if (jj_3R_153()) return true;
  +    if (jj_3R_155()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_126() {
  +  final private boolean jj_3R_128() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_136()) {
  +    if (jj_3R_138()) {
       jj_scanpos = xsp;
  -    if (jj_3R_137()) return true;
  +    if (jj_3R_139()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_129() {
  -    if (jj_scan_token(83)) return true;
  +  final private boolean jj_3R_131() {
  +    if (jj_scan_token(84)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_121() {
  +  final private boolean jj_3R_123() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_129()) {
  +    if (jj_3R_131()) {
       jj_scanpos = xsp;
  -    if (jj_3R_130()) return true;
  +    if (jj_3R_132()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       xsp = jj_scanpos;
  -    if (jj_3R_131()) jj_scanpos = xsp;
  +    if (jj_3R_133()) jj_scanpos = xsp;
       else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_104() {
  -    if (jj_3R_118()) return true;
  +  final private boolean jj_3R_106() {
  +    if (jj_3R_120()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_117()) return true;
  +    if (jj_3R_119()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_115() {
  +  final private boolean jj_3R_117() {
       if (jj_3R_15()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_122()) jj_scanpos = xsp;
  +    if (jj_3R_124()) jj_scanpos = xsp;
       else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -3245,169 +3261,169 @@
     final private boolean jj_3_5() {
       if (jj_3R_18()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(75)) return true;
  +    if (jj_scan_token(76)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_101() {
  +  final private boolean jj_3R_103() {
       if (jj_scan_token(VARIABLE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_115()) return true;
  +    if (jj_3R_117()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_89() {
  +  final private boolean jj_3R_91() {
  +    if (jj_scan_token(FUNCTION_FORMAT_NUMBER)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_90() {
       if (jj_scan_token(FUNCTION_KEY)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_88() {
  +  final private boolean jj_3R_89() {
       if (jj_scan_token(FUNCTION_ROUND)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_87() {
  +  final private boolean jj_3R_88() {
       if (jj_scan_token(FUNCTION_CEILING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_86() {
  +  final private boolean jj_3R_97() {
  +    if (jj_3R_106()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_87() {
       if (jj_scan_token(FUNCTION_FLOOR)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_95() {
  -    if (jj_3R_104()) return true;
  +  final private boolean jj_3R_96() {
  +    if (jj_3R_105()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_85() {
  +  final private boolean jj_3R_86() {
       if (jj_scan_token(FUNCTION_SUM)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_94() {
  -    if (jj_3R_103()) return true;
  +  final private boolean jj_3R_95() {
  +    if (jj_scan_token(Number)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_84() {
  +  final private boolean jj_3R_85() {
       if (jj_scan_token(FUNCTION_NUMBER)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_93() {
  -    if (jj_scan_token(Number)) return true;
  +  final private boolean jj_3R_94() {
  +    if (jj_scan_token(Literal)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_83() {
  +  final private boolean jj_3R_84() {
       if (jj_scan_token(FUNCTION_LANG)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_92() {
  -    if (jj_scan_token(Literal)) return true;
  +  final private boolean jj_3R_93() {
  +    if (jj_scan_token(76)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_104()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(77)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_82() {
  +  final private boolean jj_3R_83() {
       if (jj_scan_token(FUNCTION_NULL)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_91() {
  -    if (jj_scan_token(75)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_102()) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(76)) return true;
  +  final private boolean jj_3R_92() {
  +    if (jj_3R_103()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_81() {
  +  final private boolean jj_3R_82() {
       if (jj_scan_token(FUNCTION_FALSE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_90() {
  -    if (jj_3R_101()) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
  -  final private boolean jj_3R_80() {
  +  final private boolean jj_3R_81() {
       if (jj_scan_token(FUNCTION_TRUE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_79() {
  -    if (jj_scan_token(FUNCTION_NOT)) return true;
  +  final private boolean jj_3R_120() {
  +    if (jj_3R_128()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_118() {
  -    if (jj_3R_126()) return true;
  +  final private boolean jj_3R_80() {
  +    if (jj_scan_token(FUNCTION_NOT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_78() {
  +  final private boolean jj_3R_79() {
       if (jj_scan_token(FUNCTION_BOOLEAN)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_77() {
  +  final private boolean jj_3R_78() {
       if (jj_scan_token(FUNCTION_TRANSLATE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_76() {
  +  final private boolean jj_3R_77() {
       if (jj_scan_token(FUNCTION_NORMALIZE_SPACE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_75() {
  -    if (jj_scan_token(FUNCTION_STRING_LENGTH)) return true;
  -    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    return false;
  -  }
  -
     final private boolean jj_3R_19() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_90()) {
  -    jj_scanpos = xsp;
  -    if (jj_3R_91()) {
  -    jj_scanpos = xsp;
       if (jj_3R_92()) {
       jj_scanpos = xsp;
       if (jj_3R_93()) {
       jj_scanpos = xsp;
       if (jj_3R_94()) {
       jj_scanpos = xsp;
  -    if (jj_3R_95()) return true;
  +    if (jj_3R_95()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_96()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_97()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  @@ -3417,62 +3433,80 @@
       return false;
     }
   
  -  final private boolean jj_3R_74() {
  +  final private boolean jj_3R_76() {
  +    if (jj_scan_token(FUNCTION_STRING_LENGTH)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_75() {
       if (jj_scan_token(FUNCTION_SUBSTRING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_73() {
  +  final private boolean jj_3R_74() {
       if (jj_scan_token(FUNCTION_SUBSTRING_AFTER)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_72() {
  +  final private boolean jj_3R_73() {
       if (jj_scan_token(FUNCTION_SUBSTRING_BEFORE)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_71() {
  +  final private boolean jj_3R_72() {
       if (jj_scan_token(FUNCTION_CONTAINS)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_70() {
  +  final private boolean jj_3R_71() {
       if (jj_scan_token(FUNCTION_STARTS_WITH)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_69() {
  +  final private boolean jj_3R_70() {
       if (jj_scan_token(FUNCTION_CONCAT)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_68() {
  +  final private boolean jj_3R_69() {
       if (jj_scan_token(FUNCTION_STRING)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_67() {
  +  final private boolean jj_3R_68() {
       if (jj_scan_token(FUNCTION_NAME)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_66() {
  +  final private boolean jj_3R_67() {
       if (jj_scan_token(FUNCTION_NAMESPACE_URI)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  +  final private boolean jj_3R_66() {
  +    if (jj_scan_token(FUNCTION_LOCAL_NAME)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_65() {
  +    if (jj_scan_token(FUNCTION_ID)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
     public XPathParserTokenManager token_source;
  -  ASCII_UCodeESC_CharStream jj_input_stream;
  +  JavaCharStream jj_input_stream;
     public Token token, jj_nt;
     private Token jj_scanpos, jj_lastpos;
     private int jj_la;
  @@ -3482,13 +3516,13 @@
     final private int[] jj_la1 = new int[39];
     final private int[] jj_la1_0 = {0x7f800000,0x7800000,0x0,0x0,0x7800000,0xff80000c,0xc,0x4,0xc,0xc,0x7f800000,0xff800000,0x0,0x80000000,0x80000000,0x0,0x16000,0x7f800000,0x0,0xff81604c,0x10,0xff80000c,0x0,0xc,0x800000,0x1000000,0x180,0x180,0x1e00,0x1e00,0x20,0x40,0x6000000,0x6000000,0xff81604c,0x7f800000,0x7f800000,0x0,0x78000000,};
     final private int[] jj_la1_1 = {0xfffff000,0x0,0xfffff000,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0xfffff000,0xffffffff,0x0,0xfff,0xfff,0x0,0x0,0xfffff000,0x0,0xffffffff,0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0xfffff000,0xfffff000,0x0,0x0,};
  -  final private int[] jj_la1_2 = {0x3ff,0x200,0x1ff,0x400,0x200,0xa63ff,0x0,0x0,0x0,0x0,0x803ff,0xa63ff,0x8000,0x0,0x0,0x20000,0x800,0x3ff,0x40000,0xa6bff,0x0,0xa63ff,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x80000,0xa6bff,0x803ff,0x803ff,0x400,0x0,};
  +  final private int[] jj_la1_2 = {0x7ff,0x400,0x3ff,0x800,0x400,0x14c7ff,0x0,0x0,0x0,0x0,0x1007ff,0x14c7ff,0x10000,0x0,0x0,0x40000,0x1000,0x7ff,0x80000,0x14d7ff,0x0,0x14c7ff,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x100000,0x14d7ff,0x1007ff,0x1007ff,0x800,0x0,};
     final private JJCalls[] jj_2_rtns = new JJCalls[6];
     private boolean jj_rescan = false;
     private int jj_gc = 0;
   
     public XPathParser(java.io.InputStream stream) {
  -    jj_input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1);
  +    jj_input_stream = new JavaCharStream(stream, 1, 1);
       token_source = new XPathParserTokenManager(jj_input_stream);
       token = new Token();
       token.next = jj_nt = token_source.getNextToken();
  @@ -3508,7 +3542,7 @@
     }
   
     public XPathParser(java.io.Reader stream) {
  -    jj_input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1);
  +    jj_input_stream = new JavaCharStream(stream, 1, 1);
       token_source = new XPathParserTokenManager(jj_input_stream);
       token = new Token();
       token.next = jj_nt = token_source.getNextToken();
  @@ -3640,8 +3674,8 @@
   
     final public ParseException generateParseException() {
       jj_expentries.removeAllElements();
  -    boolean[] la1tokens = new boolean[84];
  -    for (int i = 0; i < 84; i++) {
  +    boolean[] la1tokens = new boolean[85];
  +    for (int i = 0; i < 85; i++) {
         la1tokens[i] = false;
       }
       if (jj_kind >= 0) {
  @@ -3663,7 +3697,7 @@
           }
         }
       }
  -    for (int i = 0; i < 84; i++) {
  +    for (int i = 0; i < 85; i++) {
         if (la1tokens[i]) {
           jj_expentry = new int[1];
           jj_expentry[0] = i;
  
  
  
  1.4       +3 -1      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPathParserConstants.java
  
  Index: XPathParserConstants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPathParserConstants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XPathParserConstants.java	8 Jun 2002 22:47:24 -0000	1.3
  +++ XPathParserConstants.java	25 Jan 2003 01:49:19 -0000	1.4
  @@ -76,7 +76,8 @@
     int FUNCTION_FLOOR = 70;
     int FUNCTION_CEILING = 71;
     int FUNCTION_ROUND = 72;
  -  int NCName = 73;
  +  int FUNCTION_FORMAT_NUMBER = 73;
  +  int NCName = 74;
   
     int DEFAULT = 0;
   
  @@ -154,6 +155,7 @@
       "\"floor\"",
       "\"ceiling\"",
       "\"round\"",
  +    "\"format-number\"",
       "<NCName>",
       "\":\"",
       "\"(\"",
  
  
  
  1.4       +218 -210  jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.java
  
  Index: XPathParserTokenManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XPathParserTokenManager.java	8 Jun 2002 22:47:24 -0000	1.3
  +++ XPathParserTokenManager.java	25 Jan 2003 01:49:19 -0000	1.4
  @@ -5,33 +5,35 @@
   
   public class XPathParserTokenManager implements XPathParserConstants
   {
  +  public  java.io.PrintStream debugStream = System.out;
  +  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
   private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
   {
      switch (pos)
      {
         case 0:
  -         if ((active1 & 0x6000L) != 0L)
  -            return 11;
  -         if ((active0 & 0xffffffffff800000L) != 0L || (active1 & 0x1ffL) != 0L)
  +         if ((active0 & 0xffffffffff800000L) != 0L || (active1 & 0x3ffL) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               return 13;
            }
  +         if ((active1 & 0xc000L) != 0L)
  +            return 11;
            return -1;
         case 1:
            if ((active0 & 0x800000800000L) != 0L)
               return 13;
  -         if ((active0 & 0xffff7fffff000000L) != 0L || (active1 & 0x1ffL) != 0L)
  +         if ((active0 & 0xffff7fffff000000L) != 0L || (active1 & 0x3ffL) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 1;
               return 13;
            }
            return -1;
         case 2:
  -         if ((active0 & 0x7ffe7ffff8000000L) != 0L || (active1 & 0x1dfL) != 0L)
  +         if ((active0 & 0x7ffe7ffff8000000L) != 0L || (active1 & 0x3dfL) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 2;
               return 13;
            }
  @@ -39,11 +41,11 @@
               return 13;
            return -1;
         case 3:
  -         if ((active0 & 0x7ff26fefe0000000L) != 0L || (active1 & 0x1d2L) != 0L)
  +         if ((active0 & 0x7ff26fefe0000000L) != 0L || (active1 & 0x3d2L) != 0L)
            {
               if (jjmatchedPos != 3)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 3;
               }
               return 13;
  @@ -52,41 +54,39 @@
               return 13;
            return -1;
         case 4:
  -         if ((active0 & 0x400000000000L) != 0L || (active1 & 0x142L) != 0L)
  -            return 13;
  -         if ((active0 & 0x7ff62fff60000000L) != 0L || (active1 & 0x90L) != 0L)
  -         {
  -            jjmatchedKind = 73;
  -            jjmatchedPos = 4;
  -            return 13;
  -         }
            if ((active0 & 0x80000000L) != 0L)
            {
               if (jjmatchedPos < 3)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 3;
               }
               return -1;
            }
  +         if ((active0 & 0x400000000000L) != 0L || (active1 & 0x142L) != 0L)
  +            return 13;
  +         if ((active0 & 0x7ff62fff60000000L) != 0L || (active1 & 0x290L) != 0L)
  +         {
  +            jjmatchedKind = 74;
  +            jjmatchedPos = 4;
  +            return 13;
  +         }
            return -1;
         case 5:
  -         if ((active0 & 0x77c62ffe60000000L) != 0L || (active1 & 0x80L) != 0L)
  +         if ((active0 & 0x77c62ffe60000000L) != 0L || (active1 & 0x280L) != 0L)
            {
               if (jjmatchedPos != 5)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 5;
               }
               return 13;
            }
  -         if ((active0 & 0x830000000000000L) != 0L || (active1 & 0x10L) != 0L)
  -            return 13;
            if ((active0 & 0x100000000L) != 0L)
            {
               if (jjmatchedPos < 4)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 4;
               }
               return -1;
  @@ -95,26 +95,20 @@
            {
               if (jjmatchedPos < 3)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 3;
               }
               return -1;
            }
  +         if ((active0 & 0x830000000000000L) != 0L || (active1 & 0x10L) != 0L)
  +            return 13;
            return -1;
         case 6:
  -         if ((active0 & 0x3fc62ffc40000000L) != 0L)
  -         {
  -            jjmatchedKind = 73;
  -            jjmatchedPos = 6;
  -            return 13;
  -         }
  -         if ((active0 & 0x4000000020000000L) != 0L || (active1 & 0x80L) != 0L)
  -            return 13;
            if ((active0 & 0x200000000L) != 0L)
            {
               if (jjmatchedPos < 5)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 5;
               }
               return -1;
  @@ -123,67 +117,67 @@
            {
               if (jjmatchedPos < 4)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 4;
               }
               return -1;
            }
  -         return -1;
  -      case 7:
  -         if ((active0 & 0x80200000000000L) != 0L)
  -            return 13;
  -         if ((active0 & 0x3f460ffc40000000L) != 0L)
  +         if ((active0 & 0x3fc62ffc40000000L) != 0L || (active1 & 0x200L) != 0L)
            {
  -            jjmatchedKind = 73;
  -            jjmatchedPos = 7;
  +            jjmatchedKind = 74;
  +            jjmatchedPos = 6;
               return 13;
            }
  +         if ((active0 & 0x4000000020000000L) != 0L || (active1 & 0x80L) != 0L)
  +            return 13;
  +         return -1;
  +      case 7:
            if ((active0 & 0x200000000L) != 0L)
            {
               if (jjmatchedPos < 5)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 5;
               }
               return -1;
            }
  +         if ((active0 & 0x80200000000000L) != 0L)
  +            return 13;
  +         if ((active0 & 0x3f460ffc40000000L) != 0L || (active1 & 0x200L) != 0L)
  +         {
  +            jjmatchedKind = 74;
  +            jjmatchedPos = 7;
  +            return 13;
  +         }
            return -1;
         case 8:
  -         if ((active0 & 0x18460ff840000000L) != 0L)
  +         if ((active0 & 0x18460ff840000000L) != 0L || (active1 & 0x200L) != 0L)
            {
               if (jjmatchedPos != 8)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 8;
               }
               return 13;
            }
  -         if ((active0 & 0x2700000000000000L) != 0L)
  -            return 13;
            if ((active0 & 0x400000000L) != 0L)
            {
               if (jjmatchedPos < 7)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 7;
               }
               return -1;
            }
  +         if ((active0 & 0x2700000000000000L) != 0L)
  +            return 13;
            return -1;
         case 9:
  -         if ((active0 & 0x1b440f8040000000L) != 0L)
  -         {
  -            jjmatchedKind = 73;
  -            jjmatchedPos = 9;
  -            return 13;
  -         }
  -         if ((active0 & 0x2000000000000L) != 0L)
  -            return 13;
            if ((active0 & 0x7800000000L) != 0L)
            {
               if (jjmatchedPos < 8)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 8;
               }
               return -1;
  @@ -192,20 +186,26 @@
            {
               if (jjmatchedPos < 7)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 7;
               }
               return -1;
            }
  +         if ((active0 & 0x1b440f8040000000L) != 0L || (active1 & 0x200L) != 0L)
  +         {
  +            jjmatchedKind = 74;
  +            jjmatchedPos = 9;
  +            return 13;
  +         }
  +         if ((active0 & 0x2000000000000L) != 0L)
  +            return 13;
            return -1;
         case 10:
  -         if ((active0 & 0x40000000000000L) != 0L)
  -            return 13;
            if ((active0 & 0x8000000000L) != 0L)
            {
               if (jjmatchedPos < 9)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 9;
               }
               return -1;
  @@ -214,67 +214,69 @@
            {
               if (jjmatchedPos < 8)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 8;
               }
               return -1;
            }
  -         if ((active0 & 0x1b040f0040000000L) != 0L)
  +         if ((active0 & 0x1b040f0040000000L) != 0L || (active1 & 0x200L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 10;
               return 13;
            }
  +         if ((active0 & 0x40000000000000L) != 0L)
  +            return 13;
            return -1;
         case 11:
  -         if ((active0 & 0x1b040f0040000000L) != 0L)
  -         {
  -            jjmatchedKind = 73;
  -            jjmatchedPos = 11;
  -            return 13;
  -         }
            if ((active0 & 0x8000000000L) != 0L)
            {
               if (jjmatchedPos < 9)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 9;
               }
               return -1;
            }
  +         if ((active0 & 0x1b040f0040000000L) != 0L || (active1 & 0x200L) != 0L)
  +         {
  +            jjmatchedKind = 74;
  +            jjmatchedPos = 11;
  +            return 13;
  +         }
            return -1;
         case 12:
            if ((active0 & 0x13000f0040000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 12;
               return 13;
            }
  -         if ((active0 & 0x804000000000000L) != 0L)
  +         if ((active0 & 0x804000000000000L) != 0L || (active1 & 0x200L) != 0L)
               return 13;
            return -1;
         case 13:
            if ((active0 & 0x13000f0040000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 13;
               return 13;
            }
            return -1;
         case 14:
  +         if ((active0 & 0x1200000000000000L) != 0L)
  +            return 13;
            if ((active0 & 0x1000f0040000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 14;
               return 13;
            }
  -         if ((active0 & 0x1200000000000000L) != 0L)
  -            return 13;
            return -1;
         case 15:
            if ((active0 & 0xf0040000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 15;
               return 13;
            }
  @@ -286,14 +288,14 @@
            {
               if (jjmatchedPos < 15)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 15;
               }
               return -1;
            }
            if ((active0 & 0xe0040000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 16;
               return 13;
            }
  @@ -303,7 +305,7 @@
            {
               if (jjmatchedPos < 16)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 16;
               }
               return -1;
  @@ -312,65 +314,65 @@
            {
               if (jjmatchedPos < 15)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 15;
               }
               return -1;
            }
            if ((active0 & 0x80040000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 17;
               return 13;
            }
            return -1;
         case 18:
  +         if ((active0 & 0x80000000000L) != 0L)
  +         {
  +            if (jjmatchedPos < 17)
  +            {
  +               jjmatchedKind = 74;
  +               jjmatchedPos = 17;
  +            }
  +            return -1;
  +         }
            if ((active0 & 0x60000000000L) != 0L)
            {
               if (jjmatchedPos < 16)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 16;
               }
               return -1;
            }
            if ((active0 & 0x40000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 18;
               return 13;
            }
  +         return -1;
  +      case 19:
            if ((active0 & 0x80000000000L) != 0L)
            {
               if (jjmatchedPos < 17)
               {
  -               jjmatchedKind = 73;
  +               jjmatchedKind = 74;
                  jjmatchedPos = 17;
               }
               return -1;
            }
  -         return -1;
  -      case 19:
            if ((active0 & 0x40000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 19;
               return 13;
            }
  -         if ((active0 & 0x80000000000L) != 0L)
  -         {
  -            if (jjmatchedPos < 17)
  -            {
  -               jjmatchedKind = 73;
  -               jjmatchedPos = 17;
  -            }
  -            return -1;
  -         }
            return -1;
         case 20:
            if ((active0 & 0x40000000L) != 0L)
            {
  -            jjmatchedKind = 73;
  +            jjmatchedKind = 74;
               jjmatchedPos = 20;
               return 13;
            }
  @@ -406,25 +408,25 @@
         case 36:
            return jjStopAtPos(0, 13);
         case 40:
  -         return jjStopAtPos(0, 75);
  -      case 41:
            return jjStopAtPos(0, 76);
  +      case 41:
  +         return jjStopAtPos(0, 77);
         case 42:
  -         return jjStopAtPos(0, 83);
  +         return jjStopAtPos(0, 84);
         case 43:
            return jjStopAtPos(0, 5);
         case 44:
  -         return jjStopAtPos(0, 82);
  +         return jjStopAtPos(0, 83);
         case 45:
            return jjStopAtPos(0, 6);
         case 46:
  -         jjmatchedKind = 77;
  -         return jjMoveStringLiteralDfa1_0(0x0L, 0x4000L);
  +         jjmatchedKind = 78;
  +         return jjMoveStringLiteralDfa1_0(0x0L, 0x8000L);
         case 47:
            jjmatchedKind = 2;
            return jjMoveStringLiteralDfa1_0(0x8L, 0x0L);
         case 58:
  -         return jjStopAtPos(0, 74);
  +         return jjStopAtPos(0, 75);
         case 60:
            jjmatchedKind = 9;
            return jjMoveStringLiteralDfa1_0(0x400L, 0x0L);
  @@ -434,11 +436,11 @@
            jjmatchedKind = 11;
            return jjMoveStringLiteralDfa1_0(0x1000L, 0x0L);
         case 64:
  -         return jjStopAtPos(0, 81);
  +         return jjStopAtPos(0, 82);
         case 91:
  -         return jjStopAtPos(0, 79);
  -      case 93:
            return jjStopAtPos(0, 80);
  +      case 93:
  +         return jjStopAtPos(0, 81);
         case 97:
            return jjMoveStringLiteralDfa1_0(0x10c01000000L, 0x0L);
         case 98:
  @@ -448,7 +450,7 @@
         case 100:
            return jjMoveStringLiteralDfa1_0(0x88004000000L, 0x0L);
         case 102:
  -         return jjMoveStringLiteralDfa1_0(0x24000000000L, 0x42L);
  +         return jjMoveStringLiteralDfa1_0(0x24000000000L, 0x242L);
         case 105:
            return jjMoveStringLiteralDfa1_0(0x800000000000L, 0x0L);
         case 107:
  @@ -485,8 +487,8 @@
      switch(curChar)
      {
         case 46:
  -         if ((active1 & 0x4000L) != 0L)
  -            return jjStopAtPos(1, 78);
  +         if ((active1 & 0x8000L) != 0L)
  +            return jjStopAtPos(1, 79);
            break;
         case 47:
            if ((active0 & 0x8L) != 0L)
  @@ -517,7 +519,7 @@
         case 110:
            return jjMoveStringLiteralDfa2_0(active0, 0x10401000000L, active1, 0L);
         case 111:
  -         return jjMoveStringLiteralDfa2_0(active0, 0xd0a262402a000000L, active1, 0x100L);
  +         return jjMoveStringLiteralDfa2_0(active0, 0xd0a262402a000000L, active1, 0x300L);
         case 114:
            if ((active0 & 0x800000L) != 0L)
               return jjStartNfaWithStates_0(1, 23, 13);
  @@ -569,7 +571,7 @@
         case 111:
            return jjMoveStringLiteralDfa3_0(active0, 0x4000000040000000L, active1, 0x40L);
         case 114:
  -         return jjMoveStringLiteralDfa3_0(active0, 0x1810000200000000L, active1, 0L);
  +         return jjMoveStringLiteralDfa3_0(active0, 0x1810000200000000L, active1, 0x200L);
         case 115:
            return jjMoveStringLiteralDfa3_0(active0, 0x388000000000L, active1, 0L);
         case 116:
  @@ -634,7 +636,7 @@
               return jjStartNfaWithStates_0(3, 66, 13);
            return jjMoveStringLiteralDfa4_0(active0, 0x4000024100000000L, active1, 0x80L);
         case 109:
  -         return jjMoveStringLiteralDfa4_0(active0, 0x1000000020000000L, active1, 0L);
  +         return jjMoveStringLiteralDfa4_0(active0, 0x1000000020000000L, active1, 0x200L);
         case 110:
            return jjMoveStringLiteralDfa4_0(active0, 0x2000400000000000L, active1, 0x100L);
         case 111:
  @@ -668,7 +670,7 @@
         case 58:
            return jjMoveStringLiteralDfa5_0(active0, 0x80000000L, active1, 0L);
         case 97:
  -         return jjMoveStringLiteralDfa5_0(active0, 0x10a0000000000000L, active1, 0L);
  +         return jjMoveStringLiteralDfa5_0(active0, 0x10a0000000000000L, active1, 0x200L);
         case 100:
            if ((active1 & 0x100L) != 0L)
               return jjStartNfaWithStates_0(4, 72, 13);
  @@ -747,7 +749,7 @@
         case 116:
            if ((active0 & 0x20000000000000L) != 0L)
               return jjStartNfaWithStates_0(5, 53, 13);
  -         return jjMoveStringLiteralDfa6_0(active0, 0x10600000000L, active1, 0L);
  +         return jjMoveStringLiteralDfa6_0(active0, 0x10600000000L, active1, 0x200L);
         case 119:
            return jjMoveStringLiteralDfa6_0(active0, 0x24000000000L, active1, 0L);
         default :
  @@ -767,7 +769,7 @@
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa7_0(active0, 0x840000000000000L, active1, 0L);
  +         return jjMoveStringLiteralDfa7_0(active0, 0x840000000000000L, active1, 0x200L);
         case 58:
            if ((active0 & 0x100000000L) != 0L)
               return jjStopAtPos(6, 32);
  @@ -807,7 +809,7 @@
         return jjStartNfa_0(5, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
  -      jjStopStringLiteralDfa_0(6, active0, 0L);
  +      jjStopStringLiteralDfa_0(6, active0, active1);
         return 7;
      }
      switch(curChar)
  @@ -817,118 +819,122 @@
               return jjStopAtPos(7, 33);
            break;
         case 97:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x2088000000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x2088000000000L, active1, 0L);
         case 99:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x4001000000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x4001000000000L, active1, 0L);
         case 105:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x40000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x40000000L, active1, 0L);
         case 108:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x800000000000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x800000000000000L, active1, 0L);
         case 110:
            if ((active0 & 0x200000000000L) != 0L)
               return jjStartNfaWithStates_0(7, 45, 13);
  -         return jjMoveStringLiteralDfa8_0(active0, 0x700066000000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x700066000000000L, active1, 0x200L);
         case 114:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x10400000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x10400000000L, active1, 0L);
         case 115:
            if ((active0 & 0x80000000000000L) != 0L)
               return jjStartNfaWithStates_0(7, 55, 13);
            break;
         case 116:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x2000000800000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x2000000800000000L, active1, 0L);
         case 119:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x40000000000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x40000000000000L, active1, 0L);
         case 122:
  -         return jjMoveStringLiteralDfa8_0(active0, 0x1000000000000000L);
  +         return jjMoveStringLiteralDfa8_0(active0, 0x1000000000000000L, active1, 0L);
         default :
            break;
      }
  -   return jjStartNfa_0(6, active0, 0L);
  +   return jjStartNfa_0(6, active0, active1);
   }
  -private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
  +private final int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1)
   {
  -   if (((active0 &= old0)) == 0L)
  -      return jjStartNfa_0(6, old0, 0L);
  +   if (((active0 &= old0) | (active1 &= old1)) == 0L)
  +      return jjStartNfa_0(6, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
  -      jjStopStringLiteralDfa_0(7, active0, 0L);
  +      jjStopStringLiteralDfa_0(7, active0, active1);
         return 8;
      }
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa9_0(active0, 0x10000000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x10000000000L, active1, 0L);
         case 58:
  -         return jjMoveStringLiteralDfa9_0(active0, 0x400000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x400000000L, active1, 0L);
         case 101:
            if ((active0 & 0x2000000000000000L) != 0L)
               return jjStartNfaWithStates_0(8, 61, 13);
  -         return jjMoveStringLiteralDfa9_0(active0, 0x1804001800000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x1804001800000000L, active1, 0L);
         case 103:
            if ((active0 & 0x400000000000000L) != 0L)
            {
               jjmatchedKind = 58;
               jjmatchedPos = 8;
            }
  -         return jjMoveStringLiteralDfa9_0(active0, 0x300066000000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x300066000000000L, active1, 0L);
         case 105:
  -         return jjMoveStringLiteralDfa9_0(active0, 0x40000000000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x40000000000000L, active1, 0L);
         case 109:
  -         return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L, active1, 0L);
         case 110:
  -         return jjMoveStringLiteralDfa9_0(active0, 0x88040000000L);
  +         return jjMoveStringLiteralDfa9_0(active0, 0x88040000000L, active1, 0L);
  +      case 117:
  +         return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x200L);
         default :
            break;
      }
  -   return jjStartNfa_0(7, active0, 0L);
  +   return jjStartNfa_0(7, active0, active1);
   }
  -private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
  +private final int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long active1)
   {
  -   if (((active0 &= old0)) == 0L)
  -      return jjStartNfa_0(7, old0, 0L);
  +   if (((active0 &= old0) | (active1 &= old1)) == 0L)
  +      return jjStartNfa_0(7, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
  -      jjStopStringLiteralDfa_0(8, active0, 0L);
  +      jjStopStringLiteralDfa_0(8, active0, active1);
         return 9;
      }
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa10_0(active0, 0x1304060000000000L);
  +         return jjMoveStringLiteralDfa10_0(active0, 0x1304060000000000L, active1, 0L);
         case 58:
            if ((active0 & 0x400000000L) != 0L)
               return jjStopAtPos(9, 34);
  -         return jjMoveStringLiteralDfa10_0(active0, 0x7800000000L);
  +         return jjMoveStringLiteralDfa10_0(active0, 0x7800000000L, active1, 0L);
         case 101:
            if ((active0 & 0x2000000000000L) != 0L)
               return jjStartNfaWithStates_0(9, 49, 13);
            break;
         case 103:
  -         return jjMoveStringLiteralDfa10_0(active0, 0x40000000L);
  +         return jjMoveStringLiteralDfa10_0(active0, 0x40000000L, active1, 0L);
  +      case 109:
  +         return jjMoveStringLiteralDfa10_0(active0, 0L, active1, 0x200L);
         case 110:
  -         return jjMoveStringLiteralDfa10_0(active0, 0x800000000000000L);
  +         return jjMoveStringLiteralDfa10_0(active0, 0x800000000000000L, active1, 0L);
         case 111:
  -         return jjMoveStringLiteralDfa10_0(active0, 0x10000000000L);
  +         return jjMoveStringLiteralDfa10_0(active0, 0x10000000000L, active1, 0L);
         case 116:
  -         return jjMoveStringLiteralDfa10_0(active0, 0x40088000000000L);
  +         return jjMoveStringLiteralDfa10_0(active0, 0x40088000000000L, active1, 0L);
         default :
            break;
      }
  -   return jjStartNfa_0(8, active0, 0L);
  +   return jjStartNfa_0(8, active0, active1);
   }
  -private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
  +private final int jjMoveStringLiteralDfa10_0(long old0, long active0, long old1, long active1)
   {
  -   if (((active0 &= old0)) == 0L)
  -      return jjStartNfa_0(8, old0, 0L);
  +   if (((active0 &= old0) | (active1 &= old1)) == 0L)
  +      return jjStartNfa_0(8, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
  -      jjStopStringLiteralDfa_0(9, active0, 0L);
  +      jjStopStringLiteralDfa_0(9, active0, active1);
         return 10;
      }
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x80040000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x80040000000L, active1, 0L);
         case 58:
            if ((active0 & 0x800000000L) != 0L)
               return jjStopAtPos(10, 35);
  @@ -938,81 +944,81 @@
               return jjStopAtPos(10, 37);
            else if ((active0 & 0x4000000000L) != 0L)
               return jjStopAtPos(10, 38);
  -         return jjMoveStringLiteralDfa11_0(active0, 0x8000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x8000000000L, active1, 0L);
         case 97:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x200000000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x200000000000000L, active1, 0L);
         case 98:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x100000000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x100000000000000L, active1, 0x200L);
         case 103:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x800000000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x800000000000000L, active1, 0L);
         case 104:
            if ((active0 & 0x40000000000000L) != 0L)
               return jjStartNfaWithStates_0(10, 54, 13);
            break;
         case 114:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x10000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x10000000000L, active1, 0L);
         case 115:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x1000060000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x1000060000000000L, active1, 0L);
         case 117:
  -         return jjMoveStringLiteralDfa11_0(active0, 0x4000000000000L);
  +         return jjMoveStringLiteralDfa11_0(active0, 0x4000000000000L, active1, 0L);
         default :
            break;
      }
  -   return jjStartNfa_0(9, active0, 0L);
  +   return jjStartNfa_0(9, active0, active1);
   }
  -private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
  +private final int jjMoveStringLiteralDfa11_0(long old0, long active0, long old1, long active1)
   {
  -   if (((active0 &= old0)) == 0L)
  -      return jjStartNfa_0(9, old0, 0L);
  +   if (((active0 &= old0) | (active1 &= old1)) == 0L)
  +      return jjStartNfa_0(9, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
  -      jjStopStringLiteralDfa_0(10, active0, 0L);
  +      jjStopStringLiteralDfa_0(10, active0, active1);
         return 11;
      }
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x10000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x10000000000L, active1, 0L);
         case 58:
            if ((active0 & 0x8000000000L) != 0L)
               return jjStopAtPos(11, 39);
            break;
         case 101:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x100000000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x100000000000000L, active1, 0x200L);
         case 102:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x200000000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x200000000000000L, active1, 0L);
         case 105:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x60040000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x60040000000L, active1, 0L);
         case 111:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x80000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x80000000000L, active1, 0L);
         case 112:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x1000000000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x1000000000000000L, active1, 0L);
         case 114:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x4000000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x4000000000000L, active1, 0L);
         case 116:
  -         return jjMoveStringLiteralDfa12_0(active0, 0x800000000000000L);
  +         return jjMoveStringLiteralDfa12_0(active0, 0x800000000000000L, active1, 0L);
         default :
            break;
      }
  -   return jjStartNfa_0(10, active0, 0L);
  +   return jjStartNfa_0(10, active0, active1);
   }
  -private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
  +private final int jjMoveStringLiteralDfa12_0(long old0, long active0, long old1, long active1)
   {
  -   if (((active0 &= old0)) == 0L)
  -      return jjStartNfa_0(10, old0, 0L);
  +   if (((active0 &= old0) | (active1 &= old1)) == 0L)
  +      return jjStartNfa_0(10, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
  -      jjStopStringLiteralDfa_0(11, active0, 0L);
  +      jjStopStringLiteralDfa_0(11, active0, active1);
         return 12;
      }
      switch(curChar)
      {
         case 97:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x1000000000000000L);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x1000000000000000L, active1, 0L);
         case 98:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x60000000000L);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x60000000000L, active1, 0L);
         case 102:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x100000000000000L);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x100000000000000L, active1, 0L);
         case 104:
            if ((active0 & 0x800000000000000L) != 0L)
               return jjStartNfaWithStates_0(12, 59, 13);
  @@ -1022,22 +1028,24 @@
               return jjStartNfaWithStates_0(12, 50, 13);
            break;
         case 110:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x40000000L);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x40000000L, active1, 0L);
         case 114:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x80000000000L);
  +         if ((active1 & 0x200L) != 0L)
  +            return jjStartNfaWithStates_0(12, 73, 13);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x80000000000L, active1, 0L);
         case 115:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x10000000000L);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x10000000000L, active1, 0L);
         case 116:
  -         return jjMoveStringLiteralDfa13_0(active0, 0x200000000000000L);
  +         return jjMoveStringLiteralDfa13_0(active0, 0x200000000000000L, active1, 0L);
         default :
            break;
      }
  -   return jjStartNfa_0(11, active0, 0L);
  +   return jjStartNfa_0(11, active0, active1);
   }
  -private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
  +private final int jjMoveStringLiteralDfa13_0(long old0, long active0, long old1, long active1)
   {
  -   if (((active0 &= old0)) == 0L)
  -      return jjStartNfa_0(11, old0, 0L);
  +   if (((active0 &= old0) | (active1 &= old1)) == 0L)
  +      return jjStartNfa_0(11, old0, old1); 
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) {
         jjStopStringLiteralDfa_0(12, active0, 0L);
  @@ -1506,8 +1514,8 @@
                  case 13:
                     if ((0x3ff600000000000L & l) == 0L)
                        break;
  -                  if (kind > 73)
  -                     kind = 73;
  +                  if (kind > 74)
  +                     kind = 74;
                     jjstateSet[jjnewStateCnt++] = 13;
                     break;
                  default : break;
  @@ -1525,8 +1533,8 @@
                  case 13:
                     if ((0x7fffffe87fffffeL & l) == 0L)
                        break;
  -                  if (kind > 73)
  -                     kind = 73;
  +                  if (kind > 74)
  +                     kind = 74;
                     jjCheckNAdd(13);
                     break;
                  case 2:
  @@ -1553,8 +1561,8 @@
                  case 1:
                     if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                        break;
  -                  if (kind > 73)
  -                     kind = 73;
  +                  if (kind > 74)
  +                     kind = 74;
                     jjCheckNAdd(13);
                     break;
                  case 2:
  @@ -1568,8 +1576,8 @@
                  case 13:
                     if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
                        break;
  -                  if (kind > 73)
  -                     kind = 73;
  +                  if (kind > 74)
  +                     kind = 74;
                     jjCheckNAdd(13);
                     break;
                  default : break;
  @@ -1738,13 +1746,13 @@
   "\156\157\162\155\141\154\151\172\145\55\163\160\141\143\145", "\164\162\141\156\163\154\141\164\145", "\142\157\157\154\145\141\156", 
   "\156\157\164", "\164\162\165\145", "\146\141\154\163\145", "\156\165\154\154", 
   "\154\141\156\147", "\156\165\155\142\145\162", "\163\165\155", "\146\154\157\157\162", 
  -"\143\145\151\154\151\156\147", "\162\157\165\156\144", null, "\72", "\50", "\51", "\56", "\56\56", "\133", 
  -"\135", "\100", "\54", "\52", };
  +"\143\145\151\154\151\156\147", "\162\157\165\156\144", "\146\157\162\155\141\164\55\156\165\155\142\145\162", 
  +null, "\72", "\50", "\51", "\56", "\56\56", "\133", "\135", "\100", "\54", "\52", };
   public static final String[] lexStateNames = {
      "DEFAULT", 
   };
   static final long[] jjtoToken = {
  -   0xffffffffff817ffdL, 0xfffffL, 
  +   0xffffffffff817ffdL, 0x1fffffL, 
   };
   static final long[] jjtoSkip = {
      0x2L, 0x0L, 
  @@ -1752,22 +1760,22 @@
   static final long[] jjtoSpecial = {
      0x2L, 0x0L, 
   };
  -private ASCII_UCodeESC_CharStream input_stream;
  +private JavaCharStream input_stream;
   private final int[] jjrounds = new int[14];
   private final int[] jjstateSet = new int[28];
   protected char curChar;
  -public XPathParserTokenManager(ASCII_UCodeESC_CharStream stream)
  +public XPathParserTokenManager(JavaCharStream stream)
   {
  -   if (ASCII_UCodeESC_CharStream.staticFlag)
  +   if (JavaCharStream.staticFlag)
         throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
      input_stream = stream;
   }
  -public XPathParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState)
  +public XPathParserTokenManager(JavaCharStream stream, int lexState)
   {
      this(stream);
      SwitchTo(lexState);
   }
  -public void ReInit(ASCII_UCodeESC_CharStream stream)
  +public void ReInit(JavaCharStream stream)
   {
      jjmatchedPos = jjnewStateCnt = 0;
      curLexState = defaultLexState;
  @@ -1781,7 +1789,7 @@
      for (i = 14; i-- > 0;)
         jjrounds[i] = 0x80000000;
   }
  -public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState)
  +public void ReInit(JavaCharStream stream, int lexState)
   {
      ReInit(stream);
      SwitchTo(lexState);
  
  
  
  1.2       +3 -3      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/jcc.bat
  
  Index: jcc.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/jcc.bat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jcc.bat	23 Aug 2001 00:47:00 -0000	1.1
  +++ jcc.bat	25 Jan 2003 01:49:19 -0000	1.2
  @@ -1,6 +1,6 @@
   @echo off
   
  -set JAVACC_HOME=c:\tools\javacc2.0
  +set JAVACC_HOME=c:\tools\javacc2.1
   
  -%JAVACC_HOME%\bin\javacc.bat XPath.jj
  -%JAVACC_HOME%\bin\jjdoc.bat
  \ No newline at end of file
  +call %JAVACC_HOME%\bin\javacc.bat XPath.jj
  +call %JAVACC_HOME%\bin\jjdoc.bat  XPath.jj
  \ No newline at end of file
  
  
  
  1.1                  jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/parser/JavaCharStream.java
  
  Index: JavaCharStream.java
  ===================================================================
  /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 2.1 */
  package org.apache.commons.jxpath.ri.parser;
  
  /**
   * An implementation of interface CharStream, where the stream is assumed to
   * contain only ASCII characters (with java-like unicode escape processing).
   */
  
  public final class JavaCharStream
  {
    public static final boolean staticFlag = false;
    static final int hexval(char c) throws java.io.IOException {
      switch(c)
      {
         case '0' :
            return 0;
         case '1' :
            return 1;
         case '2' :
            return 2;
         case '3' :
            return 3;
         case '4' :
            return 4;
         case '5' :
            return 5;
         case '6' :
            return 6;
         case '7' :
            return 7;
         case '8' :
            return 8;
         case '9' :
            return 9;
  
         case 'a' :
         case 'A' :
            return 10;
         case 'b' :
         case 'B' :
            return 11;
         case 'c' :
         case 'C' :
            return 12;
         case 'd' :
         case 'D' :
            return 13;
         case 'e' :
         case 'E' :
            return 14;
         case 'f' :
         case 'F' :
            return 15;
      }
  
      throw new java.io.IOException(); // Should never come here
    }
  
    public int bufpos = -1;
    int bufsize;
    int available;
    int tokenBegin;
    private int bufline[];
    private int bufcolumn[];
  
    private int column = 0;
    private int line = 1;
  
    private boolean prevCharIsCR = false;
    private boolean prevCharIsLF = false;
  
    private java.io.Reader inputStream;
  
    private char[] nextCharBuf;
    private char[] buffer;
    private int maxNextCharInd = 0;
    private int nextCharInd = -1;
    private int inBuf = 0;
  
    private final void ExpandBuff(boolean wrapAround)
    {
       char[] newbuffer = new char[bufsize + 2048];
       int newbufline[] = new int[bufsize + 2048];
       int newbufcolumn[] = new int[bufsize + 2048];
  
       try
       {
          if (wrapAround)
          {
             System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
             System.arraycopy(buffer, 0, newbuffer,
                                               bufsize - tokenBegin, bufpos);
             buffer = newbuffer;
  
             System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
             System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
             bufline = newbufline;
  
             System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
             System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
             bufcolumn = newbufcolumn;
  
             bufpos += (bufsize - tokenBegin);
          }
          else
          {
             System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
             buffer = newbuffer;
  
             System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
             bufline = newbufline;
  
             System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
             bufcolumn = newbufcolumn;
  
             bufpos -= tokenBegin;
          }
       }
       catch (Throwable t)
       {
          throw new Error(t.getMessage());
       }
  
       available = (bufsize += 2048);
       tokenBegin = 0;
    }
  
    private final void FillBuff() throws java.io.IOException
    {
       int i;
       if (maxNextCharInd == 4096)
          maxNextCharInd = nextCharInd = 0;
  
       try {
          if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
                                              4096 - maxNextCharInd)) == -1)
          {
             inputStream.close();
             throw new java.io.IOException();
          }
          else
             maxNextCharInd += i;
          return;
       }
       catch(java.io.IOException e) {
          if (bufpos != 0)
          {
             --bufpos;
             backup(0);
          }
          else
          {
             bufline[bufpos] = line;
             bufcolumn[bufpos] = column;
          }
          throw e;
       }
    }
  
    private final char ReadByte() throws java.io.IOException
    {
       if (++nextCharInd >= maxNextCharInd)
          FillBuff();
  
       return nextCharBuf[nextCharInd];
    }
  
    public final char BeginToken() throws java.io.IOException
    {     
       if (inBuf > 0)
       {
          --inBuf;
  
          if (++bufpos == bufsize)
             bufpos = 0;
  
          tokenBegin = bufpos;
          return buffer[bufpos];
       }
  
       tokenBegin = 0;
       bufpos = -1;
  
       return readChar();
    }     
  
    private final void AdjustBuffSize()
    {
       if (available == bufsize)
       {
          if (tokenBegin > 2048)
          {
             bufpos = 0;
             available = tokenBegin;
          }
          else
             ExpandBuff(false);
       }
       else if (available > tokenBegin)
          available = bufsize;
       else if ((tokenBegin - available) < 2048)
          ExpandBuff(true);
       else
          available = tokenBegin;
    }
  
    private final void UpdateLineColumn(char c)
    {
       column++;
  
       if (prevCharIsLF)
       {
          prevCharIsLF = false;
          line += (column = 1);
       }
       else if (prevCharIsCR)
       {
          prevCharIsCR = false;
          if (c == '\n')
          {
             prevCharIsLF = true;
          }
          else
             line += (column = 1);
       }
  
       switch (c)
       {
          case '\r' :
             prevCharIsCR = true;
             break;
          case '\n' :
             prevCharIsLF = true;
             break;
          case '\t' :
             column--;
             column += (8 - (column & 07));
             break;
          default :
             break;
       }
  
       bufline[bufpos] = line;
       bufcolumn[bufpos] = column;
    }
  
    public final char readChar() throws java.io.IOException
    {
       if (inBuf > 0)
       {
          --inBuf;
  
          if (++bufpos == bufsize)
             bufpos = 0;
  
          return buffer[bufpos];
       }
  
       char c;
  
       if (++bufpos == available)
          AdjustBuffSize();
  
       if ((buffer[bufpos] = c = ReadByte()) == '\\')
       {
          UpdateLineColumn(c);
  
          int backSlashCnt = 1;
  
          for (;;) // Read all the backslashes
          {
             if (++bufpos == available)
                AdjustBuffSize();
  
             try
             {
                if ((buffer[bufpos] = c = ReadByte()) != '\\')
                {
                   UpdateLineColumn(c);
                   // found a non-backslash char.
                   if ((c == 'u') && ((backSlashCnt & 1) == 1))
                   {
                      if (--bufpos < 0)
                         bufpos = bufsize - 1;
  
                      break;
                   }
  
                   backup(backSlashCnt);
                   return '\\';
                }
             }
             catch(java.io.IOException e)
             {
                if (backSlashCnt > 1)
                   backup(backSlashCnt);
  
                return '\\';
             }
  
             UpdateLineColumn(c);
             backSlashCnt++;
          }
  
          // Here, we have seen an odd number of backslash's followed by a 'u'
          try
          {
             while ((c = ReadByte()) == 'u')
                ++column;
  
             buffer[bufpos] = c = (char)(hexval(c) << 12 |
                                         hexval(ReadByte()) << 8 |
                                         hexval(ReadByte()) << 4 |
                                         hexval(ReadByte()));
  
             column += 4;
          }
          catch(java.io.IOException e)
          {
             throw new Error("Invalid escape character at line " + line +
                                           " column " + column + ".");
          }
  
          if (backSlashCnt == 1)
             return c;
          else
          {
             backup(backSlashCnt - 1);
             return '\\';
          }
       }
       else
       {
          UpdateLineColumn(c);
          return (c);
       }
    }
  
    /**
     * @deprecated 
     * @see #getEndColumn
     */
  
    public final int getColumn() {
       return bufcolumn[bufpos];
    }
  
    /**
     * @deprecated 
     * @see #getEndLine
     */
  
    public final int getLine() {
       return bufline[bufpos];
    }
  
    public final int getEndColumn() {
       return bufcolumn[bufpos];
    }
  
    public final int getEndLine() {
       return bufline[bufpos];
    }
  
    public final int getBeginColumn() {
       return bufcolumn[tokenBegin];
    }
  
    public final int getBeginLine() {
       return bufline[tokenBegin];
    }
  
    public final void backup(int amount) {
  
      inBuf += amount;
      if ((bufpos -= amount) < 0)
         bufpos += bufsize;
    }
  
    public JavaCharStream(java.io.Reader dstream,
                   int startline, int startcolumn, int buffersize)
    {
      inputStream = dstream;
      line = startline;
      column = startcolumn - 1;
  
      available = bufsize = buffersize;
      buffer = new char[buffersize];
      bufline = new int[buffersize];
      bufcolumn = new int[buffersize];
      nextCharBuf = new char[4096];
    }
  
    public JavaCharStream(java.io.Reader dstream,
                                          int startline, int startcolumn)
    {
       this(dstream, startline, startcolumn, 4096);
    }
  
    public JavaCharStream(java.io.Reader dstream)
    {
       this(dstream, 1, 1, 4096);
    }
    public void ReInit(java.io.Reader dstream,
                   int startline, int startcolumn, int buffersize)
    {
      inputStream = dstream;
      line = startline;
      column = startcolumn - 1;
  
      if (buffer == null || buffersize != buffer.length)
      {
        available = bufsize = buffersize;
        buffer = new char[buffersize];
        bufline = new int[buffersize];
        bufcolumn = new int[buffersize];
        nextCharBuf = new char[4096];
      }
      prevCharIsLF = prevCharIsCR = false;
      tokenBegin = inBuf = maxNextCharInd = 0;
      nextCharInd = bufpos = -1;
    }
  
    public void ReInit(java.io.Reader dstream,
                                          int startline, int startcolumn)
    {
       ReInit(dstream, startline, startcolumn, 4096);
    }
  
    public void ReInit(java.io.Reader dstream)
    {
       ReInit(dstream, 1, 1, 4096);
    }
    public JavaCharStream(java.io.InputStream dstream, int startline,
    int startcolumn, int buffersize)
    {
       this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
    }
  
    public JavaCharStream(java.io.InputStream dstream, int startline,
                                                             int startcolumn)
    {
       this(dstream, startline, startcolumn, 4096);
    }
  
    public JavaCharStream(java.io.InputStream dstream)
    {
       this(dstream, 1, 1, 4096);
    }
  
    public void ReInit(java.io.InputStream dstream, int startline,
    int startcolumn, int buffersize)
    {
       ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
    }
    public void ReInit(java.io.InputStream dstream, int startline,
                                                             int startcolumn)
    {
       ReInit(dstream, startline, startcolumn, 4096);
    }
    public void ReInit(java.io.InputStream dstream)
    {
       ReInit(dstream, 1, 1, 4096);
    }
  
    public final String GetImage()
    {
       if (bufpos >= tokenBegin)
          return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
       else
          return new String(buffer, tokenBegin, bufsize - tokenBegin) +
                                new String(buffer, 0, bufpos + 1);
    }
  
    public final char[] GetSuffix(int len)
    {
       char[] ret = new char[len];
  
       if ((bufpos + 1) >= len)
          System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
       else
       {
          System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
                                                            len - bufpos - 1);
          System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
       }
  
       return ret;
    }
  
    public void Done()
    {
       nextCharBuf = null;
       buffer = null;
       bufline = null;
       bufcolumn = null;
    }
  
    /**
     * Method to adjust line and column numbers for the start of a token.<BR>
     */
    public void adjustBeginLineColumn(int newLine, int newCol)
    {
       int start = tokenBegin;
       int len;
  
       if (bufpos >= tokenBegin)
       {
          len = bufpos - tokenBegin + inBuf + 1;
       }
       else
       {
          len = bufsize - tokenBegin + bufpos + 1 + inBuf;
       }
  
       int i = 0, j = 0, k = 0;
       int nextColDiff = 0, columnDiff = 0;
  
       while (i < len &&
              bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
       {
          bufline[j] = newLine;
          nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
          bufcolumn[j] = newCol + columnDiff;
          columnDiff = nextColDiff;
          i++;
       } 
  
       if (i < len)
       {
          bufline[j] = newLine++;
          bufcolumn[j] = newCol + columnDiff;
  
          while (i++ < len)
          {
             if (bufline[j = start % bufsize] != bufline[++start % bufsize])
                bufline[j] = newLine++;
             else
                bufline[j] = newLine;
          }
       }
  
       line = bufline[j];
       column = bufcolumn[j];
    }
  
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message