169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal/* 269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * Javassist, a Java-bytecode translator toolkit. 369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * Copyright (C) 1999-2007 Shigeru Chiba. All Rights Reserved. 469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * 569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * The contents of this file are subject to the Mozilla Public License Version 669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * 1.1 (the "License"); you may not use this file except in compliance with 769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * the License. Alternatively, the contents of this file may be used under 869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * the terms of the GNU Lesser General Public License Version 2.1 or later. 969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * 1069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * Software distributed under the License is distributed on an "AS IS" basis, 1169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 1269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * for the specific language governing rights and limitations under the 1369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal * License. 1469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal */ 1569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 1669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigalpackage javassist.compiler; 1769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 1869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigalpublic interface TokenId { 1969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int ABSTRACT = 300; 2069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int BOOLEAN = 301; 2169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int BREAK = 302; 2269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int BYTE = 303; 2369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CASE = 304; 2469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CATCH = 305; 2569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CHAR = 306; 2669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CLASS = 307; 2769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CONST = 308; // reserved keyword 2869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CONTINUE = 309; 2969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int DEFAULT = 310; 3069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int DO = 311; 3169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int DOUBLE = 312; 3269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int ELSE = 313; 3369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int EXTENDS = 314; 3469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int FINAL = 315; 3569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int FINALLY = 316; 3669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int FLOAT = 317; 3769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int FOR = 318; 3869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int GOTO = 319; // reserved keyword 3969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int IF = 320; 4069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int IMPLEMENTS = 321; 4169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int IMPORT = 322; 4269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int INSTANCEOF = 323; 4369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int INT = 324; 4469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int INTERFACE = 325; 4569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int LONG = 326; 4669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int NATIVE = 327; 4769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int NEW = 328; 4869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int PACKAGE = 329; 4969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int PRIVATE = 330; 5069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int PROTECTED = 331; 5169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int PUBLIC = 332; 5269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int RETURN = 333; 5369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int SHORT = 334; 5469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int STATIC = 335; 5569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int SUPER = 336; 5669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int SWITCH = 337; 5769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int SYNCHRONIZED = 338; 5869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int THIS = 339; 5969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int THROW = 340; 6069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int THROWS = 341; 6169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int TRANSIENT = 342; 6269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int TRY = 343; 6369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int VOID = 344; 6469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int VOLATILE = 345; 6569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int WHILE = 346; 6669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int STRICT = 347; 6769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 6869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int NEQ = 350; // != 6969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int MOD_E = 351; // %= 7069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int AND_E = 352; // &= 7169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int MUL_E = 353; // *= 7269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int PLUS_E = 354; // += 7369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int MINUS_E = 355; // -= 7469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int DIV_E = 356; // /= 7569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int LE = 357; // <= 7669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int EQ = 358; // == 7769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int GE = 359; // >= 7869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int EXOR_E = 360; // ^= 7969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int OR_E = 361; // |= 8069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int PLUSPLUS = 362; // ++ 8169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int MINUSMINUS = 363; // -- 8269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int LSHIFT = 364; // << 8369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int LSHIFT_E = 365; // <<= 8469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int RSHIFT = 366; // >> 8569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int RSHIFT_E = 367; // >>= 8669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int OROR = 368; // || 8769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int ANDAND = 369; // && 8869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int ARSHIFT = 370; // >>> 8969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int ARSHIFT_E = 371; // >>>= 9069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 9169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal // operators from NEQ to ARSHIFT_E 9269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal String opNames[] = { "!=", "%=", "&=", "*=", "+=", "-=", "/=", 9369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal "<=", "==", ">=", "^=", "|=", "++", "--", 9469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal "<<", "<<=", ">>", ">>=", "||", "&&", ">>>", 9569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal ">>>=" }; 9669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 9769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal // operators from MOD_E to ARSHIFT_E 9869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int assignOps[] = { '%', '&', '*', '+', '-', '/', 0, 0, 0, 9969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal '^', '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0, 10069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal ARSHIFT }; 10169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 10269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int Identifier = 400; 10369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CharConstant = 401; 10469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int IntConstant = 402; 10569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int LongConstant = 403; 10669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int FloatConstant = 404; 10769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int DoubleConstant = 405; 10869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int StringL = 406; 10969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 11069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int TRUE = 410; 11169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int FALSE = 411; 11269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int NULL = 412; 11369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 11469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int CALL = 'C'; // method call 11569e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int ARRAY = 'A'; // array access 11669e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int MEMBER = '#'; // static member access 11769e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 11869e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int EXPR = 'E'; // expression statement 11969e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int LABEL = 'L'; // label statement 12069e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int BLOCK = 'B'; // block statement 12169e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int DECL = 'D'; // declaration statement 12269e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal 12369e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal int BadToken = 500; 12469e17611504376e4d4603925f8528dfc890fd2c6Luis Sigal} 125