ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_eiffel.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5 
6 class HFile_eiffel extends HFile
7 {
8 
9 function HFile_eiffel()
10 {
11 
12 $this->HFile();
13 /*************************************/
14 // Beautifier Highlighting Configuration File
15 // Eiffel
16 /*************************************/
17 // Flags
18 
19 $this->nocase = "1";
20 $this->notrim = "0";
21 $this->perl = "0";
22 
23 // Colours
24 
25 $this->colours = array("blue", "purple", "gray", "brown", "blue", "purple");
26 $this->quotecolour = "blue";
27 $this->blockcommentcolour = "green";
28 $this->linecommentcolour = "green";
29 
30 // Indent Strings
31 
32 $this->indent = array("do");
33 $this->unindent = array("end");
34 
35 // String characters and delimiters
36 
37 $this->stringchars = array();
38 $this->delimiters = array("~", "%", "^", "&", "(", ")", "|", "{", "}", "[", "]", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
39 $this->escchar = "";
40 
41 // Comment settings
42 
43 $this->linecommenton = array("--");
44 $this->blockcommenton = array("");
45 $this->blockcommentoff = array("");
46 
47 // Keywords (keyword mapping to colour number)
48 
49 $this->keywords = array(
50  "alias" => "1",
51  "all" => "1",
52  "and" => "1",
53  "as" => "1",
54  "check" => "1",
55  "class" => "1",
56  "creation" => "1",
57  "debug" => "1",
58  "deferred" => "1",
59  "do" => "1",
60  "else" => "1",
61  "elseif" => "1",
62  "end" => "1",
63  "expanded" => "1",
64  "export" => "1",
65  "external" => "1",
66  "feature" => "1",
67  "from" => "1",
68  "frozen" => "1",
69  "if" => "1",
70  "implies" => "1",
71  "indexing" => "1",
72  "infix" => "1",
73  "inherit" => "1",
74  "inspect" => "1",
75  "is" => "1",
76  "like" => "1",
77  "local" => "1",
78  "loop" => "1",
79  "not" => "1",
80  "obsolete" => "1",
81  "old" => "1",
82  "once" => "1",
83  "or" => "1",
84  "prefix" => "1",
85  "redefine" => "1",
86  "rename" => "1",
87  "rescue" => "1",
88  "retry" => "1",
89  "select" => "1",
90  "separate" => "1",
91  "strip" => "1",
92  "then" => "1",
93  "true" => "1",
94  "undefine" => "1",
95  "unique" => "1",
96  "until" => "1",
97  "when" => "1",
98  "xor" => "1",
99  "," => "1",
100  "." => "1",
101  ";" => "1",
102  ":" => "1",
103  "Result" => "2",
104  "Current" => "2",
105  "False" => "2",
106  "True" => "2",
107  "Void" => "2",
108  "@" => "2",
109  "!" => "2",
110  "!!" => "2",
111  "=" => "2",
112  ":=" => "2",
113  "\\" => "2",
114  "\\\\" => "2",
115  "-" => "2",
116  "(" => "2",
117  ")" => "2",
118  "[" => "2",
119  "]" => "2",
120  "{" => "2",
121  "}" => "2",
122  "<" => "2",
123  "<=" => "2",
124  ">" => "2",
125  ">=" => "2",
126  "?" => "2",
127  "'" => "2",
128  "`" => "2",
129  "+" => "2",
130  "$" => "2",
131  "%" => "2",
132  "//" => "2",
133  "/" => "2",
134  "/=" => "2",
135  "ANY" => "3",
136  "ARGUMENTS" => "3",
137  "ARRAY" => "3",
138  "BIT" => "3",
139  "BOOLEAN" => "3",
140  "BOOLEAN_REF" => "3",
141  "CHARACTER" => "3",
142  "CHARACTER_REF" => "3",
143  "COMPARABLE" => "3",
144  "DOUBLE" => "3",
145  "DOUBLE_REF" => "3",
146  "EXCEPTIONS" => "3",
147  "INTEGER" => "3",
148  "INTEGER_REF" => "3",
149  "MEMORY" => "3",
150  "NONE" => "3",
151  "NUMERIC" => "3",
152  "POINTER" => "3",
153  "PLATFORM" => "3",
154  "POINTER_REF" => "3",
155  "REAL" => "3",
156  "REAL_REF" => "3",
157  "STRING" => "3",
158  "STD_FILES" => "3",
159  "STORABLE" => "3",
160  "ensure" => "4",
161  "interface" => "4",
162  "invariant" => "4",
163  "require" => "4",
164  "variant" => "4",
165  "io" => "5",
166  "i" => "5",
167  "j" => "5",
168  "k" => "5",
169  "y" => "5",
170  "x" => "5",
171  "abs" => "6",
172  "add_first" => "6",
173  "add_last" => "6",
174  "append" => "6",
175  "append_in" => "6",
176  "binary_to_integer" => "6",
177  "blank" => "6",
178  "clear" => "6",
179  "compare" => "6",
180  "copy" => "6",
181  "digit" => "6",
182  "even" => "6",
183  "fill_blank" => "6",
184  "fill_with" => "6",
185  "first" => "6",
186  "gcd" => "6",
187  "has" => "6",
188  "has_prefix" => "6",
189  "has_string" => "6",
190  "has_suffix" => "6",
191  "head" => "6",
192  "index_of" => "6",
193  "index_of_string" => "6",
194  "insert" => "6",
195  "is_bit" => "6",
196  "is_equal" => "6",
197  "is_integer" => "6",
198  "item" => "6",
199  "last" => "6",
200  "left_adjust" => "6",
201  "log" => "6",
202  "lower" => "6",
203  "occurrences" => "6",
204  "occurrences_of" => "6",
205  "odd" => "6",
206  "precede" => "6",
207  "prepend" => "6",
208  "put" => "6",
209  "put_boolean" => "6",
210  "put_integer" => "6",
211  "put_new_line" => "6",
212  "put_string" => "6",
213  "remove" => "6",
214  "remove_all_occurrences" => "6",
215  "remove_between" => "6",
216  "remove_first" => "6",
217  "remove_last" => "6",
218  "remove_prefix" => "6",
219  "remove_suffix" => "6",
220  "reverse" => "6",
221  "right_adjust" => "6",
222  "same_as" => "6",
223  "set_last" => "6",
224  "shrink" => "6",
225  "split" => "6",
226  "split_in" => "6",
227  "sqrt" => "6",
228  "substring" => "6",
229  "substring_index" => "6",
230  "swap" => "6",
231  "tail" => "6",
232  "to_bit" => "6",
233  "to_boolean" => "6",
234  "to_double" => "6",
235  "to_integer" => "6",
236  "to_lower" => "6",
237  "to_octal" => "6",
238  "to_real" => "6",
239  "to_string" => "6",
240  "to_upper" => "6",
241  "upper" => "6");
242 
243 // Special extensions
244 
245 // Each category can specify a PHP function that returns an altered
246 // version of the keyword.
247 
248 
249 
250 $this->linkscripts = array(
251  "1" => "donothing",
252  "2" => "donothing",
253  "3" => "donothing",
254  "4" => "donothing",
255  "5" => "donothing",
256  "6" => "donothing");
257 
258 }
259 
260 
261 
262 function donothing($keywordin)
263 {
264  return $keywordin;
265 }
266 
267 }
268 ?>