From: markt Date: Thu, 10 Jul 2008 20:53:24 +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=94f26c83616f7fbba44b614c9ba34c95ab9306aa;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42565 el ternary expression without space before colon now works Patch provided by Lucas Galfaso This is just the jjt patch. The resulting changes to the generated code will follow. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@675726 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..0d2317d8a 100644 --- a/java/org/apache/el/parser/ELParser.jjt +++ b/java/org/apache/el/parser/ELParser.jjt @@ -31,7 +31,7 @@ options NODE_DEFAULT_VOID=true; JAVA_UNICODE_ESCAPE=false; UNICODE_INPUT=true; - BUILD_NODE_FILES=true; + BUILD_NODE_FILES=false; } /* == Parser Declaration == */ @@ -274,20 +274,19 @@ void Identifier() #Identifier : { Token t = null; } */ void Function() #Function : { - Token t0 = null; - Token t1 = null; + Token tx = null; } { - (t0=)? t1= + (tx=) (Expression() ( Expression())*)? { - if (t0 != null) { - jjtThis.setPrefix(t0.image.substring(0, t0.image.length() - 1)); - jjtThis.setLocalName(t1.image); + 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)); } else { - jjtThis.setLocalName(t1.image); + jjtThis.setLocalName(tx.image.substring(0, tx.image.length() - 1)); } } - (Expression() ( Expression())*)? } /* @@ -428,7 +427,9 @@ void Null() #Null : {} | < MOD0 : "%" > | < MOD1 : "mod" > | < IDENTIFIER : (|) (|)* > -| < NAMESPACE : ( (||)* ) > +| < #NAMESPACE : ( ) > +| < #NAMESPACE_NAME: ( (|||)*) > +| < FUNCTION_CALL: ()? > | < FUNCTIONSUFFIX : () > | < #IMPL_OBJ_START: "#" > | < #LETTER: