commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject svn commit: r584037 - in /commons/proper/jexl/trunk: src/java/org/apache/commons/jexl/parser/ src/test/org/apache/commons/jexl/ xdocs/reference/
Date Fri, 12 Oct 2007 03:35:23 GMT
Author: proyal
Date: Thu Oct 11 20:35:21 2007
New Revision: 584037

URL: http://svn.apache.org/viewvc?rev=584037&view=rev
Log:
Add syntax for creating array literals. Document that + map literals

Added:
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTArrayLiteral.java   (with props)
    commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ArrayLiteralTest.java   (with props)
Modified:
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParseException.java
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.java
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jj
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jjt
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTokenManager.java
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTreeConstants.java
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserVisitor.java
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleCharStream.java
    commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/TokenMgrError.java
    commons/proper/jexl/trunk/xdocs/reference/syntax.xml

Added: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTArrayLiteral.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTArrayLiteral.java?rev=584037&view=auto
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTArrayLiteral.java (added)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTArrayLiteral.java Thu Oct 11 20:35:21 2007
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.jexl.parser;
+
+import org.apache.commons.jexl.JexlContext;
+
+public class ASTArrayLiteral extends SimpleNode {
+    public ASTArrayLiteral( int id ) {
+        super( id );
+    }
+
+    public ASTArrayLiteral( Parser p, int id ) {
+        super( p, id );
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept( ParserVisitor visitor, Object data ) {
+        return visitor.visit( this, data );
+    }
+
+    public Object value( JexlContext context ) throws Exception {
+        int childCount = jjtGetNumChildren();
+        Object[] array = new Object[childCount];
+
+        for ( int i = 0; i < childCount; i++ ) {
+            array[i] = ( (SimpleNode) jjtGetChild( i ) ).value( context );
+        }
+
+        return array;
+    }
+}

Propchange: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTArrayLiteral.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParseException.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParseException.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParseException.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParseException.java Thu Oct 11 20:35:21 2007
@@ -43,7 +43,8 @@
   public ParseException(Token currentTokenVal,
                         int[][] expectedTokenSequencesVal,
                         String[] tokenImageVal
-                       ) {
+                       )
+  {
     super("");
     specialConstructor = true;
     currentToken = currentTokenVal;
@@ -113,19 +114,19 @@
     if (!specialConstructor) {
       return super.getMessage();
     }
-    String expected = "";
+    StringBuffer expected = new StringBuffer();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
       if (maxSize < expectedTokenSequences[i].length) {
         maxSize = expectedTokenSequences[i].length;
       }
       for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected += tokenImage[expectedTokenSequences[i][j]] + " ";
+        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" ");
       }
       if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected += "...";
+        expected.append("...");
       }
-      expected += eol + "    ";
+      expected.append(eol).append("    ");
     }
     String retval = "Encountered \"";
     Token tok = currentToken.next;
@@ -136,7 +137,7 @@
         break;
       }
       retval += add_escapes(tok.image);
-      tok = tok.next; 
+      tok = tok.next;
     }
     retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
     retval += "." + eol;
@@ -145,7 +146,7 @@
     } else {
       retval += "Was expecting one of:" + eol + "    ";
     }
-    retval += expected;
+    retval += expected.toString();
     return retval;
   }
 
@@ -153,7 +154,7 @@
    * The end of line string for this machine.
    */
   protected String eol = System.getProperty("line.separator", "\n");
- 
+
   /**
    * Used to convert raw characters to their escaped version
    * when these raw version cannot be used as part of an ASCII

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.java Thu Oct 11 20:35:21 2007
@@ -18,6 +18,7 @@
 package org.apache.commons.jexl.parser;
 
 import java.io.Reader;
+import java.io.ByteArrayInputStream;
 
 import org.apache.commons.jexl.util.introspection.Uberspect;
 
@@ -56,7 +57,7 @@
  /*@bgen(jjtree) JexlScript */
    ASTJexlScript jjtn000 = new ASTJexlScript(this, JJTJEXLSCRIPT);
    boolean jjtc000 = true;
-   jjtree.openNodeScope(jjtn000);
+   jjtree.openNodeScope(jjtn000);String name;
     try {
       label_1:
       while (true) {
@@ -1394,19 +1395,28 @@
         case 14:
           SizeFunction();
           break;
-        case 54:
-          MapLiteral();
-          break;
         default:
           jj_la1[21] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
+          if (jj_2_3(3)) {
+            ArrayLiteral();
+          } else {
+            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+            case 54:
+              MapLiteral();
+              break;
+            default:
+              jj_la1[22] = jj_gen;
+              jj_consume_token(-1);
+              throw new ParseException();
+            }
+          }
         }
       }
     }
   }
 
   final public void Literal() throws ParseException {
+   Token t;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case INTEGER_LITERAL:
       IntegerLiteral();
@@ -1425,7 +1435,7 @@
       NullLiteral();
       break;
     default:
-      jj_la1[22] = jj_gen;
+      jj_la1[23] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -1472,7 +1482,7 @@
       }
       break;
     default:
-      jj_la1[23] = jj_gen;
+      jj_la1[24] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -1538,12 +1548,12 @@
       jj_consume_token(48);
       break;
     default:
-      jj_la1[24] = jj_gen;
-      if (jj_2_3(3)) {
+      jj_la1[25] = jj_gen;
+      if (jj_2_4(3)) {
         Block();
-      } else if (jj_2_4(2147483647)) {
-        ReferenceExpression();
       } else if (jj_2_5(2147483647)) {
+        ReferenceExpression();
+      } else if (jj_2_6(2147483647)) {
         StatementExpression();
       } else {
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1574,7 +1584,7 @@
           WhileStatement();
           break;
         default:
-          jj_la1[25] = jj_gen;
+          jj_la1[26] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
@@ -1686,7 +1696,7 @@
         Statement();
         break;
       default:
-        jj_la1[26] = jj_gen;
+        jj_la1[27] = jj_gen;
         ;
       }
     } catch (Throwable jjte000) {
@@ -1791,7 +1801,7 @@
           ;
           break;
         default:
-          jj_la1[27] = jj_gen;
+          jj_la1[28] = jj_gen;
           break label_12;
         }
         jj_consume_token(55);
@@ -1819,6 +1829,49 @@
     }
   }
 
+  final public void ArrayLiteral() throws ParseException {
+                       /*@bgen(jjtree) ArrayLiteral */
+  ASTArrayLiteral jjtn000 = new ASTArrayLiteral(this, JJTARRAYLITERAL);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+    try {
+      jj_consume_token(54);
+      Parameter();
+      label_13:
+      while (true) {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case 55:
+          ;
+          break;
+        default:
+          jj_la1[29] = jj_gen;
+          break label_13;
+        }
+        jj_consume_token(55);
+        Parameter();
+      }
+      jj_consume_token(56);
+    } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      {if (true) throw (RuntimeException)jjte000;}
+    }
+    if (jjte000 instanceof ParseException) {
+      {if (true) throw (ParseException)jjte000;}
+    }
+    {if (true) throw (Error)jjte000;}
+    } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+    }
+  }
+
   final public void MapEntry() throws ParseException {
                    /*@bgen(jjtree) MapEntry */
   ASTMapEntry jjtn000 = new ASTMapEntry(this, JJTMAPENTRY);
@@ -1874,22 +1927,22 @@
       case IDENTIFIER:
       case STRING_LITERAL:
         Parameter();
-        label_13:
+        label_14:
         while (true) {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
           case 55:
             ;
             break;
           default:
-            jj_la1[28] = jj_gen;
-            break label_13;
+            jj_la1[30] = jj_gen;
+            break label_14;
           }
           jj_consume_token(55);
           Parameter();
         }
         break;
       default:
-        jj_la1[29] = jj_gen;
+        jj_la1[31] = jj_gen;
         ;
       }
       jj_consume_token(13);
