1 /**********************************************************************
2 Copyright (c) 2002 IBM Corp. and others.
3 All rights reserved. � This program and the accompanying materials
4 are made available under the terms of the Common Public License v0.5
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/cpl-v05.html
9 IBM Corporation - initial API and implementation
10 **********************************************************************/
11 package net.sourceforge.phpdt.core.compiler;
14 * Maps each terminal symbol in the php-grammar into a unique integer. This
15 * integer is used to represent the terminal when computing a parsing action.
20 public interface ITerminalSymbols {
21 public final static String[] PHP_TYPES = { "array", "string", "object",
22 "bool", "boolean", "real", "double", "float", "int", "integer", };
25 public final static int TokenNameWHITESPACE = 900,
26 TokenNameCOMMENT_LINE = 901, TokenNameCOMMENT_BLOCK = 902,
27 TokenNameCOMMENT_PHPDOC = 903;
29 // TokenNameHTML = 904;
30 final static int TokenNameEOF = 0;
32 final static int TokenNameERROR = 1;
34 final static int TokenNameINLINE_HTML = 2;
36 final static int TokenNameREMAINDER = 30;
38 final static int TokenNameNOT = 31;
40 final static int TokenNameDOT = 32;
42 final static int TokenNameXOR = 33;
44 final static int TokenNameDIVIDE = 34;
46 final static int TokenNameMULTIPLY = 35;
48 final static int TokenNameMINUS = 36;
50 final static int TokenNamePLUS = 37;
52 final static int TokenNameEQUAL_EQUAL = 38;
54 final static int TokenNameNOT_EQUAL = 39;
56 final static int TokenNameGREATER = 40;
58 final static int TokenNameGREATER_EQUAL = 41;
60 final static int TokenNameLESS = 42;
62 final static int TokenNameLESS_EQUAL = 43;
64 final static int TokenNameAND_AND = 44;
66 final static int TokenNameOR_OR = 45;
68 final static int TokenNameCOLON = 47;
70 final static int TokenNameDOT_EQUAL = 48;
72 final static int TokenNameEQUAL = 49;
74 final static int TokenNameMINUS_GREATER = 50; // ->
76 final static int TokenNameEQUAL_GREATER = 51; // => (for each operator)
78 final static int TokenNameAND = 52;
80 final static int TokenNameTWIDDLE = 54;
82 final static int TokenNameTWIDDLE_EQUAL = 55;
84 final static int TokenNameREMAINDER_EQUAL = 56;
86 final static int TokenNameXOR_EQUAL = 57;
88 final static int TokenNameRIGHT_SHIFT_EQUAL = 58;
90 final static int TokenNameLEFT_SHIFT_EQUAL = 59;
92 final static int TokenNameAND_EQUAL = 60;
94 final static int TokenNameOR_EQUAL = 61;
96 final static int TokenNameQUESTION = 62;
98 final static int TokenNamePAAMAYIM_NEKUDOTAYIM = 63;
100 final static int TokenNameAT = 64;
102 final static int TokenNameand = 65;
104 final static int TokenNameor = 66;
106 final static int TokenNamexor = 67;
108 final static int TokenNameDOLLAR = 126;
110 final static int TokenNameDOLLAR_LBRACE = 127;
112 final static int TokenNameLPAREN = 128;
114 final static int TokenNameRPAREN = 129;
116 final static int TokenNameLBRACE = 130;
118 final static int TokenNameRBRACE = 131;
120 final static int TokenNameLBRACKET = 132;
122 final static int TokenNameRBRACKET = 133;
124 final static int TokenNameCOMMA = 134;
126 final static int TokenNameStringDoubleQuote = 136;
128 final static int TokenNameIdentifier = 138;
130 final static int TokenNameSEMICOLON = 140;
132 final static int TokenNameMINUS_MINUS = 144;
134 final static int TokenNamePLUS_PLUS = 145;
136 final static int TokenNamePLUS_EQUAL = 146;
138 final static int TokenNameDIVIDE_EQUAL = 147;
140 final static int TokenNameMINUS_EQUAL = 148;
142 final static int TokenNameMULTIPLY_EQUAL = 149;
144 final static int TokenNameVariable = 150;
146 final static int TokenNameIntegerLiteral = 151;
148 final static int TokenNameDoubleLiteral = 152;
150 final static int TokenNameStringInterpolated = 153;
152 final static int TokenNameStringSingleQuote = 154;
154 final static int TokenNameLEFT_SHIFT = 155;
156 final static int TokenNameRIGHT_SHIFT = 156;
158 final static int TokenNameEQUAL_EQUAL_EQUAL = 157;
160 final static int TokenNameNOT_EQUAL_EQUAL = 158;
162 final static int TokenNameOR = 160;
164 final static int TokenNameHEREDOC = 161;
166 final static int TokenNameintCAST = 174;
168 final static int TokenNameboolCAST = 175;
170 final static int TokenNamedoubleCAST = 176;
172 final static int TokenNamestringCAST = 177;
174 final static int TokenNamearrayCAST = 178;
176 final static int TokenNameobjectCAST = 179;
178 final static int TokenNameunsetCAST = 180;
181 final static int TokenNameEncapsedString0 = 190;
184 // final static int TokenNameEncapsedString1 = 191;
186 // final static int TokenNameEncapsedString2 = 192;
188 final static int TokenNameSTRING = 193;
190 final static int TokenNameLBRACE_DOLLAR = 194;
192 // start SQL token - the SQL tokens are only used in the
193 // PHPCompletionprocessor:
194 public final static int TokenNameSQLselect = 901;
196 public final static int TokenNameSQLupdate = 902;
198 public final static int TokenNameSQLinsert = 903;
200 public final static int TokenNameSQLwhere = 904;
202 public final static int TokenNameSQLfrom = 905;
204 public final static int TokenNameSQLinto = 906;
206 public final static int TokenNameSQLset = 907;
208 public final static int TokenNameSQLvalues = 908;
213 * Special 0-length token for php short tag syntax; Detected directly after
216 public final static int TokenNameECHO_INVISIBLE = 990;
218 public final static int TokenNameKEYWORD = 1000;
220 public final static int TokenNameif = 1001;
222 public final static int TokenNameelseif = 1002;
224 public final static int TokenNameelse = 1003;
226 public final static int TokenNameendif = 1004;
228 public final static int TokenNamefor = 1005;
230 public final static int TokenNameendfor = 1006;
232 public final static int TokenNamewhile = 1007;
234 public final static int TokenNameendwhile = 1008;
236 public final static int TokenNameswitch = 1009;
238 public final static int TokenNamecase = 10010;
240 public final static int TokenNameendswitch = 1011;
242 public final static int TokenNamebreak = 1012;
244 public final static int TokenNamecontinue = 1013;
246 public final static int TokenNamereturn = 1014;
248 // public final static int TokenNamedefine = 1015;
249 public final static int TokenNameinclude = 1016;
251 public final static int TokenNameinclude_once = 1017;
253 public final static int TokenNamerequire = 1018;
255 public final static int TokenNamerequire_once = 1019;
257 public final static int TokenNamefunction = 1020;
259 public final static int TokenNameclass = 1021;
261 public final static int TokenNamenew = 1022;
263 public final static int TokenNamedo = 1023;
265 public final static int TokenNameold_function = 1024;
267 public final static int TokenNamedefault = 1025;
269 public final static int TokenNameglobal = 1026;
271 public final static int TokenNamestatic = 1027;
273 public final static int TokenNameforeach = 1028;
275 public final static int TokenNameendforeach = 1029;
277 public final static int TokenNameextends = 1030;
279 public final static int TokenNameempty = 1031;
281 public final static int TokenNamearray = 1032;
283 public final static int TokenNameecho = 1033;
285 public final static int TokenNamevar = 1034;
287 public final static int TokenNameas = 1035;
289 public final static int TokenNameprint = 1036;
291 public final static int TokenNameunset = 1037;
293 public final static int TokenNameexit = 1038;
295 // public final static int TokenNamedie = 1039;
296 // public final static int TokenNameand = 1040;
297 // public final static int TokenNameor = 1041;
298 // public final static int TokenNamexor = 1042;
299 public final static int TokenNamelist = 1043;
301 // public final static int TokenNamenull = 1044;
302 // public final static int TokenNamefalse = 1045;
303 // public final static int TokenNametrue = 1046;
304 // public final static int TokenNamethis = 1047;
306 public final static int TokenNameabstract = 1050;
308 public final static int TokenNamecatch = 1051;
310 public final static int TokenNamefinally = 1052;
312 public final static int TokenNametry = 1053;
314 public final static int TokenNameprivate = 1054;
316 public final static int TokenNameprotected = 1055;
318 public final static int TokenNamepublic = 1056;
320 public final static int TokenNameinterface = 1057;
322 public final static int TokenNameimplements = 1058;
324 public final static int TokenNameinstanceof = 1059;
326 public final static int TokenNamesuper = 1060;
328 public final static int TokenNamethrow = 1061;
330 public final static int TokenNameconst = 1062;
332 public final static int TokenNameclone = 1063;
334 public final static int TokenNamedeclare = 1064;
336 public final static int TokenNameenddeclare = 1065;
338 public final static int TokenNameeval = 1066;
340 public final static int TokenNameuse = 1067;
342 public final static int TokenNameisset = 1068;
344 public final static int TokenNamefinal = 1069;
346 public final static int TokenNameLINE = 1070;
348 public final static int TokenNameFILE = 1071;
350 public final static int TokenNameCLASS_C = 1072;
352 public final static int TokenNameMETHOD_C = 1073;
354 public final static int TokenNameFUNC_C = 1074;
356 // special tokens not normally used in the parser
357 public final static int TokenNamethis_PHP_COMPLETION = 2000;