imporved php parser
[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", "print", 
55     "unset", "exit", "die", "and", "or", "xor",
56     "list" };
57
58   public final static String[] PHP_TYPES =
59     { "string", "unset", "array", "object", "bool", "boolean", "real", "double", "float", "int", "integer", };
60
61   public final static int TT_KEYWORD = 1000;
62   public final static int TT_if = 1001;
63   public final static int TT_elseif = 1002;
64   public final static int TT_else = 1003;
65   public final static int TT_endif = 1004;
66   public final static int TT_for = 1005;
67   public final static int TT_endfor = 1006;
68   public final static int TT_while = 1007;
69   public final static int TT_endwhile = 1008;
70   public final static int TT_switch = 1009;
71   public final static int TT_case = 10010;
72   public final static int TT_endswitch = 1011;
73   public final static int TT_break = 1012;
74   public final static int TT_continue = 1013;
75   public final static int TT_return = 1014;
76   public final static int TT_define = 1015;
77   public final static int TT_include = 1016;
78   public final static int TT_include_once = 1017;
79   public final static int TT_require = 1018;
80   public final static int TT_require_once = 1019;
81   public final static int TT_function = 1020;
82   public final static int TT_class = 1021;
83   public final static int TT_new = 1022;
84   public final static int TT_do = 1023;
85   public final static int TT_old_function = 1024;
86   public final static int TT_default = 1025;
87   public final static int TT_global = 1026;
88   public final static int TT_static = 1027;
89   public final static int TT_foreach = 1028;
90   public final static int TT_endforeach = 1029;
91   public final static int TT_extends = 1030;
92  // public final static int TT_empty = 1031;
93  // public final static int TT_array = 1032;
94   public final static int TT_echo = 1033;
95   public final static int TT_var = 1034;
96   public final static int TT_as = 1035;
97   public final static int TT_print = 1036;
98   public final static int TT_unset = 1037;
99   public final static int TT_exit = 1038;
100   public final static int TT_die = 1039;
101   public final static int TT_and = 1040;
102   public final static int TT_or = 1041;
103   public final static int TT_xor = 1042;
104   public final static int TT_list = 1043;
105
106   public final static int[] PHP_KEYWORD_TOKEN =
107     {
108       TT_if,
109       TT_elseif,
110       TT_else,
111       TT_endif,
112       TT_for,
113       TT_endfor,
114       TT_while,
115       TT_endwhile,
116       TT_switch,
117       TT_case,
118       TT_endswitch,
119       TT_break,
120       TT_continue,
121       TT_return,
122       TT_define,
123       TT_include,
124       TT_include_once,
125       TT_require,
126       TT_require_once,
127       TT_function,
128       TT_class,
129       TT_new,
130       TT_do,
131       TT_old_function,
132       TT_default,
133       TT_global,
134       TT_static,
135       TT_foreach,
136       TT_endforeach,
137       TT_extends,
138      // TT_empty,
139     //  TT_array,
140     //   TT_isset,
141     TT_echo, TT_var, TT_as, TT_print, TT_unset, TT_exit, 
142     TT_die, TT_and, TT_or, TT_xor, TT_list };
143 }