This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new ef5182f779 Drop IMPL_OBJ_START from parser
ef5182f779 is described below

commit ef5182f779e5cceab0b96efd18c9505201612f3b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 19 11:20:48 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 58987c0862..e9e66409bc 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 af5bcfab19..0d9a79fbe6 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 afcf2ba0f4..47b36d5b37 100644
--- a/java/org/apache/el/parser/ELParserTokenManager.java
+++ b/java/org/apache/el/parser/ELParserTokenManager.java
@@ -896,7 +896,7 @@ public class ELParserTokenManager implements 
ELParserConstants {
                                 {
                                     jjCheckNAddStates(18, 22);
                                 }
-                            } else if ((0x1800000000L & l) != 0L) {
+                            } else if (curChar == 36) {
                                 if (kind > 56) {
                                     kind = 56;
                                 }
@@ -1075,7 +1075,7 @@ public class ELParserTokenManager implements 
ELParserConstants {
                         }
                             break;
                         case 27:
-                            if ((0x1800000000L & l) == 0L) {
+                            if (curChar != 36) {
                                 break;
                             }
                             if (kind > 56) {
@@ -1781,7 +1781,7 @@ public class ELParserTokenManager implements 
ELParserConstants {
                                 {
                                     jjCheckNAddStates(18, 22);
                                 }
-                            } else if ((0x1800000000L & l) != 0L) {
+                            } else if (curChar == 36) {
                                 if (kind > 56) {
                                     kind = 56;
                                 }
@@ -1960,7 +1960,7 @@ public class ELParserTokenManager implements 
ELParserConstants {
                         }
                             break;
                         case 27:
-                            if ((0x1800000000L & l) == 0L) {
+                            if (curChar != 36) {
                                 break;
                             }
                             if (kind > 56) {
@@ -2193,7 +2193,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;
@@ -2497,8 +2497,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:
@@ -2513,8 +2513,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;
             }
@@ -2688,8 +2688,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 35a24f4775..ad137a94da 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to