ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_clipper.php
Go to the documentation of this file.
1<?php
2$BEAUT_PATH = realpath(".") . "/Services/COPage/syntax_highlight/php";
3if (!isset($BEAUT_PATH)) {
4 return;
5}
6require_once("$BEAUT_PATH/Beautifier/HFile.php");
7 class HFile_clipper extends HFile
8 {
9 public function HFile_clipper()
10 {
11 $this->HFile();
12 /*************************************/
13 // Beautifier Highlighting Configuration File
14 // Clipper
15 /*************************************/
16 // Flags
17
18 $this->nocase = "1";
19 $this->notrim = "0";
20 $this->perl = "0";
21
22 // Colours
23
24 $this->colours = array("blue", "purple", "gray", "blue");
25 $this->quotecolour = "blue";
26 $this->blockcommentcolour = "green";
27 $this->linecommentcolour = "green";
28
29 // Indent Strings
30
31 $this->indent = array("{");
32 $this->unindent = array("}");
33
34 // String characters and delimiters
35
36 $this->stringchars = array("\"", "'");
37 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "/", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
38 $this->escchar = "";
39
40 // Comment settings
41
42 $this->linecommenton = array("//");
43 $this->blockcommenton = array("/*");
44 $this->blockcommentoff = array("*/");
45
46 // Keywords (keyword mapping to colour number)
47
48 $this->keywords = array(
49 "accept" => "1",
50 "append" => "1",
51 "all" => "1",
52 "alternate" => "1",
53 "box" => "1",
54 "blank" => "1",
55 "bell" => "1",
56 "call" => "1",
57 "cancel" => "1",
58 "clear" => "1",
59 "close" => "1",
60 "commit" => "1",
61 "continue" => "1",
62 "copy" => "1",
63 "count" => "1",
64 "create" => "1",
65 "century" => "1",
66 "color" => "1",
67 "confirm" => "1",
68 "console" => "1",
69 "cursor" => "1",
70 "delete" => "1",
71 "dir" => "1",
72 "display" => "1",
73 "date" => "1",
74 "decimals" => "1",
75 "default" => "1",
76 "deleted" => "1",
77 "delimiters" => "1",
78 "device" => "1",
79 "eject" => "1",
80 "erase" => "1",
81 "extended" => "1",
82 "epoch" => "1",
83 "escape" => "1",
84 "exact" => "1",
85 "exclusive" => "1",
86 "file" => "1",
87 "find" => "1",
88 "form" => "1",
89 "from" => "1",
90 "filter" => "1",
91 "fixed" => "1",
92 "format" => "1",
93 "function" => "1",
94 "get" => "1",
95 "gets" => "1",
96 "go" => "1",
97 "index" => "1",
98 "init" => "1",
99 "input" => "1",
100 "intensity" => "1",
101 "join" => "1",
102 "keyboard" => "1",
103 "key" => "1",
104 "label" => "1",
105 "list" => "1",
106 "locate" => "1",
107 "memory" => "1",
108 "menu" => "1",
109 "margin" => "1",
110 "message" => "1",
111 "note" => "1",
112 "order" => "1",
113 "pack" => "1",
114 "procedure" => "1",
115 "prompt" => "1",
116 "path" => "1",
117 "printer" => "1",
118 "quit" => "1",
119 "read" => "1",
120 "recall" => "1",
121 "reindex" => "1",
122 "release" => "1",
123 "rename" => "1",
124 "replace" => "1",
125 "report" => "1",
126 "restore" => "1",
127 "run" => "1",
128 "relation" => "1",
129 "say" => "1",
130 "screen" => "1",
131 "structure" => "1",
132 "save" => "1",
133 "seek" => "1",
134 "select" => "1",
135 "set" => "1",
136 "scoreboard" => "1",
137 "softseek" => "1",
138 "skip" => "1",
139 "sort" => "1",
140 "store" => "1",
141 "sum" => "1",
142 "to" => "1",
143 "typeahead" => "1",
144 "text" => "1",
145 "total" => "1",
146 "type" => "1",
147 "unique" => "1",
148 "unlock" => "1",
149 "update" => "1",
150 "use" => "1",
151 "wrap" => "1",
152 "wait" => "1",
153 "zap" => "1",
154 "#define" => "1",
155 "#error" => "1",
156 "#include" => "1",
157 "#elif" => "1",
158 "#if" => "1",
159 "#line" => "1",
160 "#else" => "1",
161 "#ifdef" => "1",
162 "#pragma" => "1",
163 "#endif" => "1",
164 "#ifndef" => "1",
165 "#undef" => "1",
166 "#command" => "1",
167 "#translate" => "1",
168 "#stdout" => "1",
169 "#xcommand" => "1",
170 "#xtranslate" => "1",
171 "announce" => "2",
172 "begin" => "2",
173 "break" => "2",
174 "case" => "2",
175 "declare" => "2",
176 "do" => "2",
177 "elseif" => "2",
178 "else" => "2",
179 "endif" => "2",
180 "enddo" => "2",
181 "end" => "2",
182 "endcase" => "2",
183 "exit" => "2",
184 "external" => "2",
185 "field" => "2",
186 "for" => "2",
187 "if" => "2",
188 "local" => "2",
189 "loop" => "2",
190 "memvar" => "2",
191 "next" => "2",
192 "otherwise" => "2",
193 "parameters" => "2",
194 "private" => "2",
195 "public" => "2",
196 "recover" => "2",
197 "request" => "2",
198 "return" => "2",
199 "sequence" => "2",
200 "step" => "2",
201 "static" => "2",
202 "using" => "2",
203 "while" => "2",
204 "with" => "2",
205 "aadd" => "3",
206 "abs" => "3",
207 "achoice" => "3",
208 "aclone" => "3",
209 "acopy" => "3",
210 "adel" => "3",
211 "adir" => "3",
212 "aeval" => "3",
213 "afields" => "3",
214 "afill" => "3",
215 "ains" => "3",
216 "alert" => "3",
217 "alias" => "3",
218 "alltrim" => "3",
219 "altd" => "3",
220 "array" => "3",
221 "asc" => "3",
222 "ascan" => "3",
223 "asize" => "3",
224 "asort" => "3",
225 "at" => "3",
226 "atail" => "3",
227 "average" => "3",
228 "bin2i" => "3",
229 "bin2l" => "3",
230 "bin2w" => "3",
231 "bof" => "3",
232 "browse" => "3",
233 "cdow" => "3",
234 "chr" => "3",
235 "cmonth" => "3",
236 "col" => "3",
237 "colorselect" => "3",
238 "ctod" => "3",
239 "curdir" => "3",
240 "day" => "3",
241 "dbappend" => "3",
242 "dbclearfilter" => "3",
243 "dbclearindex" => "3",
244 "dbclearrelation" => "3",
245 "dbcloseall" => "3",
246 "dbclosearea" => "3",
247 "dbcommit" => "3",
248 "dbcommitall" => "3",
249 "dbcreate" => "3",
250 "dbcreateindex" => "3",
251 "dbdelete" => "3",
252 "dbedit" => "3",
253 "dbeval" => "3",
254 "dbf" => "3",
255 "dbfilter" => "3",
256 "dbgobottom" => "3",
257 "dbgoto" => "3",
258 "dbgotop" => "3",
259 "dbrecall" => "3",
260 "dbreindex" => "3",
261 "dbrelation" => "3",
262 "dbrselect" => "3",
263 "dbseek" => "3",
264 "dbselectarea" => "3",
265 "dbsetdriver" => "3",
266 "dbsetfilter" => "3",
267 "dbsetindex" => "3",
268 "dbsetorder" => "3",
269 "dbsetrelation" => "3",
270 "dbskip" => "3",
271 "dbstruct" => "3",
272 "dbunlock" => "3",
273 "dbunlockall" => "3",
274 "dbusearea" => "3",
275 "descend" => "3",
276 "devout" => "3",
277 "devoutpict" => "3",
278 "devpos" => "3",
279 "directory" => "3",
280 "diskspace" => "3",
281 "dispbegin" => "3",
282 "dispbox" => "3",
283 "dispcount" => "3",
284 "dispend" => "3",
285 "dispout" => "3",
286 "doserror" => "3",
287 "dow" => "3",
288 "dtoc" => "3",
289 "dtos" => "3",
290 "empty" => "3",
291 "eof" => "3",
292 "errorblock" => "3",
293 "errorlevel" => "3",
294 "eval" => "3",
295 "exp" => "3",
296 "fclose" => "3",
297 "fcount" => "3",
298 "fcreate" => "3",
299 "ferase" => "3",
300 "ferror" => "3",
301 "fieldblock" => "3",
302 "fieldget" => "3",
303 "fieldname" => "3",
304 "fieldpos" => "3",
305 "fieldput" => "3",
306 "fieldwblock" => "3",
307 "fklabel" => "3",
308 "fkmax" => "3",
309 "flock" => "3",
310 "fopen" => "3",
311 "found" => "3",
312 "fread" => "3",
313 "freadstr" => "3",
314 "frename" => "3",
315 "fseek" => "3",
316 "fwrite" => "3",
317 "getenv" => "3",
318 "hardcr" => "3",
319 "header" => "3",
320 "i2bin" => "3",
321 "indexext" => "3",
322 "indexkey" => "3",
323 "indexord" => "3",
324 "inkey" => "3",
325 "int" => "3",
326 "isalpha" => "3",
327 "iscolor" => "3",
328 "isdigit" => "3",
329 "islower" => "3",
330 "isprinter" => "3",
331 "isupper" => "3",
332 "l2bin" => "3",
333 "lastkey" => "3",
334 "lastrec" => "3",
335 "left" => "3",
336 "len" => "3",
337 "log" => "3",
338 "lower" => "3",
339 "ltrim" => "3",
340 "lupdate" => "3",
341 "max" => "3",
342 "maxcol" => "3",
343 "maxrow" => "3",
344 "memoedit" => "3",
345 "memoline" => "3",
346 "memoread" => "3",
347 "memotran" => "3",
348 "memowrit" => "3",
349 "memvarblock" => "3",
350 "min" => "3",
351 "mlcount" => "3",
352 "mlctopos" => "3",
353 "mlpos" => "3",
354 "mod" => "3",
355 "month" => "3",
356 "mpostolc" => "3",
357 "neterr" => "3",
358 "netname" => "3",
359 "nextkey" => "3",
360 "nosnow" => "3",
361 "os" => "3",
362 "outerr" => "3",
363 "outstd" => "3",
364 "pad" => "3",
365 "pcol" => "3",
366 "pcount" => "3",
367 "procline" => "3",
368 "procname" => "3",
369 "prow" => "3",
370 "qout" => "3",
371 "rat" => "3",
372 "readexit" => "3",
373 "readinsert" => "3",
374 "readkey" => "3",
375 "readmodal" => "3",
376 "readvar" => "3",
377 "reccount" => "3",
378 "recno" => "3",
379 "recsize" => "3",
380 "replicate" => "3",
381 "restscreen" => "3",
382 "right" => "3",
383 "rlock" => "3",
384 "round" => "3",
385 "row" => "3",
386 "rtrim" => "3",
387 "savescreen" => "3",
388 "scroll" => "3",
389 "seconds" => "3",
390 "setblink" => "3",
391 "setcancel" => "3",
392 "setcolor" => "3",
393 "setcursor" => "3",
394 "setkey" => "3",
395 "setmode" => "3",
396 "setpos" => "3",
397 "setprc" => "3",
398 "soundex" => "3",
399 "space" => "3",
400 "sqrt" => "3",
401 "str" => "3",
402 "strtran" => "3",
403 "stuff" => "3",
404 "substr" => "3",
405 "time" => "3",
406 "tone" => "3",
407 "transform" => "3",
408 "updated" => "3",
409 "upper" => "3",
410 "val" => "3",
411 "valtype" => "3",
412 "version" => "3",
413 "word" => "3",
414 "year" => "3",
415 "and" => "5",
416 "not" => "5",
417 "or" => "5",
418 "+" => "5",
419 "-" => "5",
420 "=" => "5",
421 "==" => "5",
422 "//" => "5",
423 "/" => "5",
424 "%" => "5",
425 "$" => "5",
426 "&" => "5",
427 ">" => "5",
428 ">=" => "5",
429 "<" => "5",
430 "<=" => "5",
431 "<>" => "5",
432 "^" => "5",
433 "!" => "5",
434 "!=" => "5",
435 "|" => "5",
436 "(" => "5",
437 ")" => "5",
438 "*" => "5",
439 ":" => "5",
440 ":=" => "5",
441 "#" => "5",
442 "?" => "5",
443 "??" => "5",
444 "@" => "5",
445 "[" => "5",
446 "]" => "5",
447 "{" => "5",
448 "}" => "5",
449 "." => "5");
450
451 // Special extensions
452
453 // Each category can specify a PHP function that returns an altered
454 // version of the keyword.
455
456
457
458 $this->linkscripts = array(
459 "1" => "donothing",
460 "2" => "donothing",
461 "3" => "donothing",
462 "5" => "donothing");
463 }
464
465
466 public function donothing($keywordin)
467 {
468 return $keywordin;
469 }
470 }
$BEAUT_PATH
An exception for terminatinating execution or to throw for unit testing.
donothing($keywordin)