d01f8e89381cce0b0e2268c1eed1f7e8154856aa
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPKeywords.java
1 /**********************************************************************
2 Copyright (c) 2000, 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 v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/cpl-v10.html
7
8 Contributors:
9     IBM Corporation - Initial implementation
10     Klaus Hartlage - www.eclipseproject.de
11 **********************************************************************/
12 package net.sourceforge.phpeclipse.phpeditor.php;
13
14 /**
15  * PHP keyWords and Token definitions
16  */
17 public class PHPKeywords {
18
19   public final static String[] PHP_KEYWORS =
20     {
21       "if",
22       "elseif",
23       "else",
24       "endif",
25       "for",
26       "endfor",
27       "while",
28       "endwhile",
29       "switch",
30       "case",
31       "endswitch",
32       "break",
33       "continue",
34       "return",
35       "define",
36       "include",
37       "include_once",
38       "require",
39       "require_once",
40       "function",
41       "class",
42       "new",
43       "do",
44       "old_function",
45       "default",
46       "global",
47       "static",
48       "foreach",
49       "endforeach",
50       "extends",
51     //  "empty",
52     //  "array",
53     //   "isset",
54     "echo", "var", "as", 
55     "print", 
56     // "unset", 
57     // "exit", "die", 
58     "and", "or", "xor", "list", 
59     "null", "false", "true" };
60
61   public final static String[] PHP_TYPES =
62     { "string", "unset", 
63       //"array", 
64       "object", "bool", "boolean", "real", "double", "float", "int", "integer", };
65
66   public final static int TokenNameKEYWORD = 1000;
67   public final static int TokenNameif = 1001;
68   public final static int TokenNameelseif = 1002;
69   public final static int TokenNameelse = 1003;
70   public final static int TokenNameendif = 1004;
71   public final static int TokenNamefor = 1005;
72   public final static int TokenNameendfor = 1006;
73   public final static int TokenNamewhile = 1007;
74   public final static int TokenNameendwhile = 1008;
75   public final static int TokenNameswitch = 1009;
76   public final static int TokenNamecase = 10010;
77   public final static int TokenNameendswitch = 1011;
78   public final static int TokenNamebreak = 1012;
79   public final static int TokenNamecontinue = 1013;
80   public final static int TokenNamereturn = 1014;
81   public final static int TokenNamedefine = 1015;
82   public final static int TokenNameinclude = 1016;
83   public final static int TokenNameinclude_once = 1017;
84   public final static int TokenNamerequire = 1018;
85   public final static int TokenNamerequire_once = 1019;
86   public final static int TokenNamefunction = 1020;
87   public final static int TokenNameclass = 1021;
88   public final static int TokenNamenew = 1022;
89   public final static int TokenNamedo = 1023;
90   public final static int TokenNameold_function = 1024;
91   public final static int TokenNamedefault = 1025;
92   public final static int TokenNameglobal = 1026;
93   public final static int TokenNamestatic = 1027;
94   public final static int TokenNameforeach = 1028;
95   public final static int TokenNameendforeach = 1029;
96   public final static int TokenNameextends = 1030;
97   // public final static int TokenNameempty = 1031;
98   // public final static int TokenNamearray = 1032;
99   public final static int TokenNameecho = 1033;
100   public final static int TokenNamevar = 1034;
101   public final static int TokenNameas = 1035;
102   public final static int TokenNameprint = 1036;
103  // public final static int TokenNameunset = 1037;
104  //  public final static int TokenNameexit = 1038;
105  // public final static int TokenNamedie = 1039;
106   public final static int TokenNameand = 1040;
107   public final static int TokenNameor = 1041;
108   public final static int TokenNamexor = 1042;
109   public final static int TokenNamelist = 1043;
110   public final static int TokenNamenull = 1044;
111   public final static int TokenNamefalse = 1045;
112   public final static int TokenNametrue = 1046;
113
114   public final static int[] PHP_KEYWORD_TOKEN =
115     {
116       TokenNameif,
117       TokenNameelseif,
118       TokenNameelse,
119       TokenNameendif,
120       TokenNamefor,
121       TokenNameendfor,
122       TokenNamewhile,
123       TokenNameendwhile,
124       TokenNameswitch,
125       TokenNamecase,
126       TokenNameendswitch,
127       TokenNamebreak,
128       TokenNamecontinue,
129       TokenNamereturn,
130       TokenNamedefine,
131       TokenNameinclude,
132       TokenNameinclude_once,
133       TokenNamerequire,
134       TokenNamerequire_once,
135       TokenNamefunction,
136       TokenNameclass,
137       TokenNamenew,
138       TokenNamedo,
139       TokenNameold_function,
140       TokenNamedefault,
141       TokenNameglobal,
142       TokenNamestatic,
143       TokenNameforeach,
144       TokenNameendforeach,
145       TokenNameextends,
146     // TokenNameempty,
147     //  TokenNamearray,
148     //   TokenNameisset,
149     TokenNameecho, TokenNamevar, TokenNameas, 
150     TokenNameprint, 
151     // TokenNameunset, 
152     // TokenNameexit, TokenNamedie, 
153     TokenNameand, TokenNameor, TokenNamexor, TokenNamelist, 
154     TokenNamenull, TokenNamefalse, TokenNametrue };
155 }