Skip to main content
summaryrefslogtreecommitdiffstats
blob: e2cf02cd4bdc41f9d316954cd4cf2d13ec570b72 (plain) (blame)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
/*******************************************************************************
 * Copyright (c) 2000, 2019 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Fraunhofer FIRST - extended API and implementation
 *     Technical University Berlin - extended API and implementation
 *******************************************************************************/

package org.eclipse.jdt.core.compiler;

/**
 * Maps each terminal symbol in the java-grammar into a unique integer.
 * This integer is used to represent the terminal when computing a parsing action.
 *
 * @see IScanner
 * @since 2.0
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface ITerminalSymbols {

	int TokenNameWHITESPACE = 1000;
	int TokenNameCOMMENT_LINE = 1001;
	int TokenNameCOMMENT_BLOCK = 1002;
	int TokenNameCOMMENT_JAVADOC = 1003;

	/**
	 * @deprecated With the introduction of "restricted keywords" in Java 9, classification of tokens
	 * 	 by a scanner is inherently unreliable. Any token classified as an identifier could still
	 *   be a "restricted keyword". Future versions of Java will introduce more words that have
	 *   special syntactical meaning in specific contexts.
	 *   For reliably detecting an identifier the only real solution is to use a parser instead
	 *   (see also the caveat at the top of the	interface documentation of {@link IScanner}).
	 */
	@Deprecated
	int TokenNameIdentifier = 5;
	int TokenNameabstract = 98;

    /**
     * "assert" token (added in J2SE 1.4).
     */
	int TokenNameassert = 118;
	int TokenNameboolean = 18;
	int TokenNamebreak = 119;
	int TokenNamebyte = 19;
	int TokenNamecase = 211;
	int TokenNamecatch = 225;
	int TokenNamechar = 20;
	int TokenNameclass = 165;
	int TokenNamecontinue = 120;
	int TokenNamedefault = 212;
	int TokenNamedo = 121;
	int TokenNamedouble = 21;
	int TokenNameelse = 213;
	int TokenNameextends = 243;
	int TokenNamefalse = 37;
	int TokenNamefinal = 99;
	int TokenNamefinally = 226;
	int TokenNamefloat = 22;
	int TokenNamefor = 122;
	int TokenNameif = 123;
	int TokenNameimplements = 268;
	int TokenNameimport = 191;
	int TokenNameinstanceof = 65;
	int TokenNameint = 23;
	int TokenNameinterface = 180;
	int TokenNamelong = 24;
	int TokenNamenative = 100;
	int TokenNamenew = 32;
	int TokenNamenull = 38;
	int TokenNamepackage = 214;
	int TokenNameprivate = 101;
	int TokenNameprotected = 102;
	int TokenNamepublic = 103;
	int TokenNamereturn = 124;
	int TokenNameshort = 25;
	int TokenNamestatic = 94;
	int TokenNamestrictfp = 104;
	int TokenNamesuper = 33;
	int TokenNameswitch = 125;
	int TokenNamesynchronized = 85;
	int TokenNamethis = 34;
	int TokenNamethrow = 126;
	int TokenNamethrows = 227;
	int TokenNametransient = 105;
	int TokenNametrue = 39;
	int TokenNametry = 127;
	int TokenNamevoid = 26;
	int TokenNamevolatile = 106;
	int TokenNamewhile = 117;
	int TokenNameIntegerLiteral = 40;
	int TokenNameLongLiteral = 41;
	int TokenNameFloatingPointLiteral = 42;
	int TokenNameDoubleLiteral = 43;
	int TokenNameCharacterLiteral = 44;
	int TokenNameStringLiteral = 45;
	/**
	 * @since 3.20
	 * @noreference This class is not intended to be referenced by clients as it is a part of Java preview feature.
	 */
	int TokenNameTextBlock = 46;
	int TokenNamePLUS_PLUS = 1;
	int TokenNameMINUS_MINUS = 2;
	int TokenNameEQUAL_EQUAL = 35;
	int TokenNameLESS_EQUAL = 66;
	int TokenNameGREATER_EQUAL = 67;
	int TokenNameNOT_EQUAL = 36;
	int TokenNameLEFT_SHIFT = 14;
	int TokenNameRIGHT_SHIFT = 11;
	int TokenNameUNSIGNED_RIGHT_SHIFT = 12;
	int TokenNamePLUS_EQUAL = 168;
	int TokenNameMINUS_EQUAL = 169;
	int TokenNameMULTIPLY_EQUAL = 170;
	int TokenNameDIVIDE_EQUAL = 171;
	int TokenNameAND_EQUAL = 172;
	int TokenNameOR_EQUAL = 173;
	int TokenNameXOR_EQUAL = 174;
	int TokenNameREMAINDER_EQUAL = 175;
	int TokenNameLEFT_SHIFT_EQUAL = 176;
	int TokenNameRIGHT_SHIFT_EQUAL = 177;
	int TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 178;
	int TokenNameOR_OR = 80;
	int TokenNameAND_AND = 79;
	int TokenNamePLUS = 3;
	int TokenNameMINUS = 4;
	int TokenNameNOT = 71;
	int TokenNameREMAINDER = 9;
	int TokenNameXOR = 63;
	int TokenNameAND = 62;
	int TokenNameMULTIPLY = 8;
	int TokenNameOR = 70;
	int TokenNameTWIDDLE = 72;
	int TokenNameDIVIDE = 10;
	int TokenNameGREATER = 68;
	int TokenNameLESS = 69;
	int TokenNameLPAREN = 7;
	int TokenNameRPAREN = 86;
	int TokenNameLBRACE = 110;
	int TokenNameRBRACE = 95;
	int TokenNameLBRACKET = 15;
	int TokenNameRBRACKET = 166;
	int TokenNameSEMICOLON = 64;
	int TokenNameQUESTION = 81;
	int TokenNameCOLON = 154;
	int TokenNameCOMMA = 90;
	int TokenNameDOT = 6;
	int TokenNameEQUAL = 167;
	int TokenNameEOF = 158;
	int TokenNameERROR = 309;

    /**
     * "enum" keyword (added in J2SE 1.5).
     * @since 3.0
     */
	int TokenNameenum = 400;

    /**
     * "@" token (added in J2SE 1.5).
     * @since 3.0
     */
	int TokenNameAT = 401;

    /**
     * "..." token (added in J2SE 1.5).
     * @since 3.0
     */
	int TokenNameELLIPSIS = 402;

	/**
	 * @since 3.1
	 */
	int TokenNameconst = 403;

	/**
	 * @since 3.1
	 */
	int TokenNamegoto = 404;  // goto not found in Java ? :)

	/**
	 * @since 3.10
	 */
	int TokenNameARROW = 405;
	/**
	 * @since 3.10
	 */
	int TokenNameCOLON_COLON = 406;

	/** @since 3.30 */
	int TokenNameNotAToken = 408;

	/** @since 3.30 */
	int TokenNameRestrictedIdentifierYield = 409;

	/** @since 3.30 */
	int TokenNameRestrictedIdentifierpermits = 410;

	/** @since 3.30 */
	int TokenNameRestrictedIdentifierrecord = 411;

	/** @since 3.30 */
	int TokenNameRestrictedIdentifiersealed = 412;

	/** @since 3.30 */
	int TokenNameSingleQuoteStringLiteral = 413;

	/** @since 3.30 */
	int TokenNamenon_sealed = 414;

//{ObjectTeams: mirrored from auto-generated TerminalTokens.java. Note: the values here must be constant across Eclipse-versions, so do not simply copy the identifiers!
	// Take values from 5000 upwards
    int
    TokenNamebase = 5000,
    TokenNametsuper = 5001,
    TokenNamecallin = 5002,
    TokenNamewithin = 5003,
    TokenNameplayedBy = 5004,
    TokenNamewith = 5005,
    TokenNameteam = 5006,
    TokenNameas = 5007,
    TokenNamereplace = 5009,
    TokenNameafter = 5010,
    TokenNamebefore = 5011,
    TokenNameBINDIN = 5012,
    TokenNameCALLOUT_OVERRIDE = 5014,
	TokenNameget = 5016,
	TokenNameset = 5017,
	TokenNamewhen = 5018,
    TokenNameprecedence = 5019;
// carp}
}

Back to the top