@@ -1921,10 +1974,10 @@
   jjtree.openNodeScope(jjtn000);
     try {
       Identifier();
-      label_14:
+      label_15:
       while (true) {
         jj_consume_token(54);
-        if (jj_2_6(3)) {
+        if (jj_2_7(3)) {
           Expression();
         } else {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1936,7 +1989,7 @@
             Reference();
             break;
           default:
-            jj_la1[30] = jj_gen;
+            jj_la1[32] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
@@ -1947,8 +2000,8 @@
           ;
           break;
         default:
-          jj_la1[31] = jj_gen;
-          break label_14;
+          jj_la1[33] = jj_gen;
+          break label_15;
         }
       }
     } catch (Throwable jjte000) {
@@ -1994,38 +2047,46 @@
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
     try {
-      if (jj_2_7(2147483647)) {
+      if (jj_2_8(2147483647)) {
         ArrayAccess();
       } else {
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
         case IDENTIFIER:
           Identifier();
           break;
-        case 54:
-          MapLiteral();
-          break;
         default:
-          jj_la1[32] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
+          jj_la1[34] = jj_gen;
+          if (jj_2_9(3)) {
+            MapLiteral();
+          } else {
+            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+            case 54:
+              ArrayLiteral();
+              break;
+            default:
+              jj_la1[35] = jj_gen;
+              jj_consume_token(-1);
+              throw new ParseException();
+            }
+          }
         }
       }
-      label_15:
+      label_16:
       while (true) {
-        if (jj_2_8(2)) {
+        if (jj_2_10(2)) {
           ;
         } else {
-          break label_15;
+          break label_16;
         }
         jj_consume_token(58);
-        if (jj_2_10(2147483647)) {
+        if (jj_2_12(2147483647)) {
           ArrayAccess();
         } else {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
           case INTEGER_LITERAL:
           case 14:
           case IDENTIFIER:
-            if (jj_2_9(3)) {
+            if (jj_2_11(3)) {
               Method();
             } else {
               switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2039,14 +2100,14 @@
                 IntegerLiteral();
                 break;
               default:
-                jj_la1[33] = jj_gen;
+                jj_la1[36] = jj_gen;
                 jj_consume_token(-1);
                 throw new ParseException();
               }
             }
             break;
           default:
-            jj_la1[34] = jj_gen;
+            jj_la1[37] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
@@ -2074,7 +2135,7 @@
   }
 
   final public void Parameter() throws ParseException {
-    if (jj_2_11(3)) {
+    if (jj_2_13(3)) {
       Expression();
     } else {
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2091,7 +2152,7 @@
         Reference();
         break;
       default:
-        jj_la1[35] = jj_gen;
+        jj_la1[38] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -2175,55 +2236,49 @@
     finally { jj_save(10, xla); }
   }
 
-  final private boolean jj_3R_66() {
-    if (jj_3R_82()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_95() {
-    if (jj_scan_token(20)) return true;
-    if (jj_3R_94()) return true;
-    return false;
+  final private boolean jj_2_12(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_12(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(11, xla); }
   }
 
-  final private boolean jj_3_3() {
-    if (jj_3R_18()) return true;
-    return false;
+  final private boolean jj_2_13(int xla) {
+    jj_la = xla; jj_lastpos = jj_scanpos = token;
+    try { return !jj_3_13(); }
+    catch(LookaheadSuccess ls) { return true; }
+    finally { jj_save(12, xla); }
   }
 
-  final private boolean jj_3R_37() {
-    if (jj_3R_50()) return true;
+  final private boolean jj_3_4() {
+    if (jj_3R_20()) return true;
     return false;
   }
 
-  final private boolean jj_3R_88() {
-    if (jj_3R_94()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_95()) { jj_scanpos = xsp; break; }
-    }
+  final private boolean jj_3R_98() {
+    if (jj_scan_token(20)) return true;
+    if (jj_3R_97()) return true;
     return false;
   }
 
-  final private boolean jj_3R_51() {
+  final private boolean jj_3R_58() {
     Token xsp;
     xsp = jj_scanpos;
     if (jj_scan_token(48)) {
     jj_scanpos = xsp;
-    if (jj_3_3()) {
+    if (jj_3_4()) {
     jj_scanpos = xsp;
-    if (jj_3R_66()) {
+    if (jj_3R_71()) {
     jj_scanpos = xsp;
-    if (jj_3R_67()) {
+    if (jj_3R_72()) {
     jj_scanpos = xsp;
-    if (jj_3R_68()) {
+    if (jj_3R_73()) {
     jj_scanpos = xsp;
-    if (jj_3R_69()) {
+    if (jj_3R_74()) {
     jj_scanpos = xsp;
-    if (jj_3R_70()) {
+    if (jj_3R_75()) {
     jj_scanpos = xsp;
-    if (jj_3R_71()) return true;
+    if (jj_3R_76()) return true;
     }
     }
     }
@@ -2234,355 +2289,434 @@
     return false;
   }
 
-  final private boolean jj_3R_97() {
+  final private boolean jj_3R_91() {
+    if (jj_3R_97()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_98()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_100() {
     if (jj_scan_token(19)) return true;
-    if (jj_3R_88()) return true;
+    if (jj_3R_91()) return true;
     return false;
   }
 
-  final private boolean jj_3R_96() {
+  final private boolean jj_3R_99() {
     if (jj_scan_token(18)) return true;
-    if (jj_3R_88()) return true;
+    if (jj_3R_91()) return true;
     return false;
   }
 
-  final private boolean jj_3R_89() {
+  final private boolean jj_3R_92() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_96()) {
+    if (jj_3R_99()) {
     jj_scanpos = xsp;
-    if (jj_3R_97()) return true;
+    if (jj_3R_100()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_72() {
-    if (jj_3R_88()) return true;
+  final private boolean jj_3R_77() {
+    if (jj_3R_91()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_89()) { jj_scanpos = xsp; break; }
+      if (jj_3R_92()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_36() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_81() {
+    if (jj_scan_token(STRING_LITERAL)) return true;
     return false;
   }
 
-  final private boolean jj_3R_91() {
+  final private boolean jj_3R_94() {
     if (jj_scan_token(17)) return true;
-    if (jj_3R_72()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_78() {
-    if (jj_scan_token(STRING_LITERAL)) return true;
+    if (jj_3R_77()) return true;
     return false;
   }
 
-  final private boolean jj_3R_90() {
+  final private boolean jj_3R_93() {
     if (jj_scan_token(16)) return true;
-    if (jj_3R_72()) return true;
+    if (jj_3R_77()) return true;
     return false;
   }
 
-  final private boolean jj_3R_73() {
+  final private boolean jj_3R_78() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_90()) {
+    if (jj_3R_93()) {
     jj_scanpos = xsp;
-    if (jj_3R_91()) return true;
+    if (jj_3R_94()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_53() {
-    if (jj_3R_72()) return true;
+  final private boolean jj_3R_60() {
+    if (jj_3R_77()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_73()) { jj_scanpos = xsp; break; }
+      if (jj_3R_78()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3_1() {
-    if (jj_3R_16()) return true;
-    if (jj_scan_token(15)) return true;
+  final private boolean jj_3R_32() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3R_52() {
-    if (jj_3R_16()) return true;
+  final private boolean jj_3R_79() {
+    if (jj_scan_token(FLOAT_LITERAL)) return true;
+    return false;
+  }
+
+  final private boolean jj_3_1() {
+    if (jj_3R_17()) return true;
     if (jj_scan_token(15)) return true;
-    if (jj_3R_19()) return true;
     return false;
   }
 
-  final private boolean jj_3R_76() {
-    if (jj_scan_token(FLOAT_LITERAL)) return true;
+  final private boolean jj_3R_59() {
+    if (jj_3R_17()) return true;
+    if (jj_scan_token(15)) return true;
+    if (jj_3R_21()) return true;
     return false;
   }
 
-  final private boolean jj_3R_40() {
-    if (jj_3R_53()) return true;
+  final private boolean jj_3R_51() {
+    if (jj_3R_46()) return true;
     return false;
   }
 
-  final private boolean jj_3R_39() {
-    if (jj_3R_52()) return true;
+  final private boolean jj_3R_45() {
+    if (jj_3R_60()) return true;
     return false;
   }
 
-  final private boolean jj_3R_19() {
+  final private boolean jj_3R_21() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_39()) {
+    if (jj_3R_44()) {
     jj_scanpos = xsp;
-    if (jj_3R_40()) return true;
+    if (jj_3R_45()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_41() {
+  final private boolean jj_3R_44() {
+    if (jj_3R_59()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_46() {
     if (jj_scan_token(INTEGER_LITERAL)) return true;
     return false;
   }
 
-  final private boolean jj_3R_29() {
-    if (jj_3R_17()) return true;
+  final private boolean jj_3R_25() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3R_62() {
-    if (jj_scan_token(12)) return true;
-    if (jj_3R_17()) return true;
-    if (jj_scan_token(13)) return true;
+  final private boolean jj_3R_57() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3R_45() {
-    if (jj_3R_41()) return true;
+  final private boolean jj_3R_31() {
+    if (jj_3R_46()) return true;
     return false;
   }
 
-  final private boolean jj_3R_20() {
-    if (jj_scan_token(IDENTIFIER)) return true;
+  final private boolean jj_3R_84() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3R_23() {
-    if (jj_3R_17()) return true;
+  final private boolean jj_3R_68() {
+    if (jj_scan_token(12)) return true;
+    if (jj_3R_18()) return true;
+    if (jj_scan_token(13)) return true;
     return false;
   }
 
-  final private boolean jj_3R_93() {
+  final private boolean jj_3R_96() {
     if (jj_scan_token(47)) return true;
     return false;
   }
 
-  final private boolean jj_3R_92() {
+  final private boolean jj_3R_50() {
+    if (jj_3R_22()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_95() {
     if (jj_scan_token(46)) return true;
     return false;
   }
 
-  final private boolean jj_3R_77() {
+  final private boolean jj_3R_80() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_92()) {
+    if (jj_3R_95()) {
     jj_scanpos = xsp;
-    if (jj_3R_93()) return true;
+    if (jj_3R_96()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_81() {
-    if (jj_3R_17()) return true;
+  final private boolean jj_3R_22() {
+    if (jj_scan_token(IDENTIFIER)) return true;
     return false;
   }
 
-  final private boolean jj_3R_79() {
+  final private boolean jj_3R_82() {
     if (jj_scan_token(45)) return true;
     return false;
   }
 
-  final private boolean jj_3R_49() {
+  final private boolean jj_3R_56() {
+    if (jj_3R_53()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_55() {
     if (jj_scan_token(14)) return true;
     if (jj_scan_token(12)) return true;
-    if (jj_3R_17()) return true;
+    if (jj_3R_18()) return true;
     if (jj_scan_token(13)) return true;
     return false;
   }
 
-  final private boolean jj_3R_75() {
-    if (jj_3R_17()) return true;
+  final private boolean jj_3R_67() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3R_61() {
-    if (jj_3R_17()) return true;
+  final private boolean jj_3R_66() {
+    if (jj_3R_82()) return true;
     return false;
   }
 
-  final private boolean jj_3R_28() {
-    if (jj_3R_41()) return true;
+  final private boolean jj_3R_30() {
+    if (jj_3R_21()) return true;
     return false;
   }
 
-  final private boolean jj_3R_48() {
+  final private boolean jj_3R_24() {
+    if (jj_3R_46()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_65() {
+    if (jj_3R_81()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_54() {
     if (jj_scan_token(11)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_61()) {
+    if (jj_3R_67()) {
     jj_scanpos = xsp;
-    if (jj_3R_62()) return true;
+    if (jj_3R_68()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_60() {
-    if (jj_3R_79()) return true;
+  final private boolean jj_3R_49() {
+    if (jj_3R_61()) return true;
     return false;
   }
 
-  final private boolean jj_3R_38() {
-    if (jj_3R_51()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_44() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_43() {
+    if (jj_3R_58()) return true;
     return false;
   }
 
-  final private boolean jj_3R_59() {
-    if (jj_3R_78()) return true;
+  final private boolean jj_3R_64() {
+    if (jj_3R_80()) return true;
     return false;
   }
 
-  final private boolean jj_3R_58() {
-    if (jj_3R_77()) return true;
+  final private boolean jj_3R_83() {
+    if (jj_3R_46()) return true;
     return false;
   }
 
-  final private boolean jj_3R_22() {
-    if (jj_3R_41()) return true;
+  final private boolean jj_3R_63() {
+    if (jj_3R_79()) return true;
     return false;
   }
 
-  final private boolean jj_3R_57() {
-    if (jj_3R_76()) return true;
+  final private boolean jj_3R_53() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_62()) {
+    jj_scanpos = xsp;
+    if (jj_3R_63()) {
+    jj_scanpos = xsp;
+    if (jj_3R_64()) {
+    jj_scanpos = xsp;
+    if (jj_3R_65()) {
+    jj_scanpos = xsp;
+    if (jj_3R_66()) return true;
+    }
+    }
+    }
+    }
     return false;
   }
 
-  final private boolean jj_3R_74() {
-    if (jj_3R_47()) return true;
+  final private boolean jj_3R_62() {
+    if (jj_3R_46()) return true;
     return false;
   }
 
-  final private boolean jj_3R_18() {
+  final private boolean jj_3R_20() {
     if (jj_scan_token(9)) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_38()) { jj_scanpos = xsp; break; }
+      if (jj_3R_43()) { jj_scanpos = xsp; break; }
     }
     if (jj_scan_token(10)) return true;
     return false;
   }
 
-  final private boolean jj_3R_47() {
+  final private boolean jj_3R_23() {
+    if (jj_3R_21()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_37() {
+    if (jj_3R_26()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_12() {
+    if (jj_3R_22()) return true;
+    if (jj_scan_token(54)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_56()) {
-    jj_scanpos = xsp;
-    if (jj_3R_57()) {
-    jj_scanpos = xsp;
-    if (jj_3R_58()) {
+    if (jj_3R_30()) {
     jj_scanpos = xsp;
-    if (jj_3R_59()) {
+    if (jj_3R_31()) {
     jj_scanpos = xsp;
-    if (jj_3R_60()) return true;
-    }
-    }
+    if (jj_3R_32()) return true;
     }
     }
+    if (jj_scan_token(56)) return true;
     return false;
   }
 
-  final private boolean jj_3R_56() {
-    if (jj_3R_41()) return true;
+  final private boolean jj_3_3() {
+    if (jj_3R_19()) return true;
     return false;
   }
 
-  final private boolean jj_3R_80() {
-    if (jj_3R_41()) return true;
+  final private boolean jj_3R_36() {
+    if (jj_3R_55()) return true;
     return false;
   }
 
-  final private boolean jj_3R_27() {
-    if (jj_3R_19()) return true;
+  final private boolean jj_3_13() {
+    if (jj_3R_21()) return true;
     return false;
   }
 
-  final private boolean jj_3R_43() {
+  final private boolean jj_3R_41() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_13()) {
+    jj_scanpos = xsp;
+    if (jj_3R_56()) {
+    jj_scanpos = xsp;
+    if (jj_3R_57()) return true;
+    }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_35() {
     if (jj_3R_54()) return true;
     return false;
   }
 
   final private boolean jj_3R_34() {
-    if (jj_3R_50()) return true;
+    if (jj_scan_token(12)) return true;
+    if (jj_3R_21()) return true;
+    if (jj_scan_token(13)) return true;
     return false;
   }
 
-  final private boolean jj_3R_33() {
-    if (jj_3R_49()) return true;
+  final private boolean jj_3R_101() {
+    if (jj_scan_token(55)) return true;
+    if (jj_3R_41()) return true;
     return false;
   }
 
-  final private boolean jj_3R_21() {
-    if (jj_3R_19()) return true;
+  final private boolean jj_3_11() {
+    if (jj_3R_29()) return true;
     return false;
   }
 
-  final private boolean jj_3R_32() {
-    if (jj_3R_48()) return true;
+  final private boolean jj_3R_28() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3_11()) {
+    jj_scanpos = xsp;
+    if (jj_3R_49()) {
+    jj_scanpos = xsp;
+    if (jj_3R_50()) {
+    jj_scanpos = xsp;
+    if (jj_3R_51()) return true;
+    }
+    }
+    }
     return false;
   }
 
-  final private boolean jj_3R_31() {
-    if (jj_scan_token(12)) return true;
-    if (jj_3R_19()) return true;
-    if (jj_scan_token(13)) return true;
+  final private boolean jj_3_2() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3_2() {
-    if (jj_3R_17()) return true;
+  final private boolean jj_3R_27() {
+    if (jj_3R_48()) return true;
     return false;
   }
 
-  final private boolean jj_3R_30() {
-    if (jj_3R_47()) return true;
+  final private boolean jj_3R_33() {
+    if (jj_3R_53()) return true;
     return false;
   }
 
-  final private boolean jj_3R_16() {
+  final private boolean jj_3R_17() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_30()) {
+    if (jj_3R_33()) {
     jj_scanpos = xsp;
     if (jj_3_2()) {
     jj_scanpos = xsp;
-    if (jj_3R_31()) {
+    if (jj_3R_34()) {
     jj_scanpos = xsp;
-    if (jj_3R_32()) {
+    if (jj_3R_35()) {
     jj_scanpos = xsp;
-    if (jj_3R_33()) {
+    if (jj_3R_36()) {
+    jj_scanpos = xsp;
+    if (jj_3_3()) {
     jj_scanpos = xsp;
-    if (jj_3R_34()) return true;
+    if (jj_3R_37()) return true;
+    }
     }
     }
     }
@@ -2591,129 +2725,131 @@
     return false;
   }
 
-  final private boolean jj_3R_98() {
-    if (jj_scan_token(55)) return true;
-    if (jj_3R_55()) return true;
+  final private boolean jj_3_7() {
+    if (jj_3R_21()) return true;
     return false;
   }
 
-  final private boolean jj_3_10() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_40() {
+    if (jj_3R_19()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_8() {
+    if (jj_3R_22()) return true;
     if (jj_scan_token(54)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_27()) {
+    if (jj_3R_23()) {
     jj_scanpos = xsp;
-    if (jj_3R_28()) {
+    if (jj_3R_24()) {
     jj_scanpos = xsp;
-    if (jj_3R_29()) return true;
+    if (jj_3R_25()) return true;
     }
     }
     if (jj_scan_token(56)) return true;
     return false;
   }
 
-  final private boolean jj_3R_129() {
-    if (jj_3R_16()) return true;
-    return false;
-  }
-
-  final private boolean jj_3_11() {
-    if (jj_3R_19()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_55() {
+  final private boolean jj_3_10() {
+    if (jj_scan_token(58)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3_11()) {
-    jj_scanpos = xsp;
-    if (jj_3R_74()) {
+    if (jj_3R_27()) {
     jj_scanpos = xsp;
-    if (jj_3R_75()) return true;
-    }
+    if (jj_3R_28()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_128() {
-    if (jj_scan_token(44)) return true;
-    if (jj_3R_121()) return true;
+  final private boolean jj_3_9() {
+    if (jj_3R_26()) return true;
     return false;
   }
 
-  final private boolean jj_3R_127() {
-    if (jj_scan_token(43)) return true;
-    if (jj_3R_121()) return true;
+  final private boolean jj_3R_132() {
+    if (jj_3R_17()) return true;
     return false;
   }
 
-  final private boolean jj_3_6() {
-    if (jj_3R_19()) return true;
+  final private boolean jj_3R_39() {
+    if (jj_3R_22()) return true;
     return false;
   }
 
-  final private boolean jj_3_7() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_131() {
+    if (jj_scan_token(44)) return true;
+    if (jj_3R_124()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_70() {
     if (jj_scan_token(54)) return true;
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_21()) {
+    if (jj_3_7()) {
     jj_scanpos = xsp;
-    if (jj_3R_22()) {
+    if (jj_3R_83()) {
     jj_scanpos = xsp;
-    if (jj_3R_23()) return true;
+    if (jj_3R_84()) return true;
     }
     }
     if (jj_scan_token(56)) return true;
     return false;
   }
 
-  final private boolean jj_3R_126() {
+  final private boolean jj_3R_130() {
+    if (jj_scan_token(43)) return true;
+    if (jj_3R_124()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_52() {
+    if (jj_3R_41()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_101()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_129() {
     if (jj_scan_token(42)) return true;
-    if (jj_3R_121()) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3_9() {
-    if (jj_3R_26()) return true;
+  final private boolean jj_3R_38() {
+    if (jj_3R_48()) return true;
     return false;
   }
 
-  final private boolean jj_3R_25() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3_9()) {
-    jj_scanpos = xsp;
-    if (jj_3R_43()) {
-    jj_scanpos = xsp;
-    if (jj_3R_44()) {
-    jj_scanpos = xsp;
-    if (jj_3R_45()) return true;
-    }
-    }
-    }
+  final private boolean jj_3R_61() {
+    if (jj_scan_token(14)) return true;
+    if (jj_scan_token(12)) return true;
+    if (jj_scan_token(13)) return true;
     return false;
   }
 
-  final private boolean jj_3R_125() {
+  final private boolean jj_3R_128() {
     if (jj_scan_token(36)) return true;
-    if (jj_3R_121()) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3R_121() {
+  final private boolean jj_3R_124() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_125()) {
+    if (jj_3R_128()) {
     jj_scanpos = xsp;
-    if (jj_3R_126()) {
+    if (jj_3R_129()) {
     jj_scanpos = xsp;
-    if (jj_3R_127()) {
+    if (jj_3R_130()) {
     jj_scanpos = xsp;
-    if (jj_3R_128()) {
+    if (jj_3R_131()) {
     jj_scanpos = xsp;
-    if (jj_3R_129()) return true;
+    if (jj_3R_132()) return true;
     }
     }
     }
@@ -2721,118 +2857,91 @@
     return false;
   }
 
-  final private boolean jj_3R_24() {
-    if (jj_3R_42()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_65() {
-    if (jj_scan_token(54)) return true;
+  final private boolean jj_3R_18() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3_6()) {
+    if (jj_3R_38()) {
+    jj_scanpos = xsp;
+    if (jj_3R_39()) {
     jj_scanpos = xsp;
-    if (jj_3R_80()) {
+    if (jj_3_9()) {
     jj_scanpos = xsp;
-    if (jj_3R_81()) return true;
+    if (jj_3R_40()) return true;
+    }
     }
     }
-    if (jj_scan_token(56)) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_46() {
-    if (jj_3R_55()) return true;
-    Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_98()) { jj_scanpos = xsp; break; }
+      if (jj_3_10()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_134() {
+  final private boolean jj_3R_137() {
     if (jj_scan_token(41)) return true;
-    if (jj_3R_121()) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3_8() {
-    if (jj_scan_token(58)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_24()) {
-    jj_scanpos = xsp;
-    if (jj_3R_25()) return true;
-    }
+  final private boolean jj_3R_42() {
+    if (jj_scan_token(55)) return true;
+    if (jj_3R_41()) return true;
     return false;
   }
 
-  final private boolean jj_3R_133() {
+  final private boolean jj_3R_136() {
     if (jj_scan_token(40)) return true;
-    if (jj_3R_121()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_35() {
-    if (jj_3R_42()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_54() {
-    if (jj_scan_token(14)) return true;
-    if (jj_scan_token(12)) return true;
-    if (jj_scan_token(13)) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3R_17() {
+  final private boolean jj_3R_48() {
+    if (jj_3R_22()) return true;
     Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_35()) {
-    jj_scanpos = xsp;
-    if (jj_3R_36()) {
-    jj_scanpos = xsp;
-    if (jj_3R_37()) return true;
-    }
-    }
+    if (jj_3R_70()) return true;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3_8()) { jj_scanpos = xsp; break; }
+      if (jj_3R_70()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_132() {
+  final private boolean jj_3R_135() {
     if (jj_scan_token(39)) return true;
-    if (jj_3R_121()) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3R_131() {
+  final private boolean jj_3R_134() {
     if (jj_scan_token(38)) return true;
-    if (jj_3R_121()) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3R_130() {
+  final private boolean jj_3R_69() {
+    if (jj_scan_token(55)) return true;
+    if (jj_3R_47()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_133() {
     if (jj_scan_token(37)) return true;
-    if (jj_3R_121()) return true;
+    if (jj_3R_124()) return true;
     return false;
   }
 
-  final private boolean jj_3R_122() {
+  final private boolean jj_3R_125() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_130()) {
+    if (jj_3R_133()) {
     jj_scanpos = xsp;
-    if (jj_3R_131()) {
+    if (jj_3R_134()) {
     jj_scanpos = xsp;
-    if (jj_3R_132()) {
+    if (jj_3R_135()) {
     jj_scanpos = xsp;
-    if (jj_3R_133()) {
+    if (jj_3R_136()) {
     jj_scanpos = xsp;
-    if (jj_3R_134()) return true;
+    if (jj_3R_137()) return true;
     }
     }
     }
@@ -2840,163 +2949,152 @@
     return false;
   }
 
-  final private boolean jj_3R_64() {
-    if (jj_scan_token(55)) return true;
-    if (jj_3R_63()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_42() {
-    if (jj_3R_20()) return true;
+  final private boolean jj_3R_29() {
+    if (jj_3R_22()) return true;
+    if (jj_scan_token(12)) return true;
     Token xsp;
-    if (jj_3R_65()) return true;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_65()) { jj_scanpos = xsp; break; }
-    }
+    xsp = jj_scanpos;
+    if (jj_3R_52()) jj_scanpos = xsp;
+    if (jj_scan_token(13)) return true;
     return false;
   }
 
-  final private boolean jj_3R_111() {
-    if (jj_3R_121()) return true;
+  final private boolean jj_3R_114() {
+    if (jj_3R_124()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_122()) { jj_scanpos = xsp; break; }
+      if (jj_3R_125()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_124() {
-    if (jj_scan_token(36)) return true;
-    if (jj_3R_111()) return true;
+  final private boolean jj_3R_47() {
+    if (jj_3R_41()) return true;
+    if (jj_scan_token(57)) return true;
+    if (jj_3R_41()) return true;
     return false;
   }
 
-  final private boolean jj_3R_26() {
-    if (jj_3R_20()) return true;
-    if (jj_scan_token(12)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_46()) jj_scanpos = xsp;
-    if (jj_scan_token(13)) return true;
+  final private boolean jj_3R_127() {
+    if (jj_scan_token(36)) return true;
+    if (jj_3R_114()) return true;
     return false;
   }
 
-  final private boolean jj_3R_123() {
+  final private boolean jj_3R_126() {
     if (jj_scan_token(35)) return true;
-    if (jj_3R_111()) return true;
+    if (jj_3R_114()) return true;
     return false;
   }
 
-  final private boolean jj_3R_112() {
+  final private boolean jj_3R_115() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_123()) {
+    if (jj_3R_126()) {
     jj_scanpos = xsp;
-    if (jj_3R_124()) return true;
+    if (jj_3R_127()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_63() {
-    if (jj_3R_55()) return true;
-    if (jj_scan_token(57)) return true;
-    if (jj_3R_55()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_105() {
-    if (jj_3R_111()) return true;
+  final private boolean jj_3R_19() {
+    if (jj_scan_token(54)) return true;
+    if (jj_3R_41()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_112()) { jj_scanpos = xsp; break; }
+      if (jj_3R_42()) { jj_scanpos = xsp; break; }
     }
+    if (jj_scan_token(56)) return true;
     return false;
   }
 
-  final private boolean jj_3R_120() {
-    if (jj_scan_token(34)) return true;
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_108() {
+    if (jj_3R_114()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_115()) { jj_scanpos = xsp; break; }
+    }
     return false;
   }
 
-  final private boolean jj_3R_50() {
+  final private boolean jj_3R_26() {
     if (jj_scan_token(54)) return true;
-    if (jj_3R_63()) return true;
+    if (jj_3R_47()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_64()) { jj_scanpos = xsp; break; }
+      if (jj_3R_69()) { jj_scanpos = xsp; break; }
     }
     if (jj_scan_token(56)) return true;
     return false;
   }
 
-  final private boolean jj_3R_119() {
-    if (jj_scan_token(33)) return true;
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_123() {
+    if (jj_scan_token(34)) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_118() {
-    if (jj_scan_token(32)) return true;
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_122() {
+    if (jj_scan_token(33)) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_86() {
+  final private boolean jj_3R_89() {
     if (jj_scan_token(52)) return true;
     if (jj_scan_token(12)) return true;
     return false;
   }
 
-  final private boolean jj_3R_117() {
-    if (jj_scan_token(31)) return true;
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_121() {
+    if (jj_scan_token(32)) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_116() {
-    if (jj_scan_token(30)) return true;
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_120() {
+    if (jj_scan_token(31)) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_115() {
-    if (jj_scan_token(29)) return true;
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_119() {
+    if (jj_scan_token(30)) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_87() {
+  final private boolean jj_3R_90() {
     if (jj_scan_token(51)) return true;
     if (jj_scan_token(12)) return true;
     return false;
   }
 
-  final private boolean jj_3R_114() {
+  final private boolean jj_3R_118() {
+    if (jj_scan_token(29)) return true;
+    if (jj_3R_108()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_117() {
     if (jj_scan_token(28)) return true;
-    if (jj_3R_105()) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_113() {
+  final private boolean jj_3R_116() {
     if (jj_scan_token(27)) return true;
-    if (jj_3R_105()) return true;
+    if (jj_3R_108()) return true;
     return false;
   }
 
-  final private boolean jj_3R_106() {
+  final private boolean jj_3R_109() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_113()) {
-    jj_scanpos = xsp;
-    if (jj_3R_114()) {
-    jj_scanpos = xsp;
-    if (jj_3R_115()) {
-    jj_scanpos = xsp;
     if (jj_3R_116()) {
     jj_scanpos = xsp;
     if (jj_3R_117()) {
@@ -3005,7 +3103,13 @@
     jj_scanpos = xsp;
     if (jj_3R_119()) {
     jj_scanpos = xsp;
-    if (jj_3R_120()) return true;
+    if (jj_3R_120()) {
+    jj_scanpos = xsp;
+    if (jj_3R_121()) {
+    jj_scanpos = xsp;
+    if (jj_3R_122()) {
+    jj_scanpos = xsp;
+    if (jj_3R_123()) return true;
     }
     }
     }
@@ -3016,158 +3120,163 @@
     return false;
   }
 
-  final private boolean jj_3R_103() {
-    if (jj_3R_105()) return true;
+  final private boolean jj_3R_88() {
+    if (jj_scan_token(49)) return true;
+    if (jj_scan_token(12)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_106() {
+    if (jj_3R_108()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_106()) { jj_scanpos = xsp; break; }
+      if (jj_3R_109()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
   final private boolean jj_3R_85() {
-    if (jj_scan_token(49)) return true;
-    if (jj_scan_token(12)) return true;
+    if (jj_3R_18()) return true;
+    if (jj_scan_token(48)) return true;
     return false;
   }
 
-  final private boolean jj_3R_110() {
+  final private boolean jj_3R_113() {
     if (jj_scan_token(26)) return true;
-    if (jj_3R_103()) return true;
+    if (jj_3R_106()) return true;
     return false;
   }
 
-  final private boolean jj_3R_82() {
-    if (jj_3R_17()) return true;
-    if (jj_scan_token(48)) return true;
+  final private boolean jj_3R_112() {
+    if (jj_scan_token(25)) return true;
+    if (jj_3R_106()) return true;
     return false;
   }
 
-  final private boolean jj_3R_109() {
-    if (jj_scan_token(25)) return true;
-    if (jj_3R_103()) return true;
+  final private boolean jj_3R_86() {
+    if (jj_3R_59()) return true;
     return false;
   }
 
-  final private boolean jj_3R_108() {
+  final private boolean jj_3R_111() {
     if (jj_scan_token(24)) return true;
-    if (jj_3R_103()) return true;
+    if (jj_3R_106()) return true;
     return false;
   }
 
-  final private boolean jj_3R_107() {
+  final private boolean jj_3R_110() {
     if (jj_scan_token(23)) return true;
-    if (jj_3R_103()) return true;
+    if (jj_3R_106()) return true;
     return false;
   }
 
-  final private boolean jj_3R_104() {
+  final private boolean jj_3R_107() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_107()) {
+    if (jj_3R_110()) {
     jj_scanpos = xsp;
-    if (jj_3R_108()) {
+    if (jj_3R_111()) {
     jj_scanpos = xsp;
-    if (jj_3R_109()) {
+    if (jj_3R_112()) {
     jj_scanpos = xsp;
-    if (jj_3R_110()) return true;
+    if (jj_3R_113()) return true;
     }
     }
     }
     return false;
   }
 
-  final private boolean jj_3R_83() {
-    if (jj_3R_52()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_84() {
-    if (jj_3R_19()) return true;
+  final private boolean jj_3R_87() {
+    if (jj_3R_21()) return true;
     if (jj_scan_token(48)) return true;
     return false;
   }
 
-  final private boolean jj_3R_101() {
-    if (jj_3R_103()) return true;
+  final private boolean jj_3R_104() {
+    if (jj_3R_106()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_104()) { jj_scanpos = xsp; break; }
+      if (jj_3R_107()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3_5() {
-    if (jj_3R_16()) return true;
+  final private boolean jj_3_6() {
+    if (jj_3R_17()) return true;
     if (jj_scan_token(15)) return true;
     return false;
   }
 
-  final private boolean jj_3R_102() {
-    if (jj_scan_token(22)) return true;
-    if (jj_3R_101()) return true;
+  final private boolean jj_3_5() {
+    if (jj_3R_18()) return true;
+    if (jj_scan_token(48)) return true;
     return false;
   }
 
-  final private boolean jj_3_4() {
-    if (jj_3R_17()) return true;
-    if (jj_scan_token(48)) return true;
+  final private boolean jj_3R_76() {
+    if (jj_3R_90()) return true;
     return false;
   }
 
-  final private boolean jj_3R_71() {
-    if (jj_3R_87()) return true;
+  final private boolean jj_3R_105() {
+    if (jj_scan_token(22)) return true;
+    if (jj_3R_104()) return true;
     return false;
   }
 
-  final private boolean jj_3R_99() {
-    if (jj_3R_101()) return true;
+  final private boolean jj_3R_75() {
+    if (jj_3R_89()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_102() {
+    if (jj_3R_104()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_102()) { jj_scanpos = xsp; break; }
+      if (jj_3R_105()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_70() {
-    if (jj_3R_86()) return true;
+  final private boolean jj_3R_74() {
+    if (jj_3R_88()) return true;
     return false;
   }
 
-  final private boolean jj_3R_69() {
-    if (jj_3R_85()) return true;
+  final private boolean jj_3R_73() {
+    if (jj_3R_87()) return true;
     return false;
   }
 
-  final private boolean jj_3R_100() {
+  final private boolean jj_3R_103() {
     if (jj_scan_token(21)) return true;
-    if (jj_3R_99()) return true;
+    if (jj_3R_102()) return true;
     return false;
   }
 
-  final private boolean jj_3R_68() {
-    if (jj_3R_84()) return true;
+  final private boolean jj_3R_72() {
+    if (jj_3R_86()) return true;
     return false;
   }
 
-  final private boolean jj_3R_94() {
-    if (jj_3R_99()) return true;
+  final private boolean jj_3R_71() {
+    if (jj_3R_85()) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_97() {
+    if (jj_3R_102()) return true;
     Token xsp;
     while (true) {
       xsp = jj_scanpos;
-      if (jj_3R_100()) { jj_scanpos = xsp; break; }
+      if (jj_3R_103()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_67() {
-    if (jj_3R_83()) return true;
-    return false;
-  }
-
   public ParserTokenManager token_source;
   SimpleCharStream jj_input_stream;
   public Token token, jj_nt;
@@ -3175,8 +3284,9 @@
   private Token jj_scanpos, jj_lastpos;
   private int jj_la;
   public boolean lookingAhead = false;
+  private boolean jj_semLA;
   private int jj_gen;
-  final private int[] jj_la1 = new int[36];
+  final private int[] jj_la1 = new int[39];
   static private int[] jj_la1_0;
   static private int[] jj_la1_1;
   static {
@@ -3184,33 +3294,39 @@
       jj_la1_1();
    }
    private static void jj_la1_0() {
-      jj_la1_0 = new int[] {0x5b80,0x5b80,0x1000,0x5980,0x30000,0x30000,0xc0000,0xc0000,0x100000,0x200000,0x400000,0x7800000,0x7800000,0xf8000000,0xf8000000,0x0,0x0,0x0,0x0,0x5980,0x180,0x5800,0x180,0x0,0x0,0x5980,0x0,0x0,0x0,0x5980,0x80,0x0,0x0,0x4080,0x4080,0x180,};
+      jj_la1_0 = new int[] {0x5b80,0x5b80,0x1000,0x5980,0x30000,0x30000,0xc0000,0xc0000,0x100000,0x200000,0x400000,0x7800000,0x7800000,0xf8000000,0xf8000000,0x0,0x0,0x0,0x0,0x5980,0x180,0x5800,0x0,0x180,0x0,0x0,0x5980,0x0,0x0,0x0,0x0,0x5980,0x80,0x0,0x0,0x0,0x4080,0x4080,0x180,};
    }
    private static void jj_la1_1() {
-      jj_la1_1 = new int[] {0x485bfc10,0x485bfc10,0x8400000,0x4840fc10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x7,0x18,0x18,0x3e0,0x3e0,0x4840fc10,0x4000e000,0x400000,0x4000e000,0xc000,0x10000,0x485afc10,0x40000,0x800000,0x800000,0x4840fc10,0x8400000,0x400000,0x8400000,0x8000000,0x8000000,0x4840e000,};
+      jj_la1_1 = new int[] {0x485bfc10,0x485bfc10,0x8400000,0x4840fc10,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7,0x7,0x18,0x18,0x3e0,0x3e0,0x4840fc10,0x4000e000,0x0,0x400000,0x4000e000,0xc000,0x10000,0x485afc10,0x40000,0x800000,0x800000,0x800000,0x4840fc10,0x8400000,0x400000,0x8000000,0x400000,0x8000000,0x8000000,0x4840e000,};
    }
-  final private JJCalls[] jj_2_rtns = new JJCalls[11];
+  final private JJCalls[] jj_2_rtns = new JJCalls[13];
   private boolean jj_rescan = false;
   private int jj_gc = 0;
 
   public Parser(java.io.InputStream stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
+     this(stream, null);
+  }
+  public Parser(java.io.InputStream stream, String encoding) {
+    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source = new ParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 36; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 39; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
   public void ReInit(java.io.InputStream stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
+     ReInit(stream, null);
+  }
+  public void ReInit(java.io.InputStream stream, String encoding) {
+    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source.ReInit(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jjtree.reset();
     jj_gen = 0;
-    for (int i = 0; i < 36; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 39; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -3220,7 +3336,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 36; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 39; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -3231,7 +3347,7 @@
     jj_ntk = -1;
     jjtree.reset();
     jj_gen = 0;
-    for (int i = 0; i < 36; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 39; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -3240,7 +3356,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 36; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 39; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -3250,7 +3366,7 @@
     jj_ntk = -1;
     jjtree.reset();
     jj_gen = 0;
-    for (int i = 0; i < 36; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 39; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -3369,7 +3485,7 @@
       la1tokens[jj_kind] = true;
       jj_kind = -1;
     }
-    for (int i = 0; i < 36; i++) {
+    for (int i = 0; i < 39; i++) {
       if (jj_la1[i] == jj_gen) {
         for (int j = 0; j < 32; j++) {
           if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -3406,7 +3522,8 @@
 
   final private void jj_rescan_token() {
     jj_rescan = true;
-    for (int i = 0; i < 11; i++) {
+    for (int i = 0; i < 13; i++) {
+    try {
       JJCalls p = jj_2_rtns[i];
       do {
         if (p.gen > jj_gen) {
@@ -3423,10 +3540,13 @@
             case 8: jj_3_9(); break;
             case 9: jj_3_10(); break;
             case 10: jj_3_11(); break;
+            case 11: jj_3_12(); break;
+            case 12: jj_3_13(); break;
           }
         }
         p = p.next;
       } while (p != null);
+      } catch(LookaheadSuccess ls) { }
     }
     jj_rescan = false;
   }

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jj
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jj?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jj (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jj Thu Oct 11 20:35:21 2007
@@ -1,4 +1,4 @@
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. Parser.jj */
+/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. ./Parser.jj */
 /*@egen*//*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -1283,6 +1283,9 @@
 |
   SizeFunction()
 |
+  LOOKAHEAD(3)
+  ArrayLiteral()
+|
   MapLiteral()
 }
 
@@ -1690,6 +1693,37 @@
 /*@egen*/
 }
 
+void ArrayLiteral() : {/*@bgen(jjtree) ArrayLiteral */
+  ASTArrayLiteral jjtn000 = new ASTArrayLiteral(this, JJTARRAYLITERAL);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) ArrayLiteral */
+  try {
+/*@egen*/
+  "["  Parameter() ( "," Parameter() )* "]"/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
 void MapEntry() : {/*@bgen(jjtree) MapEntry */
   ASTMapEntry jjtn000 = new ASTMapEntry(this, JJTMAPENTRY);
   boolean jjtc000 = true;
@@ -1808,11 +1842,19 @@
 {/*@bgen(jjtree) Reference */
   try {
 /*@egen*/
-  (LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]") ArrayAccess() | Identifier() | MapLiteral())
+  (LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]")
+      ArrayAccess()
+    |
+      Identifier()
+    |
+      LOOKAHEAD(3)
+      MapLiteral()
+    |
+      ArrayLiteral()
+  )
   (LOOKAHEAD(2) "."
     (
       LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]") ArrayAccess() |
-//      (LOOKAHEAD(3) Method() | Identifier() |  IntegerLiteral() )
       (LOOKAHEAD(3) Method() | SizeMethod() | Identifier() |  IntegerLiteral() )
 
     )

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jjt?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jjt (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Parser.jjt Thu Oct 11 20:35:21 2007
@@ -294,6 +294,9 @@
 |
   SizeFunction()
 |
+  LOOKAHEAD(3)
+  ArrayLiteral()
+|
   MapLiteral()
 }
 
@@ -430,6 +433,11 @@
   "["  MapEntry() ( "," MapEntry() )* "]"
 }
 
+void ArrayLiteral() : {}
+{
+  "["  Parameter() ( "," Parameter() )* "]"
+}
+
 void MapEntry() : {}
 {
     Parameter() "=>" Parameter()
@@ -452,7 +460,16 @@
 
 void Reference() : {}
 {
-  (LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]") ArrayAccess() | Identifier() | MapLiteral())
+  (LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]")
+      ArrayAccess()
+    |
+      Identifier()
+    |
+      LOOKAHEAD(3)
+      MapLiteral()
+    |
+      ArrayLiteral()
+  )
   (LOOKAHEAD(2) "."
     (
       LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]") ArrayAccess() |

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTokenManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTokenManager.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTokenManager.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTokenManager.java Thu Oct 11 20:35:21 2007
@@ -16,7 +16,6 @@
  */
  /* Generated By:JJTree&JavaCC: Do not edit this line. ParserTokenManager.java */
 package org.apache.commons.jexl.parser;
-
 public class ParserTokenManager implements ParserConstants
 {
   public  java.io.PrintStream debugStream = System.out;
@@ -269,7 +268,7 @@
 private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(0, old0); 
+      return jjStartNfa_0(0, old0);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(1, active0);
@@ -313,7 +312,7 @@
 private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(1, old0); 
+      return jjStartNfa_0(1, old0);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(2, active0);
@@ -345,7 +344,7 @@
 private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(2, old0); 
+      return jjStartNfa_0(2, old0);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(3, active0);
@@ -373,7 +372,7 @@
 private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(3, old0); 
+      return jjStartNfa_0(3, old0);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(4, active0);
@@ -391,7 +390,7 @@
 private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(4, old0); 
+      return jjStartNfa_0(4, old0);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(5, active0);
@@ -635,7 +634,7 @@
    }
 }
 static final int[] jjnextStates = {
-   13, 14, 15, 1, 2, 7, 8, 10, 11, 
+   13, 14, 15, 1, 2, 7, 8, 10, 11,
 };
 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
 {
@@ -643,42 +642,40 @@
    {
       case 0:
          return ((jjbitVec2[i2] & l2) != 0L);
-      default : 
+      default :
          if ((jjbitVec0[i1] & l1) != 0L)
             return true;
          return false;
    }
 }
 public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, "\173", "\175", 
-"\145\155\160\164\171", "\50", "\51", "\163\151\172\145", "\75", "\174\174", "\157\162", "\46\46", 
-"\141\156\144", "\174", "\136", "\46", "\75\75", "\145\161", "\41\75", "\156\145", "\74", 
-"\154\164", "\76", "\147\164", "\74\75", "\154\145", "\76\75", "\147\145", "\53", "\55", 
-"\52", "\57", "\144\151\166", "\45", "\155\157\144", "\176", "\41", "\156\157\164", 
-"\156\165\154\154", "\164\162\165\145", "\146\141\154\163\145", "\73", "\151\146", 
-"\145\154\163\145", "\167\150\151\154\145", "\146\157\162\145\141\143\150", "\151\156", "\133", 
+"", null, null, null, null, null, null, null, null, "\173", "\175",
+"\145\155\160\164\171", "\50", "\51", "\163\151\172\145", "\75", "\174\174", "\157\162", "\46\46",
+"\141\156\144", "\174", "\136", "\46", "\75\75", "\145\161", "\41\75", "\156\145", "\74",
+"\154\164", "\76", "\147\164", "\74\75", "\154\145", "\76\75", "\147\145", "\53", "\55",
+"\52", "\57", "\144\151\166", "\45", "\155\157\144", "\176", "\41", "\156\157\164",
+"\156\165\154\154", "\164\162\165\145", "\146\141\154\163\145", "\73", "\151\146",
+"\145\154\163\145", "\167\150\151\154\145", "\146\157\162\145\141\143\150", "\151\156", "\133",
 "\54", "\135", "\75\76", "\56", null, null, null, null, };
 public static final String[] lexStateNames = {
-   "DEFAULT", 
+   "DEFAULT",
 };
 static final long[] jjtoToken = {
-   0x4fffffffffffff81L, 
+   0x4fffffffffffff81L,
 };
 static final long[] jjtoSkip = {
-   0x7eL, 
+   0x7eL,
 };
 protected SimpleCharStream input_stream;
 private final int[] jjrounds = new int[17];
 private final int[] jjstateSet = new int[34];
 protected char curChar;
-public ParserTokenManager(SimpleCharStream stream)
-{
+public ParserTokenManager(SimpleCharStream stream){
    if (SimpleCharStream.staticFlag)
       throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
    input_stream = stream;
 }
-public ParserTokenManager(SimpleCharStream stream, int lexState)
-{
+public ParserTokenManager(SimpleCharStream stream, int lexState){
    this(stream);
    SwitchTo(lexState);
 }
@@ -729,7 +726,7 @@
 int jjmatchedPos;
 int jjmatchedKind;
 
-public Token getNextToken() 
+public Token getNextToken()
 {
   int kind;
   Token specialToken = null;
@@ -738,13 +735,13 @@
 
   EOFLoop :
   for (;;)
-  {   
-   try   
-   {     
+  {
+   try
+   {
       curChar = input_stream.BeginToken();
-   }     
+   }
    catch(java.io.IOException e)
-   {        
+   {
       jjmatchedKind = 0;
       matchedToken = jjFillToken();
       return matchedToken;

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTreeConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTreeConstants.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTreeConstants.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserTreeConstants.java Thu Oct 11 20:35:21 2007
@@ -60,11 +60,12 @@
   public int JJTWHILESTATEMENT = 37;
   public int JJTFOREACHSTATEMENT = 38;
   public int JJTMAPLITERAL = 39;
-  public int JJTMAPENTRY = 40;
-  public int JJTMETHOD = 41;
-  public int JJTARRAYACCESS = 42;
-  public int JJTSIZEMETHOD = 43;
-  public int JJTREFERENCE = 44;
+  public int JJTARRAYLITERAL = 40;
+  public int JJTMAPENTRY = 41;
+  public int JJTMETHOD = 42;
+  public int JJTARRAYACCESS = 43;
+  public int JJTSIZEMETHOD = 44;
+  public int JJTREFERENCE = 45;
 
 
   public String[] jjtNodeName = {
@@ -108,6 +109,7 @@
     "WhileStatement",
     "ForeachStatement",
     "MapLiteral",
+    "ArrayLiteral",
     "MapEntry",
     "Method",
     "ArrayAccess",

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserVisitor.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserVisitor.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ParserVisitor.java Thu Oct 11 20:35:21 2007
@@ -60,6 +60,7 @@
   public Object visit(ASTWhileStatement node, Object data);
   public Object visit(ASTForeachStatement node, Object data);
   public Object visit(ASTMapLiteral node, Object data);
+  public Object visit(ASTArrayLiteral node, Object data);
   public Object visit(ASTMapEntry node, Object data);
   public Object visit(ASTMethod node, Object data);
   public Object visit(ASTArrayAccess node, Object data);

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleCharStream.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleCharStream.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleCharStream.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleCharStream.java Thu Oct 11 20:35:21 2007
@@ -43,6 +43,11 @@
   protected char[] buffer;
   protected int maxNextCharInd = 0;
   protected int inBuf = 0;
+  protected int tabSize = 8;
+
+  protected void setTabSize(int i) { tabSize = i; }
+  protected int getTabSize(int i) { return tabSize; }
+
 
   protected void ExpandBuff(boolean wrapAround)
   {
@@ -178,7 +183,7 @@
            break;
         case '\t' :
            column--;
-           column += (8 - (column & 07));
+           column += (tabSize - (column % tabSize));
            break;
         default :
            break;
@@ -210,7 +215,7 @@
   }
 
   /**
-   * @deprecated 
+   * @deprecated
    * @see #getEndColumn
    */
 
@@ -219,7 +224,7 @@
   }
 
   /**
-   * @deprecated 
+   * @deprecated
    * @see #getEndLine
    */
 
@@ -264,7 +269,7 @@
   }
 
   public SimpleCharStream(java.io.Reader dstream, int startline,
-                                                           int startcolumn)
+                          int startcolumn)
   {
      this(dstream, startline, startcolumn, 4096);
   }
@@ -293,7 +298,7 @@
   }
 
   public void ReInit(java.io.Reader dstream, int startline,
-                                                           int startcolumn)
+                     int startcolumn)
   {
      ReInit(dstream, startline, startcolumn, 4096);
   }
@@ -302,35 +307,68 @@
   {
      ReInit(dstream, 1, 1, 4096);
   }
+  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
+  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
+  {
+     this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+  }
+
   public SimpleCharStream(java.io.InputStream dstream, int startline,
   int startcolumn, int buffersize)
   {
-     this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+     this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+  }
+
+  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
+                          int startcolumn) throws java.io.UnsupportedEncodingException
+  {
+     this(dstream, encoding, startline, startcolumn, 4096);
   }
 
   public SimpleCharStream(java.io.InputStream dstream, int startline,
-                                                           int startcolumn)
+                          int startcolumn)
   {
      this(dstream, startline, startcolumn, 4096);
   }
 
+  public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
+  {
+     this(dstream, encoding, 1, 1, 4096);
+  }
+
   public SimpleCharStream(java.io.InputStream dstream)
   {
      this(dstream, 1, 1, 4096);
   }
 
+  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
+                          int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
+  {
+     ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+  }
+
   public void ReInit(java.io.InputStream dstream, int startline,
                           int startcolumn, int buffersize)
   {
-     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+  }
+
+  public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
+  {
+     ReInit(dstream, encoding, 1, 1, 4096);
   }
 
   public void ReInit(java.io.InputStream dstream)
   {
      ReInit(dstream, 1, 1, 4096);
   }
+  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
+                     int startcolumn) throws java.io.UnsupportedEncodingException
+  {
+     ReInit(dstream, encoding, startline, startcolumn, 4096);
+  }
   public void ReInit(java.io.InputStream dstream, int startline,
-                                                           int startcolumn)
+                     int startcolumn)
   {
      ReInit(dstream, startline, startcolumn, 4096);
   }
@@ -394,7 +432,7 @@
         bufcolumn[j] = newCol + columnDiff;
         columnDiff = nextColDiff;
         i++;
-     } 
+     }
 
      if (i < len)
      {

Modified: commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/TokenMgrError.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/TokenMgrError.java?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/TokenMgrError.java (original)
+++ commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/TokenMgrError.java Thu Oct 11 20:35:21 2007
@@ -101,7 +101,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
@@ -121,7 +121,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 .... "
     *

Added: commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ArrayLiteralTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ArrayLiteralTest.java?rev=584037&view=auto
==============================================================================
--- commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ArrayLiteralTest.java (added)
+++ commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ArrayLiteralTest.java Thu Oct 11 20:35:21 2007
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.jexl;
+
+import java.util.Arrays;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests Array map literals
+ *
+ * @author Peter Royal
+ * @since 1.2
+ */
+public class ArrayLiteralTest extends TestCase {
+
+    public void testLiteralWithStrings() throws Exception {
+        Expression e = ExpressionFactory.createExpression( "[ 'foo', 'bar' ]" );
+        JexlContext jc = JexlHelper.createContext();
+
+        Object o = e.evaluate( jc );
+        assertNotNull( o );
+        assertTrue( o.getClass().isArray() );
+        assertArrayEquals( new Object[]{ "foo", "bar" }, (Object[]) o );
+    }
+
+    private void assertArrayEquals( Object[] expected, Object[] actual ) {
+        assertTrue( "expected:" + Arrays.asList( expected ) + " but was:" + Arrays.asList( actual ),
+                    Arrays.equals( expected, actual ) );
+    }
+
+    public void testLiteralWithNumbers() throws Exception {
+        Expression e = ExpressionFactory.createExpression( "[ 5, 10 ]" );
+        JexlContext jc = JexlHelper.createContext();
+
+        Object o = e.evaluate( jc );
+        assertNotNull( o );
+        assertTrue( o.getClass().isArray() );
+        assertArrayEquals( new Object[]{ new Integer( 5 ), new Integer( 10 ) }, (Object[]) o );
+    }
+
+    public void testSizeOfSimpleArrayLiteral() throws Exception {
+        Expression e = ExpressionFactory.createExpression( "size([ 'foo' ])" );
+        JexlContext jc = JexlHelper.createContext();
+
+        Object o = e.evaluate( jc );
+        assertEquals( new Integer( 1 ), o );
+    }
+
+    public void testNotEmptySimpleMapLiteral() throws Exception {
+        Expression e = ExpressionFactory.createExpression( "empty([ 'foo' ])" );
+        JexlContext jc = JexlHelper.createContext();
+
+        Object o = e.evaluate( jc );
+        assertFalse( ( (Boolean) o ).booleanValue() );
+    }
+
+}

Propchange: commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ArrayLiteralTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/jexl/trunk/xdocs/reference/syntax.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/xdocs/reference/syntax.xml?rev=584037&r1=584036&r2=584037&view=diff
==============================================================================
--- commons/proper/jexl/trunk/xdocs/reference/syntax.xml (original)
+++ commons/proper/jexl/trunk/xdocs/reference/syntax.xml Thu Oct 11 20:35:21 2007
@@ -6,9 +6,9 @@
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
-  
+
         http://www.apache.org/licenses/LICENSE-2.0
-  
+
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -103,7 +103,7 @@
           <td>
             1 or more digits from <code>0</code> to <code>9</code>, followed
             by a decimal point and then one or more digits from
-            <code>0</code> to <code>9</code>. 
+            <code>0</code> to <code>9</code>.
           </td>
         </tr>
         <tr>
@@ -128,6 +128,20 @@
             <source>val1 == null</source>
           </td>
         </tr>
+        <tr>
+          <td>Map literal</td>
+          <td>
+            You can construct a <code>java.util.HashMap</code> by using <source>[ key => value, key => value ]</source>.
+              <code>key</code> and <code>value</code> can be any valid expression.
+          </td>
+        </tr>
+        <tr>
+          <td>Array literal</td>
+          <td>
+            You can construct an <code>Object[]</code> array by using <source>[ item, item, item ]</source>.
+              <code>item</code> can be be any valid expression.
+          </td>
+        </tr>
       </table>
     </section>
     <section name="Functions">
@@ -193,7 +207,7 @@
         <tr>
           <td>Bitwise <code>and</code></td>
           <td>
-            The usual <code>&amp;</code> operator is used, e.g. 
+            The usual <code>&amp;</code> operator is used, e.g.
             <source>33 &amp; 4</source>, 0010 0001 &amp; 0000 0100 = 0.
           </td>
         </tr>
@@ -222,7 +236,7 @@
           <td>Equality</td>
           <td>
             The usual <code>==</code> operator can be used as well as the abbreviation <code>eq</code>.
-            For example 
+            For example
             <source>val1 == val2</source> and
             <source>val1 eq val2</source> are equivalent.
             <ol>
@@ -375,4 +389,4 @@
 
   </body>
 </document>
-    
+



Mime
View raw message