Restore definition of Identifier as Java Language Identifier
diff --git a/spec/src/main/asciidoc/ELSpec.adoc b/spec/src/main/asciidoc/ELSpec.adoc
index a6dbe7e..0d7f250 100644
--- a/spec/src/main/asciidoc/ELSpec.adoc
+++ b/spec/src/main/asciidoc/ELSpec.adoc
@@ -1987,7 +1987,8 @@
/*
* Identifier
- * Java Language Identifier
+ * Java Language Identifier as defined by the Java Language Specification,
+ * Java SE 21 Edition
*/
void Identifier() #Identifier : { Token t = null; }
{
@@ -2172,35 +2173,25 @@
"\u0024",
"\u0041"-"\u005a",
"\u005f",
- "\u0061"-"\u007a",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
+
+ ...
+
+ "\uffda"-"\uffdc",
+ "\uffe0"-"\uffe1",
+ "\uffe5"-"\uffe6"
]
>
| < #DIGIT:
[
+ "\u0000"-"\u0008",
+ "\u000e"-"\u001b",
"\u0030"-"\u0039",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
+
+ ...
+
+ "\ufeff",
+ "\uff10"-"\uff19",
+ "\ufff9"-"\ufffb"
]
>
| < ILLEGAL_CHARACTER: (~[]) >
@@ -2228,6 +2219,72 @@
* It is illegal to nest `${` or `\#{` inside
an outer `${` or `#{`
+* The full specification for `LETTER` and `DIGIT` extend to several hundred
+ lines each and vary with Java version. The correct ranges may be generated by
+ running the following code under Java 21.
+
+[source,java]
+----
+public void testGenerateJavaLetterRanges() {
+ int start = 0;
+ int end = 0;
+ boolean inRange = false;
+
+ for (int i = 0 ; i < 0xFFFF; i++) {
+ if (Character.isJavaIdentifierStart(i)) {
+ if (!inRange) {
+ inRange = true;
+ start = i;
+ }
+ } else {
+ if (inRange) {
+ end = i - 1;
+ inRange = false;
+ System.out.print(" \"" + asUnicodeEscape(start) + "\"");
+ if (start == end) {
+ System.out.println(",");
+ } else {
+ System.out.println("-\"" + asUnicodeEscape(end) + "\",");
+ }
+ }
+ }
+ }
+}
+
+
+public void testGenerateJavaDigitRanges() {
+ int start = 0;
+ int end = 0;
+ boolean inRange = false;
+
+ for (int i = 0 ; i < 0xFFFF; i++) {
+ if (Character.isJavaIdentifierPart(i) &&
+ !Character.isJavaIdentifierStart(i)) {
+ if (!inRange) {
+ inRange = true;
+ start = i;
+ }
+ } else {
+ if (inRange) {
+ end = i - 1;
+ inRange = false;
+ System.out.print(" \"" + asUnicodeEscape(start) + "\"");
+ if (start == end) {
+ System.out.println(",");
+ } else {
+ System.out.println("-\"" + asUnicodeEscape(end) + "\",");
+ }
+ }
+ }
+ }
+}
+
+
+private static String asUnicodeEscape(int input) {
+ return String.format("\\u%04x", Integer.valueOf(input));
+}
+----
+
== Operations on Collection Objects
This chapter describes how collection objects
@@ -3075,6 +3132,11 @@
Expand the definition of the concatenation operator (`+=`) to include
collections.
+* https://github.com/jakartaee/expression-language/issues/278[#278]
+ Restore definition of `Identifier` as `Java Language Identifier` and clarify
+ that this is as defined by the Java Language Specification for the minimum
+ version of Java required by this specification (Java 21 for version 6.1).
+
* https://github.com/jakartaee/expression-language/issues/313[#313]
Add support for inner classes when using the `ImportHandler` and clarify that
the import handler expects canonical class names where full class names are