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;
13 * Maps each terminal symbol in the php-grammar into a unique integer. This
14 * integer is used to represent the terminal when computing a parsing action.
19 public interface ITerminalSymbols {
20 public final static String[] PHP_TYPES = {"array", "string", "object",
21 "bool", "boolean", "real", "double", "float", "int", "integer",};
23 public final static int TokenNameWHITESPACE = 900,
24 TokenNameCOMMENT_LINE = 901, TokenNameCOMMENT_BLOCK = 902,
25 TokenNameCOMMENT_PHPDOC = 903;
26 // TokenNameHTML = 904;
27 final static int TokenNameEOF = 0;
28 final static int TokenNameERROR = 1;
29 final static int TokenNameINLINE_HTML = 2;
30 final static int TokenNameREMAINDER = 30;
31 final static int TokenNameNOT = 31;
32 final static int TokenNameDOT = 32;
33 final static int TokenNameXOR = 33;
34 final static int TokenNameDIVIDE = 34;
35 final static int TokenNameMULTIPLY = 35;
36 final static int TokenNameMINUS = 36;
37 final static int TokenNamePLUS = 37;
38 final static int TokenNameEQUAL_EQUAL = 38;
39 final static int TokenNameNOT_EQUAL = 39;
40 final static int TokenNameGREATER = 40;
41 final static int TokenNameGREATER_EQUAL = 41;
42 final static int TokenNameLESS = 42;
43 final static int TokenNameLESS_EQUAL = 43;
44 final static int TokenNameAND_AND = 44;
45 final static int TokenNameOR_OR = 45;
46 final static int TokenNameCOLON = 47;
47 final static int TokenNameDOT_EQUAL = 48;
48 final static int TokenNameEQUAL = 49;
49 final static int TokenNameMINUS_GREATER = 50; // ->
50 final static int TokenNameEQUAL_GREATER = 51; // => (for each operator)
51 final static int TokenNameAND = 52;
52 final static int TokenNameTWIDDLE = 54;
53 final static int TokenNameTWIDDLE_EQUAL = 55;
54 final static int TokenNameREMAINDER_EQUAL = 56;
55 final static int TokenNameXOR_EQUAL = 57;
56 final static int TokenNameRIGHT_SHIFT_EQUAL = 58;
57 final static int TokenNameLEFT_SHIFT_EQUAL = 59;
58 final static int TokenNameAND_EQUAL = 60;
59 final static int TokenNameOR_EQUAL = 61;
60 final static int TokenNameQUESTION = 62;
61 final static int TokenNamePAAMAYIM_NEKUDOTAYIM = 63;
62 final static int TokenNameAT = 64;
63 final static int TokenNameand = 65;
64 final static int TokenNameor = 66;
65 final static int TokenNamexor = 67;
66 final static int TokenNameDOLLAR = 126;
67 final static int TokenNameDOLLAR_LBRACE = 127;
68 final static int TokenNameLPAREN = 128;
69 final static int TokenNameRPAREN = 129;
70 final static int TokenNameLBRACE = 130;
71 final static int TokenNameRBRACE = 131;
72 final static int TokenNameLBRACKET = 132;
73 final static int TokenNameRBRACKET = 133;
74 final static int TokenNameCOMMA = 134;
75 final static int TokenNameStringDoubleQuote = 136;
76 final static int TokenNameIdentifier = 138;
77 final static int TokenNameSEMICOLON = 140;
78 final static int TokenNameMINUS_MINUS = 144;
79 final static int TokenNamePLUS_PLUS = 145;
80 final static int TokenNamePLUS_EQUAL = 146;
81 final static int TokenNameDIVIDE_EQUAL = 147;
82 final static int TokenNameMINUS_EQUAL = 148;
83 final static int TokenNameMULTIPLY_EQUAL = 149;
84 final static int TokenNameVariable = 150;
85 final static int TokenNameIntegerLiteral = 151;
86 final static int TokenNameDoubleLiteral = 152;
87 final static int TokenNameStringInterpolated = 153;
88 final static int TokenNameStringSingleQuote = 154;
89 final static int TokenNameLEFT_SHIFT = 155;
90 final static int TokenNameRIGHT_SHIFT = 156;
91 final static int TokenNameEQUAL_EQUAL_EQUAL = 157;
92 final static int TokenNameNOT_EQUAL_EQUAL = 158;
93 final static int TokenNameOR = 160;
94 final static int TokenNameHEREDOC = 161;
95 final static int TokenNameintCAST = 174;
96 final static int TokenNameboolCAST = 175;
97 final static int TokenNamedoubleCAST = 176;
98 final static int TokenNamestringCAST = 177;
99 final static int TokenNamearrayCAST = 178;
100 final static int TokenNameobjectCAST = 179;
101 final static int TokenNameunsetCAST = 180;
104 final static int TokenNameEncapsedString0 = 190;
106 final static int TokenNameEncapsedString1 = 191;
108 final static int TokenNameEncapsedString2 = 192;
110 final static int TokenNameSTRING = 193;
112 final static int TokenNameLBRACE_DOLLAR = 194;
114 // start SQL token - the SQL tokens are only used in the
115 // PHPCompletionprocessor:
116 public final static int TokenNameSQLselect = 901;
117 public final static int TokenNameSQLupdate = 902;
118 public final static int TokenNameSQLinsert = 903;
119 public final static int TokenNameSQLwhere = 904;
120 public final static int TokenNameSQLfrom = 905;
121 public final static int TokenNameSQLinto = 906;
122 public final static int TokenNameSQLset = 907;
123 public final static int TokenNameSQLvalues = 908;
125 public final static int TokenNameKEYWORD = 1000;
126 public final static int TokenNameif = 1001;
127 public final static int TokenNameelseif = 1002;
128 public final static int TokenNameelse = 1003;
129 public final static int TokenNameendif = 1004;
130 public final static int TokenNamefor = 1005;
131 public final static int TokenNameendfor = 1006;
132 public final static int TokenNamewhile = 1007;
133 public final static int TokenNameendwhile = 1008;
134 public final static int TokenNameswitch = 1009;
135 public final static int TokenNamecase = 10010;
136 public final static int TokenNameendswitch = 1011;
137 public final static int TokenNamebreak = 1012;
138 public final static int TokenNamecontinue = 1013;
139 public final static int TokenNamereturn = 1014;
140 // public final static int TokenNamedefine = 1015;
141 public final static int TokenNameinclude = 1016;
142 public final static int TokenNameinclude_once = 1017;
143 public final static int TokenNamerequire = 1018;
144 public final static int TokenNamerequire_once = 1019;
145 public final static int TokenNamefunction = 1020;
146 public final static int TokenNameclass = 1021;
147 public final static int TokenNamenew = 1022;
148 public final static int TokenNamedo = 1023;
149 public final static int TokenNameold_function = 1024;
150 public final static int TokenNamedefault = 1025;
151 public final static int TokenNameglobal = 1026;
152 public final static int TokenNamestatic = 1027;
153 public final static int TokenNameforeach = 1028;
154 public final static int TokenNameendforeach = 1029;
155 public final static int TokenNameextends = 1030;
156 public final static int TokenNameempty = 1031;
157 public final static int TokenNamearray = 1032;
158 public final static int TokenNameecho = 1033;
159 public final static int TokenNamevar = 1034;
160 public final static int TokenNameas = 1035;
161 public final static int TokenNameprint = 1036;
162 public final static int TokenNameunset = 1037;
163 public final static int TokenNameexit = 1038;
164 // public final static int TokenNamedie = 1039;
165 // public final static int TokenNameand = 1040;
166 // public final static int TokenNameor = 1041;
167 // public final static int TokenNamexor = 1042;
168 public final static int TokenNamelist = 1043;
169 // public final static int TokenNamenull = 1044;
170 // public final static int TokenNamefalse = 1045;
171 // public final static int TokenNametrue = 1046;
172 // public final static int TokenNamethis = 1047;
174 public final static int TokenNameabstract = 1050;
175 public final static int TokenNamecatch = 1051;
176 public final static int TokenNamefinally = 1052;
177 public final static int TokenNametry = 1053;
178 public final static int TokenNameprivate = 1054;
179 public final static int TokenNameprotected = 1055;
180 public final static int TokenNamepublic = 1056;
181 public final static int TokenNameinterface = 1057;
182 public final static int TokenNameimplements = 1058;
183 public final static int TokenNameinstanceof = 1059;
184 public final static int TokenNamesuper = 1060;
185 public final static int TokenNamethrow = 1061;
186 public final static int TokenNameconst = 1062;
187 public final static int TokenNameclone = 1063;
188 public final static int TokenNamedeclare = 1064;
189 public final static int TokenNameenddeclare = 1065;
190 public final static int TokenNameeval = 1066;
191 public final static int TokenNameuse = 1067;
192 public final static int TokenNameisset = 1068;
193 public final static int TokenNamefinal = 1069;
194 public final static int TokenNameLINE = 1070;
195 public final static int TokenNameFILE = 1071;
196 public final static int TokenNameCLASS_C = 1072;
197 public final static int TokenNameMETHOD_C = 1073;
198 public final static int TokenNameFUNC_C = 1074;
200 // special tokens not normally used in the parser
201 public final static int TokenNamethis_PHP_COMPLETION = 2000;