001: /*
002: * Javassist, a Java-bytecode translator toolkit.
003: * Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.
004: *
005: * The contents of this file are subject to the Mozilla Public License Version
006: * 1.1 (the "License"); you may not use this file except in compliance with
007: * the License. Alternatively, the contents of this file may be used under
008: * the terms of the GNU Lesser General Public License Version 2.1 or later.
009: *
010: * Software distributed under the License is distributed on an "AS IS" basis,
011: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
012: * for the specific language governing rights and limitations under the
013: * License.
014: */
015:
016: package javassist.compiler;
017:
018: public interface TokenId {
019: int ABSTRACT = 300;
020: int BOOLEAN = 301;
021: int BREAK = 302;
022: int BYTE = 303;
023: int CASE = 304;
024: int CATCH = 305;
025: int CHAR = 306;
026: int CLASS = 307;
027: int CONST = 308; // reserved keyword
028: int CONTINUE = 309;
029: int DEFAULT = 310;
030: int DO = 311;
031: int DOUBLE = 312;
032: int ELSE = 313;
033: int EXTENDS = 314;
034: int FINAL = 315;
035: int FINALLY = 316;
036: int FLOAT = 317;
037: int FOR = 318;
038: int GOTO = 319; // reserved keyword
039: int IF = 320;
040: int IMPLEMENTS = 321;
041: int IMPORT = 322;
042: int INSTANCEOF = 323;
043: int INT = 324;
044: int INTERFACE = 325;
045: int LONG = 326;
046: int NATIVE = 327;
047: int NEW = 328;
048: int PACKAGE = 329;
049: int PRIVATE = 330;
050: int PROTECTED = 331;
051: int PUBLIC = 332;
052: int RETURN = 333;
053: int SHORT = 334;
054: int STATIC = 335;
055: int SUPER = 336;
056: int SWITCH = 337;
057: int SYNCHRONIZED = 338;
058: int THIS = 339;
059: int THROW = 340;
060: int THROWS = 341;
061: int TRANSIENT = 342;
062: int TRY = 343;
063: int VOID = 344;
064: int VOLATILE = 345;
065: int WHILE = 346;
066: int STRICT = 347;
067:
068: int NEQ = 350; // !=
069: int MOD_E = 351; // %=
070: int AND_E = 352; // &=
071: int MUL_E = 353; // *=
072: int PLUS_E = 354; // +=
073: int MINUS_E = 355; // -=
074: int DIV_E = 356; // /=
075: int LE = 357; // <=
076: int EQ = 358; // ==
077: int GE = 359; // >=
078: int EXOR_E = 360; // ^=
079: int OR_E = 361; // |=
080: int PLUSPLUS = 362; // ++
081: int MINUSMINUS = 363; // --
082: int LSHIFT = 364; // <<
083: int LSHIFT_E = 365; // <<=
084: int RSHIFT = 366; // >>
085: int RSHIFT_E = 367; // >>=
086: int OROR = 368; // ||
087: int ANDAND = 369; // &&
088: int ARSHIFT = 370; // >>>
089: int ARSHIFT_E = 371; // >>>=
090:
091: // operators from NEQ to ARSHIFT_E
092: String opNames[] = { "!=", "%=", "&=", "*=", "+=", "-=", "/=",
093: "<=", "==", ">=", "^=", "|=", "++", "--", "<<", "<<=",
094: ">>", ">>=", "||", "&&", ">>>", ">>>=" };
095:
096: // operators from MOD_E to ARSHIFT_E
097: int assignOps[] = { '%', '&', '*', '+', '-', '/', 0, 0, 0, '^',
098: '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0, ARSHIFT };
099:
100: int Identifier = 400;
101: int CharConstant = 401;
102: int IntConstant = 402;
103: int LongConstant = 403;
104: int FloatConstant = 404;
105: int DoubleConstant = 405;
106: int StringL = 406;
107:
108: int TRUE = 410;
109: int FALSE = 411;
110: int NULL = 412;
111:
112: int CALL = 'C'; // method call
113: int ARRAY = 'A'; // array access
114: int MEMBER = '#'; // static member access
115:
116: int EXPR = 'E'; // expression statement
117: int LABEL = 'L'; // label statement
118: int BLOCK = 'B'; // block statement
119: int DECL = 'D'; // declaration statement
120:
121: int BadToken = 500;
122: }
|