Author: sjmenden
Date: 2011-08-23 09:46:59 -0400 (Tue, 23 Aug 2011)
New Revision: 1824
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.properties.default
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.xml
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/MethodExpressionImpl.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/lang/ELSupport.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstLiteralExpression.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstString.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstValue.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.jjt
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserConstants.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTokenManager.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTreeConstants.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/JJTELParserState.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Node.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ParseException.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleCharStream.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleNode.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Token.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/TokenMgrError.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/ELParser.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Generator.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Parser.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/webapps/docs/changelog.xml
Log:
contians changes for r1806
http://source.jboss.org/rdiff/JBossWeb?csid=1806&u&N
and r1808
http://source.jboss.org/rdiff/JBossWeb?csid=1808&u&N
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.properties.default
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.properties.default 2011-08-23 11:23:01
UTC (rev 1823)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.properties.default 2011-08-23 13:46:59
UTC (rev 1824)
@@ -12,15 +12,15 @@
# ----- Version Control Flags -----
version.major=2
version.minor=1
-version.build=4
-version.patch=0
+version.build=10
+version.patch=JBPAPP-7007
version.tag=SNAPSHOT
# ----- Default Base Path for Dependent Packages -----
# Please note this path must be absolute, not relative,
# as it is referenced with different working directory
# contexts by the various build scripts.
-base.path=/usr/share/java
+base.path=/Volumes/Optibay/Source/JBossWeb/deps
#base.path=C:/path/to/the/repository
#base.path=/usr/local
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.xml
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.xml 2011-08-23 11:23:01 UTC (rev 1823)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/build.xml 2011-08-23 13:46:59 UTC (rev 1824)
@@ -99,6 +99,7 @@
source="${compile.source}"
target="${compile.target}"
excludes="**/CVS/**,**/.svn/**">
+ <compilerarg value="-Xlint:unchecked"/>
<!-- Comment this in to show unchecked warnings: <compilerarg
value="-Xlint:unchecked"/> -->
<classpath refid="tomcat.classpath" />
</javac>
@@ -790,7 +791,10 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
- excludes="**/CVS/**,**/.svn/**">
+ excludes="**/CVS/**,**/.svn/**"
+ nowarn="on"
+ failonerror="false">
+ <compilerarg value="-Xlint:-unchecked"/>
<include name="**" />
</javac>
<jar jarfile="${tomcat-dbcp.jar}"
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/MethodExpressionImpl.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/MethodExpressionImpl.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/MethodExpressionImpl.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -311,4 +311,9 @@
public boolean isLiteralText() {
return false;
}
+
+ public boolean isParametersProvided() {
+ return this.getNode().isParametersProvided();
+ }
+
}
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/lang/ELSupport.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/lang/ELSupport.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/lang/ELSupport.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -246,6 +246,9 @@
if (Float.TYPE == type || Float.class.equals(type)) {
return new Float(number.floatValue());
}
+ if (Number.class.equals(type)) {
+ return number;
+ }
throw new IllegalArgumentException(MessageFactory.get("error.convert",
number, number.getClass(), type));
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstLiteralExpression.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstLiteralExpression.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstLiteralExpression.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -49,10 +49,10 @@
StringBuffer buf = new StringBuffer(size);
for (int i = 0; i < size; i++) {
char c = image.charAt(i);
- if (c == '\\' && i + 1 < size) {
+ if (c == '\\' && i + 2 < size) {
char c1 = image.charAt(i + 1);
- if (c1 == '\\' || c1 == '"' || c1 ==
'\'' || c1 == '#'
- || c1 == '$') {
+ char c2 = image.charAt(i + 2);
+ if ((c1 == '#' || c1 == '$') && c2 ==
'{') {
c = c1;
i++;
}
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstString.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstString.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstString.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -62,8 +62,7 @@
char c = image.charAt(i);
if (c == '\\' && i + 1 < size) {
char c1 = image.charAt(i + 1);
- if (c1 == '\\' || c1 == '"' || c1 ==
'\'' || c1 == '#'
- || c1 == '$') {
+ if (c1 == '\\' || c1 == '"' || c1 ==
'\'') {
c = c1;
i++;
}
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstValue.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstValue.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/AstValue.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -175,4 +175,13 @@
}
return result;
}
+
+ public boolean isParametersProvided() {
+ if (jjtGetNumChildren() > 1 && this.children[1] != null &&
+ this.children[1] instanceof AstDotSuffix) {
+ return (this.children[1].jjtGetNumChildren()) > 0;
+ }
+ return false;
+ }
+
}
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1486,9 +1486,9 @@
private boolean jj_3R_29() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(29)) {
+ if (jj_scan_token(27)) {
jj_scanpos = xsp;
- if (jj_scan_token(30)) return true;
+ if (jj_scan_token(28)) return true;
}
return false;
}
@@ -1501,9 +1501,9 @@
private boolean jj_3R_28() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(31)) {
+ if (jj_scan_token(29)) {
jj_scanpos = xsp;
- if (jj_scan_token(32)) return true;
+ if (jj_scan_token(30)) return true;
}
return false;
}
@@ -1511,9 +1511,9 @@
private boolean jj_3R_27() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(25)) {
+ if (jj_scan_token(23)) {
jj_scanpos = xsp;
- if (jj_scan_token(26)) return true;
+ if (jj_scan_token(24)) return true;
}
return false;
}
@@ -1537,9 +1537,9 @@
private boolean jj_3R_26() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(27)) {
+ if (jj_scan_token(25)) {
jj_scanpos = xsp;
- if (jj_scan_token(28)) return true;
+ if (jj_scan_token(26)) return true;
}
return false;
}
@@ -1577,9 +1577,9 @@
private boolean jj_3R_23() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(35)) {
+ if (jj_scan_token(33)) {
jj_scanpos = xsp;
- if (jj_scan_token(36)) return true;
+ if (jj_scan_token(34)) return true;
}
return false;
}
@@ -1592,9 +1592,9 @@
private boolean jj_3R_22() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(33)) {
+ if (jj_scan_token(31)) {
jj_scanpos = xsp;
- if (jj_scan_token(34)) return true;
+ if (jj_scan_token(32)) return true;
}
return false;
}
@@ -1612,9 +1612,9 @@
private boolean jj_3R_17() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(39)) {
+ if (jj_scan_token(37)) {
jj_scanpos = xsp;
- if (jj_scan_token(40)) return true;
+ if (jj_scan_token(38)) return true;
}
return false;
}
@@ -1692,9 +1692,9 @@
private boolean jj_3R_15() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(41)) {
+ if (jj_scan_token(39)) {
jj_scanpos = xsp;
- if (jj_scan_token(42)) return true;
+ if (jj_scan_token(40)) return true;
}
return false;
}
@@ -1809,9 +1809,9 @@
private boolean jj_3R_35() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(37)) {
+ if (jj_scan_token(35)) {
jj_scanpos = xsp;
- if (jj_scan_token(38)) return true;
+ if (jj_scan_token(36)) return true;
}
if (jj_3R_30()) return true;
return false;
@@ -1847,9 +1847,9 @@
private boolean jj_3R_40() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(51)) {
+ if (jj_scan_token(49)) {
jj_scanpos = xsp;
- if (jj_scan_token(52)) return true;
+ if (jj_scan_token(50)) return true;
}
return false;
}
@@ -1857,9 +1857,9 @@
private boolean jj_3R_39() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(49)) {
+ if (jj_scan_token(47)) {
jj_scanpos = xsp;
- if (jj_scan_token(50)) return true;
+ if (jj_scan_token(48)) return true;
}
return false;
}
@@ -1916,10 +1916,10 @@
jj_la1_init_1();
}
private static void jj_la1_init_0() {
- jj_la1_0 = new int[]
{0xe,0xe,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,0x80000000,0x80000000,0x0,0x80000000,0x7f800000,0x6000000,0x1800000,0x60000000,0x18000000,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x27b00,0x90000,0x27b00,0x90000,0x20000,0x0,0x400000,0x27b00,0x7b00,0x3000,};
}
private static void jj_la1_init_1() {
- jj_la1_1 = new int[]
{0x0,0x0,0x600,0x600,0x180,0x180,0x1e,0x6,0x18,0x1e,0x1,0x0,0x0,0x1,0x0,0x1,0xc000,0xc000,0x1e2000,0x60000,0x180000,0x1e2000,0x60,0x208860,0x0,0x200000,0x0,0x0,0x200000,0x0,0x208860,0x0,0x0,};
+ jj_la1_1 = new int[]
{0x0,0x0,0x180,0x180,0x60,0x60,0x7,0x1,0x6,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x3000,0x78800,0x18000,0x60000,0x78800,0x18,0x82218,0x0,0x80000,0x0,0x0,0x80000,0x0,0x82218,0x0,0x0,};
}
final private JJCalls[] jj_2_rtns = new JJCalls[3];
private boolean jj_rescan = false;
@@ -2074,7 +2074,7 @@
return (jj_ntk = jj_nt.kind);
}
- private java.util.List jj_expentries = new java.util.ArrayList();
+ private java.util.List<int[]> jj_expentries = new
java.util.ArrayList<int[]>();
private int[] jj_expentry;
private int jj_kind = -1;
private int[] jj_lasttokens = new int[100];
@@ -2089,7 +2089,7 @@
for (int i = 0; i < jj_endpos; i++) {
jj_expentry[i] = jj_lasttokens[i];
}
- jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator();
it.hasNext();) {
+ jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator();
it.hasNext();) {
int[] oldentry = (int[])(it.next());
if (oldentry.length == jj_expentry.length) {
for (int i = 0; i < jj_expentry.length; i++) {
@@ -2108,7 +2108,7 @@
/** Generate ParseException. */
public ParseException generateParseException() {
jj_expentries.clear();
- boolean[] la1tokens = new boolean[59];
+ boolean[] la1tokens = new boolean[57];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
@@ -2125,7 +2125,7 @@
}
}
}
- for (int i = 0; i < 59; i++) {
+ for (int i = 0; i < 57; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
@@ -2137,7 +2137,7 @@
jj_add_error_token(0, 0);
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.get(i);
+ exptokseq[i] = jj_expentries.get(i);
}
return new ParseException(token, exptokseq, tokenImage);
}
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.jjt
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.jjt 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParser.jjt 2011-08-23
13:46:59 UTC (rev 1824)
@@ -353,11 +353,15 @@
/* ====================================================================================
*/
<DEFAULT> TOKEN :
{
+ /*
+ * The following definition uses + rather than * in two places to prevent
+ * LITERAL_EXPRESSION matching the empty string that could result in the
+ * Parser entering an infinite loop.
+ */
< LITERAL_EXPRESSION:
- ((~["\\", "$", "#"])
- | ("\\" ("\\" | "$" | "#"))
- | ("$" ~["{", "$"])
- | ("#" ~["{", "#"])
+ ( (~["$", "#", "\\"])* "\\"
(["$", "#"])?
+ | (~["$", "#"])* (["$", "#"]
~["{", "$", "#"])
+ | (~["$", "#"])+
)+
| "$"
| "#"
@@ -368,8 +372,6 @@
< START_DEFERRED_EXPRESSION: "#{" > : IN_EXPRESSION
}
-<DEFAULT> SKIP : { "\\" }
-
<IN_EXPRESSION> SKIP : { " " | "\t" | "\n" |
"\r" }
<IN_EXPRESSION> TOKEN :
@@ -381,13 +383,10 @@
| < #EXPONENT: ["e","E"]
(["+","-"])? (["0"-"9"])+ >
| < STRING_LITERAL: ("\"" ((~["\"","\\"])
- | ("\\" ( ["\\","\""] )))*
"\"")
+ | ("\\" ( ["\\","\"","\'"] )))*
"\"")
| ("\'" ((~["\'","\\"])
- | ("\\" ( ["\\","\'"] )))* "\'")
+ | ("\\" ( ["\\","\"","\'"] )))*
"\'")
-| < BADLY_ESCAPED_STRING_LITERAL: ("\""
(~["\"","\\"])* ("\\" (
~["\\","\""] )))
- | ("\'" (~["\'","\\"])* ("\\" (
~["\\","\'"] )))
- >
| < TRUE : "true" >
| < FALSE : "false" >
| < NULL : "null" >
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserConstants.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserConstants.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserConstants.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -17,105 +17,103 @@
/** RegularExpression Id. */
int START_DEFERRED_EXPRESSION = 3;
/** RegularExpression Id. */
- int INTEGER_LITERAL = 9;
+ int INTEGER_LITERAL = 8;
/** RegularExpression Id. */
- int FLOATING_POINT_LITERAL = 10;
+ int FLOATING_POINT_LITERAL = 9;
/** RegularExpression Id. */
- int EXPONENT = 11;
+ int EXPONENT = 10;
/** RegularExpression Id. */
- int STRING_LITERAL = 12;
+ int STRING_LITERAL = 11;
/** RegularExpression Id. */
- int BADLY_ESCAPED_STRING_LITERAL = 13;
+ int TRUE = 12;
/** RegularExpression Id. */
- int TRUE = 14;
+ int FALSE = 13;
/** RegularExpression Id. */
- int FALSE = 15;
+ int NULL = 14;
/** RegularExpression Id. */
- int NULL = 16;
+ int END_EXPRESSION = 15;
/** RegularExpression Id. */
- int END_EXPRESSION = 17;
+ int DOT = 16;
/** RegularExpression Id. */
- int DOT = 18;
+ int LPAREN = 17;
/** RegularExpression Id. */
- int LPAREN = 19;
+ int RPAREN = 18;
/** RegularExpression Id. */
- int RPAREN = 20;
+ int LBRACK = 19;
/** RegularExpression Id. */
- int LBRACK = 21;
+ int RBRACK = 20;
/** RegularExpression Id. */
- int RBRACK = 22;
+ int COLON = 21;
/** RegularExpression Id. */
- int COLON = 23;
+ int COMMA = 22;
/** RegularExpression Id. */
- int COMMA = 24;
+ int GT0 = 23;
/** RegularExpression Id. */
- int GT0 = 25;
+ int GT1 = 24;
/** RegularExpression Id. */
- int GT1 = 26;
+ int LT0 = 25;
/** RegularExpression Id. */
- int LT0 = 27;
+ int LT1 = 26;
/** RegularExpression Id. */
- int LT1 = 28;
+ int GE0 = 27;
/** RegularExpression Id. */
- int GE0 = 29;
+ int GE1 = 28;
/** RegularExpression Id. */
- int GE1 = 30;
+ int LE0 = 29;
/** RegularExpression Id. */
- int LE0 = 31;
+ int LE1 = 30;
/** RegularExpression Id. */
- int LE1 = 32;
+ int EQ0 = 31;
/** RegularExpression Id. */
- int EQ0 = 33;
+ int EQ1 = 32;
/** RegularExpression Id. */
- int EQ1 = 34;
+ int NE0 = 33;
/** RegularExpression Id. */
- int NE0 = 35;
+ int NE1 = 34;
/** RegularExpression Id. */
- int NE1 = 36;
+ int NOT0 = 35;
/** RegularExpression Id. */
- int NOT0 = 37;
+ int NOT1 = 36;
/** RegularExpression Id. */
- int NOT1 = 38;
+ int AND0 = 37;
/** RegularExpression Id. */
- int AND0 = 39;
+ int AND1 = 38;
/** RegularExpression Id. */
- int AND1 = 40;
+ int OR0 = 39;
/** RegularExpression Id. */
- int OR0 = 41;
+ int OR1 = 40;
/** RegularExpression Id. */
- int OR1 = 42;
+ int EMPTY = 41;
/** RegularExpression Id. */
- int EMPTY = 43;
+ int INSTANCEOF = 42;
/** RegularExpression Id. */
- int INSTANCEOF = 44;
+ int MULT = 43;
/** RegularExpression Id. */
- int MULT = 45;
+ int PLUS = 44;
/** RegularExpression Id. */
- int PLUS = 46;
+ int MINUS = 45;
/** RegularExpression Id. */
- int MINUS = 47;
+ int QUESTIONMARK = 46;
/** RegularExpression Id. */
- int QUESTIONMARK = 48;
+ int DIV0 = 47;
/** RegularExpression Id. */
- int DIV0 = 49;
+ int DIV1 = 48;
/** RegularExpression Id. */
- int DIV1 = 50;
+ int MOD0 = 49;
/** RegularExpression Id. */
- int MOD0 = 51;
+ int MOD1 = 50;
/** RegularExpression Id. */
- int MOD1 = 52;
+ int IDENTIFIER = 51;
/** RegularExpression Id. */
- int IDENTIFIER = 53;
+ int FUNCTIONSUFFIX = 52;
/** RegularExpression Id. */
- int FUNCTIONSUFFIX = 54;
+ int IMPL_OBJ_START = 53;
/** RegularExpression Id. */
- int IMPL_OBJ_START = 55;
+ int LETTER = 54;
/** RegularExpression Id. */
- int LETTER = 56;
+ int DIGIT = 55;
/** RegularExpression Id. */
- int DIGIT = 57;
- /** RegularExpression Id. */
- int ILLEGAL_CHARACTER = 58;
+ int ILLEGAL_CHARACTER = 56;
/** Lexical state. */
int DEFAULT = 0;
@@ -128,7 +126,6 @@
"<LITERAL_EXPRESSION>",
"\"${\"",
"\"#{\"",
- "\"\\\\\"",
"\" \"",
"\"\\t\"",
"\"\\n\"",
@@ -137,7 +134,6 @@
"<FLOATING_POINT_LITERAL>",
"<EXPONENT>",
"<STRING_LITERAL>",
- "<BADLY_ESCAPED_STRING_LITERAL>",
"\"true\"",
"\"false\"",
"\"null\"",
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTokenManager.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTokenManager.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTokenManager.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -16,18 +16,11 @@
switch (pos)
{
case 0:
- if ((active0 & 0x10L) != 0L)
- return 2;
- if ((active0 & 0x4L) != 0L)
+ if ((active0 & 0xcL) != 0L)
{
jjmatchedKind = 1;
- return 4;
+ return 5;
}
- if ((active0 & 0x8L) != 0L)
- {
- jjmatchedKind = 1;
- return 6;
- }
return -1;
default :
return -1;
@@ -51,8 +44,6 @@
return jjMoveStringLiteralDfa1_0(0x8L);
case 36:
return jjMoveStringLiteralDfa1_0(0x4L);
- case 92:
- return jjStartNfaWithStates_0(0, 4, 2);
default :
return jjMoveNfa_0(7, 0);
}
@@ -77,14 +68,6 @@
}
return jjStartNfa_0(0, active0);
}
-private int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
static final long[] jjbitVec0 = {
0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
};
@@ -114,53 +97,49 @@
{
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
}
else if ((0x1800000000L & l) != 0L)
{
if (kind > 1)
kind = 1;
+ jjCheckNAdd(5);
}
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 6;
- else if (curChar == 36)
- jjstateSet[jjnewStateCnt++] = 4;
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
break;
case 0:
- if ((0xffffffe7ffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
break;
case 2:
- if ((0x1800000000L & l) == 0L)
+ if ((0xffffffe7ffffffffL & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
break;
case 3:
- if (curChar == 36)
- jjstateSet[jjnewStateCnt++] = 4;
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(3, 4);
break;
case 4:
- if ((0xffffffefffffffffL & l) == 0L)
+ if ((0x1800000000L & l) != 0L)
+ jjCheckNAdd(5);
+ break;
+ case 5:
+ if ((0xffffffe7ffffffffL & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(5, 8);
break;
- case 5:
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 6;
- break;
case 6:
- if ((0xfffffff7ffffffffL & l) == 0L)
+ if ((0x1800000000L & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(9, 13);
break;
default : break;
}
@@ -174,40 +153,43 @@
switch(jjstateSet[--i])
{
case 7:
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 4);
if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
+ else if (curChar == 92)
{
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(14, 17);
}
- else if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 2;
break;
case 0:
- if ((0xffffffffefffffffL & l) == 0L)
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
+ break;
+ case 1:
+ if (curChar != 92)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(14, 17);
break;
- case 1:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 2;
- break;
case 2:
- if (curChar != 92)
- break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
break;
- case 4:
- case 6:
+ case 3:
+ jjCheckNAddTwoStates(3, 4);
+ break;
+ case 5:
if ((0xf7ffffffffffffffL & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(5, 8);
break;
default : break;
}
@@ -225,15 +207,37 @@
switch(jjstateSet[--i])
{
case 7:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjCheckNAddTwoStates(0, 1);
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ {
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 4);
+ }
+ break;
case 0:
- case 4:
- case 6:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjCheckNAddTwoStates(0, 1);
+ break;
+ case 2:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
break;
+ case 3:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjCheckNAddTwoStates(3, 4);
+ break;
+ case 5:
+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(5, 8);
+ break;
default : break;
}
} while(i != startsAt);
@@ -256,84 +260,84 @@
switch (pos)
{
case 0:
- if ((active0 & 0x40000L) != 0L)
+ if ((active0 & 0x10000L) != 0L)
return 1;
- if ((active0 & 0x141d555401c000L) != 0L)
+ if ((active0 & 0x5075555007000L) != 0L)
{
- jjmatchedKind = 53;
- return 36;
+ jjmatchedKind = 51;
+ return 30;
}
return -1;
case 1:
- if ((active0 & 0x41554000000L) != 0L)
- return 36;
- if ((active0 & 0x1419400001c000L) != 0L)
+ if ((active0 & 0x5065000007000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 1;
- return 36;
+ return 30;
}
+ if ((active0 & 0x10555000000L) != 0L)
+ return 30;
return -1;
case 2:
- if ((active0 & 0x18000001c000L) != 0L)
+ if ((active0 & 0x5005000000000L) != 0L)
+ return 30;
+ if ((active0 & 0x60000007000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 2;
- return 36;
+ return 30;
}
- if ((active0 & 0x14014000000000L) != 0L)
- return 36;
return -1;
case 3:
- if ((active0 & 0x14000L) != 0L)
- return 36;
- if ((active0 & 0x180000008000L) != 0L)
+ if ((active0 & 0x5000L) != 0L)
+ return 30;
+ if ((active0 & 0x60000002000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 3;
- return 36;
+ return 30;
}
return -1;
case 4:
- if ((active0 & 0x80000008000L) != 0L)
- return 36;
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 4;
- return 36;
+ return 30;
}
+ if ((active0 & 0x20000002000L) != 0L)
+ return 30;
return -1;
case 5:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 5;
- return 36;
+ return 30;
}
return -1;
case 6:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 6;
- return 36;
+ return 30;
}
return -1;
case 7:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 7;
- return 36;
+ return 30;
}
return -1;
case 8:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 8;
- return 36;
+ return 30;
}
return -1;
default :
@@ -349,70 +353,70 @@
switch(curChar)
{
case 33:
- jjmatchedKind = 37;
- return jjMoveStringLiteralDfa1_1(0x800000000L);
+ jjmatchedKind = 35;
+ return jjMoveStringLiteralDfa1_1(0x200000000L);
case 37:
- return jjStopAtPos(0, 51);
+ return jjStopAtPos(0, 49);
case 38:
- return jjMoveStringLiteralDfa1_1(0x8000000000L);
+ return jjMoveStringLiteralDfa1_1(0x2000000000L);
case 40:
- return jjStopAtPos(0, 19);
+ return jjStopAtPos(0, 17);
case 41:
- return jjStopAtPos(0, 20);
+ return jjStopAtPos(0, 18);
case 42:
- return jjStopAtPos(0, 45);
+ return jjStopAtPos(0, 43);
case 43:
- return jjStopAtPos(0, 46);
+ return jjStopAtPos(0, 44);
case 44:
- return jjStopAtPos(0, 24);
+ return jjStopAtPos(0, 22);
case 45:
- return jjStopAtPos(0, 47);
+ return jjStopAtPos(0, 45);
case 46:
- return jjStartNfaWithStates_1(0, 18, 1);
+ return jjStartNfaWithStates_1(0, 16, 1);
case 47:
- return jjStopAtPos(0, 49);
+ return jjStopAtPos(0, 47);
case 58:
- return jjStopAtPos(0, 23);
+ return jjStopAtPos(0, 21);
case 60:
- jjmatchedKind = 27;
- return jjMoveStringLiteralDfa1_1(0x80000000L);
- case 61:
- return jjMoveStringLiteralDfa1_1(0x200000000L);
- case 62:
jjmatchedKind = 25;
return jjMoveStringLiteralDfa1_1(0x20000000L);
+ case 61:
+ return jjMoveStringLiteralDfa1_1(0x80000000L);
+ case 62:
+ jjmatchedKind = 23;
+ return jjMoveStringLiteralDfa1_1(0x8000000L);
case 63:
- return jjStopAtPos(0, 48);
+ return jjStopAtPos(0, 46);
case 91:
- return jjStopAtPos(0, 21);
+ return jjStopAtPos(0, 19);
case 93:
- return jjStopAtPos(0, 22);
+ return jjStopAtPos(0, 20);
case 97:
- return jjMoveStringLiteralDfa1_1(0x10000000000L);
+ return jjMoveStringLiteralDfa1_1(0x4000000000L);
case 100:
- return jjMoveStringLiteralDfa1_1(0x4000000000000L);
+ return jjMoveStringLiteralDfa1_1(0x1000000000000L);
case 101:
- return jjMoveStringLiteralDfa1_1(0x80400000000L);
+ return jjMoveStringLiteralDfa1_1(0x20100000000L);
case 102:
- return jjMoveStringLiteralDfa1_1(0x8000L);
+ return jjMoveStringLiteralDfa1_1(0x2000L);
case 103:
- return jjMoveStringLiteralDfa1_1(0x44000000L);
+ return jjMoveStringLiteralDfa1_1(0x11000000L);
case 105:
- return jjMoveStringLiteralDfa1_1(0x100000000000L);
+ return jjMoveStringLiteralDfa1_1(0x40000000000L);
case 108:
- return jjMoveStringLiteralDfa1_1(0x110000000L);
+ return jjMoveStringLiteralDfa1_1(0x44000000L);
case 109:
- return jjMoveStringLiteralDfa1_1(0x10000000000000L);
+ return jjMoveStringLiteralDfa1_1(0x4000000000000L);
case 110:
- return jjMoveStringLiteralDfa1_1(0x5000010000L);
+ return jjMoveStringLiteralDfa1_1(0x1400004000L);
case 111:
- return jjMoveStringLiteralDfa1_1(0x40000000000L);
+ return jjMoveStringLiteralDfa1_1(0x10000000000L);
case 116:
- return jjMoveStringLiteralDfa1_1(0x4000L);
+ return jjMoveStringLiteralDfa1_1(0x1000L);
case 124:
- return jjMoveStringLiteralDfa1_1(0x20000000000L);
+ return jjMoveStringLiteralDfa1_1(0x8000000000L);
case 125:
- return jjStopAtPos(0, 17);
+ return jjStopAtPos(0, 15);
default :
return jjMoveNfa_1(0, 0);
}
@@ -427,56 +431,56 @@
switch(curChar)
{
case 38:
- if ((active0 & 0x8000000000L) != 0L)
- return jjStopAtPos(1, 39);
+ if ((active0 & 0x2000000000L) != 0L)
+ return jjStopAtPos(1, 37);
break;
case 61:
- if ((active0 & 0x20000000L) != 0L)
+ if ((active0 & 0x8000000L) != 0L)
+ return jjStopAtPos(1, 27);
+ else if ((active0 & 0x20000000L) != 0L)
return jjStopAtPos(1, 29);
else if ((active0 & 0x80000000L) != 0L)
return jjStopAtPos(1, 31);
else if ((active0 & 0x200000000L) != 0L)
return jjStopAtPos(1, 33);
- else if ((active0 & 0x800000000L) != 0L)
- return jjStopAtPos(1, 35);
break;
case 97:
- return jjMoveStringLiteralDfa2_1(active0, 0x8000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x2000L);
case 101:
- if ((active0 & 0x40000000L) != 0L)
- return jjStartNfaWithStates_1(1, 30, 36);
- else if ((active0 & 0x100000000L) != 0L)
- return jjStartNfaWithStates_1(1, 32, 36);
- else if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 36, 36);
+ if ((active0 & 0x10000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 28, 30);
+ else if ((active0 & 0x40000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 30, 30);
+ else if ((active0 & 0x400000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 34, 30);
break;
case 105:
- return jjMoveStringLiteralDfa2_1(active0, 0x4000000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000L);
case 109:
- return jjMoveStringLiteralDfa2_1(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x20000000000L);
case 110:
- return jjMoveStringLiteralDfa2_1(active0, 0x110000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x44000000000L);
case 111:
- return jjMoveStringLiteralDfa2_1(active0, 0x10004000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x4001000000000L);
case 113:
- if ((active0 & 0x400000000L) != 0L)
- return jjStartNfaWithStates_1(1, 34, 36);
+ if ((active0 & 0x100000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 32, 30);
break;
case 114:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 42, 36);
- return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
+ if ((active0 & 0x10000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 40, 30);
+ return jjMoveStringLiteralDfa2_1(active0, 0x1000L);
case 116:
- if ((active0 & 0x4000000L) != 0L)
- return jjStartNfaWithStates_1(1, 26, 36);
- else if ((active0 & 0x10000000L) != 0L)
- return jjStartNfaWithStates_1(1, 28, 36);
+ if ((active0 & 0x1000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 24, 30);
+ else if ((active0 & 0x4000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 26, 30);
break;
case 117:
- return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
case 124:
- if ((active0 & 0x20000000000L) != 0L)
- return jjStopAtPos(1, 41);
+ if ((active0 & 0x8000000000L) != 0L)
+ return jjStopAtPos(1, 39);
break;
default :
break;
@@ -495,26 +499,26 @@
switch(curChar)
{
case 100:
- if ((active0 & 0x10000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 40, 36);
- else if ((active0 & 0x10000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 52, 36);
+ if ((active0 & 0x4000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 38, 30);
+ else if ((active0 & 0x4000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 50, 30);
break;
case 108:
- return jjMoveStringLiteralDfa3_1(active0, 0x18000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x6000L);
case 112:
- return jjMoveStringLiteralDfa3_1(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x20000000000L);
case 115:
- return jjMoveStringLiteralDfa3_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x40000000000L);
case 116:
- if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 38, 36);
+ if ((active0 & 0x1000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 36, 30);
break;
case 117:
- return jjMoveStringLiteralDfa3_1(active0, 0x4000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x1000L);
case 118:
- if ((active0 & 0x4000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 50, 36);
+ if ((active0 & 0x1000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 48, 30);
break;
default :
break;
@@ -533,17 +537,17 @@
switch(curChar)
{
case 101:
- if ((active0 & 0x4000L) != 0L)
- return jjStartNfaWithStates_1(3, 14, 36);
+ if ((active0 & 0x1000L) != 0L)
+ return jjStartNfaWithStates_1(3, 12, 30);
break;
case 108:
- if ((active0 & 0x10000L) != 0L)
- return jjStartNfaWithStates_1(3, 16, 36);
+ if ((active0 & 0x4000L) != 0L)
+ return jjStartNfaWithStates_1(3, 14, 30);
break;
case 115:
- return jjMoveStringLiteralDfa4_1(active0, 0x8000L);
+ return jjMoveStringLiteralDfa4_1(active0, 0x2000L);
case 116:
- return jjMoveStringLiteralDfa4_1(active0, 0x180000000000L);
+ return jjMoveStringLiteralDfa4_1(active0, 0x60000000000L);
default :
break;
}
@@ -561,14 +565,14 @@
switch(curChar)
{
case 97:
- return jjMoveStringLiteralDfa5_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa5_1(active0, 0x40000000000L);
case 101:
- if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_1(4, 15, 36);
+ if ((active0 & 0x2000L) != 0L)
+ return jjStartNfaWithStates_1(4, 13, 30);
break;
case 121:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStartNfaWithStates_1(4, 43, 36);
+ if ((active0 & 0x20000000000L) != 0L)
+ return jjStartNfaWithStates_1(4, 41, 30);
break;
default :
break;
@@ -587,7 +591,7 @@
switch(curChar)
{
case 110:
- return jjMoveStringLiteralDfa6_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa6_1(active0, 0x40000000000L);
default :
break;
}
@@ -605,7 +609,7 @@
switch(curChar)
{
case 99:
- return jjMoveStringLiteralDfa7_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa7_1(active0, 0x40000000000L);
default :
break;
}
@@ -623,7 +627,7 @@
switch(curChar)
{
case 101:
- return jjMoveStringLiteralDfa8_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa8_1(active0, 0x40000000000L);
default :
break;
}
@@ -641,7 +645,7 @@
switch(curChar)
{
case 111:
- return jjMoveStringLiteralDfa9_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa9_1(active0, 0x40000000000L);
default :
break;
}
@@ -659,8 +663,8 @@
switch(curChar)
{
case 102:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStartNfaWithStates_1(9, 44, 36);
+ if ((active0 & 0x40000000000L) != 0L)
+ return jjStartNfaWithStates_1(9, 42, 30);
break;
default :
break;
@@ -696,7 +700,7 @@
private int jjMoveNfa_1(int startState, int curPos)
{
int startsAt = 0;
- jjnewStateCnt = 36;
+ jjnewStateCnt = 30;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
@@ -714,42 +718,42 @@
case 0:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 9)
- kind = 9;
- jjCheckNAddStates(4, 8);
+ if (kind > 8)
+ kind = 8;
+ jjCheckNAddStates(18, 22);
}
else if ((0x1800000000L & l) != 0L)
{
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
}
else if (curChar == 39)
- jjCheckNAddStates(9, 13);
+ jjCheckNAddStates(23, 25);
else if (curChar == 34)
- jjCheckNAddStates(14, 18);
+ jjCheckNAddStates(26, 28);
else if (curChar == 46)
jjCheckNAdd(1);
break;
- case 36:
+ case 30:
if ((0x3ff001000000000L & l) != 0L)
{
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
}
if ((0x3ff001000000000L & l) != 0L)
{
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
}
break;
case 1:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 10)
- kind = 10;
+ if (kind > 9)
+ kind = 9;
jjCheckNAddTwoStates(1, 2);
break;
case 3:
@@ -759,136 +763,120 @@
case 4:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 10)
- kind = 10;
+ if (kind > 9)
+ kind = 9;
jjCheckNAdd(4);
break;
case 5:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 9)
- kind = 9;
- jjCheckNAddStates(4, 8);
+ if (curChar == 34)
+ jjCheckNAddStates(26, 28);
break;
case 6:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 9)
- kind = 9;
- jjCheckNAdd(6);
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddStates(26, 28);
break;
- case 7:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(7, 8);
- break;
case 8:
- if (curChar != 46)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(9, 10);
+ if ((0x8400000000L & l) != 0L)
+ jjCheckNAddStates(26, 28);
break;
case 9:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(9, 10);
+ if (curChar == 34 && kind > 11)
+ kind = 11;
break;
+ case 10:
+ if (curChar == 39)
+ jjCheckNAddStates(23, 25);
+ break;
case 11:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(12);
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(23, 25);
break;
- case 12:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAdd(12);
- break;
case 13:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(13, 14);
+ if ((0x8400000000L & l) != 0L)
+ jjCheckNAddStates(23, 25);
break;
+ case 14:
+ if (curChar == 39 && kind > 11)
+ kind = 11;
+ break;
case 15:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(16);
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 8)
+ kind = 8;
+ jjCheckNAddStates(18, 22);
break;
case 16:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 10)
- kind = 10;
+ if (kind > 8)
+ kind = 8;
jjCheckNAdd(16);
break;
case 17:
- if (curChar == 34)
- jjCheckNAddStates(14, 18);
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(17, 18);
break;
case 18:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
+ if (curChar != 46)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAddTwoStates(19, 20);
break;
- case 20:
- if (curChar == 34)
- jjCheckNAddStates(19, 21);
+ case 19:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAddTwoStates(19, 20);
break;
case 21:
- if (curChar == 34 && kind > 12)
- kind = 12;
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(22);
break;
case 22:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(22, 23);
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAdd(22);
break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 13)
- kind = 13;
+ case 23:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(23, 24);
break;
case 25:
- if (curChar == 39)
- jjCheckNAddStates(9, 13);
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(26);
break;
case 26:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAdd(26);
break;
- case 28:
- if (curChar == 39)
- jjCheckNAddStates(22, 24);
- break;
- case 29:
- if (curChar == 39 && kind > 12)
- kind = 12;
- break;
- case 30:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(30, 31);
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 33:
+ case 27:
if ((0x1800000000L & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
break;
- case 34:
+ case 28:
if ((0x3ff001000000000L & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
break;
- case 35:
+ case 29:
if ((0x3ff001000000000L & l) == 0L)
break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
break;
default : break;
}
@@ -904,94 +892,73 @@
case 0:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
break;
- case 36:
+ case 30:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
}
break;
case 2:
if ((0x2000000020L & l) != 0L)
- jjAddStates(25, 26);
- break;
- case 10:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(27, 28);
- break;
- case 14:
- if ((0x2000000020L & l) != 0L)
jjAddStates(29, 30);
break;
- case 18:
+ case 6:
if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
+ jjCheckNAddStates(26, 28);
break;
- case 19:
+ case 7:
if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 20;
+ jjstateSet[jjnewStateCnt++] = 8;
break;
- case 20:
+ case 8:
if (curChar == 92)
- jjCheckNAddStates(19, 21);
+ jjCheckNAddStates(26, 28);
break;
- case 22:
+ case 11:
if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(31, 32);
+ jjCheckNAddStates(23, 25);
break;
- case 23:
+ case 12:
if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 24;
+ jjstateSet[jjnewStateCnt++] = 13;
break;
- case 24:
- case 32:
- if ((0xffffffffefffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 26:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
- break;
- case 27:
+ case 13:
if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 28;
+ jjCheckNAddStates(23, 25);
break;
- case 28:
- if (curChar == 92)
- jjCheckNAddStates(22, 24);
+ case 20:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(31, 32);
break;
- case 30:
- if ((0xffffffffefffffffL & l) != 0L)
+ case 24:
+ if ((0x2000000020L & l) != 0L)
jjAddStates(33, 34);
break;
- case 31:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 32;
- break;
- case 34:
+ case 28:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
break;
- case 35:
+ case 29:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
break;
default : break;
}
@@ -1011,58 +978,45 @@
case 0:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
break;
- case 36:
+ case 30:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
{
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
}
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
{
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
}
break;
- case 18:
+ case 6:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(19, 21);
+ jjAddStates(26, 28);
break;
- case 22:
+ case 11:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(31, 32);
+ jjAddStates(23, 25);
break;
- case 24:
- case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 13)
- kind = 13;
- break;
- case 26:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(22, 24);
- break;
- case 30:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(33, 34);
- break;
- case 34:
+ case 28:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
break;
- case 35:
+ case 29:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
break;
default : break;
}
@@ -1075,16 +1029,16 @@
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
+ if ((i = jjnewStateCnt) == (startsAt = 30 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
static final int[] jjnextStates = {
- 0, 1, 3, 5, 6, 7, 8, 13, 14, 26, 27, 29, 30, 31, 18, 19,
- 21, 22, 23, 18, 19, 21, 26, 27, 29, 3, 4, 11, 12, 15, 16, 22,
- 23, 30, 31,
+ 0, 1, 3, 4, 2, 0, 1, 4, 2, 0, 1, 4, 5, 2, 0, 1,
+ 2, 6, 16, 17, 18, 23, 24, 11, 12, 14, 6, 7, 9, 3, 4, 21,
+ 22, 25, 26,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
@@ -1122,12 +1076,12 @@
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
"", null, "\44\173", "\43\173", null, null, null, null,
null, null, null, null,
-null, null, "\164\162\165\145", "\146\141\154\163\145",
"\156\165\154\154", "\175",
-"\56", "\50", "\51", "\133", "\135",
"\72", "\54", "\76", "\147\164", "\74",
-"\154\164", "\76\75", "\147\145", "\74\75",
"\154\145", "\75\75", "\145\161", "\41\75",
-"\156\145", "\41", "\156\157\164", "\46\46",
"\141\156\144", "\174\174", "\157\162",
-"\145\155\160\164\171", "\151\156\163\164\141\156\143\145\157\146",
"\52", "\53", "\55", "\77", "\57",
-"\144\151\166", "\45", "\155\157\144", null, null, null,
null, null, null, };
+"\164\162\165\145", "\146\141\154\163\145",
"\156\165\154\154", "\175", "\56", "\50",
"\51",
+"\133", "\135", "\72", "\54", "\76",
"\147\164", "\74", "\154\164", "\76\75",
+"\147\145", "\74\75", "\154\145", "\75\75",
"\145\161", "\41\75", "\156\145", "\41",
+"\156\157\164", "\46\46", "\141\156\144",
"\174\174", "\157\162", "\145\155\160\164\171",
+"\151\156\163\164\141\156\143\145\157\146", "\52", "\53",
"\55", "\77", "\57", "\144\151\166",
"\45", "\155\157\144", null,
+null, null, null, null, null, };
/** Lexer state names. */
public static final String[] lexStateNames = {
@@ -1137,19 +1091,19 @@
/** Lex State array. */
public static final int[] jjnewLexState = {
- -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1,
-1, -1, -1,
+ -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
-1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1,
};
static final long[] jjtoToken = {
- 0x47ffffffffff60fL,
+ 0x11ffffffffffb0fL,
};
static final long[] jjtoSkip = {
- 0x1f0L,
+ 0xf0L,
};
protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[36];
-private final int[] jjstateSet = new int[72];
+private final int[] jjrounds = new int[30];
+private final int[] jjstateSet = new int[60];
protected char curChar;
/** Constructor. */
public ELParserTokenManager(SimpleCharStream stream){
@@ -1176,7 +1130,7 @@
{
int i;
jjround = 0x80000001;
- for (i = 36; i-- > 0;)
+ for (i = 30; i-- > 0;)
jjrounds[i] = 0x80000000;
}
@@ -1263,9 +1217,9 @@
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
- if (jjmatchedPos == 0 && jjmatchedKind > 58)
+ if (jjmatchedPos == 0 && jjmatchedKind > 56)
{
- jjmatchedKind = 58;
+ jjmatchedKind = 56;
}
break;
}
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTreeConstants.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTreeConstants.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ELParserTreeConstants.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ELParserTreeConstants.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. ELParserTreeConstants.java Version 5.0 */
package org.apache.el.parser;
public interface ELParserTreeConstants
@@ -74,4 +74,4 @@
"Null",
};
}
-/* JavaCC - OriginalChecksum=bf4d2e0f35a3199e11bfd8303212d1ad (do not edit this line) */
+/* JavaCC - OriginalChecksum=f9dfeaba39219034209bcc010ceeafc5 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/JJTELParserState.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/JJTELParserState.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/JJTELParserState.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1,17 +1,17 @@
-/* Generated By:JavaCC: Do not edit this line. JJTELParserState.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. JJTELParserState.java Version 5.0 */
package org.apache.el.parser;
public class JJTELParserState {
- private java.util.List nodes;
- private java.util.List marks;
+ private java.util.List<Node> nodes;
+ private java.util.List<Integer> marks;
private int sp; // number of nodes on stack
private int mk; // current mark
private boolean node_created;
public JJTELParserState() {
- nodes = new java.util.ArrayList();
- marks = new java.util.ArrayList();
+ nodes = new java.util.ArrayList<Node>();
+ marks = new java.util.ArrayList<Integer>();
sp = 0;
mk = 0;
}
@@ -35,7 +35,7 @@
/* Returns the root node of the AST. It only makes sense to call
this after a successful parse. */
public Node rootNode() {
- return (Node)nodes.get(0);
+ return nodes.get(0);
}
/* Pushes a node on to the stack. */
@@ -48,14 +48,14 @@
stack. */
public Node popNode() {
if (--sp < mk) {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
}
- return (Node)nodes.remove(nodes.size()-1);
+ return nodes.remove(nodes.size()-1);
}
/* Returns the node currently on the top of the stack. */
public Node peekNode() {
- return (Node)nodes.get(nodes.size()-1);
+ return nodes.get(nodes.size()-1);
}
/* Returns the number of children on the stack in the current node
@@ -69,12 +69,12 @@
while (sp > mk) {
popNode();
}
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
}
public void openNodeScope(Node n) {
- marks.add(new Integer(mk));
+ marks.add(mk);
mk = sp;
n.jjtOpen();
}
@@ -85,7 +85,7 @@
made the children of the definite node. Then the definite node
is pushed on to the stack. */
public void closeNodeScope(Node n, int num) {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
while (num-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
@@ -105,7 +105,7 @@
public void closeNodeScope(Node n, boolean condition) {
if (condition) {
int a = nodeArity();
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
while (a-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
@@ -115,9 +115,9 @@
pushNode(n);
node_created = true;
} else {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
node_created = false;
}
}
}
-/* JavaCC - OriginalChecksum=302852ad347878d613824b11862fef15 (do not edit this line) */
+/* JavaCC - OriginalChecksum=70ac39f1e0e1eed7476e1dae2dfa25fa (do not edit this line) */
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Node.java
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Node.java 2011-08-23
11:23:01 UTC (rev 1823)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Node.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -68,4 +68,5 @@
public void accept(NodeVisitor visitor) throws Exception;
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws
ELException;
public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues)
throws ELException;
+ public boolean isParametersProvided();
}
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ParseException.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ParseException.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/ParseException.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
/* JavaCCOptions:KEEP_LINE_COL=null */
package org.apache.el.parser;
@@ -14,24 +14,24 @@
public class ParseException extends Exception {
/**
+ * The version identifier for this Serializable class.
+ * Increment only if the <i>serialized</i> form of the
+ * class changes.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
* This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
* a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set. The boolean
- * flag "specialConstructor" is also set to true to indicate that
- * this constructor was used to create this object.
- * This constructor calls its super class with the empty string
- * to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
+ * "expectedTokenSequences", and "tokenImage" set.
*/
public ParseException(Token currentTokenVal,
int[][] expectedTokenSequencesVal,
String[] tokenImageVal
)
{
- super("");
- specialConstructor = true;
+ super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
currentToken = currentTokenVal;
expectedTokenSequences = expectedTokenSequencesVal;
tokenImage = tokenImageVal;
@@ -49,21 +49,13 @@
public ParseException() {
super();
- specialConstructor = false;
}
/** Constructor with message. */
public ParseException(String message) {
super(message);
- specialConstructor = false;
}
- /**
- * This variable determines which constructor was used to create
- * this object and thereby affects the semantics of the
- * "getMessage" method (see below).
- */
- protected boolean specialConstructor;
/**
* This is the last token that has been consumed successfully. If
@@ -87,19 +79,16 @@
public String[] tokenImage;
/**
- * This method has the standard behavior when this object has been
- * created using the standard constructors. Otherwise, it uses
- * "currentToken" and "expectedTokenSequences" to generate a parse
+ * It uses "currentToken" and "expectedTokenSequences" to generate
a parse
* error message and returns it. If this object has been created
* due to a parse error, and you do not catch it (it gets thrown
- * from the parser), then this method is called during the printing
- * of the final stack trace, and hence the correct error message
+ * from the parser) the correct error message
* gets displayed.
*/
- public String getMessage() {
- if (!specialConstructor) {
- return super.getMessage();
- }
+ private static String initialise(Token currentToken,
+ int[][] expectedTokenSequences,
+ String[] tokenImage) {
+ String eol = System.getProperty("line.separator", "\n");
StringBuffer expected = new StringBuffer();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
@@ -149,7 +138,7 @@
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
- protected String add_escapes(String str) {
+ static String add_escapes(String str) {
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
@@ -195,4 +184,4 @@
}
}
-/* JavaCC - OriginalChecksum=8e2ccd67f74aad88b27a1262c61e9157 (do not edit this line) */
+/* JavaCC - OriginalChecksum=87586a39aa89f164889cc59bc6a7e7ad (do not edit this line) */
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleCharStream.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleCharStream.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleCharStream.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */
-/* JavaCCOptions:STATIC=false */
+/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.apache.el.parser;
/**
@@ -38,192 +38,192 @@
protected void ExpandBuff(boolean wrapAround)
{
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
+ char[] newbuffer = new char[bufsize + 2048];
+ int newbufline[] = new int[bufsize + 2048];
+ int newbufcolumn[] = new int[bufsize + 2048];
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer,
- bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
+ try
+ {
+ if (wrapAround)
+ {
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+ System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
+ buffer = newbuffer;
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+ bufline = newbufline;
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize -
tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+ bufcolumn = newbufcolumn;
- maxNextCharInd = (bufpos += (bufsize - tokenBegin));
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
+ maxNextCharInd = (bufpos += (bufsize - tokenBegin));
+ }
+ else
+ {
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+ buffer = newbuffer;
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+ bufline = newbufline;
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize -
tokenBegin);
- bufcolumn = newbufcolumn;
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+ bufcolumn = newbufcolumn;
- maxNextCharInd = (bufpos -= tokenBegin);
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
- }
+ maxNextCharInd = (bufpos -= tokenBegin);
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new Error(t.getMessage());
+ }
- bufsize += 2048;
- available = bufsize;
- tokenBegin = 0;
+ bufsize += 2048;
+ available = bufsize;
+ tokenBegin = 0;
}
protected void FillBuff() throws java.io.IOException
{
- if (maxNextCharInd == available)
- {
- if (available == bufsize)
+ if (maxNextCharInd == available)
+ {
+ if (available == bufsize)
+ {
+ if (tokenBegin > 2048)
{
- if (tokenBegin > 2048)
- {
- bufpos = maxNextCharInd = 0;
- available = tokenBegin;
- }
- else if (tokenBegin < 0)
- bufpos = maxNextCharInd = 0;
- else
- ExpandBuff(false);
+ bufpos = maxNextCharInd = 0;
+ available = tokenBegin;
}
- else if (available > tokenBegin)
- available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
+ else if (tokenBegin < 0)
+ bufpos = maxNextCharInd = 0;
else
- available = tokenBegin;
- }
+ ExpandBuff(false);
+ }
+ else if (available > tokenBegin)
+ available = bufsize;
+ else if ((tokenBegin - available) < 2048)
+ ExpandBuff(true);
+ else
+ available = tokenBegin;
+ }
- int i;
- try {
- if ((i = inputStream.read(buffer, maxNextCharInd,
- available - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
- }
- catch(java.io.IOException e) {
- --bufpos;
- backup(0);
- if (tokenBegin == -1)
- tokenBegin = bufpos;
- throw e;
- }
+ int i;
+ try {
+ if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) ==
-1)
+ {
+ inputStream.close();
+ throw new java.io.IOException();
+ }
+ else
+ maxNextCharInd += i;
+ return;
+ }
+ catch(java.io.IOException e) {
+ --bufpos;
+ backup(0);
+ if (tokenBegin == -1)
+ tokenBegin = bufpos;
+ throw e;
+ }
}
/** Start. */
public char BeginToken() throws java.io.IOException
{
- tokenBegin = -1;
- char c = readChar();
- tokenBegin = bufpos;
+ tokenBegin = -1;
+ char c = readChar();
+ tokenBegin = bufpos;
- return c;
+ return c;
}
protected void UpdateLineColumn(char c)
{
- column++;
+ column++;
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
+ if (prevCharIsLF)
+ {
+ prevCharIsLF = false;
+ line += (column = 1);
+ }
+ else if (prevCharIsCR)
+ {
+ prevCharIsCR = false;
+ if (c == '\n')
+ {
+ prevCharIsLF = true;
+ }
+ else
line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
- }
+ }
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (tabSize - (column % tabSize));
- break;
- default :
- break;
- }
+ switch (c)
+ {
+ case '\r' :
+ prevCharIsCR = true;
+ break;
+ case '\n' :
+ prevCharIsLF = true;
+ break;
+ case '\t' :
+ column--;
+ column += (tabSize - (column % tabSize));
+ break;
+ default :
+ break;
+ }
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
+ bufline[bufpos] = line;
+ bufcolumn[bufpos] = column;
}
/** Read a character. */
public char readChar() throws java.io.IOException
{
- if (inBuf > 0)
- {
- --inBuf;
+ if (inBuf > 0)
+ {
+ --inBuf;
- if (++bufpos == bufsize)
- bufpos = 0;
+ if (++bufpos == bufsize)
+ bufpos = 0;
- return buffer[bufpos];
- }
+ return buffer[bufpos];
+ }
- if (++bufpos >= maxNextCharInd)
- FillBuff();
+ if (++bufpos >= maxNextCharInd)
+ FillBuff();
- char c = buffer[bufpos];
+ char c = buffer[bufpos];
- UpdateLineColumn(c);
- return c;
+ UpdateLineColumn(c);
+ return c;
}
+ @Deprecated
/**
* @deprecated
* @see #getEndColumn
*/
public int getColumn() {
- return bufcolumn[bufpos];
+ return bufcolumn[bufpos];
}
+ @Deprecated
/**
* @deprecated
* @see #getEndLine
*/
public int getLine() {
- return bufline[bufpos];
+ return bufline[bufpos];
}
/** Get token end column number. */
public int getEndColumn() {
- return bufcolumn[bufpos];
+ return bufcolumn[bufpos];
}
/** Get token end line number. */
@@ -233,12 +233,12 @@
/** Get token beginning column number. */
public int getBeginColumn() {
- return bufcolumn[tokenBegin];
+ return bufcolumn[tokenBegin];
}
/** Get token beginning line number. */
public int getBeginLine() {
- return bufline[tokenBegin];
+ return bufline[tokenBegin];
}
/** Backup a number of characters. */
@@ -246,7 +246,7 @@
inBuf += amount;
if ((bufpos -= amount) < 0)
- bufpos += bufsize;
+ bufpos += bufsize;
}
/** Constructor. */
@@ -267,13 +267,13 @@
public SimpleCharStream(java.io.Reader dstream, int startline,
int startcolumn)
{
- this(dstream, startline, startcolumn, 4096);
+ this(dstream, startline, startcolumn, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.Reader dstream)
{
- this(dstream, 1, 1, 4096);
+ this(dstream, 1, 1, 4096);
}
/** Reinitialise. */
@@ -300,124 +300,124 @@
public void ReInit(java.io.Reader dstream, int startline,
int startcolumn)
{
- ReInit(dstream, startline, startcolumn, 4096);
+ ReInit(dstream, startline, startcolumn, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.Reader dstream)
{
- ReInit(dstream, 1, 1, 4096);
+ ReInit(dstream, 1, 1, 4096);
}
/** Constructor. */
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);
+ this(encoding == null ? new java.io.InputStreamReader(dstream) : new
java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, int startline,
int startcolumn, int buffersize)
{
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
int startcolumn) throws java.io.UnsupportedEncodingException
{
- this(dstream, encoding, startline, startcolumn, 4096);
+ this(dstream, encoding, startline, startcolumn, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, int startline,
int startcolumn)
{
- this(dstream, startline, startcolumn, 4096);
+ this(dstream, startline, startcolumn, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding) throws
java.io.UnsupportedEncodingException
{
- this(dstream, encoding, 1, 1, 4096);
+ this(dstream, encoding, 1, 1, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream)
{
- this(dstream, 1, 1, 4096);
+ this(dstream, 1, 1, 4096);
}
/** Reinitialise. */
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);
+ ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new
java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, int startline,
int startcolumn, int buffersize)
{
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding) throws
java.io.UnsupportedEncodingException
{
- ReInit(dstream, encoding, 1, 1, 4096);
+ ReInit(dstream, encoding, 1, 1, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream)
{
- ReInit(dstream, 1, 1, 4096);
+ ReInit(dstream, 1, 1, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding, int startline,
int startcolumn) throws java.io.UnsupportedEncodingException
{
- ReInit(dstream, encoding, startline, startcolumn, 4096);
+ ReInit(dstream, encoding, startline, startcolumn, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, int startline,
int startcolumn)
{
- ReInit(dstream, startline, startcolumn, 4096);
+ ReInit(dstream, startline, startcolumn, 4096);
}
/** Get token literal value. */
public String GetImage()
{
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
+ if (bufpos >= tokenBegin)
+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+ else
+ return new String(buffer, tokenBegin, bufsize - tokenBegin) +
+ new String(buffer, 0, bufpos + 1);
}
/** Get the suffix. */
public char[] GetSuffix(int len)
{
- char[] ret = new char[len];
+ char[] ret = new char[len];
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
+ if ((bufpos + 1) >= len)
+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+ else
+ {
+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
+ len - bufpos - 1);
+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+ }
- return ret;
+ return ret;
}
/** Reset buffer when finished. */
public void Done()
{
- buffer = null;
- bufline = null;
- bufcolumn = null;
+ buffer = null;
+ bufline = null;
+ bufcolumn = null;
}
/**
@@ -425,48 +425,47 @@
*/
public void adjustBeginLineColumn(int newLine, int newCol)
{
- int start = tokenBegin;
- int len;
+ int start = tokenBegin;
+ int len;
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
+ if (bufpos >= tokenBegin)
+ {
+ len = bufpos - tokenBegin + inBuf + 1;
+ }
+ else
+ {
+ len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+ }
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
+ int i = 0, j = 0, k = 0;
+ int nextColDiff = 0, columnDiff = 0;
- while (i < len &&
- bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
+ while (i < len && bufline[j = start % bufsize] == bufline[k = ++start %
bufsize])
+ {
+ bufline[j] = newLine;
+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+ bufcolumn[j] = newCol + columnDiff;
+ columnDiff = nextColDiff;
+ i++;
+ }
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
+ if (i < len)
+ {
+ bufline[j] = newLine++;
+ bufcolumn[j] = newCol + columnDiff;
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
- else
- bufline[j] = newLine;
- }
- }
+ while (i++ < len)
+ {
+ if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+ bufline[j] = newLine++;
+ else
+ bufline[j] = newLine;
+ }
+ }
- line = bufline[j];
- column = bufcolumn[j];
+ line = bufline[j];
+ column = bufcolumn[j];
}
}
-/* JavaCC - OriginalChecksum=818cc1c71ac884d7a3756c5d760b3c8f (do not edit this line) */
+/* JavaCC - OriginalChecksum=9ba0db3918bffb8019f00da1e421f339 (do not edit this line) */
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleNode.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleNode.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/SimpleNode.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -157,4 +157,9 @@
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws
ELException {
throw new UnsupportedOperationException();
}
+
+ public boolean isParametersProvided() {
+ return false;
+ }
+
}
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Token.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Token.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/Token.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1,14 +1,21 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */
-/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
+/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true
*/
package org.apache.el.parser;
/**
* Describes the input token stream.
*/
-public class Token {
+public class Token implements java.io.Serializable {
/**
+ * The version identifier for this Serializable class.
+ * Increment only if the <i>serialized</i> form of the
+ * class changes.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
* An integer that describes the kind of this token. This numbering
* system is determined by JavaCCParser, and a table of these numbers is
* stored in the file ...Constants.java.
@@ -75,7 +82,7 @@
*/
public Token(int kind)
{
- this(kind, null);
+ this(kind, null);
}
/**
@@ -83,8 +90,8 @@
*/
public Token(int kind, String image)
{
- this.kind = kind;
- this.image = image;
+ this.kind = kind;
+ this.image = image;
}
/**
@@ -92,7 +99,7 @@
*/
public String toString()
{
- return image;
+ return image;
}
/**
@@ -109,16 +116,16 @@
*/
public static Token newToken(int ofKind, String image)
{
- switch(ofKind)
- {
- default : return new Token(ofKind, image);
- }
+ switch(ofKind)
+ {
+ default : return new Token(ofKind, image);
+ }
}
public static Token newToken(int ofKind)
{
- return newToken(ofKind, null);
+ return newToken(ofKind, null);
}
}
-/* JavaCC - OriginalChecksum=7feb61b391e60d3d8ef1a9482b26365e (do not edit this line) */
+/* JavaCC - OriginalChecksum=3fc97649fffa8b13e1e03af022020b2f (do not edit this line) */
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/TokenMgrError.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/TokenMgrError.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/el/parser/TokenMgrError.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
/* JavaCCOptions: */
package org.apache.el.parser;
@@ -6,135 +6,142 @@
public class TokenMgrError extends Error
{
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
+ /**
+ * The version identifier for this Serializable class.
+ * Increment only if the <i>serialized</i> form of the
+ * class changes.
+ */
+ private static final long serialVersionUID = 1L;
- /**
- * Lexical error occurred.
- */
- static final int LEXICAL_ERROR = 0;
+ /*
+ * Ordinals for various reasons why an Error of this type can be thrown.
+ */
- /**
- * An attempt was made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
+ /**
+ * Lexical error occurred.
+ */
+ static final int LEXICAL_ERROR = 0;
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
+ /**
+ * An attempt was made to create a second instance of a static token manager.
+ */
+ static final int STATIC_LEXER_ERROR = 1;
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
+ /**
+ * Tried to change to an invalid lexical state.
+ */
+ static final int INVALID_LEXICAL_STATE = 2;
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
+ /**
+ * Detected (and bailed out of) an infinite loop in the token manager.
+ */
+ static final int LOOP_DETECTED = 3;
- /**
- * Replaces unprintable characters by their escaped (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4,
s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
+ /**
+ * Indicates the reason why the exception is thrown. It will have
+ * one of the above 4 values.
+ */
+ int errorCode;
+
+ /**
+ * Replaces unprintable characters by their escaped (or unicode escaped)
+ * equivalents in the given string
+ */
+ protected static final String addEscapes(String str) {
+ StringBuffer retval = new StringBuffer();
+ char ch;
+ for (int i = 0; i < str.length(); i++) {
+ switch (str.charAt(i))
+ {
+ case 0 :
+ continue;
+ case '\b':
+ retval.append("\\b");
+ continue;
+ case '\t':
+ retval.append("\\t");
+ continue;
+ case '\n':
+ retval.append("\\n");
+ continue;
+ case '\f':
+ retval.append("\\f");
+ continue;
+ case '\r':
+ retval.append("\\r");
+ continue;
+ case '\"':
+ retval.append("\\\"");
+ continue;
+ case '\'':
+ retval.append("\\\'");
+ continue;
+ case '\\':
+ retval.append("\\\\");
+ continue;
+ default:
+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
+ String s = "0000" + Integer.toString(ch, 16);
+ retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ } else {
+ retval.append(ch);
+ }
+ continue;
}
- return retval.toString();
- }
+ }
+ return retval.toString();
+ }
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the lexical error
- * curLexState : lexical state in which this error occurred
- * errorLine : line number when the error occurred
- * errorColumn : column number when the error occurred
- * errorAfter : prefix that was seen before this error occurred
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int
errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" +
addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar
+ "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
+ /**
+ * Returns a detailed message for the Error when it is thrown by the
+ * token manager to indicate a lexical error.
+ * Parameters :
+ * EOFSeen : indicates if EOF caused the lexical error
+ * curLexState : lexical state in which this error occurred
+ * errorLine : line number when the error occurred
+ * errorColumn : column number when the error occurred
+ * errorAfter : prefix that was seen before this error occurred
+ * curchar : the offending character
+ * Note: You can customize the lexical error message by modifying this method.
+ */
+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int
errorColumn, String errorAfter, char curChar) {
+ return("Lexical error at line " +
+ errorLine + ", column " +
+ errorColumn + ". Encountered: " +
+ (EOFSeen ? "<EOF> " : ("\"" +
addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar
+ "), ") +
+ "after : \"" + addEscapes(errorAfter) + "\"");
+ }
- /**
- * 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 :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
+ /**
+ * 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 :
+ *
+ * "Internal Error : Please file a bug report .... "
+ *
+ * from this method for such cases in the release version of your parser.
+ */
+ public String getMessage() {
+ return super.getMessage();
+ }
- /*
- * Constructors of various flavors follow.
- */
+ /*
+ * Constructors of various flavors follow.
+ */
- /** No arg constructor. */
- public TokenMgrError() {
- }
+ /** No arg constructor. */
+ public TokenMgrError() {
+ }
- /** Constructor with message and reason. */
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
+ /** Constructor with message and reason. */
+ public TokenMgrError(String message, int reason) {
+ super(message);
+ errorCode = reason;
+ }
- /** Full Constructor. */
- public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn,
String errorAfter, char curChar, int reason) {
- this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason);
- }
+ /** Full Constructor. */
+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn,
String errorAfter, char curChar, int reason) {
+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
reason);
+ }
}
-/* JavaCC - OriginalChecksum=6b523b4a5c49e1ee9e58afea685a63ce (do not edit this line) */
+/* JavaCC - OriginalChecksum=de3ff0bacfb0fe749cc8eaf56ae82fea (do not edit this line) */
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/ELParser.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/ELParser.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/ELParser.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -31,6 +31,7 @@
public class ELParser {
private Token curToken; // current token
+ private Token prevToken; // previous token
private ELNode.Nodes expr;
@@ -118,27 +119,28 @@
* arguments
*/
private boolean parseFunction() {
- if (!(curToken instanceof Id) || isELReserved(curToken.toString())) {
+ if (!(curToken instanceof Id) || isELReserved(curToken.toString()) ||
+ prevToken instanceof Char && prevToken.toChar() == '.')
{
return false;
}
String s1 = null; // Function prefix
String s2 = curToken.toString(); // Function name
int mark = getIndex();
if (hasNext()) {
- Token t = nextToken();
- if (t.toChar() == ':') {
+ curToken = nextToken();
+ if (curToken.toChar() == ':') {
if (hasNext()) {
Token t2 = nextToken();
if (t2 instanceof Id) {
s1 = s2;
s2 = t2.toString();
if (hasNext()) {
- t = nextToken();
+ curToken = nextToken();
}
}
}
}
- if (t.toChar() == '(') {
+ if (curToken.toChar() == '(') {
ELexpr.add(new ELNode.Function(s1, s2));
return true;
}
@@ -223,6 +225,7 @@
* @return The next token in the EL expression buffer.
*/
private Token nextToken() {
+ prevToken = curToken;
skipSpaces();
if (hasNextChar()) {
char ch = nextChar();
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Generator.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Generator.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Generator.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -813,8 +813,8 @@
}
return v;
} else if (attr.isELInterpreterInput()) {
- v = attributeValueWithEL(this.isTagFile, v, expectedType,
- attr.getEL().getMapName());
+ v = JspUtil.interpreterCall(this.isTagFile, v, expectedType,
+ attr.getEL().getMapName(), false);
if (encode) {
return
"org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("
+ v + ", request.getCharacterEncoding())";
@@ -832,72 +832,6 @@
}
- /*
- * When interpreting the EL attribute value, literals outside the EL
- * must not be unescaped but the EL processor will unescape them.
- * Therefore, make sure only the EL expressions are processed by the EL
- * processor.
- */
- private String attributeValueWithEL(boolean isTag, String tx,
- Class<?> expectedType, String mapName) {
- if (tx==null) return null;
- Class<?> type = expectedType;
- int size = tx.length();
- StringBuffer output = new StringBuffer(size);
- boolean el = false;
- int i = 0;
- int mark = 0;
- char ch;
-
- while(i < size){
- ch = tx.charAt(i);
-
- // Start of an EL expression
- if (!el && i+1 < size && ch == '$' &&
tx.charAt(i+1)=='{') {
- if (mark < i) {
- if (output.length() > 0) {
- output.append(" + ");
- // Composite expression - must coerce to String
- type = String.class;
- }
- output.append(quote(tx.substring(mark, i)));
- }
- mark = i;
- el = true;
- i += 2;
- } else if (ch=='\\' && i+1 < size &&
- (tx.charAt(i+1)=='$' || tx.charAt(i+1)=='}')) {
- // Skip an escaped $ or }
- i += 2;
- } else if (el && ch=='}') {
- // End of an EL expression
- if (output.length() > 0) {
- output.append(" + ");
- // Composite expression - must coerce to String
- type = String.class;
- }
- output.append(
- JspUtil.interpreterCall(isTag,
- tx.substring(mark, i+1), type,
- mapName, false));
- mark = i + 1;
- el = false;
- ++i;
- } else {
- // Nothing to see here - move to next character
- ++i;
- }
- }
- if (!el && mark < i) {
- if (output.length() > 0) {
- output.append(" + ");
- }
- output.append(quote(tx.substring(mark, i)));
- }
- return output.toString();
- }
-
-
/**
* Prints the attribute value specified in the param action, in the form
* of name=value string.
@@ -2914,8 +2848,8 @@
// run attrValue through the expression interpreter
String mapName = (attr.getEL() != null) ? attr.getEL()
.getMapName() : null;
- attrValue = attributeValueWithEL(this.isTagFile,
- attrValue, c[0], mapName);
+ attrValue = JspUtil.interpreterCall(this.isTagFile, attrValue,
+ c[0], mapName, false);
}
} else {
attrValue = convertString(c[0], attrValue, localName,
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Parser.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Parser.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/compiler/Parser.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -74,11 +74,6 @@
private static final String JAVAX_BODY_CONTENT_TEMPLATE_TEXT =
"JAVAX_BODY_CONTENT_TEMPLATE_TEXT";
- private static final boolean STRICT_QUOTE_ESCAPING = Boolean.valueOf(
- System.getProperty(
- "org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING",
- "true")).booleanValue();
-
/**
* The constructor
*/
@@ -245,66 +240,25 @@
err.jspError(start, "jsp.error.attribute.unterminated", watch);
}
- String ret = parseQuoted(start, reader.getText(start, stop),
- watch.charAt(watch.length() - 1));
+ String ret = null;
+ try {
+ char quote = 0;
+ if (watch.length() == 1) {
+ quote = watch.charAt(0);
+ }
+ ret = AttributeParser.getUnquoted(reader.getText(start, stop),
+ quote, pageInfo.isELIgnored());
+ } catch (IllegalArgumentException iae) {
+ err.jspError(start, iae.getMessage());
+ }
if (watch.length() == 1) // quote
return ret;
- // putback delimiter '<%=' and '%>', since they are needed
if the
+ // Put back delimiter '<%=' and '%>', since they are needed
if the
// attribute does not allow RTexpression.
return "<%=" + ret + "%>";
}
- /**
- * QuotedChar ::= ''' | '"' | '\\' |
'\"' | "\'" | '\>' | '\$' |
- * Char
- */
- private String parseQuoted(Mark start, String tx, char quote)
- throws JasperException {
- StringBuffer buf = new StringBuffer();
- int size = tx.length();
- int i = 0;
- while (i < size) {
- char ch = tx.charAt(i);
- if (ch == '&') {
- if (i + 5 < size && tx.charAt(i + 1) == 'a'
- && tx.charAt(i + 2) == 'p' && tx.charAt(i
+ 3) == 'o'
- && tx.charAt(i + 4) == 's' && tx.charAt(i
+ 5) == ';') {
- buf.append('\'');
- i += 6;
- } else if (i + 5 < size && tx.charAt(i + 1) == 'q'
- && tx.charAt(i + 2) == 'u' && tx.charAt(i
+ 3) == 'o'
- && tx.charAt(i + 4) == 't' && tx.charAt(i
+ 5) == ';') {
- buf.append('"');
- i += 6;
- } else {
- buf.append(ch);
- ++i;
- }
- } else if (ch == '\\' && i + 1 < size) {
- ch = tx.charAt(i + 1);
- if (ch == '\\' || ch == '\"' || ch ==
'\'' || ch == '>') {
- // \ " and ' are always unescaped regardless of if they are
- // inside or outside of an EL expression. JSP.1.6 takes
- // precedence over JSP.1.3.10 (confirmed with EG).
- buf.append(ch);
- i += 2;
- } else {
- buf.append('\\');
- ++i;
- }
- } else if (ch == quote && STRICT_QUOTE_ESCAPING) {
- // Unescaped quote character
- err.jspError(start, "jsp.error.attribute.noescape", tx,
- "" + quote);
- } else {
- buf.append(ch);
- ++i;
- }
- }
- return buf.toString();
- }
-
private String parseScriptText(String tx) {
CharArrayWriter cw = new CharArrayWriter();
int size = tx.length();
Modified:
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
===================================================================
---
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2011-08-23
11:23:01 UTC (rev 1823)
+++
branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2011-08-23
13:46:59 UTC (rev 1824)
@@ -51,7 +51,7 @@
private final static String KEY = JspApplicationContextImpl.class.getName();
- private final static ExpressionFactory expressionFactory = new ExpressionFactoryImpl();
+ private final static ExpressionFactory expressionFactory = new
ExpressionFactoryImpl();
private final List<ELContextListener> contextListeners = new
ArrayList<ELContextListener>();
Modified: branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/webapps/docs/changelog.xml
===================================================================
--- branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/webapps/docs/changelog.xml 2011-08-23 11:23:01
UTC (rev 1823)
+++ branches/JBOSSWEB_2_1_10_GA_JBPAPP-7007/webapps/docs/changelog.xml 2011-08-23 13:46:59
UTC (rev 1824)
@@ -29,6 +29,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ EL escaping fixes. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+
</section>
<section name="JBoss Web 2.1.9.GA (remm)">
@@ -63,6 +71,13 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>49081</bug>: EL parsing fix. (markt)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="JBoss Web 2.1.7.GA (remm)">