You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2025/06/19 10:28:53 UTC
(tomcat) branch 9.0.x updated: Drop IMPL_OBJ_START from parser
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new eea7dea0c6 Drop IMPL_OBJ_START from parser
eea7dea0c6 is described below
commit eea7dea0c6bd0ff57ea0c4e99e7dfbd627f70596
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 19 11:28:47 2025 +0100
Drop IMPL_OBJ_START from parser
---
java/org/apache/el/parser/ELParser.java | 4 ++--
java/org/apache/el/parser/ELParser.jjt | 3 +--
java/org/apache/el/parser/ELParserConstants.java | 10 ++++------
.../org/apache/el/parser/ELParserTokenManager.java | 22 +++++++++++-----------
webapps/docs/changelog.xml | 8 ++++++++
5 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/java/org/apache/el/parser/ELParser.java b/java/org/apache/el/parser/ELParser.java
index 35eef0941c..3d2bbcb4cd 100644
--- a/java/org/apache/el/parser/ELParser.java
+++ b/java/org/apache/el/parser/ELParser.java
@@ -4189,7 +4189,7 @@ public class ELParser/* @bgen(jjtree) */ implements ELParserTreeConstants, ELPar
/** Generate ParseException. */
public ParseException generateParseException() {
jj_expentries.clear();
- boolean[] la1tokens = new boolean[62];
+ boolean[] la1tokens = new boolean[61];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
@@ -4206,7 +4206,7 @@ public class ELParser/* @bgen(jjtree) */ implements ELParserTreeConstants, ELPar
}
}
}
- for (int i = 0; i < 62; i++) {
+ for (int i = 0; i < 61; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
diff --git a/java/org/apache/el/parser/ELParser.jjt b/java/org/apache/el/parser/ELParser.jjt
index 8ebaab1bc3..fca64c0408 100644
--- a/java/org/apache/el/parser/ELParser.jjt
+++ b/java/org/apache/el/parser/ELParser.jjt
@@ -547,9 +547,8 @@ java.util.Deque<Integer> deque = new java.util.ArrayDeque<Integer>();
| < CONCAT : "+=" >
| < ASSIGN : "=" >
| < ARROW : "->" >
-| < IDENTIFIER : (<JAVALETTER>|<IMPL_OBJ_START>) (<JAVALETTER>|<JAVADIGIT>)* >
+| < IDENTIFIER : <JAVALETTER> (<JAVALETTER>|<JAVADIGIT>)* >
| < FUNCTIONSUFFIX : (<IDENTIFIER>) >
-| < #IMPL_OBJ_START: "#" >
| < #JAVALETTER:
[
"\u0024",
diff --git a/java/org/apache/el/parser/ELParserConstants.java b/java/org/apache/el/parser/ELParserConstants.java
index abec2c050a..82d6364fab 100644
--- a/java/org/apache/el/parser/ELParserConstants.java
+++ b/java/org/apache/el/parser/ELParserConstants.java
@@ -116,13 +116,11 @@ public interface ELParserConstants {
/** RegularExpression Id. */
int FUNCTIONSUFFIX = 57;
/** RegularExpression Id. */
- int IMPL_OBJ_START = 58;
+ int JAVALETTER = 58;
/** RegularExpression Id. */
- int JAVALETTER = 59;
+ int JAVADIGIT = 59;
/** RegularExpression Id. */
- int JAVADIGIT = 60;
- /** RegularExpression Id. */
- int ILLEGAL_CHARACTER = 61;
+ int ILLEGAL_CHARACTER = 60;
/** Lexical state. */
int DEFAULT = 0;
@@ -138,7 +136,7 @@ public interface ELParserConstants {
"\":\"", "\";\"", "\",\"", "\">\"", "\"gt\"", "\"<\"", "\"lt\"", "\">=\"", "\"ge\"", "\"<=\"", "\"le\"",
"\"==\"", "\"eq\"", "\"!=\"", "\"ne\"", "\"!\"", "\"not\"", "\"&&\"", "\"and\"", "\"||\"", "\"or\"",
"\"empty\"", "\"instanceof\"", "\"*\"", "\"+\"", "\"-\"", "\"?\"", "\"/\"", "\"div\"", "\"%\"", "\"mod\"",
- "\"+=\"", "\"=\"", "\"->\"", "<IDENTIFIER>", "<FUNCTIONSUFFIX>", "\"#\"", "<JAVALETTER>", "<JAVADIGIT>",
+ "\"+=\"", "\"=\"", "\"->\"", "<IDENTIFIER>", "<FUNCTIONSUFFIX>", "<JAVALETTER>", "<JAVADIGIT>",
"<ILLEGAL_CHARACTER>", };
}
diff --git a/java/org/apache/el/parser/ELParserTokenManager.java b/java/org/apache/el/parser/ELParserTokenManager.java
index 17e0f7b0bb..e28776591c 100644
--- a/java/org/apache/el/parser/ELParserTokenManager.java
+++ b/java/org/apache/el/parser/ELParserTokenManager.java
@@ -890,7 +890,7 @@ public class ELParserTokenManager implements ELParserConstants {
{
jjCheckNAddStates(18, 22);
}
- } else if ((0x1800000000L & l) != 0L) {
+ } else if (curChar == 36) {
if (kind > 56) {
kind = 56;
}
@@ -1069,7 +1069,7 @@ public class ELParserTokenManager implements ELParserConstants {
}
break;
case 27:
- if ((0x1800000000L & l) == 0L) {
+ if (curChar != 36) {
break;
}
if (kind > 56) {
@@ -1775,7 +1775,7 @@ public class ELParserTokenManager implements ELParserConstants {
{
jjCheckNAddStates(18, 22);
}
- } else if ((0x1800000000L & l) != 0L) {
+ } else if (curChar == 36) {
if (kind > 56) {
kind = 56;
}
@@ -1954,7 +1954,7 @@ public class ELParserTokenManager implements ELParserConstants {
}
break;
case 27:
- if ((0x1800000000L & l) == 0L) {
+ if (curChar != 36) {
break;
}
if (kind > 56) {
@@ -2187,7 +2187,7 @@ public class ELParserTokenManager implements ELParserConstants {
"\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", "\53\75", "\75", "\55\76", null, null, null, null, null, null, };
+ "\155\157\144", "\53\75", "\75", "\55\76", null, null, null, null, null, };
protected Token jjFillToken() {
final Token t;
@@ -2491,8 +2491,8 @@ public class ELParserTokenManager implements ELParserConstants {
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
- if (jjmatchedPos == 0 && jjmatchedKind > 61) {
- jjmatchedKind = 61;
+ if (jjmatchedPos == 0 && jjmatchedKind > 60) {
+ jjmatchedKind = 60;
}
break;
case 2:
@@ -2507,8 +2507,8 @@ public class ELParserTokenManager implements ELParserConstants {
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_2();
- if (jjmatchedPos == 0 && jjmatchedKind > 61) {
- jjmatchedKind = 61;
+ if (jjmatchedPos == 0 && jjmatchedKind > 60) {
+ jjmatchedKind = 60;
}
break;
}
@@ -2682,8 +2682,8 @@ public class ELParserTokenManager implements ELParserConstants {
/** Lex State array. */
public static final int[] jjnewLexState = { -1, -1, 1, 1, -1, -1, -1, -1, 2, -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, -1, -1, -1, };
- static final long[] jjtoToken = { 0x23ffffffffffef0fL, };
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, };
+ static final long[] jjtoToken = { 0x13ffffffffffef0fL, };
static final long[] jjtoSkip = { 0xf0L, };
static final long[] jjtoSpecial = { 0x0L, };
static final long[] jjtoMore = { 0x0L, };
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 48aa794c47..52d1829642 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -131,6 +131,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <scode>
+ Remove <code>IMPL_OBJ_START</code> from EL grammar for
+ <code>IDENTIFIER</code>. (markt)
+ </scode>
+ </changelog>
+ </subsection>
<subsection name="Web applications">
<changelog>
<add>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org