geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r787519 [1/2] - in /geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser: ELParser.html ELParser.java ELParser.jjt ELParserConstants.java ELParserTokenManager.java
Date Tue, 23 Jun 2009 02:34:50 GMT
Author: xuhaihong
Date: Tue Jun 23 02:34:50 2009
New Revision: 787519

URL: http://svn.apache.org/viewvc?rev=787519&view=rev
Log:
Apply the extra patch for ELParser, for it caused much JSP parse error

Modified:
    geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.html
    geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.java
    geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.jjt
    geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParserConstants.java
    geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParserTokenManager.java

Modified: geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.html
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.html?rev=787519&r1=787518&r2=787519&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.html
(original)
+++ geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.html
Tue Jun 23 02:34:50 2009
@@ -51,7 +51,7 @@
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod6">Choice</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod7">Or</A> ( &lt;QUESTIONMARK&gt;
<A HREF="#prod6">Choice</A> &lt;COLON&gt; <A HREF="#prod6">Choice</A>
)*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod7">Or</A> ( &lt;QUESTIONMARK&gt;
<A HREF="#prod7">Or</A> &lt;COLON&gt; <A HREF="#prod6">Choice</A>
)*</TD>
 </TR>
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod7">Or</A></TD>

Modified: geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.java?rev=787519&r1=787518&r2=787519&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.java
(original)
+++ geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.java
Tue Jun 23 02:34:50 2009
@@ -27,6 +27,15 @@
                 throw new ELException(pe.getMessage());
         }
     }
+  
+  public static void main(String[] argv) throws Exception {
+	  String[] str = { "${foo()}", "${fn.fn:foo() ? a : b}", "${fn:foo() ? (fn_af.f:fd() ? a
: b) : b}", "${a.b.c ? a : b}" };
+		for (int i = 0; i < str.length; i++) {
+			SimpleNode sn = (SimpleNode) ELParser.parse(str[i]);
+			System.out.println("====\n" + str[i]);
+			sn.dump("\t");
+		}
+  }
 
 /*
  * CompositeExpression
@@ -207,31 +216,31 @@
         break label_2;
       }
       jj_consume_token(QUESTIONMARK);
-      Choice();
+      Or();
       jj_consume_token(COLON);
-                                                AstChoice jjtn001 = new AstChoice(JJTCHOICE);
-                                                boolean jjtc001 = true;
-                                                jjtree.openNodeScope(jjtn001);
+                                            AstChoice jjtn001 = new AstChoice(JJTCHOICE);
+                                            boolean jjtc001 = true;
+                                            jjtree.openNodeScope(jjtn001);
       try {
         Choice();
       } catch (Throwable jjte001) {
-                                                if (jjtc001) {
-                                                  jjtree.clearNodeScope(jjtn001);
-                                                  jjtc001 = false;
-                                                } else {
-                                                  jjtree.popNode();
-                                                }
-                                                if (jjte001 instanceof RuntimeException)
{
-                                                  {if (true) throw (RuntimeException)jjte001;}
-                                                }
-                                                if (jjte001 instanceof ParseException) {
-                                                  {if (true) throw (ParseException)jjte001;}
-                                                }
-                                                {if (true) throw (Error)jjte001;}
+                                            if (jjtc001) {
+                                              jjtree.clearNodeScope(jjtn001);
+                                              jjtc001 = false;
+                                            } else {
+                                              jjtree.popNode();
+                                            }
+                                            if (jjte001 instanceof RuntimeException) {
+                                              {if (true) throw (RuntimeException)jjte001;}
+                                            }
+                                            if (jjte001 instanceof ParseException) {
+                                              {if (true) throw (ParseException)jjte001;}
+                                            }
+                                            {if (true) throw (Error)jjte001;}
       } finally {
-                                                if (jjtc001) {
-                                                  jjtree.closeNodeScope(jjtn001,  3);
-                                                }
+                                            if (jjtc001) {
+                                              jjtree.closeNodeScope(jjtn001,  3);
+                                            }
       }
     }
   }
@@ -963,7 +972,7 @@
     case NULL:
     case LPAREN:
     case IDENTIFIER:
-    case FUNCTION_CALL:
+    case NAMESPACE:
       Value();
       break;
     default:
@@ -1033,7 +1042,7 @@
       break;
     case LPAREN:
     case IDENTIFIER:
-    case FUNCTION_CALL:
+    case NAMESPACE:
       NonLiteral();
       break;
     default:
@@ -1176,9 +1185,25 @@
  /*@bgen(jjtree) Function */
         AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
         boolean jjtc000 = true;
