Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thomann2019-02-07 14:37:21 +0000
committerJay Arthanareeswaran2019-02-07 15:08:22 +0000
commit2a504ee503ea1288959c8ff005b9e06e8300fea2 (patch)
tree5720d46c770e02c06ee8f1ce6b2f43848d334641 /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser
parentf7b7264efd96a9b892819e046d340c8667b196d2 (diff)
downloadeclipse.jdt.core-2a504ee503ea1288959c8ff005b9e06e8300fea2.tar.gz
eclipse.jdt.core-2a504ee503ea1288959c8ff005b9e06e8300fea2.tar.xz
eclipse.jdt.core-2a504ee503ea1288959c8ff005b9e06e8300fea2.zip
Bug 544159 - [12] Support for Unicode 11
Change-Id: I24171d81e08574f4f0eb394467d77b5fb96ed599 Signed-off-by: Olivier Thomann <Olivier_Thomann@ca.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ScannerHelper.java21
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part0.rscbin0 -> 8192 bytes
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part1.rscbin0 -> 8192 bytes
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part14.rscbin0 -> 8192 bytes
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part2.rscbin0 -> 8192 bytes
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start0.rscbin0 -> 8192 bytes
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start1.rscbin0 -> 8192 bytes
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start2.rscbin0 -> 8192 bytes
8 files changed, 19 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ScannerHelper.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ScannerHelper.java
index c9bf5ce3bc..d20a4d224c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ScannerHelper.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ScannerHelper.java
@@ -47,6 +47,7 @@ public class ScannerHelper {
private static long[][][] Tables8;
private static long[][][] Tables9;
private static long[][][] Tables11;
+ private static long[][][] Tables12;
public final static int MAX_OBVIOUS = 128;
public final static int[] OBVIOUS_IDENT_CHAR_NATURES = new int[MAX_OBVIOUS];
@@ -151,6 +152,9 @@ static void initializeTable19() {
static void initializeTableJava11() {
Tables11 = initializeTables("unicode10"); //$NON-NLS-1$
}
+static void initializeTableJava12() {
+ Tables12 = initializeTables("unicode11"); //$NON-NLS-1$
+}
static long[][][] initializeTables(String unicode_path) {
long[][][] tempTable = new long[2][][];
tempTable[START_INDEX] = new long[3][];
@@ -290,12 +294,18 @@ public static boolean isJavaIdentifierPart(long complianceLevel, int codePoint)
initializeTable19();
}
return isJavaIdentifierPart0(codePoint, Tables9);
- } else {
+ } else if (complianceLevel <= ClassFileConstants.JDK11) {
// java 11 supports Unicode 10
if (Tables11 == null) {
initializeTableJava11();
}
return isJavaIdentifierPart0(codePoint, Tables11);
+ } else {
+ // java 12 supports Unicode 11
+ if (Tables12 == null) {
+ initializeTableJava12();
+ }
+ return isJavaIdentifierPart0(codePoint, Tables12);
}
}
public static boolean isJavaIdentifierPart(long complianceLevel, char high, char low) {
@@ -351,12 +361,19 @@ public static boolean isJavaIdentifierStart(long complianceLevel, int codePoint)
initializeTable19();
}
return isJavaIdentifierStart0(codePoint, Tables9);
- } else {
+ } else if (complianceLevel <= ClassFileConstants.JDK11) {
// java 11 supports Unicode 10
if (Tables11 == null) {
initializeTableJava11();
}
return isJavaIdentifierStart0(codePoint, Tables11);
+ } else {
+
+ // java 12 supports Unicode 11
+ if (Tables12 == null) {
+ initializeTableJava12();
+ }
+ return isJavaIdentifierStart0(codePoint, Tables12);
}
}
private static int toCodePoint(char high, char low) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part0.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part0.rsc
new file mode 100644
index 0000000000..f434660ef0
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part0.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part1.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part1.rsc
new file mode 100644
index 0000000000..abb590ba3d
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part1.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part14.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part14.rsc
new file mode 100644
index 0000000000..c8241e80d5
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part14.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part2.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part2.rsc
new file mode 100644
index 0000000000..ab6b33ed48
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/part2.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start0.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start0.rsc
new file mode 100644
index 0000000000..1cd786208c
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start0.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start1.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start1.rsc
new file mode 100644
index 0000000000..2ca6b51f99
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start1.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start2.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start2.rsc
new file mode 100644
index 0000000000..ab6b33ed48
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/unicode11/start2.rsc
Binary files differ

Back to the top