shawn       2003/03/30 17:17:07

  Modified:    el/src/java/org/apache/commons/el ELParser.jj
               el/src/java/org/apache/commons/el/parser ELParser.java
                        ELParserConstants.java ELParserTokenManager.java
  Added:       el/src/java/org/apache/commons/el ConditionalExpression.java
  Log:
  Support for the ternary conditional (a ? b : c) operator.
  
  Revision  Changes    Path
  1.2       +30 -11    jakarta-commons/el/src/java/org/apache/commons/el/ELParser.jj
  
  Index: ELParser.jj
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/el/src/java/org/apache/commons/el/ELParser.jj,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ELParser.jj       4 Feb 2003 00:22:24 -0000       1.1
  +++ ELParser.jj       31 Mar 2003 01:17:07 -0000      1.2
  @@ -134,7 +134,7 @@
   | < OR1: "or" >
   | < OR2: "||" >
   | < EMPTY: "empty" >
  -
  +| < COND: "?" >
   
   /* Identifiers */
   
  @@ -252,7 +252,10 @@
     Expression ret;
   }
   {
  -  ret = OrExpression ()
  +  (
  +   LOOKAHEAD(ConditionalExpression()) ret = ConditionalExpression() |
  +   ret = OrExpression ()
  +  )
     { return ret; }
   }
   
  @@ -503,6 +506,22 @@
     }
   }
   
  +Expression ConditionalExpression () :
  +{
  + Expression condition, trueBranch, falseBranch;
  +}
  +{
  + (
  +  condition = OrExpression ()
  +  <COND>
  +  trueBranch = Expression ()
  +  <COLON>
  +  falseBranch = Expression ()
  + )
  + {
  +  return new ConditionalExpression(condition, trueBranch, falseBranch);
  + }
  +}
   
   Expression UnaryExpression () :
   {
  @@ -513,25 +532,25 @@
   }
   {
     (
  -   (
  +    (
       (<NOT1> | <NOT2>) { operator = NotOperator.SINGLETON; }
       | <MINUS> { operator = UnaryMinusOperator.SINGLETON; }
       | <EMPTY> { operator = EmptyOperator.SINGLETON; }
       )
  -  {
  -    if (singleOperator == null) {
  +    {
  +     if (singleOperator == null) {
         singleOperator = operator;
  -    }
  -    else if (operators == null) {
  +     }
  +     else if (operators == null) {
         operators = new ArrayList ();
         operators.add (singleOperator);
         operators.add (operator);
  -    }
  -    else {
  +     }
  +     else {
         operators.add (operator);
  +     }
       }
  -  }
  -   )*
  +  )*
   
       expression = Value ()
   
  
  
  
  1.1                  
jakarta-commons/el/src/java/org/apache/commons/el/ConditionalExpression.java
  
  Index: ConditionalExpression.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  package org.apache.commons.el;
  
  import java.util.List;
  import java.util.Map;
  import javax.servlet.jsp.el.ELException;
  import javax.servlet.jsp.el.VariableResolver;
  import javax.servlet.jsp.el.FunctionMapper;
  
  /**
   *
   * <p>Represents a conditional expression.  I've decided not to produce an
   * abstract base "TernaryOperatorExpression" class since (a) future ternary
   * operators are unlikely and (b) it's not clear that there would be a
   * meaningful way to abstract them.  (For instance, would they all be right-
   * associative?  Would they all have two fixed operator symbols?)
   * 
   * @author Shawn Bayern
   **/
  
  public class ConditionalExpression
    extends Expression
  {
    //-------------------------------------
    // Properties
    //-------------------------------------
    // property condition
  
    Expression mCondition;
    public Expression getCondition ()
    { return mCondition; }
    public void setCondition (Expression pCondition)
    { mCondition = pCondition; }
  
    //-------------------------------------
    // property trueBranch
  
    Expression mTrueBranch;
    public Expression getTrueBranch ()
    { return mTrueBranch; }
    public void setTrueBranch (Expression pTrueBranch)
    { mTrueBranch = pTrueBranch; }
  
    //-------------------------------------
    // property falseBranch
  
    Expression mFalseBranch;
    public Expression getFalseBranch ()
    { return mFalseBranch; }
    public void setFalseBranch (Expression pFalseBranch)
    { mFalseBranch = pFalseBranch; }
  
    //-------------------------------------
    /**
     *
     * Constructor
     **/
    public ConditionalExpression (Expression pCondition,
                                Expression pTrueBranch,
                                Expression pFalseBranch)
    {
      mCondition = pCondition;
      mTrueBranch = pTrueBranch;
      mFalseBranch = pFalseBranch;
    }
  
    //-------------------------------------
    // Expression methods
    //-------------------------------------
    /**
     *
     * Returns the expression in the expression language syntax
     **/
    public String getExpressionString ()
    {
      return
        "( " + mCondition.getExpressionString() + " ? " + 
        mTrueBranch.getExpressionString() + " : " +
        mFalseBranch.getExpressionString() + " )";
    }
  
    //-------------------------------------
    /**
     *
     * Evaluates the conditional expression and returns the literal result
     **/
    public Object evaluate (VariableResolver vr,
                          FunctionMapper f,
                          String p,
                          Logger l)
      throws ELException
    {
      // first, evaluate the condition (and coerce the result to a boolean value)
      boolean condition =
        Coercions.coerceToBoolean(
          mCondition.evaluate(vr, f, p, l), l).booleanValue();
  
      // then, use this boolean to branch appropriately
      if (condition)
        return mTrueBranch.evaluate(vr, f, p, l);
      else
        return mFalseBranch.evaluate(vr, f, p, l);
    }
  
    //-------------------------------------
  }
  
  
  
  1.2       +836 -64   
jakarta-commons/el/src/java/org/apache/commons/el/parser/ELParser.java
  
  Index: ELParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/el/src/java/org/apache/commons/el/parser/ELParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ELParser.java     4 Feb 2003 00:22:25 -0000       1.1
  +++ ELParser.java     31 Mar 2003 01:17:07 -0000      1.2
  @@ -101,7 +101,30 @@
   
     final public Expression Expression() throws ParseException {
     Expression ret;
  -    ret = OrExpression();
  +    if (jj_2_1(2147483647)) {
  +      ret = ConditionalExpression();
  +    } else {
  +      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  +      case INTEGER_LITERAL:
  +      case FLOATING_POINT_LITERAL:
  +      case STRING_LITERAL:
  +      case TRUE:
  +      case FALSE:
  +      case NULL:
  +      case LPAREN:
  +      case MINUS:
  +      case NOT1:
  +      case NOT2:
  +      case EMPTY:
  +      case IDENTIFIER:
  +        ret = OrExpression();
  +        break;
  +      default:
  +        jj_la1[3] = jj_gen;
  +        jj_consume_token(-1);
  +        throw new ParseException();
  +      }
  +    }
       {if (true) return ret;}
       throw new Error("Missing return statement in function");
     }
  @@ -121,7 +144,7 @@
           ;
           break;
         default:
  -        jj_la1[3] = jj_gen;
  +        jj_la1[4] = jj_gen;
           break label_2;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -132,7 +155,7 @@
           jj_consume_token(OR2);
           break;
         default:
  -        jj_la1[4] = jj_gen;
  +        jj_la1[5] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  @@ -171,7 +194,7 @@
           ;
           break;
         default:
  -        jj_la1[5] = jj_gen;
  +        jj_la1[6] = jj_gen;
           break label_3;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -182,7 +205,7 @@
           jj_consume_token(AND2);
           break;
         default:
  -        jj_la1[6] = jj_gen;
  +        jj_la1[7] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  @@ -223,7 +246,7 @@
           ;
           break;
         default:
  -        jj_la1[7] = jj_gen;
  +        jj_la1[8] = jj_gen;
           break label_4;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -237,7 +260,7 @@
             jj_consume_token(EQ2);
             break;
           default:
  -          jj_la1[8] = jj_gen;
  +          jj_la1[9] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -253,14 +276,14 @@
             jj_consume_token(NE2);
             break;
           default:
  -          jj_la1[9] = jj_gen;
  +          jj_la1[10] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
                             operator = NotEqualsOperator.SINGLETON;
           break;
         default:
  -        jj_la1[10] = jj_gen;
  +        jj_la1[11] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  @@ -304,7 +327,7 @@
           ;
           break;
         default:
  -        jj_la1[11] = jj_gen;
  +        jj_la1[12] = jj_gen;
           break label_5;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -318,7 +341,7 @@
             jj_consume_token(LT2);
             break;
           default:
  -          jj_la1[12] = jj_gen;
  +          jj_la1[13] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -334,7 +357,7 @@
             jj_consume_token(GT2);
             break;
           default:
  -          jj_la1[13] = jj_gen;
  +          jj_la1[14] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -350,7 +373,7 @@
             jj_consume_token(GE2);
             break;
           default:
  -          jj_la1[14] = jj_gen;
  +          jj_la1[15] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -366,14 +389,14 @@
             jj_consume_token(LE2);
             break;
           default:
  -          jj_la1[15] = jj_gen;
  +          jj_la1[16] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
                             operator = LessThanOrEqualsOperator.SINGLETON;
           break;
         default:
  -        jj_la1[16] = jj_gen;
  +        jj_la1[17] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  @@ -411,7 +434,7 @@
           ;
           break;
         default:
  -        jj_la1[17] = jj_gen;
  +        jj_la1[18] = jj_gen;
           break label_6;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -424,7 +447,7 @@
                     operator = MinusOperator.SINGLETON;
           break;
         default:
  -        jj_la1[18] = jj_gen;
  +        jj_la1[19] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  @@ -465,7 +488,7 @@
           ;
           break;
         default:
  -        jj_la1[19] = jj_gen;
  +        jj_la1[20] = jj_gen;
           break label_7;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -483,7 +506,7 @@
             jj_consume_token(DIVIDE2);
             break;
           default:
  -          jj_la1[20] = jj_gen;
  +          jj_la1[21] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -499,14 +522,14 @@
             jj_consume_token(MODULUS2);
             break;
           default:
  -          jj_la1[21] = jj_gen;
  +          jj_la1[22] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
                                       operator = ModulusOperator.SINGLETON;
           break;
         default:
  -        jj_la1[22] = jj_gen;
  +        jj_la1[23] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  @@ -529,6 +552,17 @@
       throw new Error("Missing return statement in function");
     }
   
  +  final public Expression ConditionalExpression() throws ParseException {
  + Expression condition, trueBranch, falseBranch;
  +    condition = OrExpression();
  +    jj_consume_token(COND);
  +    trueBranch = Expression();
  +    jj_consume_token(COLON);
  +    falseBranch = Expression();
  +  {if (true) return new ConditionalExpression(condition, trueBranch, falseBranch);}
  +    throw new Error("Missing return statement in function");
  +  }
  +
     final public Expression UnaryExpression() throws ParseException {
     Expression expression;
     UnaryOperator singleOperator = null;
  @@ -544,7 +578,7 @@
           ;
           break;
         default:
  -        jj_la1[23] = jj_gen;
  +        jj_la1[24] = jj_gen;
           break label_8;
         }
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -558,7 +592,7 @@
             jj_consume_token(NOT2);
             break;
           default:
  -          jj_la1[24] = jj_gen;
  +          jj_la1[25] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -573,21 +607,21 @@
                   operator = EmptyOperator.SINGLETON;
           break;
         default:
  -        jj_la1[25] = jj_gen;
  +        jj_la1[26] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
  -    if (singleOperator == null) {
  +     if (singleOperator == null) {
         singleOperator = operator;
  -    }
  -    else if (operators == null) {
  +     }
  +     else if (operators == null) {
         operators = new ArrayList ();
         operators.add (singleOperator);
         operators.add (operator);
  -    }
  -    else {
  +     }
  +     else {
         operators.add (operator);
  -    }
  +     }
       }
       expression = Value();
       if (operators != null) {
  @@ -615,7 +649,7 @@
           ;
           break;
         default:
  -        jj_la1[26] = jj_gen;
  +        jj_la1[27] = jj_gen;
           break label_9;
         }
         suffix = ValueSuffix();
  @@ -653,8 +687,8 @@
         jj_consume_token(RPAREN);
         break;
       default:
  -      jj_la1[27] = jj_gen;
  -      if (jj_2_1(2147483647)) {
  +      jj_la1[28] = jj_gen;
  +      if (jj_2_2(2147483647)) {
           ret = FunctionInvocation();
         } else {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  @@ -662,7 +696,7 @@
             ret = NamedValue();
             break;
           default:
  -          jj_la1[28] = jj_gen;
  +          jj_la1[29] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
  @@ -707,7 +741,7 @@
             ;
             break;
           default:
  -          jj_la1[29] = jj_gen;
  +          jj_la1[30] = jj_gen;
             break label_10;
           }
           jj_consume_token(COMMA);
  @@ -716,7 +750,7 @@
         }
         break;
       default:
  -      jj_la1[30] = jj_gen;
  +      jj_la1[31] = jj_gen;
         ;
       }
       jj_consume_token(RPAREN);
  @@ -734,7 +768,7 @@
         suffix = ArraySuffix();
         break;
       default:
  -      jj_la1[31] = jj_gen;
  +      jj_la1[32] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -780,7 +814,7 @@
         ret = NullLiteral();
         break;
       default:
  -      jj_la1[32] = jj_gen;
  +      jj_la1[33] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -799,7 +833,7 @@
                 {if (true) return BooleanLiteral.FALSE;}
         break;
       default:
  -      jj_la1[33] = jj_gen;
  +      jj_la1[34] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -842,7 +876,7 @@
   
     final public String QualifiedName() throws ParseException {
     String prefix = null, localPart = null;
  -    if (jj_2_2(2147483647)) {
  +    if (jj_2_3(2147483647)) {
         prefix = Identifier();
         jj_consume_token(COLON);
       } else {
  @@ -870,42 +904,779 @@
       return retval;
     }
   
  -  final private boolean jj_3R_13() {
  -    if (jj_3R_12()) return true;
  +  final private boolean jj_2_3(int xla) {
  +    jj_la = xla; jj_lastpos = jj_scanpos = token;
  +    boolean retval = !jj_3_3();
  +    jj_save(2, xla);
  +    return retval;
  +  }
  +
  +  final private boolean jj_3R_42() {
  +    if (jj_scan_token(NE2)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_scan_token(COLON)) return true;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_91() {
  +    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3_2() {
  -    if (jj_3R_12()) return true;
  +  final private boolean jj_3R_40() {
  +    if (jj_scan_token(EQ2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_41() {
  +    if (jj_scan_token(NE1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_32() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_41()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_42()) 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_90() {
  +    if (jj_scan_token(INTEGER_LITERAL)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_39() {
  +    if (jj_scan_token(EQ1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_31() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_39()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_40()) 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_26() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_31()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_32()) 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_25()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_70() {
  +    if (jj_scan_token(NOT2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_21() {
  +    if (jj_3R_25()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_26()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_92() {
  +    if (jj_scan_token(STRING_LITERAL)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_62() {
  +    if (jj_scan_token(EMPTY)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_61() {
  +    if (jj_scan_token(MINUS)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_69() {
  +    if (jj_scan_token(NOT1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_60() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_69()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_70()) 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_55() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_60()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_61()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_62()) 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_96() {
  +    if (jj_scan_token(FALSE)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_43() {
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_55()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    if (jj_3R_56()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_95() {
  +    if (jj_scan_token(TRUE)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_89() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_95()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_96()) 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_85() {
  +    if (jj_3R_93()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_84() {
  +    if (jj_3R_92()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_83() {
  +    if (jj_3R_91()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_82() {
  +    if (jj_3R_90()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_28() {
  +    if (jj_scan_token(AND2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_81() {
  +    if (jj_3R_89()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_76() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_81()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_82()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_83()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_84()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_85()) 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;
  +    } 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_11() {
  +    if (jj_3R_14()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(COND)) 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;
       if (jj_scan_token(COLON)) 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_27() {
  +    if (jj_scan_token(AND1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_22() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_27()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_28()) 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_21()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_17() {
  +    if (jj_3R_21()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_22()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_68() {
  +    if (jj_scan_token(MODULUS2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_88() {
  +    if (jj_scan_token(LBRACKET)) 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;
  +    if (jj_scan_token(RBRACKET)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_66() {
  +    if (jj_scan_token(DIVIDE2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_67() {
  +    if (jj_scan_token(MODULUS1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_59() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_67()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_68()) 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_65() {
  +    if (jj_scan_token(DIVIDE1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_87() {
  +    if (jj_scan_token(DOT)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_13()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_58() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_65()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_66()) 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_57() {
  +    if (jj_scan_token(MULTIPLY)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_44() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_57()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_58()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_59()) 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;
  +    if (jj_3R_43()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_24() {
  +    if (jj_scan_token(OR2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_80() {
  +    if (jj_3R_88()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_33() {
  +    if (jj_3R_43()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_44()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_79() {
  +    if (jj_3R_87()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_75() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_79()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_80()) 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_23() {
  +    if (jj_scan_token(OR1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_18() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_23()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_24()) 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_17()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_14() {
  +    if (jj_3R_17()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_18()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_94() {
  +    if (jj_scan_token(COMMA)) 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_3_1() {
       if (jj_3R_11()) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_86() {
  +    if (jj_3R_15()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_94()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_20() {
  +    if (jj_3R_14()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_19() {
  +    if (jj_3R_11()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_46() {
  +    if (jj_scan_token(MINUS)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_15() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_19()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_20()) 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_45() {
  +    if (jj_scan_token(PLUS)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_34() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_45()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_46()) 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_33()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_77() {
  +    if (jj_3R_12()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       if (jj_scan_token(LPAREN)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_86()) jj_scanpos = xsp;
  +    else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(RPAREN)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_12() {
  +  final private boolean jj_3R_29() {
  +    if (jj_3R_33()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_34()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3_2() {
  +    if (jj_3R_12()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(LPAREN)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_78() {
       if (jj_scan_token(IDENTIFIER)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
   
  -  final private boolean jj_3R_11() {
  +  final private boolean jj_3R_74() {
  +    if (jj_3R_78()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_73() {
  +    if (jj_3R_77()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_72() {
  +    if (jj_scan_token(LPAREN)) 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;
  +    if (jj_scan_token(RPAREN)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_71() {
  +    if (jj_3R_76()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3_3() {
  +    if (jj_3R_13()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(COLON)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_63() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_71()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_72()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_73()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_74()) 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;
  +    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_54() {
  +    if (jj_scan_token(LE2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_52() {
  +    if (jj_scan_token(GE2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_50() {
  +    if (jj_scan_token(GT2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_48() {
  +    if (jj_scan_token(LT2)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_53() {
  +    if (jj_scan_token(LE1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_16() {
  +    if (jj_3R_13()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_scan_token(COLON)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_38() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    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;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_51() {
  +    if (jj_scan_token(GE1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_37() {
       Token xsp;
       xsp = jj_scanpos;
  -    if (jj_3R_13()) jj_scanpos = xsp;
  +    if (jj_3R_51()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_52()) 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_49() {
  +    if (jj_scan_token(GT1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_36() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_49()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_50()) 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_47() {
  +    if (jj_scan_token(LT1)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_35() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_47()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_48()) 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_12() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_16()) jj_scanpos = xsp;
       else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  -    if (jj_3R_12()) return true;
  +    if (jj_3R_13()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_30() {
  +    Token xsp;
  +    xsp = jj_scanpos;
  +    if (jj_3R_35()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_36()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_37()) {
  +    jj_scanpos = xsp;
  +    if (jj_3R_38()) 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;
  +    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    if (jj_3R_29()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_25() {
  +    if (jj_3R_29()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_30()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_64() {
  +    if (jj_3R_75()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_13() {
  +    if (jj_scan_token(IDENTIFIER)) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_56() {
  +    if (jj_3R_63()) return true;
  +    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    Token xsp;
  +    while (true) {
  +      xsp = jj_scanpos;
  +      if (jj_3R_64()) { jj_scanpos = xsp; break; }
  +      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
  +    }
  +    return false;
  +  }
  +
  +  final private boolean jj_3R_93() {
  +    if (jj_scan_token(NULL)) return true;
       if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
       return false;
     }
  @@ -919,10 +1690,10 @@
     public boolean lookingAhead = false;
     private boolean jj_semLA;
     private int jj_gen;
  -  final private int[] jj_la1 = new int[34];
  -  final private int[] jj_la1_0 = 
{0x6,0x6,0x6,0x0,0x0,0x0,0x0,0x18600000,0x600000,0x18000000,0x18600000,0x79e0000,0x180000,0x60000,0x6000000,0x1800000,0x79e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x20007580,0x0,0x80000000,0x20007580,0x10000,0x7580,0x3000,};
  -  final private int[] jj_la1_1 = 
{0x0,0x0,0x0,0xc000,0xc000,0x3000,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x18,0x3e0,0xc0,0x300,0x3e0,0x10c10,0xc00,0x10c10,0x2,0x0,0x20000,0x0,0x30c10,0x2,0x0,0x0,};
  -  final private JJCalls[] jj_2_rtns = new JJCalls[2];
  +  final private int[] jj_la1 = new int[35];
  +  final private int[] jj_la1_0 = 
{0x6,0x6,0x6,0x20007580,0x0,0x0,0x0,0x0,0x18600000,0x600000,0x18000000,0x18600000,0x79e0000,0x180000,0x60000,0x6000000,0x1800000,0x79e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x20007580,0x0,0x80000000,0x20007580,0x10000,0x7580,0x3000,};
  +  final private int[] jj_la1_1 = 
{0x0,0x0,0x0,0x50c10,0xc000,0xc000,0x3000,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x18,0x3e0,0xc0,0x300,0x3e0,0x10c10,0xc00,0x10c10,0x2,0x0,0x40000,0x0,0x50c10,0x2,0x0,0x0,};
  +  final private JJCalls[] jj_2_rtns = new JJCalls[3];
     private boolean jj_rescan = false;
     private int jj_gc = 0;
   
  @@ -932,7 +1703,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 34; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 35; i++) jj_la1[i] = -1;
       for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
     }
   
  @@ -942,7 +1713,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 34; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 35; i++) jj_la1[i] = -1;
       for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
     }
   
  @@ -952,7 +1723,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 34; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 35; i++) jj_la1[i] = -1;
       for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
     }
   
  @@ -962,7 +1733,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 34; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 35; i++) jj_la1[i] = -1;
       for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
     }
   
  @@ -971,7 +1742,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 34; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 35; i++) jj_la1[i] = -1;
       for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
     }
   
  @@ -980,7 +1751,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 34; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 35; i++) jj_la1[i] = -1;
       for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
     }
   
  @@ -1087,15 +1858,15 @@
   
     final public ParseException generateParseException() {
       jj_expentries.removeAllElements();
  -    boolean[] la1tokens = new boolean[54];
  -    for (int i = 0; i < 54; i++) {
  +    boolean[] la1tokens = new boolean[55];
  +    for (int i = 0; i < 55; i++) {
         la1tokens[i] = false;
       }
       if (jj_kind >= 0) {
         la1tokens[jj_kind] = true;
         jj_kind = -1;
       }
  -    for (int i = 0; i < 34; i++) {
  +    for (int i = 0; i < 35; i++) {
         if (jj_la1[i] == jj_gen) {
           for (int j = 0; j < 32; j++) {
             if ((jj_la1_0[i] & (1<<j)) != 0) {
  @@ -1107,7 +1878,7 @@
           }
         }
       }
  -    for (int i = 0; i < 54; i++) {
  +    for (int i = 0; i < 55; i++) {
         if (la1tokens[i]) {
           jj_expentry = new int[1];
           jj_expentry[0] = i;
  @@ -1132,7 +1903,7 @@
   
     final private void jj_rescan_token() {
       jj_rescan = true;
  -    for (int i = 0; i < 2; i++) {
  +    for (int i = 0; i < 3; i++) {
         JJCalls p = jj_2_rtns[i];
         do {
           if (p.gen > jj_gen) {
  @@ -1140,6 +1911,7 @@
             switch (i) {
               case 0: jj_3_1(); break;
               case 1: jj_3_2(); break;
  +            case 2: jj_3_3(); break;
             }
           }
           p = p.next;
  
  
  
  1.2       +7 -5      
jakarta-commons/el/src/java/org/apache/commons/el/parser/ELParserConstants.java
  
  Index: ELParserConstants.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/el/src/java/org/apache/commons/el/parser/ELParserConstants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ELParserConstants.java    4 Feb 2003 00:22:25 -0000       1.1
  +++ ELParserConstants.java    31 Mar 2003 01:17:07 -0000      1.2
  @@ -48,11 +48,12 @@
     int OR1 = 46;
     int OR2 = 47;
     int EMPTY = 48;
  -  int IDENTIFIER = 49;
  -  int IMPL_OBJ_START = 50;
  -  int LETTER = 51;
  -  int DIGIT = 52;
  -  int ILLEGAL_CHARACTER = 53;
  +  int COND = 49;
  +  int IDENTIFIER = 50;
  +  int IMPL_OBJ_START = 51;
  +  int LETTER = 52;
  +  int DIGIT = 53;
  +  int ILLEGAL_CHARACTER = 54;
   
     int DEFAULT = 0;
     int IN_EXPRESSION = 1;
  @@ -107,6 +108,7 @@
       "\"or\"",
       "\"||\"",
       "\"empty\"",
  +    "\"?\"",
       "<IDENTIFIER>",
       "\"#\"",
       "<LETTER>",
  
  
  
  1.2       +26 -23    
jakarta-commons/el/src/java/org/apache/commons/el/parser/ELParserTokenManager.java
  
  Index: ELParserTokenManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/el/src/java/org/apache/commons/el/parser/ELParserTokenManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ELParserTokenManager.java 4 Feb 2003 00:22:25 -0000       1.1
  +++ ELParserTokenManager.java 31 Mar 2003 01:17:07 -0000      1.2
  @@ -228,20 +228,20 @@
      switch (pos)
      {
         case 0:
  +         if ((active0 & 0x10000L) != 0L)
  +            return 1;
            if ((active0 & 0x1568015547000L) != 0L)
            {
  -            jjmatchedKind = 49;
  +            jjmatchedKind = 50;
               return 6;
            }
  -         if ((active0 & 0x10000L) != 0L)
  -            return 1;
            return -1;
         case 1:
            if ((active0 & 0x400015540000L) != 0L)
               return 6;
            if ((active0 & 0x1168000007000L) != 0L)
            {
  -            jjmatchedKind = 49;
  +            jjmatchedKind = 50;
               jjmatchedPos = 1;
               return 6;
            }
  @@ -251,20 +251,20 @@
               return 6;
            if ((active0 & 0x1000000007000L) != 0L)
            {
  -            jjmatchedKind = 49;
  +            jjmatchedKind = 50;
               jjmatchedPos = 2;
               return 6;
            }
            return -1;
         case 3:
  -         if ((active0 & 0x5000L) != 0L)
  -            return 6;
            if ((active0 & 0x1000000002000L) != 0L)
            {
  -            jjmatchedKind = 49;
  +            jjmatchedKind = 50;
               jjmatchedPos = 3;
               return 6;
            }
  +         if ((active0 & 0x5000L) != 0L)
  +            return 6;
            return -1;
         default :
            return -1;
  @@ -319,6 +319,8 @@
         case 62:
            jjmatchedKind = 17;
            return jjMoveStringLiteralDfa1_1(0x2000000L);
  +      case 63:
  +         return jjStopAtPos(0, 49);
         case 91:
            return jjStopAtPos(0, 33);
         case 93:
  @@ -551,8 +553,8 @@
                     }
                     else if ((0x1800000000L & l) != 0L)
                     {
  -                     if (kind > 49)
  -                        kind = 49;
  +                     if (kind > 50)
  +                        kind = 50;
                        jjCheckNAdd(6);
                     }
                     else if (curChar == 39)
  @@ -583,15 +585,15 @@
                  case 5:
                     if ((0x1800000000L & l) == 0L)
                        break;
  -                  if (kind > 49)
  -                     kind = 49;
  +                  if (kind > 50)
  +                     kind = 50;
                     jjCheckNAdd(6);
                     break;
                  case 6:
                     if ((0x3ff001000000000L & l) == 0L)
                        break;
  -                  if (kind > 49)
  -                     kind = 49;
  +                  if (kind > 50)
  +                     kind = 50;
                     jjCheckNAdd(6);
                     break;
                  case 7:
  @@ -715,8 +717,8 @@
                  case 6:
                     if ((0x7fffffe87fffffeL & l) == 0L)
                        break;
  -                  if (kind > 49)
  -                     kind = 49;
  +                  if (kind > 50)
  +                     kind = 50;
                     jjCheckNAdd(6);
                     break;
                  case 2:
  @@ -795,8 +797,8 @@
                  case 6:
                     if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                        break;
  -                  if (kind > 49)
  -                     kind = 49;
  +                  if (kind > 50)
  +                     kind = 50;
                     jjCheckNAdd(6);
                     break;
                  case 20:
  @@ -879,7 +881,8 @@
   "\74", "\154\164", "\75\75", "\145\161", "\74\75", "\154\145", "\76\75", 
"\147\145", 
   "\41\75", "\156\145", "\50", "\51", "\54", "\72", "\133", "\135", "\53", "\55", 
"\52", 
   "\57", "\144\151\166", "\45", "\155\157\144", "\156\157\164", "\41", 
"\141\156\144", 
  -"\46\46", "\157\162", "\174\174", "\145\155\160\164\171", null, null, null, null, 
null, };
  +"\46\46", "\157\162", "\174\174", "\145\155\160\164\171", "\77", null, null, null, 
null, 
  +null, };
   public static final String[] lexStateNames = {
      "DEFAULT", 
      "IN_EXPRESSION", 
  @@ -887,10 +890,10 @@
   public static final int[] jjnewLexState = {
      -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, 
      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, 
  -   -1, -1, -1, -1, 
  +   -1, -1, -1, -1, -1, 
   };
   static final long[] jjtoToken = {
  -   0x23fffffffffd87L, 
  +   0x47fffffffffd87L, 
   };
   static final long[] jjtoSkip = {
      0x78L, 
  @@ -994,9 +997,9 @@
          jjmatchedKind = 0x7fffffff;
          jjmatchedPos = 0;
          curPos = jjMoveStringLiteralDfa0_1();
  -       if (jjmatchedPos == 0 && jjmatchedKind > 53)
  +       if (jjmatchedPos == 0 && jjmatchedKind > 54)
          {
  -          jjmatchedKind = 53;
  +          jjmatchedKind = 54;
          }
          break;
      }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to