tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r658470 [1/2] - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/el/parser/ webapps/docs/
Date Tue, 20 May 2008 22:39:42 GMT
Author: markt
Date: Tue May 20 15:39:42 2008
New Revision: 658470

URL: http://svn.apache.org/viewvc?rev=658470&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44994
Correct BNF grammar so ${0 lt a ? 1 lt a ? "many": "one": "none"} works
Note patch is larger than strictly necessary due to autogenerated code

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.html
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.java
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.jjt
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParserConstants.java
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParserTokenManager.java
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ParseException.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=658470&r1=658469&r2=658470&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue May 20 15:39:42 2008
@@ -53,13 +53,6 @@
       markt How about making it optional with a system property that can be used
             to restore the current behaviour is an app depends on it?
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44994
-  Correct BNF grammar so ${0 lt a ? 1 lt a ? "many": "one": "none"} works
-  http://svn.apache.org/viewvc?rev=657404&view=rev
-  Note patch is larger than strictly necessary due to autogenerated code
-  +1: markt, yoavs, remm
-  -1: 
-
 * Additional patch from https://issues.apache.org/bugzilla/show_bug.cgi?id=43094
   Allow configuration of JSSE providers
   Based on a patch by Bruno Harbulot

Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.html
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.html?rev=658470&r1=658469&r2=658470&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.html (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.html Tue May 20 15:39:42 2008
@@ -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="#prod7">Or</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="#prod6">Choice</A> &lt;COLON&gt; <A HREF="#prod6">Choice</A>
)*</TD>
 </TR>
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod7">Or</A></TD>

Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.java?rev=658470&r1=658469&r2=658470&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.java Tue May 20 15:39:42 2008
@@ -27,15 +27,6 @@
                 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
@@ -216,31 +207,31 @@
         break label_2;
       }
       jj_consume_token(QUESTIONMARK);
-      Or();
+      Choice();
       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);
+                                                }
       }
     }
   }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.jjt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.jjt?rev=658470&r1=658469&r2=658470&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.jjt (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParser.jjt Tue May 20 15:39:42 2008
@@ -104,7 +104,7 @@
  */
 void Choice() : {}
 {
-	Or() (<QUESTIONMARK> Or() <COLON> Choice() #Choice(3))*
+	Or() (<QUESTIONMARK> Choice() <COLON> Choice() #Choice(3))*
 }
 
 /*

Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParserConstants.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParserConstants.java?rev=658470&r1=658469&r2=658470&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParserConstants.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/el/parser/ELParserConstants.java Tue May 20 15:39:42
2008
@@ -19,131 +19,126 @@
 
 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 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>", };
+  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>",
+  };
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message