| package org.eclipse.jdt.internal.compiler.ast; |
| |
| /* |
| * (c) Copyright IBM Corp. 2000, 2001. |
| * All Rights Reserved. |
| */ |
| public abstract class OperatorExpression extends Expression implements OperatorIds { |
| public static int[][] ResolveTypeTables = new int[NumberOfTables][]; |
| static {classInitialize();} |
| /** |
| * OperatorExpression constructor comment. |
| */ |
| public OperatorExpression() { |
| super(); |
| } |
| public static final void classInitialize() { |
| ResolveTypeTables[AND] = get_AND(); |
| ResolveTypeTables[AND_AND] = get_AND_AND(); |
| ResolveTypeTables[DIVIDE] = get_DIVIDE(); |
| ResolveTypeTables[EQUAL_EQUAL] = get_EQUAL_EQUAL(); |
| ResolveTypeTables[GREATER] = get_GREATER(); |
| ResolveTypeTables[GREATER_EQUAL] = get_GREATER_EQUAL(); |
| ResolveTypeTables[LEFT_SHIFT] = get_LEFT_SHIFT(); |
| ResolveTypeTables[LESS] = get_LESS(); |
| ResolveTypeTables[LESS_EQUAL] = get_LESS_EQUAL(); |
| ResolveTypeTables[MINUS] = get_MINUS(); |
| ResolveTypeTables[MULTIPLY] = get_MULTIPLY(); |
| ResolveTypeTables[OR] = get_OR(); |
| ResolveTypeTables[OR_OR] = get_OR_OR(); |
| ResolveTypeTables[PLUS] = get_PLUS(); |
| ResolveTypeTables[REMAINDER] = get_REMAINDER(); |
| ResolveTypeTables[RIGHT_SHIFT] = get_RIGHT_SHIFT(); |
| ResolveTypeTables[UNSIGNED_RIGHT_SHIFT] = get_UNSIGNED_RIGHT_SHIFT(); |
| ResolveTypeTables[XOR] = get_XOR(); |
| } |
| public static final String generateTableTestCase(){ |
| //return a String which is a java method allowing to test |
| //the non zero entries of all tables |
| |
| /* slow code */ |
| |
| /* |
| org.eclipse.jdt.internal.compiler.ast. |
| OperatorExpression.generateTableTestCase(); |
| */ |
| |
| int[] operators = new int[]{AND,AND_AND,DIVIDE,GREATER,GREATER_EQUAL, |
| LEFT_SHIFT,LESS,LESS_EQUAL,MINUS,MULTIPLY,OR,OR_OR,PLUS,REMAINDER, |
| RIGHT_SHIFT,UNSIGNED_RIGHT_SHIFT,XOR}; |
| |
| class Decode { |
| public final String constant(int code){ |
| switch(code){ |
| case T_boolean : return "true"/*nonNLS*/ ; |
| case T_byte : return "((byte) 3)"/*nonNLS*/ ; |
| case T_char : return "'A'"/*nonNLS*/ ; |
| case T_double : return "300.0d"/*nonNLS*/ ; |
| case T_float : return "100.0f"/*nonNLS*/ ; |
| case T_int : return "1"/*nonNLS*/ ; |
| case T_long : return "7L"/*nonNLS*/ ; |
| case T_String : return "\"hello-world\""/*nonNLS*/ ; |
| case T_null : return "null"/*nonNLS*/; |
| case T_short : return "((short) 5)"/*nonNLS*/; |
| case T_Object : return "null"/*nonNLS*/;} |
| return ""/*nonNLS*/;} |
| |
| public final String type(int code){ |
| switch(code){ |
| case T_boolean : return "z"/*nonNLS*/ ; |
| case T_byte : return "b"/*nonNLS*/ ; |
| case T_char : return "c"/*nonNLS*/ ; |
| case T_double : return "d"/*nonNLS*/ ; |
| case T_float : return "f"/*nonNLS*/ ; |
| case T_int : return "i"/*nonNLS*/ ; |
| case T_long : return "l"/*nonNLS*/ ; |
| case T_String : return "str"/*nonNLS*/ ; |
| case T_null : return "null"/*nonNLS*/; |
| case T_short : return "s"/*nonNLS*/; |
| case T_Object : return "obj"/*nonNLS*/;} |
| return "xxx"/*nonNLS*/;} |
| |
| public final String operator(int operator){ |
| switch (operator) { |
| case EQUAL_EQUAL : return "=="/*nonNLS*/; |
| case LESS_EQUAL : return "<="/*nonNLS*/; |
| case GREATER_EQUAL :return ">="/*nonNLS*/; |
| case LEFT_SHIFT : return "<<"/*nonNLS*/; |
| case RIGHT_SHIFT : return ">>"/*nonNLS*/; |
| case UNSIGNED_RIGHT_SHIFT : return ">>>"/*nonNLS*/; |
| case OR_OR :return "||"/*nonNLS*/; |
| case AND_AND : return "&&"/*nonNLS*/; |
| case PLUS : return "+"/*nonNLS*/; |
| case MINUS : return "-"/*nonNLS*/; |
| case NOT : return "!"/*nonNLS*/; |
| case REMAINDER : return "%"/*nonNLS*/; |
| case XOR : return "^"/*nonNLS*/; |
| case AND : return "&"/*nonNLS*/; |
| case MULTIPLY : return "*"/*nonNLS*/; |
| case OR : return "|"/*nonNLS*/; |
| case TWIDDLE : return "~"/*nonNLS*/; |
| case DIVIDE : return "/"/*nonNLS*/; |
| case GREATER : return ">"/*nonNLS*/; |
| case LESS : return "<"/*nonNLS*/; }; |
| return "????"/*nonNLS*/;} |
| } |
| |
| |
| Decode decode = new Decode(); |
| String s ; |
| s = "\tpublic static void binaryOperationTablesTestCase(){\n"/*nonNLS*/ + |
| |
| "\t\t//TC test : all binary operation (described in tables)\n"/*nonNLS*/+ |
| "\t\t//method automatically generated by\n"/*nonNLS*/+ |
| "\t\t//org.eclipse.jdt.internal.compiler.ast.OperatorExpression.generateTableTestCase();\n"/*nonNLS*/+ |
| |
| "\t\tString str0 ;\t String str\t= "/*nonNLS*/+decode.constant(T_String)+";\n"/*nonNLS*/+ |
| "\t\tint i0 ;\t int i\t= "/*nonNLS*/+decode.constant(T_int)+" ;\n"/*nonNLS*/+ |
| "\t\tboolean z0;\t boolean z\t= "/*nonNLS*/+decode.constant(T_boolean)+";\n"/*nonNLS*/+ |
| "\t\tchar c0; \t char c\t= "/*nonNLS*/+decode.constant(T_char)+" ;\n"/*nonNLS*/+ |
| "\t\tfloat f0; \t float f\t= "/*nonNLS*/+decode.constant(T_float)+" ;\n"/*nonNLS*/+ |
| "\t\tdouble d0;\t double d\t= "/*nonNLS*/+decode.constant(T_double)+" ;\n"/*nonNLS*/+ |
| "\t\tbyte b0; \t byte b\t= "/*nonNLS*/+decode.constant(T_byte)+";\n"/*nonNLS*/+ |
| "\t\tshort s0; \t short s\t= "/*nonNLS*/+decode.constant(T_short)+";\n"/*nonNLS*/+ |
| "\t\tlong l0; \t long l\t= "/*nonNLS*/+decode.constant(T_long)+" ;\n"/*nonNLS*/+ |
| "\t\tObject obj0; \t Object obj\t= "/*nonNLS*/+decode.constant(T_Object)+" ;\n"/*nonNLS*/+ |
| |
| "\n"/*nonNLS*/; |
| |
| int error = 0; |
| for (int i=0; i < operators.length ; i++) |
| { int operator = operators[i]; |
| for (int left=0; left<16;left++) |
| for (int right=0; right<16;right++) |
| { int result = (ResolveTypeTables[operator][(left<<4)+right]) & 0x0000F; |
| if (result != T_undefined) |
| |
| //1/ First regular computation then 2/ comparaison |
| //with a compile time constant (generated by the compiler) |
| // z0 = s >= s; |
| // if ( z0 != (((short) 5) >= ((short) 5))) |
| // System.out.println(155); |
| |
| { s += "\t\t"/*nonNLS*/+decode.type(result)+"0"/*nonNLS*/+" = "/*nonNLS*/+decode.type(left); |
| s += " "/*nonNLS*/+decode.operator(operator)+" "/*nonNLS*/+decode.type(right)+";\n"/*nonNLS*/; |
| String begin = result == T_String ? "\t\tif (! "/*nonNLS*/ : "\t\tif ( "/*nonNLS*/; |
| String test = result == T_String ? ".equals("/*nonNLS*/ : " != ("/*nonNLS*/ ; |
| s += begin +decode.type(result)+"0"/*nonNLS*/+test |
| +decode.constant(left)+" "/*nonNLS*/ |
| +decode.operator(operator)+" "/*nonNLS*/ |
| +decode.constant(right)+"))\n"/*nonNLS*/; |
| s += "\t\t\tSystem.out.println("/*nonNLS*/+ (++error) +");\n"/*nonNLS*/; |
| |
| }}} |
| |
| return s += "\n\t\tSystem.out.println(\"binary tables test : done\");}"/*nonNLS*/ ; |
| } |
| public static final int[] get_AND(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| int[] table = new int[16*16] ; |
| |
| // table[(T_undefined<<4)+T_undefined] = T_undefined ; |
| // table[(T_undefined<<4)+T_byte] = T_undefined ; |
| // table[(T_undefined<<4)+T_long] = T_undefined ; |
| // table[(T_undefined<<4)+T_short] = T_undefined ; |
| // table[(T_undefined<<4)+T_void] = T_undefined ; |
| // table[(T_undefined<<4)+T_String] = T_undefined ; |
| // table[(T_undefined<<4)+T_Object] = T_undefined ; |
| // table[(T_undefined<<4)+T_double] = T_undefined ; |
| // table[(T_undefined<<4)+T_float] = T_undefined ; |
| // table[(T_undefined<<4)+T_boolean] = T_undefined ; |
| // table[(T_undefined<<4)+T_char] = T_undefined ; |
| // table[(T_undefined<<4)+T_int] = T_undefined ; |
| // table[(T_undefined<<4)+T_null] = T_undefined ; |
| |
| // table[(T_byte<<4)+T_undefined] = T_undefined ; |
| table[(T_byte<<4)+T_byte] = (Byte2Int<<12) +(Byte2Int<<4) +T_int ; |
| table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_byte<<4)+T_short] = (Byte2Int<<12) +(Short2Int<<4)+T_int; |
| // table[(T_byte<<4)+T_void] = T_undefined ; |
| // table[(T_byte<<4)+T_String] = T_undefined ; |
| // table[(T_byte<<4)+T_Object] = T_undefined ; |
| // table[(T_byte<<4)+T_double] = T_undefined ; |
| // table[(T_byte<<4)+T_float] = T_undefined ; |
| // table[(T_byte<<4)+T_boolean] = T_undefined ; |
| table[(T_byte<<4)+T_char] = (Byte2Int<<12) +(Char2Int<<4) +T_int ; |
| table[(T_byte<<4)+T_int] = (Byte2Int<<12) +(Int2Int<<4) +T_int ; |
| // table[(T_byte<<4)+T_null] = T_undefined ; |
| |
| // table[(T_long<<4)+T_undefined] = T_undefined ; |
| table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_long; |
| table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_long; ; |
| // table[(T_long<<4)+T_void] = T_undefined ; |
| // table[(T_long<<4)+T_String] = T_undefined ; |
| // table[(T_long<<4)+T_Object] = T_undefined ; |
| // table[(T_long<<4)+T_double] = T_undefined ; |
| // table[(T_long<<4)+T_float] = T_undefined ; |
| // table[(T_long<<4)+T_boolean] = T_undefined ; |
| table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_long ; |
| table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_long ; |
| // table[(T_long<<4)+T_null] = T_undefined ; |
| |
| // table[(T_short<<4)+T_undefined] = T_undefined ; |
| table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_short<<4)+T_void] = T_undefined ; |
| // table[(T_short<<4)+T_String] = T_undefined ; |
| // table[(T_short<<4)+T_Object] = T_undefined ; |
| // table[(T_short<<4)+T_double] = T_undefined ; |
| // table[(T_short<<4)+T_float] = T_undefined ; |
| // table[(T_short<<4)+T_boolean] = T_undefined ; |
| table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_short<<4)+T_null] = T_undefined ; |
| |
| // table[(T_void<<4)+T_undefined] = T_undefined ; |
| // table[(T_void<<4)+T_byte] = T_undefined ; |
| // table[(T_void<<4)+T_long] = T_undefined ; |
| // table[(T_void<<4)+T_short] = T_undefined ; |
| // table[(T_void<<4)+T_void] = T_undefined ; |
| // table[(T_void<<4)+T_String] = T_undefined ; |
| // table[(T_void<<4)+T_Object] = T_undefined ; |
| // table[(T_void<<4)+T_double] = T_undefined ; |
| // table[(T_void<<4)+T_float] = T_undefined ; |
| // table[(T_void<<4)+T_boolean] = T_undefined ; |
| // table[(T_void<<4)+T_char] = T_undefined ; |
| // table[(T_void<<4)+T_int] = T_undefined ; |
| // table[(T_void<<4)+T_null] = T_undefined ; |
| |
| // table[(T_String<<4)+T_undefined] = T_undefined ; |
| // table[(T_String<<4)+T_byte] = T_undefined ; |
| // table[(T_String<<4)+T_long] = T_undefined ; |
| // table[(T_String<<4)+T_short] = T_undefined ; |
| // table[(T_String<<4)+T_void] = T_undefined ; |
| // table[(T_String<<4)+T_String] = T_undefined ; |
| // table[(T_String<<4)+T_Object] = T_undefined ; |
| // table[(T_String<<4)+T_double] = T_undefined ; |
| // table[(T_String<<4)+T_float] = T_undefined ; |
| // table[(T_String<<4)+T_boolean] = T_undefined ; |
| // table[(T_String<<4)+T_char] = T_undefined ; |
| // table[(T_String<<4)+T_int] = T_undefined ; |
| // table[(T_String<<4)+T_null] = T_undefined ; |
| |
| // table[(T_Object<<4)+T_undefined] = T_undefined ; |
| // table[(T_Object<<4)+T_byte] = T_undefined ; |
| // table[(T_Object<<4)+T_long] = T_undefined ; |
| // table[(T_Object<<4)+T_short] = T_undefined ; |
| // table[(T_Object<<4)+T_void] = T_undefined ; |
| // table[(T_Object<<4)+T_String] = T_undefined ; |
| // table[(T_Object<<4)+T_Object] = T_undefined ; |
| // table[(T_Object<<4)+T_double] = T_undefined ; |
| // table[(T_Object<<4)+T_float] = T_undefined ; |
| // table[(T_Object<<4)+T_boolean] = T_undefined ; |
| // table[(T_Object<<4)+T_char] = T_undefined ; |
| // table[(T_Object<<4)+T_int] = T_undefined ; |
| // table[(T_Object<<4)+T_null] = T_undefined ; |
| |
| // table[(T_double<<4)+T_undefined] = T_undefined ; |
| // table[(T_double<<4)+T_byte] = T_undefined ; |
| // table[(T_double<<4)+T_long] = T_undefined ; |
| // table[(T_double<<4)+T_short] = T_undefined ; |
| // table[(T_double<<4)+T_void] = T_undefined ; |
| // table[(T_double<<4)+T_String] = T_undefined ; |
| // table[(T_double<<4)+T_Object] = T_undefined ; |
| // table[(T_double<<4)+T_double] = T_undefined ; |
| // table[(T_double<<4)+T_float] = T_undefined ; |
| // table[(T_double<<4)+T_boolean] = T_undefined ; |
| // table[(T_double<<4)+T_char] = T_undefined ; |
| // table[(T_double<<4)+T_int] = T_undefined; |
| // table[(T_double<<4)+T_null] = T_undefined ; |
| |
| // table[(T_float<<4)+T_undefined] = T_undefined ; |
| // table[(T_float<<4)+T_byte] = T_undefined ; |
| // table[(T_float<<4)+T_long] = T_undefined ; |
| // table[(T_float<<4)+T_short] = T_undefined ; |
| // table[(T_float<<4)+T_void] = T_undefined ; |
| // table[(T_float<<4)+T_String] = T_undefined ; |
| // table[(T_float<<4)+T_Object] = T_undefined ; |
| // table[(T_float<<4)+T_double] = T_undefined ; |
| // table[(T_float<<4)+T_float] = T_undefined ; |
| // table[(T_float<<4)+T_boolean] = T_undefined ; |
| // table[(T_float<<4)+T_char] = T_undefined ; |
| // table[(T_float<<4)+T_int] = T_undefined ; |
| // table[(T_float<<4)+T_null] = T_undefined ; |
| |
| // table[(T_boolean<<4)+T_undefined] = T_undefined ; |
| // table[(T_boolean<<4)+T_byte] = T_undefined ; |
| // table[(T_boolean<<4)+T_long] = T_undefined ; |
| // table[(T_boolean<<4)+T_short] = T_undefined ; |
| // table[(T_boolean<<4)+T_void] = T_undefined ; |
| // table[(T_boolean<<4)+T_String] = T_undefined ; |
| // table[(T_boolean<<4)+T_Object] = T_undefined ; |
| // table[(T_boolean<<4)+T_double] = T_undefined ; |
| // table[(T_boolean<<4)+T_float] = T_undefined ; |
| table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean << 12)+(Boolean2Boolean << 4)+T_boolean ; |
| // table[(T_boolean<<4)+T_char] = T_undefined ; |
| // table[(T_boolean<<4)+T_int] = T_undefined ; |
| // table[(T_boolean<<4)+T_null] = T_undefined ; |
| |
| // table[(T_char<<4)+T_undefined] = T_undefined ; |
| table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_long; |
| table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_char<<4)+T_void] = T_undefined ; |
| // table[(T_char<<4)+T_String] = T_undefined ; |
| // table[(T_char<<4)+T_Object] = T_undefined ; |
| // table[(T_char<<4)+T_double] = T_undefined ; |
| // table[(T_char<<4)+T_float] = T_undefined ; |
| // table[(T_char<<4)+T_boolean] = T_undefined ; |
| table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_char<<4)+T_null] = T_undefined ; |
| |
| // table[(T_int<<4)+T_undefined] = T_undefined ; |
| table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_int<<4)+T_void] = T_undefined ; |
| // table[(T_int<<4)+T_String] = T_undefined ; |
| // table[(T_int<<4)+T_Object] = T_undefined ; |
| // table[(T_int<<4)+T_double] = T_undefined ; |
| // table[(T_int<<4)+T_float] = T_undefined ; |
| // table[(T_int<<4)+T_boolean] = T_undefined ; |
| table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_int<<4)+T_null] = T_undefined ; |
| |
| // table[(T_null<<4)+T_undefined] = T_undefined ; |
| // table[(T_null<<4)+T_byte] = T_undefined ; |
| // table[(T_null<<4)+T_long] = T_undefined ; |
| // table[(T_null<<4)+T_short] = T_undefined ; |
| // table[(T_null<<4)+T_void] = T_undefined ; |
| // table[(T_null<<4)+T_String] = T_undefined ; |
| // table[(T_null<<4)+T_Object] = T_undefined ; |
| // table[(T_null<<4)+T_double] = T_undefined ; |
| // table[(T_null<<4)+T_float] = T_undefined ; |
| // table[(T_null<<4)+T_boolean] = T_undefined ; |
| // table[(T_null<<4)+T_char] = T_undefined ; |
| // table[(T_null<<4)+T_int] = T_undefined ; |
| // table[(T_null<<4)+T_null] = T_undefined ; |
| |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_AND_AND(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| int[] table = new int[16*16] ; |
| |
| // table[(T_undefined<<4)+T_undefined] = T_undefined ; |
| // table[(T_undefined<<4)+T_byte] = T_undefined ; |
| // table[(T_undefined<<4)+T_long] = T_undefined ; |
| // table[(T_undefined<<4)+T_short] = T_undefined ; |
| // table[(T_undefined<<4)+T_void] = T_undefined ; |
| // table[(T_undefined<<4)+T_String] = T_undefined ; |
| // table[(T_undefined<<4)+T_Object] = T_undefined ; |
| // table[(T_undefined<<4)+T_double] = T_undefined ; |
| // table[(T_undefined<<4)+T_float] = T_undefined ; |
| // table[(T_undefined<<4)+T_boolean] = T_undefined ; |
| // table[(T_undefined<<4)+T_char] = T_undefined ; |
| // table[(T_undefined<<4)+T_int] = T_undefined ; |
| // table[(T_undefined<<4)+T_null] = T_undefined ; |
| |
| // table[(T_byte<<4)+T_undefined] = T_undefined ; |
| // table[(T_byte<<4)+T_byte] = T_undefined ; |
| // table[(T_byte<<4)+T_long] = T_undefined ; |
| // table[(T_byte<<4)+T_short] = T_undefined ; |
| // table[(T_byte<<4)+T_void] = T_undefined ; |
| // table[(T_byte<<4)+T_String] = T_undefined ; |
| // table[(T_byte<<4)+T_Object] = T_undefined ; |
| // table[(T_byte<<4)+T_double] = T_undefined ; |
| // table[(T_byte<<4)+T_float] = T_undefined ; |
| // table[(T_byte<<4)+T_boolean] = T_undefined ; |
| // table[(T_byte<<4)+T_char] = T_undefined ; |
| // table[(T_byte<<4)+T_int] = T_undefined ; |
| // table[(T_byte<<4)+T_null] = T_undefined ; |
| |
| // table[(T_long<<4)+T_undefined] = T_undefined ; |
| // table[(T_long<<4)+T_byte] = T_undefined; |
| // table[(T_long<<4)+T_long] = T_undefined ; |
| // table[(T_long<<4)+T_short] = T_undefined ; |
| // table[(T_long<<4)+T_void] = T_undefined ; |
| // table[(T_long<<4)+T_String] = T_undefined ; |
| // table[(T_long<<4)+T_Object] = T_undefined ; |
| // table[(T_long<<4)+T_double] = T_undefined ; |
| // table[(T_long<<4)+T_float] = T_undefined ; |
| // table[(T_long<<4)+T_boolean] = T_undefined ; |
| // table[(T_long<<4)+T_char] = T_undefined ; |
| // table[(T_long<<4)+T_int] = T_undefined ; |
| // table[(T_long<<4)+T_null] = T_undefined ; |
| |
| // table[(T_short<<4)+T_undefined] = T_undefined ; |
| // table[(T_short<<4)+T_byte] = T_undefined ; |
| // table[(T_short<<4)+T_long] = T_undefined ; |
| // table[(T_short<<4)+T_short] = T_undefined ; |
| // table[(T_short<<4)+T_void] = T_undefined ; |
| // table[(T_short<<4)+T_String] = T_undefined ; |
| // table[(T_short<<4)+T_Object] = T_undefined ; |
| // table[(T_short<<4)+T_double] = T_undefined ; |
| // table[(T_short<<4)+T_float] = T_undefined ; |
| // table[(T_short<<4)+T_boolean] = T_undefined ; |
| // table[(T_short<<4)+T_char] = T_undefined ; |
| // table[(T_short<<4)+T_int] = T_undefined ; |
| // table[(T_short<<4)+T_null] = T_undefined ; |
| |
| // table[(T_void<<4)+T_undefined] = T_undefined ; |
| // table[(T_void<<4)+T_byte] = T_undefined ; |
| // table[(T_void<<4)+T_long] = T_undefined ; |
| // table[(T_void<<4)+T_short] = T_undefined ; |
| // table[(T_void<<4)+T_void] = T_undefined ; |
| // table[(T_void<<4)+T_String] = T_undefined ; |
| // table[(T_void<<4)+T_Object] = T_undefined ; |
| // table[(T_void<<4)+T_double] = T_undefined ; |
| // table[(T_void<<4)+T_float] = T_undefined ; |
| // table[(T_void<<4)+T_boolean] = T_undefined ; |
| // table[(T_void<<4)+T_char] = T_undefined ; |
| // table[(T_void<<4)+T_int] = T_undefined ; |
| // table[(T_void<<4)+T_null] = T_undefined ; |
| |
| // table[(T_String<<4)+T_undefined] = T_undefined ; |
| // table[(T_String<<4)+T_byte] = T_undefined ; |
| // table[(T_String<<4)+T_long] = T_undefined ; |
| // table[(T_String<<4)+T_short] = T_undefined ; |
| // table[(T_String<<4)+T_void] = T_undefined ; |
| // table[(T_String<<4)+T_String] = T_undefined ; |
| // table[(T_String<<4)+T_Object] = T_undefined ; |
| // table[(T_String<<4)+T_double] = T_undefined ; |
| // table[(T_String<<4)+T_float] = T_undefined ; |
| // table[(T_String<<4)+T_boolean] = T_undefined ; |
| // table[(T_String<<4)+T_char] = T_undefined ; |
| // table[(T_String<<4)+T_int] = T_undefined ; |
| // table[(T_String<<4)+T_null] = T_undefined ; |
| |
| // table[(T_Object<<4)+T_undefined] = T_undefined ; |
| // table[(T_Object<<4)+T_byte] = T_undefined ; |
| // table[(T_Object<<4)+T_long] = T_undefined ; |
| // table[(T_Object<<4)+T_short] = T_undefined ; |
| // table[(T_Object<<4)+T_void] = T_undefined ; |
| // table[(T_Object<<4)+T_String] = T_undefined ; |
| // table[(T_Object<<4)+T_Object] = T_undefined ; |
| // table[(T_Object<<4)+T_double] = T_undefined ; |
| // table[(T_Object<<4)+T_float] = T_undefined ; |
| // table[(T_Object<<4)+T_boolean] = T_undefined ; |
| // table[(T_Object<<4)+T_char] = T_undefined ; |
| // table[(T_Object<<4)+T_int] = T_undefined ; |
| // table[(T_Object<<4)+T_null] = T_undefined ; |
| |
| // table[(T_double<<4)+T_undefined] = T_undefined ; |
| // table[(T_double<<4)+T_byte] = T_undefined ; |
| // table[(T_double<<4)+T_long] = T_undefined ; |
| // table[(T_double<<4)+T_short] = T_undefined ; |
| // table[(T_double<<4)+T_void] = T_undefined ; |
| // table[(T_double<<4)+T_String] = T_undefined ; |
| // table[(T_double<<4)+T_Object] = T_undefined ; |
| // table[(T_double<<4)+T_double] = T_undefined ; |
| // table[(T_double<<4)+T_float] = T_undefined ; |
| // table[(T_double<<4)+T_boolean] = T_undefined ; |
| // table[(T_double<<4)+T_char] = T_undefined ; |
| // table[(T_double<<4)+T_int] = T_undefined; |
| // table[(T_double<<4)+T_null] = T_undefined ; |
| |
| // table[(T_float<<4)+T_undefined] = T_undefined ; |
| // table[(T_float<<4)+T_byte] = T_undefined ; |
| // table[(T_float<<4)+T_long] = T_undefined ; |
| // table[(T_float<<4)+T_short] = T_undefined ; |
| // table[(T_float<<4)+T_void] = T_undefined ; |
| // table[(T_float<<4)+T_String] = T_undefined ; |
| // table[(T_float<<4)+T_Object] = T_undefined ; |
| // table[(T_float<<4)+T_double] = T_undefined ; |
| // table[(T_float<<4)+T_float] = T_undefined ; |
| // table[(T_float<<4)+T_boolean] = T_undefined ; |
| // table[(T_float<<4)+T_char] = T_undefined ; |
| // table[(T_float<<4)+T_int] = T_undefined ; |
| // table[(T_float<<4)+T_null] = T_undefined ; |
| |
| // table[(T_boolean<<4)+T_undefined] = T_undefined ; |
| // table[(T_boolean<<4)+T_byte] = T_undefined ; |
| // table[(T_boolean<<4)+T_long] = T_undefined ; |
| // table[(T_boolean<<4)+T_short] = T_undefined ; |
| // table[(T_boolean<<4)+T_void] = T_undefined ; |
| // table[(T_boolean<<4)+T_String] = T_undefined ; |
| // table[(T_boolean<<4)+T_Object] = T_undefined ; |
| // table[(T_boolean<<4)+T_double] = T_undefined ; |
| // table[(T_boolean<<4)+T_float] = T_undefined ; |
| table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean ; |
| // table[(T_boolean<<4)+T_char] = T_undefined ; |
| // table[(T_boolean<<4)+T_int] = T_undefined ; |
| // table[(T_boolean<<4)+T_null] = T_undefined ; |
| |
| // table[(T_char<<4)+T_undefined] = T_undefined ; |
| // table[(T_char<<4)+T_byte] = T_undefined ; |
| // table[(T_char<<4)+T_long] = T_undefined; |
| // table[(T_char<<4)+T_short] = T_undefined ; |
| // table[(T_char<<4)+T_void] = T_undefined ; |
| // table[(T_char<<4)+T_String] = T_undefined ; |
| // table[(T_char<<4)+T_Object] = T_undefined ; |
| // table[(T_char<<4)+T_double] = T_undefined ; |
| // table[(T_char<<4)+T_float] = T_undefined ; |
| // table[(T_char<<4)+T_boolean] = T_undefined ; |
| // table[(T_char<<4)+T_char] = T_undefined ; |
| // table[(T_char<<4)+T_int] = T_undefined ; |
| // table[(T_char<<4)+T_null] = T_undefined ; |
| |
| // table[(T_int<<4)+T_undefined] = T_undefined ; |
| // table[(T_int<<4)+T_byte] = T_undefined ; |
| // table[(T_int<<4)+T_long] = T_undefined ; |
| // table[(T_int<<4)+T_short] = T_undefined ; |
| // table[(T_int<<4)+T_void] = T_undefined ; |
| // table[(T_int<<4)+T_String] = T_undefined ; |
| // table[(T_int<<4)+T_Object] = T_undefined ; |
| // table[(T_int<<4)+T_double] = T_undefined ; |
| // table[(T_int<<4)+T_float] = T_undefined ; |
| // table[(T_int<<4)+T_boolean] = T_undefined ; |
| // table[(T_int<<4)+T_char] = T_undefined ; |
| // table[(T_int<<4)+T_int] = T_undefined ; |
| // table[(T_int<<4)+T_null] = T_undefined ; |
| |
| // table[(T_null<<4)+T_undefined] = T_undefined ; |
| // table[(T_null<<4)+T_byte] = T_undefined ; |
| // table[(T_null<<4)+T_long] = T_undefined ; |
| // table[(T_null<<4)+T_short] = T_undefined ; |
| // table[(T_null<<4)+T_void] = T_undefined ; |
| // table[(T_null<<4)+T_String] = T_undefined ; |
| // table[(T_null<<4)+T_Object] = T_undefined ; |
| // table[(T_null<<4)+T_double] = T_undefined ; |
| // table[(T_null<<4)+T_float] = T_undefined ; |
| // table[(T_null<<4)+T_boolean] = T_undefined ; |
| // table[(T_null<<4)+T_char] = T_undefined ; |
| // table[(T_null<<4)+T_int] = T_undefined ; |
| // table[(T_null<<4)+T_null] = T_undefined ; |
| |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_DIVIDE(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_MINUS(); |
| |
| // return table ; |
| } |
| public static final int[] get_EQUAL_EQUAL(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| int[] table = new int[16*16] ; |
| |
| // table[(T_undefined<<4)+T_undefined] = T_undefined ; |
| // table[(T_undefined<<4)+T_byte] = T_undefined ; |
| // table[(T_undefined<<4)+T_long] = T_undefined ; |
| // table[(T_undefined<<4)+T_short] = T_undefined ; |
| // table[(T_undefined<<4)+T_void] = T_undefined ; |
| // table[(T_undefined<<4)+T_String] = T_undefined ; |
| // table[(T_undefined<<4)+T_Object] = T_undefined ; |
| // table[(T_undefined<<4)+T_double] = T_undefined ; |
| // table[(T_undefined<<4)+T_float] = T_undefined ; |
| // table[(T_undefined<<4)+T_boolean] = T_undefined ; |
| // table[(T_undefined<<4)+T_char] = T_undefined ; |
| // table[(T_undefined<<4)+T_int] = T_undefined ; |
| // table[(T_undefined<<4)+T_null] = T_undefined ; |
| |
| // table[(T_byte<<4)+T_undefined] = T_undefined ; |
| table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_byte<<4)+T_void] = T_undefined ; |
| // table[(T_byte<<4)+T_String] = T_undefined ; |
| // table[(T_byte<<4)+T_Object] = T_undefined ; |
| table[(T_byte<<4)+T_double] = (Byte2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_byte<<4)+T_float] = (Byte2Float<<12)+(Float2Float<<4)+T_boolean; |
| // table[(T_byte<<4)+T_boolean] = T_undefined ; |
| table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_boolean; |
| // table[(T_byte<<4)+T_null] = T_undefined ; |
| |
| // table[(T_long<<4)+T_undefined] = T_undefined ; |
| table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_boolean; |
| table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_boolean ; |
| // table[(T_long<<4)+T_void] = T_undefined ; |
| // table[(T_long<<4)+T_String] = T_undefined ; |
| // table[(T_long<<4)+T_Object] = T_undefined ; |
| table[(T_long<<4)+T_double] = (Long2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_long<<4)+T_float] = (Long2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_long<<4)+T_boolean] = T_undefined ; |
| table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_boolean ; |
| table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_boolean ; |
| // table[(T_long<<4)+T_null] = T_undefined ; |
| |
| // table[(T_short<<4)+T_undefined] = T_undefined ; |
| table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_short<<4)+T_void] = T_undefined ; |
| // table[(T_short<<4)+T_String] = T_undefined ; |
| // table[(T_short<<4)+T_Object] = T_undefined ; |
| table[(T_short<<4)+T_double] = (Short2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_short<<4)+T_float] = (Short2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_short<<4)+T_boolean] = T_undefined ; |
| table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_boolean ; |
| // table[(T_short<<4)+T_null] = T_undefined ; |
| |
| // table[(T_void<<4)+T_undefined] = T_undefined ; |
| // table[(T_void<<4)+T_byte] = T_undefined ; |
| // table[(T_void<<4)+T_long] = T_undefined ; |
| // table[(T_void<<4)+T_short] = T_undefined ; |
| // table[(T_void<<4)+T_void] = T_undefined ; |
| // table[(T_void<<4)+T_String] = T_undefined ; |
| // table[(T_void<<4)+T_Object] = T_undefined ; |
| // table[(T_void<<4)+T_double] = T_undefined ; |
| // table[(T_void<<4)+T_float] = T_undefined ; |
| // table[(T_void<<4)+T_boolean] = T_undefined ; |
| // table[(T_void<<4)+T_char] = T_undefined ; |
| // table[(T_void<<4)+T_int] = T_undefined ; |
| // table[(T_void<<4)+T_null] = T_undefined ; |
| |
| // table[(T_String<<4)+T_undefined] = T_undefined ; |
| // table[(T_String<<4)+T_byte] = T_undefined ; |
| // table[(T_String<<4)+T_long] = T_undefined ; |
| // table[(T_String<<4)+T_short] = T_undefined ; |
| // table[(T_String<<4)+T_void] = T_undefined ; |
| table[(T_String<<4)+T_String] = /*String2Object String2Object*/ |
| (T_Object<<16)+(T_String<<12)+(T_Object<<8)+(T_String<<4)+T_boolean ; |
| table[(T_String<<4)+T_Object] = /*String2Object Object2Object*/ |
| (T_Object<<16)+(T_String<<12)+(T_Object<<8)+(T_Object<<4)+T_boolean ; |
| // table[(T_String<<4)+T_double] = T_undefined ; |
| // table[(T_String<<4)+T_float] = T_undefined ; |
| // table[(T_String<<4)+T_boolean] = T_undefined ; |
| // table[(T_String<<4)+T_char] = T_undefined ; |
| // table[(T_String<<4)+T_int] = T_undefined ; |
| table[(T_String<<4)+T_null] = /*Object2String null2Object */ |
| (T_Object<<16)+(T_String<<12)+(T_Object<<8)+(T_null<<4)+T_boolean ; |
| |
| // table[(T_Object<<4)+T_undefined] = T_undefined ; |
| // table[(T_Object<<4)+T_byte] = T_undefined ; |
| // table[(T_Object<<4)+T_long] = T_undefined ; |
| // table[(T_Object<<4)+T_short] = T_undefined ; |
| // table[(T_Object<<4)+T_void] = T_undefined ; |
| table[(T_Object<<4)+T_String] = /*Object2Object String2Object*/ |
| (T_Object<<16)+(T_Object<<12)+(T_Object<<8)+(T_String<<4)+T_boolean ; |
| table[(T_Object<<4)+T_Object] = /*Object2Object Object2Object*/ |
| (T_Object<<16)+(T_Object<<12)+(T_Object<<8)+(T_Object<<4)+T_boolean ; |
| // table[(T_Object<<4)+T_double] = T_undefined ; |
| // table[(T_Object<<4)+T_float] = T_undefined ; |
| // table[(T_Object<<4)+T_boolean] = T_undefined ; |
| // table[(T_Object<<4)+T_char] = T_undefined ; |
| // table[(T_Object<<4)+T_int] = T_undefined ; |
| table[(T_Object<<4)+T_null] = /*Object2Object null2Object*/ |
| (T_Object<<16)+(T_Object<<12)+(T_Object<<8)+(T_null<<4)+T_boolean ; |
| |
| // table[(T_double<<4)+T_undefined] = T_undefined ; |
| table[(T_double<<4)+T_byte] = (Double2Double<<12)+(Byte2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_long] = (Double2Double<<12)+(Long2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_short] = (Double2Double<<12)+(Short2Double<<4)+T_boolean ; |
| // table[(T_double<<4)+T_void] = T_undefined ; |
| // table[(T_double<<4)+T_String] = T_undefined ; |
| // table[(T_double<<4)+T_Object] = T_undefined ; |
| table[(T_double<<4)+T_double] = (Double2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_float] = (Double2Double<<12)+(Float2Double<<4)+T_boolean; |
| // table[(T_double<<4)+T_boolean] = T_undefined ; |
| table[(T_double<<4)+T_char] = (Double2Double<<12)+(Char2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_int] = (Double2Double<<12)+(Int2Double<<4)+T_boolean ; |
| // table[(T_double<<4)+T_null] = T_undefined ; |
| |
| // table[(T_float<<4)+T_undefined] = T_undefined ; |
| table[(T_float<<4)+T_byte] = (Float2Float<<12)+(Byte2Float<<4)+T_boolean ; |
| table[(T_float<<4)+T_long] = (Float2Float<<12)+(Long2Float<<4)+T_boolean ; |
| table[(T_float<<4)+T_short] = (Float2Float<<12)+(Short2Float<<4)+T_boolean ; |
| // table[(T_float<<4)+T_void] = T_undefined ; |
| // table[(T_float<<4)+T_String] = T_undefined ; |
| // table[(T_float<<4)+T_Object] = T_undefined ; |
| table[(T_float<<4)+T_double] = (Float2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_float<<4)+T_float] = (Float2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_float<<4)+T_boolean] = T_undefined ; |
| table[(T_float<<4)+T_char] = (Float2Float<<12)+(Char2Float<<4)+T_boolean ; |
| table[(T_float<<4)+T_int] = (Float2Float<<12)+(Int2Float<<4)+T_boolean ; |
| // table[(T_float<<4)+T_null] = T_undefined ; |
| |
| // table[(T_boolean<<4)+T_undefined] = T_undefined ; |
| // table[(T_boolean<<4)+T_byte] = T_undefined ; |
| // table[(T_boolean<<4)+T_long] = T_undefined ; |
| // table[(T_boolean<<4)+T_short] = T_undefined ; |
| // table[(T_boolean<<4)+T_void] = T_undefined ; |
| // table[(T_boolean<<4)+T_String] = T_undefined ; |
| // table[(T_boolean<<4)+T_Object] = T_undefined ; |
| // table[(T_boolean<<4)+T_double] = T_undefined ; |
| // table[(T_boolean<<4)+T_float] = T_undefined ; |
| table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean ; |
| // table[(T_boolean<<4)+T_char] = T_undefined ; |
| // table[(T_boolean<<4)+T_int] = T_undefined ; |
| // table[(T_boolean<<4)+T_null] = T_undefined ; |
| |
| // table[(T_char<<4)+T_undefined] = T_undefined ; |
| table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_char<<4)+T_void] = T_undefined ; |
| // table[(T_char<<4)+T_String] = T_undefined ; |
| // table[(T_char<<4)+T_Object] = T_undefined ; |
| table[(T_char<<4)+T_double] = (Char2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_char<<4)+T_float] = (Char2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_char<<4)+T_boolean] = T_undefined ; |
| table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_boolean ; |
| // table[(T_char<<4)+T_null] = T_undefined ; |
| |
| // table[(T_int<<4)+T_undefined] = T_undefined ; |
| table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_int<<4)+T_void] = T_undefined ; |
| // table[(T_int<<4)+T_String] = T_undefined ; |
| // table[(T_int<<4)+T_Object] = T_undefined ; |
| table[(T_int<<4)+T_double] = (Int2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_int<<4)+T_float] = (Int2Float<<12)+(Float2Float<<4)+T_boolean; |
| // table[(T_int<<4)+T_boolean] = T_undefined ; |
| table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_boolean ; |
| // table[(T_int<<4)+T_null] = T_undefined ; |
| |
| // table[(T_null<<4)+T_undefined] = T_undefined ; |
| // table[(T_null<<4)+T_byte] = T_undefined ; |
| // table[(T_null<<4)+T_long] = T_undefined ; |
| // table[(T_null<<4)+T_short] = T_undefined ; |
| // table[(T_null<<4)+T_void] = T_undefined ; |
| table[(T_null<<4)+T_String] = /*null2Object String2Object*/ |
| (T_Object<<16)+(T_null<<12)+(T_Object<<8)+(T_String<<4)+T_boolean ; |
| table[(T_null<<4)+T_Object] = /*null2Object Object2Object*/ |
| (T_Object<<16)+(T_null<<12)+(T_Object<<8)+(T_Object<<4)+T_boolean ; ; |
| // table[(T_null<<4)+T_double] = T_undefined ; |
| // table[(T_null<<4)+T_float] = T_undefined ; |
| // table[(T_null<<4)+T_boolean] = T_undefined ; |
| // table[(T_null<<4)+T_char] = T_undefined ; |
| // table[(T_null<<4)+T_int] = T_undefined ; |
| table[(T_null<<4)+T_null] = /*null2Object null2Object*/ |
| (T_Object<<16)+(T_null<<12)+(T_Object<<8)+(T_null<<4)+T_boolean ; |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_GREATER(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_LESS(); |
| |
| // return table ; |
| } |
| public static final int[] get_GREATER_EQUAL(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_LESS(); |
| |
| // return table ; |
| } |
| public static final int[] get_LEFT_SHIFT(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| int[] table = new int[16*16] ; |
| |
| // table[(T_undefined<<4)+T_undefined] = T_undefined ; |
| // table[(T_undefined<<4)+T_byte] = T_undefined ; |
| // table[(T_undefined<<4)+T_long] = T_undefined ; |
| // table[(T_undefined<<4)+T_short] = T_undefined ; |
| // table[(T_undefined<<4)+T_void] = T_undefined ; |
| // table[(T_undefined<<4)+T_String] = T_undefined ; |
| // table[(T_undefined<<4)+T_Object] = T_undefined ; |
| // table[(T_undefined<<4)+T_double] = T_undefined ; |
| // table[(T_undefined<<4)+T_float] = T_undefined ; |
| // table[(T_undefined<<4)+T_boolean] = T_undefined ; |
| // table[(T_undefined<<4)+T_char] = T_undefined ; |
| // table[(T_undefined<<4)+T_int] = T_undefined ; |
| // table[(T_undefined<<4)+T_null] = T_undefined ; |
| |
| // table[(T_byte<<4)+T_undefined] = T_undefined ; |
| table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_byte<<4)+T_long] = (Byte2Int<<12)+(Long2Int<<4)+T_int ; |
| table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_byte<<4)+T_void] = T_undefined ; |
| // table[(T_byte<<4)+T_String] = T_undefined ; |
| // table[(T_byte<<4)+T_Object] = T_undefined ; |
| // table[(T_byte<<4)+T_double] = T_undefined ; |
| // table[(T_byte<<4)+T_float] = T_undefined ; |
| // table[(T_byte<<4)+T_boolean] = T_undefined ; |
| table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_byte<<4)+T_null] = T_undefined ; |
| |
| // table[(T_long<<4)+T_undefined] = T_undefined ; |
| table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Int<<4)+T_long; |
| table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Int<<4)+T_long ; |
| table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Int<<4)+T_long ; |
| // table[(T_long<<4)+T_void] = T_undefined ; |
| // table[(T_long<<4)+T_String] = T_undefined ; |
| // table[(T_long<<4)+T_Object] = T_undefined ; |
| // table[(T_long<<4)+T_double] = T_undefined ; |
| // table[(T_long<<4)+T_float] = T_undefined ; |
| // table[(T_long<<4)+T_boolean] = T_undefined ; |
| table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Int<<4)+T_long ; |
| table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Int<<4)+T_long ; |
| // table[(T_long<<4)+T_null] = T_undefined ; |
| |
| // table[(T_short<<4)+T_undefined] = T_undefined ; |
| table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_short<<4)+T_long] = (Short2Int<<12)+(Long2Int<<4)+T_int ; |
| table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_short<<4)+T_void] = T_undefined ; |
| // table[(T_short<<4)+T_String] = T_undefined ; |
| // table[(T_short<<4)+T_Object] = T_undefined ; |
| // table[(T_short<<4)+T_double] = T_undefined ; |
| // table[(T_short<<4)+T_float] = T_undefined ; |
| // table[(T_short<<4)+T_boolean] = T_undefined ; |
| table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_short<<4)+T_null] = T_undefined ; |
| |
| // table[(T_void<<4)+T_undefined] = T_undefined ; |
| // table[(T_void<<4)+T_byte] = T_undefined ; |
| // table[(T_void<<4)+T_long] = T_undefined ; |
| // table[(T_void<<4)+T_short] = T_undefined ; |
| // table[(T_void<<4)+T_void] = T_undefined ; |
| // table[(T_void<<4)+T_String] = T_undefined ; |
| // table[(T_void<<4)+T_Object] = T_undefined ; |
| // table[(T_void<<4)+T_double] = T_undefined ; |
| // table[(T_void<<4)+T_float] = T_undefined ; |
| // table[(T_void<<4)+T_boolean] = T_undefined ; |
| // table[(T_void<<4)+T_char] = T_undefined ; |
| // table[(T_void<<4)+T_int] = T_undefined ; |
| // table[(T_void<<4)+T_null] = T_undefined ; |
| |
| // table[(T_String<<4)+T_undefined] = T_undefined ; |
| // table[(T_String<<4)+T_byte] = T_undefined ; |
| // table[(T_String<<4)+T_long] = T_undefined ; |
| // table[(T_String<<4)+T_short] = T_undefined ; |
| // table[(T_String<<4)+T_void] = T_undefined ; |
| // table[(T_String<<4)+T_String] = T_undefined ; |
| // table[(T_String<<4)+T_Object] = T_undefined ; |
| // table[(T_String<<4)+T_double] = T_undefined ; |
| // table[(T_String<<4)+T_float] = T_undefined ; |
| // table[(T_String<<4)+T_boolean] = T_undefined ; |
| // table[(T_String<<4)+T_char] = T_undefined ; |
| // table[(T_String<<4)+T_int] = T_undefined ; |
| // table[(T_String<<4)+T_null] = T_undefined ; |
| |
| // table[(T_Object<<4)+T_undefined] = T_undefined ; |
| // table[(T_Object<<4)+T_byte] = T_undefined ; |
| // table[(T_Object<<4)+T_long] = T_undefined ; |
| // table[(T_Object<<4)+T_short] = T_undefined ; |
| // table[(T_Object<<4)+T_void] = T_undefined ; |
| // table[(T_Object<<4)+T_String] = T_undefined ; |
| // table[(T_Object<<4)+T_Object] = T_undefined ; |
| // table[(T_Object<<4)+T_double] = T_undefined ; |
| // table[(T_Object<<4)+T_float] = T_undefined ; |
| // table[(T_Object<<4)+T_boolean] = T_undefined ; |
| // table[(T_Object<<4)+T_char] = T_undefined ; |
| // table[(T_Object<<4)+T_int] = T_undefined ; |
| // table[(T_Object<<4)+T_null] = T_undefined ; |
| |
| // table[(T_double<<4)+T_undefined] = T_undefined ; |
| // table[(T_double<<4)+T_byte] = T_undefined ; |
| // table[(T_double<<4)+T_long] = T_undefined ; |
| // table[(T_double<<4)+T_short] = T_undefined ; |
| // table[(T_double<<4)+T_void] = T_undefined ; |
| // table[(T_double<<4)+T_String] = T_undefined ; |
| // table[(T_double<<4)+T_Object] = T_undefined ; |
| // table[(T_double<<4)+T_double] = T_undefined ; |
| // table[(T_double<<4)+T_float] = T_undefined ; |
| // table[(T_double<<4)+T_boolean] = T_undefined ; |
| // table[(T_double<<4)+T_char] = T_undefined ; |
| // table[(T_double<<4)+T_int] = T_undefined; |
| // table[(T_double<<4)+T_null] = T_undefined ; |
| |
| // table[(T_float<<4)+T_undefined] = T_undefined ; |
| // table[(T_float<<4)+T_byte] = T_undefined ; |
| // table[(T_float<<4)+T_long] = T_undefined ; |
| // table[(T_float<<4)+T_short] = T_undefined ; |
| // table[(T_float<<4)+T_void] = T_undefined ; |
| // table[(T_float<<4)+T_String] = T_undefined ; |
| // table[(T_float<<4)+T_Object] = T_undefined ; |
| // table[(T_float<<4)+T_double] = T_undefined ; |
| // table[(T_float<<4)+T_float] = T_undefined ; |
| // table[(T_float<<4)+T_boolean] = T_undefined ; |
| // table[(T_float<<4)+T_char] = T_undefined ; |
| // table[(T_float<<4)+T_int] = T_undefined ; |
| // table[(T_float<<4)+T_null] = T_undefined ; |
| |
| // table[(T_boolean<<4)+T_undefined] = T_undefined ; |
| // table[(T_boolean<<4)+T_byte] = T_undefined ; |
| // table[(T_boolean<<4)+T_long] = T_undefined ; |
| // table[(T_boolean<<4)+T_short] = T_undefined ; |
| // table[(T_boolean<<4)+T_void] = T_undefined ; |
| // table[(T_boolean<<4)+T_String] = T_undefined ; |
| // table[(T_boolean<<4)+T_Object] = T_undefined ; |
| // table[(T_boolean<<4)+T_double] = T_undefined ; |
| // table[(T_boolean<<4)+T_float] = T_undefined ; |
| // table[(T_boolean<<4)+T_boolean] = T_undefined ; |
| // table[(T_boolean<<4)+T_char] = T_undefined ; |
| // table[(T_boolean<<4)+T_int] = T_undefined ; |
| // table[(T_boolean<<4)+T_null] = T_undefined ; |
| |
| // table[(T_char<<4)+T_undefined] = T_undefined ; |
| table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_char<<4)+T_long] = (Char2Int<<12)+(Long2Int<<4)+T_int ; |
| table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_char<<4)+T_void] = T_undefined ; |
| // table[(T_char<<4)+T_String] = T_undefined ; |
| // table[(T_char<<4)+T_Object] = T_undefined ; |
| // table[(T_char<<4)+T_double] = T_undefined ; |
| // table[(T_char<<4)+T_float] = T_undefined ; |
| // table[(T_char<<4)+T_boolean] = T_undefined ; |
| table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_char<<4)+T_null] = T_undefined ; |
| |
| // table[(T_int<<4)+T_undefined] = T_undefined ; |
| table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_int<<4)+T_long] = (Int2Int<<12)+(Long2Int<<4)+T_int ; |
| table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_int<<4)+T_void] = T_undefined ; |
| // table[(T_int<<4)+T_String] = T_undefined ; |
| // table[(T_int<<4)+T_Object] = T_undefined ; |
| // table[(T_int<<4)+T_double] = T_undefined ; |
| // table[(T_int<<4)+T_float] = T_undefined ; |
| // table[(T_int<<4)+T_boolean] = T_undefined ; |
| table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_int<<4)+T_null] = T_undefined ; |
| |
| // table[(T_null<<4)+T_undefined] = T_undefined ; |
| // table[(T_null<<4)+T_byte] = T_undefined ; |
| // table[(T_null<<4)+T_long] = T_undefined ; |
| // table[(T_null<<4)+T_short] = T_undefined ; |
| // table[(T_null<<4)+T_void] = T_undefined ; |
| // table[(T_null<<4)+T_String] = T_undefined ; |
| // table[(T_null<<4)+T_Object] = T_undefined ; |
| // table[(T_null<<4)+T_double] = T_undefined ; |
| // table[(T_null<<4)+T_float] = T_undefined ; |
| // table[(T_null<<4)+T_boolean] = T_undefined ; |
| // table[(T_null<<4)+T_char] = T_undefined ; |
| // table[(T_null<<4)+T_int] = T_undefined ; |
| // table[(T_null<<4)+T_null] = T_undefined ; |
| |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_LESS(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| int[] table = new int[16*16] ; |
| |
| // table[(T_undefined<<4)+T_undefined] = T_undefined ; |
| // table[(T_undefined<<4)+T_byte] = T_undefined ; |
| // table[(T_undefined<<4)+T_long] = T_undefined ; |
| // table[(T_undefined<<4)+T_short] = T_undefined ; |
| // table[(T_undefined<<4)+T_void] = T_undefined ; |
| // table[(T_undefined<<4)+T_String] = T_undefined ; |
| // table[(T_undefined<<4)+T_Object] = T_undefined ; |
| // table[(T_undefined<<4)+T_double] = T_undefined ; |
| // table[(T_undefined<<4)+T_float] = T_undefined ; |
| // table[(T_undefined<<4)+T_boolean] = T_undefined ; |
| // table[(T_undefined<<4)+T_char] = T_undefined ; |
| // table[(T_undefined<<4)+T_int] = T_undefined ; |
| // table[(T_undefined<<4)+T_null] = T_undefined ; |
| |
| // table[(T_byte<<4)+T_undefined] = T_undefined ; |
| table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_byte<<4)+T_void] = T_undefined ; |
| // table[(T_byte<<4)+T_String] = T_undefined ; |
| // table[(T_byte<<4)+T_Object] = T_undefined ; |
| table[(T_byte<<4)+T_double] = (Byte2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_byte<<4)+T_float] = (Byte2Float<<12)+(Float2Float<<4)+T_boolean; |
| // table[(T_byte<<4)+T_boolean] = T_undefined ; |
| table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_boolean ; |
| // table[(T_byte<<4)+T_null] = T_undefined ; |
| |
| // table[(T_long<<4)+T_undefined] = T_undefined ; |
| table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_boolean; |
| table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_boolean ; |
| // table[(T_long<<4)+T_void] = T_undefined ; |
| // table[(T_long<<4)+T_String] = T_undefined ; |
| // table[(T_long<<4)+T_Object] = T_undefined ; |
| table[(T_long<<4)+T_double] = (Long2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_long<<4)+T_float] = (Long2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_long<<4)+T_boolean] = T_undefined ; |
| table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_boolean ; |
| table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_boolean ; |
| // table[(T_long<<4)+T_null] = T_undefined ; |
| |
| // table[(T_short<<4)+T_undefined] = T_undefined ; |
| table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_short<<4)+T_void] = T_undefined ; |
| // table[(T_short<<4)+T_String] = T_undefined ; |
| // table[(T_short<<4)+T_Object] = T_undefined ; |
| table[(T_short<<4)+T_double] = (Short2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_short<<4)+T_float] = (Short2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_short<<4)+T_boolean] = T_undefined ; |
| table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_boolean ; |
| // table[(T_short<<4)+T_null] = T_undefined ; |
| |
| // table[(T_void<<4)+T_undefined] = T_undefined ; |
| // table[(T_void<<4)+T_byte] = T_undefined ; |
| // table[(T_void<<4)+T_long] = T_undefined ; |
| // table[(T_void<<4)+T_short] = T_undefined ; |
| // table[(T_void<<4)+T_void] = T_undefined ; |
| // table[(T_void<<4)+T_String] = T_undefined ; |
| // table[(T_void<<4)+T_Object] = T_undefined ; |
| // table[(T_void<<4)+T_double] = T_undefined ; |
| // table[(T_void<<4)+T_float] = T_undefined ; |
| // table[(T_void<<4)+T_boolean] = T_undefined ; |
| // table[(T_void<<4)+T_char] = T_undefined ; |
| // table[(T_void<<4)+T_int] = T_undefined ; |
| // table[(T_void<<4)+T_null] = T_undefined ; |
| |
| // table[(T_String<<4)+T_undefined] = T_undefined ; |
| // table[(T_String<<4)+T_byte] = T_undefined ; |
| // table[(T_String<<4)+T_long] = T_undefined ; |
| // table[(T_String<<4)+T_short] = T_undefined ; |
| // table[(T_String<<4)+T_void] = T_undefined ; |
| // table[(T_String<<4)+T_String] = T_undefined ; |
| // table[(T_String<<4)+T_Object] = T_undefined ; |
| // table[(T_String<<4)+T_double] = T_undefined ; |
| // table[(T_String<<4)+T_float] = T_undefined ; |
| // table[(T_String<<4)+T_boolean] = T_undefined ; |
| // table[(T_String<<4)+T_char] = T_undefined ; |
| // table[(T_String<<4)+T_int] = T_undefined ; |
| // table[(T_String<<4)+T_null] = T_undefined ; |
| |
| // table[(T_Object<<4)+T_undefined] = T_undefined ; |
| // table[(T_Object<<4)+T_byte] = T_undefined ; |
| // table[(T_Object<<4)+T_long] = T_undefined ; |
| // table[(T_Object<<4)+T_short] = T_undefined ; |
| // table[(T_Object<<4)+T_void] = T_undefined ; |
| // table[(T_Object<<4)+T_String] = T_undefined ; |
| // table[(T_Object<<4)+T_Object] = T_undefined ; |
| // table[(T_Object<<4)+T_double] = T_undefined ; |
| // table[(T_Object<<4)+T_float] = T_undefined ; |
| // table[(T_Object<<4)+T_boolean] = T_undefined ; |
| // table[(T_Object<<4)+T_char] = T_undefined ; |
| // table[(T_Object<<4)+T_int] = T_undefined ; |
| // table[(T_Object<<4)+T_null] = T_undefined ; |
| |
| // table[(T_double<<4)+T_undefined] = T_undefined ; |
| table[(T_double<<4)+T_byte] = (Double2Double<<12)+(Byte2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_long] = (Double2Double<<12)+(Long2Double<<4)+T_boolean; |
| table[(T_double<<4)+T_short] = (Double2Double<<12)+(Short2Double<<4)+T_boolean ; |
| // table[(T_double<<4)+T_void] = T_undefined ; |
| // table[(T_double<<4)+T_String] = T_undefined ; |
| // table[(T_double<<4)+T_Object] = T_undefined ; |
| table[(T_double<<4)+T_double] = (Double2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_float] = (Double2Double<<12)+(Float2Double<<4)+T_boolean ; |
| // table[(T_double<<4)+T_boolean] = T_undefined ; |
| table[(T_double<<4)+T_char] = (Double2Double<<12)+(Char2Double<<4)+T_boolean ; |
| table[(T_double<<4)+T_int] = (Double2Double<<12)+(Int2Double<<4)+T_boolean; |
| // table[(T_double<<4)+T_null] = T_undefined ; |
| |
| // table[(T_float<<4)+T_undefined] = T_undefined ; |
| table[(T_float<<4)+T_byte] = (Float2Float<<12)+(Byte2Float<<4)+T_boolean ; |
| table[(T_float<<4)+T_long] = (Float2Float<<12)+(Long2Float<<4)+T_boolean ; |
| table[(T_float<<4)+T_short] = (Float2Float<<12)+(Short2Float<<4)+T_boolean ; |
| // table[(T_float<<4)+T_void] = T_undefined ; |
| // table[(T_float<<4)+T_String] = T_undefined ; |
| // table[(T_float<<4)+T_Object] = T_undefined ; |
| table[(T_float<<4)+T_double] = (Float2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_float<<4)+T_float] = (Float2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_float<<4)+T_boolean] = T_undefined ; |
| table[(T_float<<4)+T_char] = (Float2Float<<12)+(Char2Float<<4)+T_boolean ; |
| table[(T_float<<4)+T_int] = (Float2Float<<12)+(Int2Float<<4)+T_boolean ; |
| // table[(T_float<<4)+T_null] = T_undefined ; |
| |
| // table[(T_boolean<<4)+T_undefined] = T_undefined ; |
| // table[(T_boolean<<4)+T_byte] = T_undefined ; |
| // table[(T_boolean<<4)+T_long] = T_undefined ; |
| // table[(T_boolean<<4)+T_short] = T_undefined ; |
| // table[(T_boolean<<4)+T_void] = T_undefined ; |
| // table[(T_boolean<<4)+T_String] = T_undefined ; |
| // table[(T_boolean<<4)+T_Object] = T_undefined ; |
| // table[(T_boolean<<4)+T_double] = T_undefined ; |
| // table[(T_boolean<<4)+T_float] = T_undefined ; |
| // table[(T_boolean<<4)+T_boolean] = T_undefined ; |
| // table[(T_boolean<<4)+T_char] = T_undefined ; |
| // table[(T_boolean<<4)+T_int] = T_undefined ; |
| // table[(T_boolean<<4)+T_null] = T_undefined ; |
| |
| // table[(T_char<<4)+T_undefined] = T_undefined ; |
| table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_boolean ; |
| table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_char<<4)+T_void] = T_undefined ; |
| // table[(T_char<<4)+T_String] = T_undefined ; |
| // table[(T_char<<4)+T_Object] = T_undefined ; |
| table[(T_char<<4)+T_double] = (Char2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_char<<4)+T_float] = (Char2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_char<<4)+T_boolean] = T_undefined ; |
| table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_boolean ; |
| // table[(T_char<<4)+T_null] = T_undefined ; |
| |
| // table[(T_int<<4)+T_undefined] = T_undefined ; |
| table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_boolean ; |
| table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_boolean; |
| table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_boolean ; |
| // table[(T_int<<4)+T_void] = T_undefined ; |
| // table[(T_int<<4)+T_String] = T_undefined ; |
| // table[(T_int<<4)+T_Object] = T_undefined ; |
| table[(T_int<<4)+T_double] = (Int2Double<<12)+(Double2Double<<4)+T_boolean ; |
| table[(T_int<<4)+T_float] = (Int2Float<<12)+(Float2Float<<4)+T_boolean ; |
| // table[(T_int<<4)+T_boolean] = T_undefined ; |
| table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_boolean ; |
| table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_boolean; |
| // table[(T_int<<4)+T_null] = T_undefined ; |
| |
| // table[(T_null<<4)+T_undefined] = T_undefined ; |
| // table[(T_null<<4)+T_byte] = T_undefined ; |
| // table[(T_null<<4)+T_long] = T_undefined ; |
| // table[(T_null<<4)+T_short] = T_undefined ; |
| // table[(T_null<<4)+T_void] = T_undefined ; |
| // table[(T_null<<4)+T_String] = T_undefined ; |
| // table[(T_null<<4)+T_Object] = T_undefined ; |
| // table[(T_null<<4)+T_double] = T_undefined ; |
| // table[(T_null<<4)+T_float] = T_undefined ; |
| // table[(T_null<<4)+T_boolean] = T_undefined ; |
| // table[(T_null<<4)+T_char] = T_undefined ; |
| // table[(T_null<<4)+T_int] = T_undefined ; |
| // table[(T_null<<4)+T_null] = T_undefined ; |
| |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_LESS_EQUAL(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_LESS(); |
| |
| // return table ; |
| } |
| public static final int[] get_MINUS(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| int[] table = new int[16*16] ; |
| |
| table = (int[]) get_PLUS().clone(); |
| |
| table[(T_String<<4)+T_byte] = T_undefined ; |
| table[(T_String<<4)+T_long] = T_undefined ; |
| table[(T_String<<4)+T_short] = T_undefined ; |
| table[(T_String<<4)+T_void] = T_undefined ; |
| table[(T_String<<4)+T_String] = T_undefined ; |
| table[(T_String<<4)+T_Object] = T_undefined ; |
| table[(T_String<<4)+T_double] = T_undefined ; |
| table[(T_String<<4)+T_float] = T_undefined ; |
| table[(T_String<<4)+T_boolean] = T_undefined ; |
| table[(T_String<<4)+T_char] = T_undefined ; |
| table[(T_String<<4)+T_int] = T_undefined ; |
| table[(T_String<<4)+T_null] = T_undefined ; |
| |
| table[(T_byte<<4) +T_String] = T_undefined ; |
| table[(T_long<<4) +T_String] = T_undefined ; |
| table[(T_short<<4) +T_String] = T_undefined ; |
| table[(T_void<<4) +T_String] = T_undefined ; |
| table[(T_Object<<4) +T_String] = T_undefined ; |
| table[(T_double<<4) +T_String] = T_undefined ; |
| table[(T_float<<4) +T_String] = T_undefined ; |
| table[(T_boolean<<4)+T_String] = T_undefined ; |
| table[(T_char<<4) +T_String] = T_undefined ; |
| table[(T_int<<4) +T_String] = T_undefined ; |
| table[(T_null<<4) +T_String] = T_undefined ; |
| |
| table[(T_null<<4) +T_null] = T_undefined ; |
| |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_MULTIPLY(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_MINUS(); |
| |
| // return table ; |
| } |
| public static final int[] get_OR(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_AND() ; |
| |
| // return table ; |
| } |
| public static final int[] get_OR_OR(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_AND_AND() ; |
| |
| // return table ; |
| } |
| public static final int[] get_PLUS(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| int[] table = new int[16*16] ; |
| |
| // table[(T_undefined<<4)+T_undefined] = T_undefined ; |
| // table[(T_undefined<<4)+T_byte] = T_undefined ; |
| // table[(T_undefined<<4)+T_long] = T_undefined ; |
| // table[(T_undefined<<4)+T_short] = T_undefined ; |
| // table[(T_undefined<<4)+T_void] = T_undefined ; |
| // table[(T_undefined<<4)+T_String] = T_undefined ; |
| // table[(T_undefined<<4)+T_Object] = T_undefined ; |
| // table[(T_undefined<<4)+T_double] = T_undefined ; |
| // table[(T_undefined<<4)+T_float] = T_undefined ; |
| // table[(T_undefined<<4)+T_boolean] = T_undefined ; |
| // table[(T_undefined<<4)+T_char] = T_undefined ; |
| // table[(T_undefined<<4)+T_int] = T_undefined ; |
| // table[(T_undefined<<4)+T_null] = T_undefined ; |
| |
| // table[(T_byte<<4)+T_undefined] = T_undefined ; |
| table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_byte<<4)+T_void] = T_undefined ; |
| table[(T_byte<<4)+T_String] = (Byte2Byte<<12)+(String2String<<4)+T_String ; |
| // table[(T_byte<<4)+T_Object] = T_undefined ; |
| table[(T_byte<<4)+T_double] = (Byte2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_byte<<4)+T_float] = (Byte2Float<<12)+(Float2Float<<4)+T_float; |
| // table[(T_byte<<4)+T_boolean] = T_undefined ; |
| table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_byte<<4)+T_null] = T_undefined ; |
| |
| // table[(T_long<<4)+T_undefined] = T_undefined ; |
| table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_long; |
| table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_long ; |
| // table[(T_long<<4)+T_void] = T_undefined ; |
| table[(T_long<<4)+T_String] = (Long2Long<<12)+(String2String<<4)+T_String ; |
| // table[(T_long<<4)+T_Object] = T_undefined ; |
| table[(T_long<<4)+T_double] = (Long2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_long<<4)+T_float] = (Long2Float<<12)+(Float2Float<<4)+T_float ; |
| // table[(T_long<<4)+T_boolean] = T_undefined ; |
| table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_long ; |
| table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_long ; ; |
| // table[(T_long<<4)+T_null] = T_undefined ; |
| |
| // table[(T_short<<4)+T_undefined] = T_undefined ; |
| table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_short<<4)+T_void] = T_undefined ; |
| table[(T_short<<4)+T_String] = (Short2Short<<12)+(String2String<<4)+T_String ; |
| // table[(T_short<<4)+T_Object] = T_undefined ; |
| table[(T_short<<4)+T_double] = (Short2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_short<<4)+T_float] = (Short2Float<<12)+(Float2Float<<4)+T_float ; |
| // table[(T_short<<4)+T_boolean] = T_undefined ; |
| table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_short<<4)+T_null] = T_undefined ; |
| |
| // table[(T_void<<4)+T_undefined] = T_undefined ; |
| // table[(T_void<<4)+T_byte] = T_undefined ; |
| // table[(T_void<<4)+T_long] = T_undefined ; |
| // table[(T_void<<4)+T_short] = T_undefined ; |
| // table[(T_void<<4)+T_void] = T_undefined ; |
| // table[(T_void<<4)+T_String] = T_undefined ; |
| // table[(T_void<<4)+T_Object] = T_undefined ; |
| // table[(T_void<<4)+T_double] = T_undefined ; |
| // table[(T_void<<4)+T_float] = T_undefined ; |
| // table[(T_void<<4)+T_boolean] = T_undefined ; |
| // table[(T_void<<4)+T_char] = T_undefined ; |
| // table[(T_void<<4)+T_int] = T_undefined ; |
| // table[(T_void<<4)+T_null] = T_undefined ; |
| |
| // table[(T_String<<4)+T_undefined] = T_undefined ; |
| table[(T_String<<4)+T_byte] = (String2String<<12)+(Byte2Byte<<4)+T_String ; |
| table[(T_String<<4)+T_long] = (String2String<<12)+(Long2Long<<4)+T_String ; |
| table[(T_String<<4)+T_short] = (String2String<<12)+(Short2Short<<4)+T_String ; |
| // table[(T_String<<4)+T_void] = T_undefined ; |
| table[(T_String<<4)+T_String] = (String2String<<12)+(String2String<<4)+T_String ; |
| table[(T_String<<4)+T_Object] = (String2String<<12)+(T_Object<<8)+(T_Object<<4)+T_String ; |
| table[(T_String<<4)+T_double] = (String2String<<12)+(Double2Double<<4)+T_String ; |
| table[(T_String<<4)+T_float] = (String2String<<12)+(Float2Float<<4)+T_String ; |
| table[(T_String<<4)+T_boolean] = (String2String<<12)+(Boolean2Boolean<<4)+T_String ; |
| table[(T_String<<4)+T_char] = (String2String<<12)+(Char2Char<<4)+T_String ; |
| table[(T_String<<4)+T_int] = (String2String<<12)+(Int2Int<<4)+T_String ; |
| table[(T_String<<4)+T_null] = (String2String<<12)+(T_null<<8)+(T_null<<4)+T_String ; |
| |
| // table[(T_Object<<4)+T_undefined] = T_undefined ; |
| // table[(T_Object<<4)+T_byte] = T_undefined ; |
| // table[(T_Object<<4)+T_long] = T_undefined ; |
| // table[(T_Object<<4)+T_short] = T_undefined ; |
| // table[(T_Object<<4)+T_void] = T_undefined ; |
| table[(T_Object<<4)+T_String] = (T_Object<<16)+(T_Object<<12)+(String2String<<4)+T_String ; |
| // table[(T_Object<<4)+T_Object] = T_undefined ; |
| // table[(T_Object<<4)+T_double] = T_undefined ; |
| // table[(T_Object<<4)+T_float] = T_undefined ; |
| // table[(T_Object<<4)+T_boolean] = T_undefined ; |
| // table[(T_Object<<4)+T_char] = T_undefined ; |
| // table[(T_Object<<4)+T_int] = T_undefined ; |
| // table[(T_Object<<4)+T_null] = T_undefined ; |
| |
| // table[(T_double<<4)+T_undefined] = T_undefined ; |
| table[(T_double<<4)+T_byte] = (Double2Double<<12)+(Byte2Double<<4)+T_double ; |
| table[(T_double<<4)+T_long] = (Double2Double<<12)+(Long2Double<<4)+T_double ; |
| table[(T_double<<4)+T_short] = (Double2Double<<12)+(Short2Double<<4)+T_double ; ; |
| // table[(T_double<<4)+T_void] = T_undefined ; |
| table[(T_double<<4)+T_String] = (Double2Double<<12)+(String2String<<4)+T_String ; |
| // table[(T_double<<4)+T_Object] = T_undefined ; |
| table[(T_double<<4)+T_double] = (Double2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_double<<4)+T_float] = (Double2Double<<12)+(Float2Double<<4)+T_double ; ; |
| // table[(T_double<<4)+T_boolean] = T_undefined ; |
| table[(T_double<<4)+T_char] = (Double2Double<<12)+(Char2Double<<4)+T_double ; ; |
| table[(T_double<<4)+T_int] = (Double2Double<<12)+(Int2Double<<4)+T_double ; ; |
| // table[(T_double<<4)+T_null] = T_undefined ; |
| |
| // table[(T_float<<4)+T_undefined] = T_undefined ; |
| table[(T_float<<4)+T_byte] = (Float2Float<<12)+(Byte2Float<<4)+T_float ; |
| table[(T_float<<4)+T_long] = (Float2Float<<12)+(Long2Float<<4)+T_float ; |
| table[(T_float<<4)+T_short] = (Float2Float<<12)+(Short2Float<<4)+T_float ; |
| // table[(T_float<<4)+T_void] = T_undefined ; |
| table[(T_float<<4)+T_String] = (Float2Float<<12)+(String2String<<4)+T_String ; |
| // table[(T_float<<4)+T_Object] = T_undefined ; |
| table[(T_float<<4)+T_double] = (Float2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_float<<4)+T_float] = (Float2Float<<12)+(Float2Float<<4)+T_float ; |
| // table[(T_float<<4)+T_boolean] = T_undefined ; |
| table[(T_float<<4)+T_char] = (Float2Float<<12)+(Char2Float<<4)+T_float ; |
| table[(T_float<<4)+T_int] = (Float2Float<<12)+(Int2Float<<4)+T_float ; |
| // table[(T_float<<4)+T_null] = T_undefined ; |
| |
| // table[(T_boolean<<4)+T_undefined] = T_undefined ; |
| // table[(T_boolean<<4)+T_byte] = T_undefined ; |
| // table[(T_boolean<<4)+T_long] = T_undefined ; |
| // table[(T_boolean<<4)+T_short] = T_undefined ; |
| // table[(T_boolean<<4)+T_void] = T_undefined ; |
| table[(T_boolean<<4)+T_String] = (Boolean2Boolean<<12)+(String2String<<4)+T_String ; |
| // table[(T_boolean<<4)+T_Object] = T_undefined ; |
| // table[(T_boolean<<4)+T_double] = T_undefined ; |
| // table[(T_boolean<<4)+T_float] = T_undefined ; |
| // table[(T_boolean<<4)+T_boolean] = T_undefined ; |
| // table[(T_boolean<<4)+T_char] = T_undefined ; |
| // table[(T_boolean<<4)+T_int] = T_undefined ; |
| // table[(T_boolean<<4)+T_null] = T_undefined ; |
| |
| // table[(T_char<<4)+T_undefined] = T_undefined ; |
| table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_char<<4)+T_void] = T_undefined ; |
| table[(T_char<<4)+T_String] = (Char2Char<<12)+(String2String<<4)+T_String ; |
| // table[(T_char<<4)+T_Object] = T_undefined ; |
| table[(T_char<<4)+T_double] = (Char2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_char<<4)+T_float] = (Char2Float<<12)+(Float2Float<<4)+T_float ; |
| // table[(T_char<<4)+T_boolean] = T_undefined ; |
| table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_int ; ; |
| table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_char<<4)+T_null] = T_undefined ; |
| |
| // table[(T_int<<4)+T_undefined] = T_undefined ; |
| table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_int ; |
| table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_long ; |
| table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_int ; |
| // table[(T_int<<4)+T_void] = T_undefined ; |
| table[(T_int<<4)+T_String] = (Int2Int<<12)+(String2String<<4)+T_String ; |
| // table[(T_int<<4)+T_Object] = T_undefined ; |
| table[(T_int<<4)+T_double] = (Int2Double<<12)+(Double2Double<<4)+T_double ; |
| table[(T_int<<4)+T_float] = (Int2Float<<12)+(Float2Float<<4)+T_float ; |
| // table[(T_int<<4)+T_boolean] = T_undefined ; |
| table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_int ; |
| table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_int ; |
| // table[(T_int<<4)+T_null] = T_undefined ; |
| |
| // table[(T_null<<4)+T_undefined] = T_undefined ; |
| // table[(T_null<<4)+T_byte] = T_undefined ; |
| // table[(T_null<<4)+T_long] = T_undefined ; |
| // table[(T_null<<4)+T_short] = T_undefined ; |
| // table[(T_null<<4)+T_void] = T_undefined ; |
| table[(T_null<<4)+T_String] = (T_null<<16)+(T_null<<12)+(String2String<<4)+T_String ; |
| // table[(T_null<<4)+T_Object] = T_undefined ; |
| // table[(T_null<<4)+T_double] = T_undefined ; |
| // table[(T_null<<4)+T_float] = T_undefined ; |
| // table[(T_null<<4)+T_boolean] = T_undefined ; |
| // table[(T_null<<4)+T_char] = T_undefined ; |
| // table[(T_null<<4)+T_int] = T_undefined ; |
| // table[(T_null<<4)+T_null] = (Null2String<<12)+(Null2String<<4)+T_String ;; |
| |
| //and now.....the return......... |
| |
| return table ; |
| } |
| public static final int[] get_REMAINDER(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_MINUS(); |
| |
| // return table ; |
| } |
| public static final int[] get_RIGHT_SHIFT(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_LEFT_SHIFT(); |
| |
| // return table ; |
| } |
| public static final int[] get_UNSIGNED_RIGHT_SHIFT(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_LEFT_SHIFT(); |
| |
| // return table ; |
| } |
| public static final int[] get_XOR(){ |
| |
| //the code is an int |
| // (cast) left Op (cast) rigth --> result |
| // 0000 0000 0000 0000 0000 |
| // <<16 <<12 <<8 <<4 |
| |
| |
| // int[] table = new int[16*16] ; |
| |
| return get_AND() ; |
| |
| // return table ; |
| } |
| public String operatorToString() { |
| switch ((bits & OperatorMASK) >> OperatorSHIFT) { |
| case EQUAL_EQUAL : |
| return "=="/*nonNLS*/; |
| case LESS_EQUAL : |
| return "<="/*nonNLS*/; |
| case GREATER_EQUAL : |
| return ">="/*nonNLS*/; |
| case NOT_EQUAL : |
| return "!="/*nonNLS*/; |
| case LEFT_SHIFT : |
| return "<<"/*nonNLS*/; |
| case RIGHT_SHIFT : |
| return ">>"/*nonNLS*/; |
| case UNSIGNED_RIGHT_SHIFT : |
| return ">>>"/*nonNLS*/; |
| case OR_OR : |
| return "||"/*nonNLS*/; |
| case AND_AND : |
| return "&&"/*nonNLS*/; |
| case PLUS : |
| return "+"/*nonNLS*/; |
| case MINUS : |
| return "-"/*nonNLS*/; |
| case NOT : |
| return "!"/*nonNLS*/; |
| case REMAINDER : |
| return "%"/*nonNLS*/; |
| case XOR : |
| return "^"/*nonNLS*/; |
| case AND : |
| return "&"/*nonNLS*/; |
| case MULTIPLY : |
| return "*"/*nonNLS*/; |
| case OR : |
| return "|"/*nonNLS*/; |
| case TWIDDLE : |
| return "~"/*nonNLS*/; |
| case DIVIDE : |
| return "/"/*nonNLS*/; |
| case GREATER : |
| return ">"/*nonNLS*/; |
| case LESS : |
| return "<"/*nonNLS*/; |
| case QUESTIONCOLON : |
| return "?:"/*nonNLS*/; |
| case EQUAL : |
| return "="/*nonNLS*/; |
| }; |
| return "unknown operator"/*nonNLS*/; |
| } |
| public String toStringExpression(){ |
| /* slow code*/ |
| |
| //subclass redefine toStringExpressionNoParenthesis() |
| |
| return "("/*nonNLS*/ + toStringExpressionNoParenthesis() + ")"/*nonNLS*/; |
| } |
| |
| public abstract String toStringExpressionNoParenthesis(); |
| |
| } |