/******************************************************************************* * 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 CharTableE extends CharTable { static final CharTableE INSTANCE = new CharTableE(); static final char X[] = ( "\000\020\020\020\040\040\040\040\060\060\060\060\060\060\060\100\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" + "\040\040\040\040\040\040\040\040\040\040\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\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\004\004\004" + "\004\004\004\004\004\004\004\004\004\004\004\004\004\002\002\002\002\002\002" + "\002\002\002\002\002\002\002\002\002\002\006\006\006\006\006\006\006\006\006" + "\006\006\006\006\006\006\006\006\006\006\006\006\006\006\006\002\002\002\002" + "\002\002\002\002").toCharArray(); static final int A[] = new int[8]; static final String A_DATA = "\u7800\000\u4800\u1010\u7800\000\u7800\000\u4800\u1010\u4800\u1010\u4000\u3006" + "\u4000\u3006"; static { char[] data = A_DATA.toCharArray(); assert (data.length == (8 * 2)); int i = 0, j = 0; while (i < (8 * 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) { int props = getProp(ch); return ((props & 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); } }