Added first PHP parser version (doesn't work correct actually)
[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
16 /**
17  * PHP keyWords and Token definitions
18  */
19 public class PHPKeywords {
20
21   public final static String[] PHP_KEYWORS =
22     {
23       "if",
24       "elseif",
25       "else",
26       "endif",
27       "for",
28       "endfor",
29       "while",
30       "endwhile",
31       "switch",
32       "case",
33       "endswitch",
34       "break",
35       "continue",
36       "return",
37       "define",
38       "include",
39       "include_once",
40       "require",
41       "require_once",
42       "function",
43       "class",
44       "new",
45       "do",
46       "old_function",
47       "default",
48       "global",
49       "static",
50       "foreach",
51       "endforeach",
52       "extends",
53       "empty",
54       "array",
55       "isset",
56       "echo",
57       "var",
58       "as",
59       "print",
60       "unset",
61       "exit",
62       "die" };
63
64   public final static int TT_KEYWORD = 1000;
65   public final static int TT_if = 1001;
66   public final static int TT_elseif = 1002;
67   public final static int TT_else = 1003;
68   public final static int TT_endif = 1004;
69   public final static int TT_for = 1005;
70   public final static int TT_endfor = 1006;
71   public final static int TT_while = 100;
72   public final static int TT_endwhile = 1007;
73   public final static int TT_switch = 1008;
74   public final static int TT_case = 1009;
75   public final static int TT_endswitch = 1010;
76   public final static int TT_break = 1011;
77   public final static int TT_continue = 1012;
78   public final static int TT_return = 1013;
79   public final static int TT_define = 1014;
80   public final static int TT_include = 1015;
81   public final static int TT_include_once = 1016;
82   public final static int TT_require = 1017;
83   public final static int TT_require_once = 1018;
84   public final static int TT_function = 1019;
85   public final static int TT_class = 1020;
86   public final static int TT_new = 1021;
87   public final static int TT_do = 1022;
88   public final static int TT_old_function = 1023;
89   public final static int TT_default = 1024;
90   public final static int TT_global = 1025;
91   public final static int TT_static = 1026;
92   public final static int TT_foreach = 1027;
93   public final static int TT_endforeach = 1028;
94   public final static int TT_extends = 1029;
95   public final static int TT_empty = 1030;
96   public final static int TT_array = 1031;
97   public final static int TT_isset = 1032;
98   public final static int TT_echo = 1033;
99   public final static int TT_var = 1034;
100   public final static int TT_as = 1035;
101   public final static int TT_print = 1036;
102   public final static int TT_unset = 1037;
103   public final static int TT_exit = 1038;
104   public final static int TT_die = 1039;
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,
142     TT_var,
143     TT_as,
144     TT_print,
145     TT_unset,
146     TT_exit,
147     TT_die };
148 }