From: markt Date: Fri, 1 Aug 2008 16:11:14 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42565 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3992826ea2e220bdc199983fd2bc8a9f7c99ed92;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42565 This patch: - limits the regexp for namespace to what is in the spec - removes the namespace token since the maximal munch rule means that there is a risk the second and third parts of a ternary expression would, incorrectly, be interpreted as a fucntion call. - modifies the lookahead for function to be more explicit about what to look for My set of weird and wonderful test cases (mixing ternary, fucntion and empty) now all work. Updated generated files will follow. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@681736 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/el/parser/ELParser.jjt b/java/org/apache/el/parser/ELParser.jjt index 1a6c41cf4..070885885 100644 --- a/java/org/apache/el/parser/ELParser.jjt +++ b/java/org/apache/el/parser/ELParser.jjt @@ -255,7 +255,7 @@ void BracketSuffix() #BracketSuffix : {} void NonLiteral() : {} { Expression() - | LOOKAHEAD(3) Function() + | LOOKAHEAD(( )? ) Function() | Identifier() } @@ -278,7 +278,7 @@ void Function() #Function : Token t1 = null; } { - (t0=)? t1= + (t0= )? t1= { if (t0 != null) { jjtThis.setPrefix(t0.image.substring(0, t0.image.length() - 1)); @@ -428,7 +428,6 @@ void Null() #Null : {} | < MOD0 : "%" > | < MOD1 : "mod" > | < IDENTIFIER : (|) (|)* > -| < NAMESPACE : ( (||)* ) > | < FUNCTIONSUFFIX : () > | < #IMPL_OBJ_START: "#" > | < #LETTER: