/Users/lyon/j4p/src/javassist/compiler/TokenId.java

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