-        jjtree.openNodeScope(jjtn000);Token tx = null;
+        jjtree.openNodeScope(jjtn000);Token t0 = null;
+        Token t1 = null;
     try {
-      tx = jj_consume_token(FUNCTION_CALL);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case NAMESPACE:
+        t0 = jj_consume_token(NAMESPACE);
+        break;
+      default:
+        jj_la1[30] = jj_gen;
+        ;
+      }
+      t1 = jj_consume_token(IDENTIFIER);
+                if (t0 != null) {
+                        jjtn000.setPrefix(t0.image.substring(0, t0.image.length() - 1));
+                        jjtn000.setLocalName(t1.image);
+                } else {
+                        jjtn000.setLocalName(t1.image);
+                }
+      jj_consume_token(LPAREN);
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case INTEGER_LITERAL:
       case FLOATING_POINT_LITERAL:
@@ -1192,7 +1217,7 @@
       case EMPTY:
       case MINUS:
       case IDENTIFIER:
-      case FUNCTION_CALL:
+      case NAMESPACE:
         Expression();
         label_10:
         while (true) {
@@ -1201,7 +1226,7 @@
             ;
             break;
           default:
-            jj_la1[30] = jj_gen;
+            jj_la1[31] = jj_gen;
             break label_10;
           }
           jj_consume_token(COMMA);
@@ -1209,19 +1234,10 @@
         }
         break;
       default:
-        jj_la1[31] = jj_gen;
+        jj_la1[32] = jj_gen;
         ;
       }
       jj_consume_token(RPAREN);
-          jjtree.closeNodeScope(jjtn000, true);
-          jjtc000 = false;
-                int split = tx.image.indexOf(":");
-                if (split!=-1) {
-                        jjtn000.setPrefix(tx.image.substring(0, split));
-                        jjtn000.setLocalName(tx.image.substring(split + 1, tx.image.length()
- 1));
-                } else {
-                        jjtn000.setLocalName(tx.image.substring(0, tx.image.length() - 1));
-                }
     } catch (Throwable jjte000) {
           if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
@@ -1266,7 +1282,7 @@
       Null();
       break;
     default:
-      jj_la1[32] = jj_gen;
+      jj_la1[33] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -1303,7 +1319,7 @@
       }
       break;
     default:
-      jj_la1[33] = jj_gen;
+      jj_la1[34] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -1398,61 +1414,34 @@
   }
 
   final private boolean jj_3R_11() {
-    if (jj_scan_token(FUNCTION_CALL)) return true;
     Token xsp;
     xsp = jj_scanpos;
+    if (jj_scan_token(54)) jj_scanpos = xsp;
+    if (jj_scan_token(IDENTIFIER)) return true;
+    if (jj_scan_token(LPAREN)) return true;
+    xsp = jj_scanpos;
     if (jj_3R_12()) jj_scanpos = xsp;
     if (jj_scan_token(RPAREN)) return true;
     return false;
   }
 
