/*******************************************************************************
* Copyright (c) 2012-2015 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.ide.ext.java.jdt.core.util;
/**
* @author Evgen Vidolob
*/
public class CharTable2 extends CharTable {
static final CharTable2 INSTANCE = new CharTable2();
static final char X[] = (
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\020\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\060\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040").toCharArray();
static final char Y[] = (
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\000\000\002\004\004\004\004\004\004\004\004\004\004" +
"\004\004\004\004\004\004\004\004\004\004\000\000\000\000\000\000\000\000\000" +
"\000\000\000\000\000\000\004").toCharArray();
static final int A[] = new int[6];
static final String A_DATA =
"\000\u7005\000\u7005\000\u7005\u7800\000\u7800\000\u7800\000";
static {
char[] data = A_DATA.toCharArray();
assert (data.length == (6 * 2));
int i = 0, j = 0;
while (i < (6 * 2)) {
int entry = data[i++] << 16;
A[j++] = entry | data[i++];
}
}
@Override
int getProp(int ch) {
char offset = (char)ch;
return A[Y[X[offset >> 5] | ((offset >> 1) & 0xF)] | (offset & 0x1)];
}
@Override
int getNumericValue(int ch) {
int val = getProp(ch);
int result;
switch (val & 0xC00) {
default:
case (0x00000000):
result = -1;
break;
case (0x00000400):
result = ch + ((val & 0x3E0) >> 5) & 0x1F;
break;
case (0x00000800):
result = -2;
break;
case (0x00000C00):
result = (ch + ((val & 0x3E0) >> 5) & 0x1F) + 10;
break;
}
return result;
}
@Override
boolean isWhitespace(int ch) {
return (getProp(ch) & 0x00007000) == 0x00004000;
}
@Override
boolean isJavaIdentifierStart(int ch) {
int props = getProp(ch);
return ((props & 0x00007000) >= 0x00005000);
}
@Override
boolean isJavaIdentifierPart(int ch) {
int props = getProp(ch);
return ((props & 0x00003000) != 0);
}
}