aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/compiler/TokenId.java
blob: 8b78bf00b51d6dd40c2f9e6061cf867c1b250390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
 * This file is part of the Javassist toolkit.
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy of the License at
 * either http://www.mozilla.org/MPL/.
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
 * the License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is Javassist.
 *
 * The Initial Developer of the Original Code is Shigeru Chiba.  Portions
 * created by Shigeru Chiba are Copyright (C) 1999-2003 Shigeru Chiba.
 * All Rights Reserved.
 *
 * Contributor(s):
 *
 * The development of this software is supported in part by the PRESTO
 * program (Sakigake Kenkyu 21) of Japan Science and Technology Corporation.
 */

package javassist.compiler;

public interface TokenId {
    int ABSTRACT = 300;
    int BOOLEAN = 301;
    int BREAK = 302;
    int BYTE = 303;
    int CASE = 304;
    int CATCH = 305;
    int CHAR = 306;
    int CLASS = 307;
    int CONST = 308;	// reserved keyword
    int CONTINUE = 309;
    int DEFAULT = 310;
    int DO = 311;
    int DOUBLE = 312;
    int ELSE = 313;
    int EXTENDS = 314;
    int FINAL = 315;
    int FINALLY = 316;
    int FLOAT = 317;
    int FOR = 318;
    int GOTO = 319;	// reserved keyword
    int IF = 320;
    int IMPLEMENTS = 321;
    int IMPORT = 322;
    int INSTANCEOF = 323;
    int INT = 324;
    int INTERFACE = 325;
    int LONG = 326;
    int NATIVE = 327;
    int NEW = 328;
    int PACKAGE = 329;
    int PRIVATE = 330;
    int PROTECTED = 331;
    int PUBLIC = 332;
    int RETURN = 333;
    int SHORT = 334;
    int STATIC = 335;
    int SUPER = 336;
    int SWITCH = 337;
    int SYNCHRONIZED = 338;
    int THIS = 339;
    int THROW = 340;
    int THROWS = 341;
    int TRANSIENT = 342;
    int TRY = 343;
    int VOID = 344;
    int VOLATILE = 345;
    int WHILE = 346;
    int STRICT = 347;

    int NEQ = 350;	// !=
    int MOD_E = 351;	// %=
    int AND_E = 352;	// &=
    int MUL_E = 353;	// *=
    int PLUS_E = 354;	// +=
    int MINUS_E = 355;	// -=
    int DIV_E = 356;	// /=
    int LE = 357;		// <=
    int EQ = 358;		// ==
    int GE = 359;		// >=
    int EXOR_E = 360;	// ^=
    int OR_E = 361;	// |=
    int PLUSPLUS = 362;	// ++
    int MINUSMINUS = 363;	// --
    int LSHIFT = 364;	// <<
    int LSHIFT_E = 365;	// <<=
    int RSHIFT = 366;	// >>
    int RSHIFT_E = 367;	// >>=
    int OROR = 368;	// ||
    int ANDAND = 369;	// &&
    int ARSHIFT = 370;	// >>>
    int ARSHIFT_E = 371;	// >>>=

    // operators from NEQ to ARSHIFT_E
    String opNames[] = { "!=", "%=", "&=", "*=", "+=", "-=", "/=",
		       "<=", "==", ">=", "^=", "|=", "++", "--",
		       "<<", "<<=", ">>", ">>=", "||", "&&", ">>>",
		       ">>>=" };

    // operators from MOD_E to ARSHIFT_E
    int assignOps[] = { '%', '&', '*', '+', '-', '/', 0, 0, 0,
			'^', '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0,
			ARSHIFT };

    int Identifier = 400;
    int CharConstant = 401;
    int IntConstant = 402;
    int LongConstant = 403;
    int FloatConstant = 404;
    int DoubleConstant = 405;
    int StringL = 406;

    int TRUE = 410;
    int FALSE = 411;
    int NULL = 412;

    int CALL = 'C';	// method call
    int ARRAY = 'A';	// array access
    int MEMBER = '#';	// static member access

    int EXPR = 'E';	// expression statement
    int LABEL = 'L';	// label statement
    int BLOCK = 'B';	// block statement
    int DECL = 'D';	// declaration statement

    int BadToken = 500;
}