• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Javassist, a Java-bytecode translator toolkit.
3  * Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License.  Alternatively, the contents of this file may be used under
8  * the terms of the GNU Lesser General Public License Version 2.1 or later,
9  * or the Apache License Version 2.0.
10  *
11  * Software distributed under the License is distributed on an "AS IS" basis,
12  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13  * for the specific language governing rights and limitations under the
14  * License.
15  */
16 
17 package javassist.compiler;
18 
19 public interface TokenId {
20     int ABSTRACT = 300;
21     int BOOLEAN = 301;
22     int BREAK = 302;
23     int BYTE = 303;
24     int CASE = 304;
25     int CATCH = 305;
26     int CHAR = 306;
27     int CLASS = 307;
28     int CONST = 308;    // reserved keyword
29     int CONTINUE = 309;
30     int DEFAULT = 310;
31     int DO = 311;
32     int DOUBLE = 312;
33     int ELSE = 313;
34     int EXTENDS = 314;
35     int FINAL = 315;
36     int FINALLY = 316;
37     int FLOAT = 317;
38     int FOR = 318;
39     int GOTO = 319;     // reserved keyword
40     int IF = 320;
41     int IMPLEMENTS = 321;
42     int IMPORT = 322;
43     int INSTANCEOF = 323;
44     int INT = 324;
45     int INTERFACE = 325;
46     int LONG = 326;
47     int NATIVE = 327;
48     int NEW = 328;
49     int PACKAGE = 329;
50     int PRIVATE = 330;
51     int PROTECTED = 331;
52     int PUBLIC = 332;
53     int RETURN = 333;
54     int SHORT = 334;
55     int STATIC = 335;
56     int SUPER = 336;
57     int SWITCH = 337;
58     int SYNCHRONIZED = 338;
59     int THIS = 339;
60     int THROW = 340;
61     int THROWS = 341;
62     int TRANSIENT = 342;
63     int TRY = 343;
64     int VOID = 344;
65     int VOLATILE = 345;
66     int WHILE = 346;
67     int STRICT = 347;
68 
69     int NEQ = 350;      // !=
70     int MOD_E = 351;    // %=
71     int AND_E = 352;    // &=
72     int MUL_E = 353;    // *=
73     int PLUS_E = 354;   // +=
74     int MINUS_E = 355;  // -=
75     int DIV_E = 356;    // /=
76     int LE = 357;               // <=
77     int EQ = 358;               // ==
78     int GE = 359;               // >=
79     int EXOR_E = 360;   // ^=
80     int OR_E = 361;     // |=
81     int PLUSPLUS = 362; // ++
82     int MINUSMINUS = 363;       // --
83     int LSHIFT = 364;   // <<
84     int LSHIFT_E = 365; // <<=
85     int RSHIFT = 366;   // >>
86     int RSHIFT_E = 367; // >>=
87     int OROR = 368;     // ||
88     int ANDAND = 369;   // &&
89     int ARSHIFT = 370;  // >>>
90     int ARSHIFT_E = 371;        // >>>=
91 
92     // operators from NEQ to ARSHIFT_E
93     String opNames[] = { "!=", "%=", "&=", "*=", "+=", "-=", "/=",
94                        "<=", "==", ">=", "^=", "|=", "++", "--",
95                        "<<", "<<=", ">>", ">>=", "||", "&&", ">>>",
96                        ">>>=" };
97 
98     // operators from MOD_E to ARSHIFT_E
99     int assignOps[] = { '%', '&', '*', '+', '-', '/', 0, 0, 0,
100                         '^', '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0,
101                         ARSHIFT };
102 
103     int Identifier = 400;
104     int CharConstant = 401;
105     int IntConstant = 402;
106     int LongConstant = 403;
107     int FloatConstant = 404;
108     int DoubleConstant = 405;
109     int StringL = 406;
110 
111     int TRUE = 410;
112     int FALSE = 411;
113     int NULL = 412;
114 
115     int CALL = 'C';     // method call
116     int ARRAY = 'A';    // array access
117     int MEMBER = '#';   // static member access
118 
119     int EXPR = 'E';     // expression statement
120     int LABEL = 'L';    // label statement
121     int BLOCK = 'B';    // block statement
122     int DECL = 'D';     // declaration statement
123 
124     int BadToken = 500;
125 }
126