-  final private boolean jj_3R_28() {
-    if (jj_3R_34()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_35()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_37() {
-    if (jj_scan_token(MINUS)) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_29() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_36()) {
-    jj_scanpos = xsp;
-    if (jj_3R_37()) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_36() {
-    if (jj_scan_token(PLUS)) return true;
+  final private boolean jj_3R_20() {
+    if (jj_3R_21()) return true;
     return false;
   }
 
-  final private boolean jj_3R_69() {
+  final private boolean jj_3R_44() {
     if (jj_scan_token(IDENTIFIER)) return true;
     return false;
   }
 
-  final private boolean jj_3R_61() {
-    if (jj_3R_69()) return true;
+  final private boolean jj_3R_19() {
+    if (jj_3R_20()) return true;
     return false;
   }
 
-  final private boolean jj_3R_24() {
-    if (jj_3R_28()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_29()) { jj_scanpos = xsp; break; }
-    }
+  final private boolean jj_3R_38() {
+    if (jj_3R_44()) return true;
     return false;
   }
 
@@ -1461,434 +1450,206 @@
     return false;
   }
 
-  final private boolean jj_3R_33() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(29)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(30)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_60() {
-    if (jj_scan_token(LPAREN)) return true;
-    if (jj_3R_13()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_52() {
+  final private boolean jj_3R_31() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_60()) {
+    if (jj_3R_37()) {
     jj_scanpos = xsp;
     if (jj_3_1()) {
     jj_scanpos = xsp;
-    if (jj_3R_61()) return true;
+    if (jj_3R_38()) return true;
     }
     }
     return false;
   }
 
-  final private boolean jj_3R_32() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(31)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(32)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_31() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(25)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(26)) return true;
-    }
+  final private boolean jj_3R_37() {
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  final private boolean jj_3R_68() {
+  final private boolean jj_3R_43() {
     if (jj_scan_token(NULL)) return true;
     return false;
   }
 
-  final private boolean jj_3R_25() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_30()) {
-    jj_scanpos = xsp;
-    if (jj_3R_31()) {
-    jj_scanpos = xsp;
-    if (jj_3R_32()) {
-    jj_scanpos = xsp;
-    if (jj_3R_33()) return true;
-    }
-    }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_30() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(27)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(28)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_63() {
-    if (jj_scan_token(LBRACK)) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_67() {
+  final private boolean jj_3R_42() {
     if (jj_scan_token(STRING_LITERAL)) return true;
     return false;
   }
 
-  final private boolean jj_3R_54() {
-    if (jj_3R_63()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_22() {
-    if (jj_3R_24()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_25()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_27() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(35)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(36)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_62() {
-    if (jj_scan_token(DOT)) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_26() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(33)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(34)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_23() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_26()) {
-    jj_scanpos = xsp;
-    if (jj_3R_27()) return true;
-    }
+  final private boolean jj_3R_18() {
+    if (jj_3R_19()) return true;
     return false;
   }
 
-  final private boolean jj_3R_66() {
+  final private boolean jj_3R_41() {
     if (jj_scan_token(INTEGER_LITERAL)) return true;
     return false;
   }
 
-  final private boolean jj_3R_21() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(39)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(40)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_53() {
-    if (jj_3R_62()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_50() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_53()) {
-    jj_scanpos = xsp;
-    if (jj_3R_54()) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_20() {
-    if (jj_3R_22()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_23()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_47() {
-    if (jj_3R_50()) return true;
+  final private boolean jj_3R_17() {
+    if (jj_3R_18()) return true;
     return false;
   }
 
-  final private boolean jj_3R_65() {
+  final private boolean jj_3R_40() {
     if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
     return false;
   }
 
-  final private boolean jj_3R_49() {
-    if (jj_3R_52()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_14() {
-    if (jj_scan_token(COMMA)) return true;
+  final private boolean jj_3R_29() {
+    if (jj_3R_31()) return true;
     return false;
   }
 
-  final private boolean jj_3R_71() {
+  final private boolean jj_3R_46() {
     if (jj_scan_token(FALSE)) return true;
     return false;
   }
 
-  final private boolean jj_3R_48() {
-    if (jj_3R_51()) return true;
+  final private boolean jj_3R_16() {
+    if (jj_3R_17()) return true;
     return false;
   }
 
-  final private boolean jj_3R_46() {
+  final private boolean jj_3R_27() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_48()) {
+    if (jj_3R_28()) {
     jj_scanpos = xsp;
-    if (jj_3R_49()) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_18() {
-    if (jj_3R_20()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_21()) { jj_scanpos = xsp; break; }
+    if (jj_3R_29()) return true;
     }
     return false;
   }
 
-  final private boolean jj_3R_19() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(41)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(42)) return true;
-    }
+  final private boolean jj_3R_28() {
+    if (jj_3R_30()) return true;
     return false;
   }
 
-  final private boolean jj_3R_70() {
+  final private boolean jj_3R_45() {
     if (jj_scan_token(TRUE)) return true;
     return false;
   }
 
-  final private boolean jj_3R_64() {
+  final private boolean jj_3R_39() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_70()) {
+    if (jj_3R_45()) {
     jj_scanpos = xsp;
-    if (jj_3R_71()) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_45() {
     if (jj_3R_46()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_47()) { jj_scanpos = xsp; break; }
     }
     return false;
   }
 
-  final private boolean jj_3R_16() {
-    if (jj_3R_18()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_19()) { jj_scanpos = xsp; break; }
-    }
+  final private boolean jj_3R_15() {
+    if (jj_3R_16()) return true;
     return false;
   }
 
-  final private boolean jj_3R_41() {
-    if (jj_3R_45()) return true;
+  final private boolean jj_3R_26() {
+    if (jj_3R_27()) return true;
     return false;
   }
 
-  final private boolean jj_3R_59() {
-    if (jj_3R_68()) return true;
+  final private boolean jj_3R_25() {
+    if (jj_3R_26()) return true;
     return false;
   }
 
-  final private boolean jj_3R_58() {
-    if (jj_3R_67()) return true;
+  final private boolean jj_3R_36() {
+    if (jj_3R_43()) return true;
     return false;
   }
 
-  final private boolean jj_3R_17() {
-    if (jj_scan_token(QUESTIONMARK)) return true;
+  final private boolean jj_3R_35() {
+    if (jj_3R_42()) return true;
     return false;
   }
 
-  final private boolean jj_3R_40() {
+  final private boolean jj_3R_24() {
     if (jj_scan_token(EMPTY)) return true;
-    if (jj_3R_34()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_57() {
-    if (jj_3R_66()) return true;
     return false;
   }
 
-  final private boolean jj_3R_12() {
-    if (jj_3R_13()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_14()) { jj_scanpos = xsp; break; }
-    }
+  final private boolean jj_3R_34() {
+    if (jj_3R_41()) return true;
     return false;
   }
 
-  final private boolean jj_3R_56() {
-    if (jj_3R_65()) return true;
+  final private boolean jj_3R_33() {
+    if (jj_3R_40()) return true;
     return false;
   }
 
-  final private boolean jj_3R_39() {
+  final private boolean jj_3R_23() {
     Token xsp;
     xsp = jj_scanpos;
     if (jj_scan_token(37)) {
     jj_scanpos = xsp;
     if (jj_scan_token(38)) return true;
     }
-    if (jj_3R_34()) return true;
     return false;
   }
 
-  final private boolean jj_3R_34() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_38()) {
-    jj_scanpos = xsp;
-    if (jj_3R_39()) {
-    jj_scanpos = xsp;
-    if (jj_3R_40()) {
-    jj_scanpos = xsp;
-    if (jj_3R_41()) return true;
-    }
-    }
-    }
+  final private boolean jj_3R_12() {
+    if (jj_3R_13()) return true;
     return false;
   }
 
-  final private boolean jj_3R_38() {
+  final private boolean jj_3R_22() {
     if (jj_scan_token(MINUS)) return true;
-    if (jj_3R_34()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_55() {
-    if (jj_3R_64()) return true;
     return false;
   }
 
-  final private boolean jj_3R_51() {
+  final private boolean jj_3R_21() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_55()) {
+    if (jj_3R_22()) {
     jj_scanpos = xsp;
-    if (jj_3R_56()) {
+    if (jj_3R_23()) {
     jj_scanpos = xsp;
-    if (jj_3R_57()) {
+    if (jj_3R_24()) {
     jj_scanpos = xsp;
-    if (jj_3R_58()) {
-    jj_scanpos = xsp;
-    if (jj_3R_59()) return true;
-    }
+    if (jj_3R_25()) return true;
     }
     }
     }
     return false;
   }
 
-  final private boolean jj_3R_15() {
-    if (jj_3R_16()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_17()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_44() {
+  final private boolean jj_3R_30() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(51)) {
+    if (jj_3R_32()) {
+    jj_scanpos = xsp;
+    if (jj_3R_33()) {
+    jj_scanpos = xsp;
+    if (jj_3R_34()) {
     jj_scanpos = xsp;
-    if (jj_scan_token(52)) return true;
+    if (jj_3R_35()) {
+    jj_scanpos = xsp;
+    if (jj_3R_36()) return true;
+    }
+    }
+    }
     }
     return false;
   }
 
-  final private boolean jj_3R_13() {
-    if (jj_3R_15()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_43() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(49)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(50)) return true;
-    }
+  final private boolean jj_3R_32() {
+    if (jj_3R_39()) return true;
     return false;
   }
 
-  final private boolean jj_3R_35() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_42()) {
-    jj_scanpos = xsp;
-    if (jj_3R_43()) {
-    jj_scanpos = xsp;
-    if (jj_3R_44()) return true;
-    }
-    }
+  final private boolean jj_3R_14() {
+    if (jj_3R_15()) return true;
     return false;
   }
 
-  final private boolean jj_3R_42() {
-    if (jj_scan_token(MULT)) return true;
+  final private boolean jj_3R_13() {
+    if (jj_3R_14()) return true;
     return false;
   }
 
@@ -1901,7 +1662,7 @@
   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 = new int[35];
   static private int[] jj_la1_0;
   static private int[] jj_la1_1;
   static {
@@ -1909,10 +1670,10 @@
       jj_la1_1();
    }
    private static void jj_la1_0() {
-      jj_la1_0 = new int[] {0xe,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe000000,0x18000000,0x6000000,0x80000000,0x60000000,0xfe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9d600,0x240000,0x9d600,0x240000,0x80000,0x0,0x1000000,0x9d600,0x1d600,0xc000,};
+      jj_la1_0 = new int[] {0xe,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe000000,0x18000000,0x6000000,0x80000000,0x60000000,0xfe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9d600,0x240000,0x9d600,0x240000,0x80000,0x0,0x0,0x1000000,0x9d600,0x1d600,0xc000,};
    }
    private static void jj_la1_1() {
-      jj_la1_1 = new int[] {0x0,0x0,0x10000,0x600,0x600,0x180,0x180,0x1e,0x6,0x18,0x1e,0x1,0x0,0x0,0x1,0x0,0x1,0xc000,0xc000,0x1e2000,0x60000,0x180000,0x1e2000,0x60,0x1208860,0x0,0x1200000,0x0,0x0,0x200000,0x0,0x1208860,0x0,0x0,};
+      jj_la1_1 = new int[] {0x0,0x0,0x10000,0x600,0x600,0x180,0x180,0x1e,0x6,0x18,0x1e,0x1,0x0,0x0,0x1,0x0,0x1,0xc000,0xc000,0x1e2000,0x60000,0x180000,0x1e2000,0x60,0x608860,0x0,0x600000,0x0,0x0,0x200000,0x400000,0x0,0x608860,0x0,0x0,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[1];
   private boolean jj_rescan = false;
@@ -1927,7 +1688,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();
   }
 
@@ -1941,7 +1702,7 @@
     jj_ntk = -1;
     jjtree.reset();
     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();
   }
 
@@ -1951,7 +1712,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();
   }
 
@@ -1962,7 +1723,7 @@
     jj_ntk = -1;
     jjtree.reset();
     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();
   }
 
@@ -1971,7 +1732,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();
   }
 
@@ -1981,7 +1742,7 @@
     jj_ntk = -1;
     jjtree.reset();
     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();
   }
 
@@ -2092,15 +1853,15 @@
 
   public ParseException generateParseException() {
     jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[62];
-    for (int i = 0; i < 62; i++) {
+    boolean[] la1tokens = new boolean[60];
+    for (int i = 0; i < 60; 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) {
@@ -2112,7 +1873,7 @@
         }
       }
     }
-    for (int i = 0; i < 62; i++) {
+    for (int i = 0; i < 60; i++) {
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;

Modified: geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.jjt
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.jjt?rev=787519&r1=787518&r2=787519&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.jjt
(original)
+++ geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParser.jjt
Tue Jun 23 02:34:50 2009
@@ -31,7 +31,7 @@
 	NODE_DEFAULT_VOID=true;
 	JAVA_UNICODE_ESCAPE=false;
   	UNICODE_INPUT=true;
-	BUILD_NODE_FILES=false;
+	BUILD_NODE_FILES=true;
 }
 
 /* == Parser Declaration == */
@@ -104,7 +104,7 @@
  */
 void Choice() : {}
 {
-	Or() (<QUESTIONMARK> Choice() <COLON> Choice() #Choice(3))*
+	Or() (<QUESTIONMARK> Or() <COLON> Choice() #Choice(3))*
 }
 
 /*
@@ -274,19 +274,20 @@
  */
 void Function() #Function :
 {
-	Token tx = null;
+	Token t0 = null;
+	Token t1 = null;
 }
 {
-	(tx=<FUNCTION_CALL>) (Expression() (<COMMA> Expression())*)? <RPAREN>
+	(t0=<NAMESPACE>)? t1=<IDENTIFIER>
 	{
-		int split = tx.image.indexOf(":");
-		if (split!=-1) {
-			jjtThis.setPrefix(tx.image.substring(0, split));
-			jjtThis.setLocalName(tx.image.substring(split + 1, tx.image.length() - 1));
+		if (t0 != null) {
+			jjtThis.setPrefix(t0.image.substring(0, t0.image.length() - 1));
+			jjtThis.setLocalName(t1.image);
 		} else {
-			jjtThis.setLocalName(tx.image.substring(0, tx.image.length() - 1));
+			jjtThis.setLocalName(t1.image);
 		}
 	}
+	<LPAREN> (Expression() (<COMMA> Expression())*)? <RPAREN>
 }
 
 /*
@@ -427,9 +428,7 @@
 |	< MOD0 : "%" >
 |	< MOD1 : "mod" >
 |	< IDENTIFIER : (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)*
>
-|	< #NAMESPACE : ( <NAMESPACE_NAME> <COLON>) >
-|	< #NAMESPACE_NAME: (<IDENTIFIER> (<LETTER>|<DIGIT>|<MINUS>|<DOT>)*)
>
-|	< FUNCTION_CALL: (<NAMESPACE>)? <IDENTIFIER> <LPAREN> >
+|   < NAMESPACE : (<IDENTIFIER> (<IDENTIFIER>|<MINUS>|<DOT>)*
<COLON>) >
 |	< FUNCTIONSUFFIX : (<IDENTIFIER>) >
 |	< #IMPL_OBJ_START: "#" >
 |	< #LETTER:

Modified: geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParserConstants.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParserConstants.java?rev=787519&r1=787518&r2=787519&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParserConstants.java
(original)
+++ geronimo/external/trunk/tomcat-parent-6.0.18/jasper-el/src/main/java/org/apache/el/parser/ELParserConstants.java
Tue Jun 23 02:34:50 2009
@@ -19,130 +19,131 @@
 
 public interface ELParserConstants {
 
-  int EOF = 0;
-  int LITERAL_EXPRESSION = 1;
-  int START_DYNAMIC_EXPRESSION = 2;
-  int START_DEFERRED_EXPRESSION = 3;
-  int INTEGER_LITERAL = 9;
-  int FLOATING_POINT_LITERAL = 10;
-  int EXPONENT = 11;
-  int STRING_LITERAL = 12;
-  int BADLY_ESCAPED_STRING_LITERAL = 13;
-  int TRUE = 14;
-  int FALSE = 15;
-  int NULL = 16;
-  int END_EXPRESSION = 17;
-  int DOT = 18;
-  int LPAREN = 19;
-  int RPAREN = 20;
-  int LBRACK = 21;
-  int RBRACK = 22;
-  int COLON = 23;
-  int COMMA = 24;
-  int GT0 = 25;
-  int GT1 = 26;
-  int LT0 = 27;
-  int LT1 = 28;
-  int GE0 = 29;
-  int GE1 = 30;
-  int LE0 = 31;
-  int LE1 = 32;
-  int EQ0 = 33;
-  int EQ1 = 34;
-  int NE0 = 35;
-  int NE1 = 36;
-  int NOT0 = 37;
-  int NOT1 = 38;
-  int AND0 = 39;
-  int AND1 = 40;
-  int OR0 = 41;
-  int OR1 = 42;
-  int EMPTY = 43;
-  int INSTANCEOF = 44;
-  int MULT = 45;
-  int PLUS = 46;
-  int MINUS = 47;
-  int QUESTIONMARK = 48;
-  int DIV0 = 49;
-  int DIV1 = 50;
-  int MOD0 = 51;
-  int MOD1 = 52;
-  int IDENTIFIER = 53;
-  int NAMESPACE = 54;
-  int NAMESPACE_NAME = 55;
-  int FUNCTION_CALL = 56;
-  int FUNCTIONSUFFIX = 57;
-  int IMPL_OBJ_START = 58;
-  int LETTER = 59;
-  int DIGIT = 60;
-  int ILLEGAL_CHARACTER = 61;
-
-  int DEFAULT = 0;
-  int IN_EXPRESSION = 1;
-
-  String[] tokenImage = {
-    "<EOF>",
-    "<LITERAL_EXPRESSION>",
-    "\"${\"",
-    "\"#{\"",
-    "\"\\\\\"",
-    "\" \"",
-    "\"\\t\"",
-    "\"\\n\"",
-    "\"\\r\"",
-    "<INTEGER_LITERAL>",
-    "<FLOATING_POINT_LITERAL>",
-    "<EXPONENT>",
-    "<STRING_LITERAL>",
-    "<BADLY_ESCAPED_STRING_LITERAL>",
-    "\"true\"",
-    "\"false\"",
-    "\"null\"",
-    "\"}\"",
-    "\".\"",
-    "\"(\"",
-    "\")\"",
-    "\"[\"",
-    "\"]\"",
-    "\":\"",
-    "\",\"",
-    "\">\"",
-    "\"gt\"",
-    "\"<\"",
-    "\"lt\"",
-    "\">=\"",
-    "\"ge\"",
-    "\"<=\"",
-    "\"le\"",
-    "\"==\"",
-    "\"eq\"",
-    "\"!=\"",
-    "\"ne\"",
-    "\"!\"",
-    "\"not\"",
-    "\"&&\"",
-    "\"and\"",
-    "\"||\"",
-    "\"or\"",
-    "\"empty\"",
-    "\"instanceof\"",
-    "\"*\"",
-    "\"+\"",
-    "\"-\"",
-    "\"?\"",
-    "\"/\"",
-    "\"div\"",
-    "\"%\"",
-    "\"mod\"",
-    "<IDENTIFIER>",
-    "<NAMESPACE>",
-    "<NAMESPACE_NAME>",
-    "<FUNCTION_CALL>",
-    "<FUNCTIONSUFFIX>",
-    "\"#\"",
-    "<LETTER>",
-    "<DIGIT>",
-    "<ILLEGAL_CHARACTER>",
-  };
+	int EOF = 0;
+
+	int LITERAL_EXPRESSION = 1;
+
+	int START_DYNAMIC_EXPRESSION = 2;
+
+	int START_DEFERRED_EXPRESSION = 3;
+
+	int INTEGER_LITERAL = 9;
+
+	int FLOATING_POINT_LITERAL = 10;
+
+	int EXPONENT = 11;
+
+	int STRING_LITERAL = 12;
+
+	int BADLY_ESCAPED_STRING_LITERAL = 13;
+
+	int TRUE = 14;
+
+	int FALSE = 15;
+
+	int NULL = 16;
+
+	int END_EXPRESSION = 17;
+
+	int DOT = 18;
+
+	int LPAREN = 19;
+
+	int RPAREN = 20;
+
+	int LBRACK = 21;
+
+	int RBRACK = 22;
+
+	int COLON = 23;
+
+	int COMMA = 24;
+
+	int GT0 = 25;
+
+	int GT1 = 26;
+
+	int LT0 = 27;
+
+	int LT1 = 28;
+
+	int GE0 = 29;
+
+	int GE1 = 30;
+
+	int LE0 = 31;
+
+	int LE1 = 32;
+
+	int EQ0 = 33;
+
+	int EQ1 = 34;
+
+	int NE0 = 35;
+
+	int NE1 = 36;
+
+	int NOT0 = 37;
+
+	int NOT1 = 38;
+
+	int AND0 = 39;
+
+	int AND1 = 40;
+
+	int OR0 = 41;
+
+	int OR1 = 42;
+
+	int EMPTY = 43;
+
+	int INSTANCEOF = 44;
+
+	int MULT = 45;
+
+	int PLUS = 46;
+
+	int MINUS = 47;
+
+	int QUESTIONMARK = 48;
+
+	int DIV0 = 49;
+
+	int DIV1 = 50;
+
+	int MOD0 = 51;
+
+	int MOD1 = 52;
+
+	int IDENTIFIER = 53;
+
+	int NAMESPACE = 54;
+
+	int FUNCTIONSUFFIX = 55;
+
+	int IMPL_OBJ_START = 56;
+
+	int LETTER = 57;
+
+	int DIGIT = 58;
+
+	int ILLEGAL_CHARACTER = 59;
+
+	int DEFAULT = 0;
+
+	int IN_EXPRESSION = 1;
+
+	String[] tokenImage = { "<EOF>", "<LITERAL_EXPRESSION>", "\"${\"",
+			"\"#{\"", "\"\\\\\"", "\" \"", "\"\\t\"", "\"\\n\"", "\"\\r\"",
+			"<INTEGER_LITERAL>", "<FLOATING_POINT_LITERAL>", "<EXPONENT>",
+			"<STRING_LITERAL>", "<BADLY_ESCAPED_STRING_LITERAL>", "\"true\"",
+			"\"false\"", "\"null\"", "\"}\"", "\".\"", "\"(\"", "\")\"",
+			"\"[\"", "\"]\"", "\":\"", "\",\"", "\">\"", "\"gt\"", "\"<\"",
+			"\"lt\"", "\">=\"", "\"ge\"", "\"<=\"", "\"le\"", "\"==\"",
+			"\"eq\"", "\"!=\"", "\"ne\"", "\"!\"", "\"not\"", "\"&&\"",
+			"\"and\"", "\"||\"", "\"or\"", "\"empty\"", "\"instanceof\"",
+			"\"*\"", "\"+\"", "\"-\"", "\"?\"", "\"/\"", "\"div\"", "\"%\"",
+			"\"mod\"", "<IDENTIFIER>", "<NAMESPACE>", "<FUNCTIONSUFFIX>",
+			"\"#\"", "<LETTER>", "<DIGIT>", "<ILLEGAL_CHARACTER>", };
 
 }



Mime
View raw message