ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_lisp.php
Go to the documentation of this file.
1 <?php
2 
3 $BEAUT_PATH = realpath(".") . "/Services/COPage/syntax_highlight/php";
4 if (!isset($BEAUT_PATH)) {
5  return;
6 }
7 require_once("$BEAUT_PATH/Beautifier/HFile.php");
8  class HFile_lisp extends HFile
9  {
10  public function HFile_lisp()
11  {
12  $this->HFile();
13 
14  /*************************************/
15  // Beautifier Highlighting Configuration File
16  // LISP
17  /*************************************/
18  // Flags
19 
20  $this->nocase = "0";
21  $this->notrim = "0";
22  $this->perl = "0";
23 
24  // Colours
25 
26  $this->colours = array("blue", "purple", "gray", "brown", "blue", "purple", "gray");
27  $this->quotecolour = "blue";
28  $this->blockcommentcolour = "green";
29  $this->linecommentcolour = "green";
30 
31  // Indent Strings
32 
33  $this->indent = array();
34  $this->unindent = array();
35 
36  // String characters and delimiters
37 
38  $this->stringchars = array("\"");
39  $this->delimiters = array("~", "!", "@", "%", "^", "&", "(", ")", "|", "{", "}", "[", "]", ";", "\"", "'", " ", ",", " ", ".", "?");
40  $this->escchar = "";
41 
42  // Comment settings
43 
44  $this->linecommenton = array(";");
45  $this->blockcommenton = array("#|");
46  $this->blockcommentoff = array("|#");
47 
48  // Keywords (keyword mapping to colour number)
49 
50  $this->keywords = array(
51  "~a" => "1",
52  "~A" => "1",
53  "~b" => "1",
54  "~B" => "1",
55  "~d" => "1",
56  "~D" => "1",
57  "~e" => "1",
58  "~E" => "1",
59  "~o" => "1",
60  "~O" => "1",
61  "~s" => "1",
62  "~S" => "1",
63  "~x" => "1",
64  "~X" => "1",
65  "~%" => "1",
66  "#\\" => "2",
67  "#|" => "2",
68  "#=" => "2",
69  "#-" => "2",
70  "#+" => "2",
71  "#(" => "2",
72  "#." => "2",
73  "#\'" => "2",
74  "#:" => "2",
75  "##" => "2",
76  "#a" => "2",
77  "#A" => "2",
78  "#b" => "2",
79  "#B" => "2",
80  "#c" => "2",
81  "#o" => "2",
82  "#O" => "2",
83  "#r" => "2",
84  "#R" => "2",
85  "#s" => "2",
86  "#S" => "2",
87  "#x" => "2",
88  "#X" => "2",
89  "&allow-other-keys" => "3",
90  "&aux" => "3",
91  "&key" => "3",
92  "&optional" => "3",
93  "&rest" => "3",
94  "*features*" => "4",
95  "*load-verbose*" => "4",
96  "*modules*" => "4",
97  "*package*" => "4",
98  "*print-array*" => "4",
99  "*print-base*" => "4",
100  "*print-case*" => "4",
101  "*print-circle*" => "4",
102  "*printescape*" => "4",
103  "*printgensym*" => "4",
104  "*print-length*" => "4",
105  "*print-level*" => "4",
106  "*print-pretty*" => "4",
107  "*print-radix*" => "4",
108  "*read-base*" => "4",
109  "*readtable*" => "4",
110  "*standard-input*" => "4",
111  "*standard-output*" => "4",
112  "*terminal-io*" => "4",
113  ":allow-other-keys" => "5",
114  ":append" => "5",
115  ":array" => "5",
116  ":base" => "5",
117  ":capitalize" => "5",
118  ":case" => "5",
119  ":circle" => "5",
120  ":count" => "5",
121  ":direction" => "5",
122  ":downcase" => "5",
123  ":element-type" => "5",
124  ":escape" => "5",
125  ":external" => "5",
126  ":from-end" => "5",
127  ":gensym" => "5",
128  ":if-exists" => "5",
129  ":inherited" => "5",
130  ":initial-element" => "5",
131  ":input" => "5",
132  ":internal" => "5",
133  ":key" => "5",
134  ":length" => "5",
135  ":level" => "5",
136  ":output" => "5",
137  ":output-file" => "5",
138  ":pretty" => "5",
139  ":print" => "5",
140  ":radix" => "5",
141  ":stream" => "5",
142  ":test" => "5",
143  ":test-not" => "5",
144  ":upcase" => "5",
145  ":verbose" => "5",
146  "abs" => "6",
147  "acons" => "6",
148  "acos" => "6",
149  "alpha-char-p" => "6",
150  "alphanumericp" => "6",
151  "and" => "6",
152  "append" => "6",
153  "apply" => "6",
154  "apropos" => "6",
155  "aref" => "6",
156  "array-dimensions" => "6",
157  "array-rank" => "6",
158  "arrayp" => "6",
159  "asin" => "6",
160  "assoc" => "6",
161  "atan" => "6",
162  "atom" => "6",
163  "block" => "6",
164  "boundp" => "6",
165  "break" => "6",
166  "by" => "6",
167  "bye" => "6",
168  "car" => "6",
169  "case" => "6",
170  "catch" => "6",
171  "cdr" => "6",
172  "ceiling" => "6",
173  "char" => "6",
174  "char=" => "6",
175  "char/=" => "6",
176  "char>" => "6",
177  "char>=" => "6",
178  "char<" => "6",
179  "char<=" => "6",
180  "char-code" => "6",
181  "char-downcase" => "6",
182  "char-upcase" => "6",
183  "char-acterp" => "6",
184  "close" => "6",
185  "code-char" => "6",
186  "compile" => "6",
187  "compile-file" => "6",
188  "compiler-let" => "6",
189  "complexp" => "6",
190  "concatenate" => "6",
191  "cond" => "6",
192  "cons" => "6",
193  "consp" => "6",
194  "copy-seq" => "6",
195  "cos" => "6",
196  "decf" => "6",
197  "declare" => "6",
198  "defconstant" => "6",
199  "defmacro" => "6",
200  "defparameter" => "6",
201  "defstruct" => "6",
202  "defun" => "6",
203  "defvar" => "6",
204  "delete" => "6",
205  "delete-file" => "6",
206  "delete-if" => "6",
207  "delete-if-not" => "6",
208  "describe" => "6",
209  "digit-char-p" => "6",
210  "do" => "6",
211  "do*" => "6",
212  "do-all-symbols" => "6",
213  "do-external-symbols" => "6",
214  "do-symbols" => "6",
215  "documentation" => "6",
216  "dolist" => "6",
217  "dotimes" => "6",
218  "ed" => "6",
219  "eighth" => "6",
220  "eq" => "6",
221  "eql" => "6",
222  "equal" => "6",
223  "error" => "6",
224  "eval" => "6",
225  "eval-when" => "6",
226  "exp" => "6",
227  "export" => "6",
228  "expt" => "6",
229  "fifth" => "6",
230  "find-package" => "6",
231  "find-symbol" => "6",
232  "finish-output" => "6",
233  "first" => "6",
234  "flet" => "6",
235  "floatp" => "6",
236  "floor" => "6",
237  "format" => "6",
238  "fourth" => "6",
239  "fresh-line" => "6",
240  "funcall" => "6",
241  "function" => "6",
242  "gcd" => "6",
243  "gensym" => "6",
244  "gentemp" => "6",
245  "get" => "6",
246  "getf" => "6",
247  "get-macro-character" => "6",
248  "get-properties" => "6",
249  "go" => "6",
250  "if" => "6",
251  "import" => "6",
252  "in-package" => "6",
253  "incf" => "6",
254  "inspect" => "6",
255  "integerp" => "6",
256  "intern" => "6",
257  "isqrt" => "6",
258  "labels" => "6",
259  "lanbda" => "6",
260  "last" => "6",
261  "lcm" => "6",
262  "length" => "6",
263  "let" => "6",
264  "let*" => "6",
265  "list" => "6",
266  "list*" => "6",
267  "list-all-packages" => "6",
268  "listp" => "6",
269  "load" => "6",
270  "log" => "6",
271  "loop" => "6",
272  "lower-case-p" => "6",
273  "macroexpand" => "6",
274  "macro-function" => "6",
275  "macrolet" => "6",
276  "make-array" => "6",
277  "make-list" => "6",
278  "make-string" => "6",
279  "makunbound" => "6",
280  "mapc" => "6",
281  "mapcan" => "6",
282  "mapcar" => "6",
283  "mapcon" => "6",
284  "mapl" => "6",
285  "maplist" => "6",
286  "max" => "6",
287  "member" => "6",
288  "member-if" => "6",
289  "member-if-not" => "6",
290  "min" => "6",
291  "mod" => "6",
292  "multiple-value-bind" => "6",
293  "multiple-value-call" => "6",
294  "multiple-value-list" => "6",
295  "multiple-value-prog1" => "6",
296  "multiple-value-setq" => "6",
297  "nconc" => "6",
298  "nil" => "6",
299  "ninth" => "6",
300  "not" => "6",
301  "nreverse" => "6",
302  "nstring-downcase" => "6",
303  "nstring-upcase" => "6",
304  "nth" => "6",
305  "nthcdr" => "6",
306  "null" => "6",
307  "numberp" => "6",
308  "open" => "6",
309  "or" => "6",
310  "otherwise" => "6",
311  "peek-char" => "6",
312  "pi" => "6",
313  "pop" => "6",
314  "pprint" => "6",
315  "prin1" => "6",
316  "princ" => "6",
317  "print" => "6",
318  "probe-file" => "6",
319  "proclaim" => "6",
320  "prog" => "6",
321  "prog*" => "6",
322  "prog1" => "6",
323  "progn" => "6",
324  "progv" => "6",
325  "provide" => "6",
326  "psetf" => "6",
327  "psetq" => "6",
328  "push" => "6",
329  "quote" => "6",
330  "random" => "6",
331  "rationalp" => "6",
332  "read" => "6",
333  "read-char" => "6",
334  "read-preserving-whitespace" => "6",
335  "rem" => "6",
336  "remf" => "6",
337  "remove" => "6",
338  "remove-if" => "6",
339  "remove-if-not" => "6",
340  "remprop" => "6",
341  "rename-file" => "6",
342  "require" => "6",
343  "rest" => "6",
344  "return" => "6",
345  "return-from" => "6",
346  "reverse" => "6",
347  "round" => "6",
348  "rplace" => "6",
349  "rplacd" => "6",
350  "second" => "6",
351  "set" => "6",
352  "set-macro-character" => "6",
353  "setf" => "6",
354  "setq" => "6",
355  "seventh" => "6",
356  "shadow" => "6",
357  "sin" => "6",
358  "sixth" => "6",
359  "special" => "6",
360  "special-form-p" => "6",
361  "sqrt" => "6",
362  "step" => "6",
363  "string" => "6",
364  "string=" => "6",
365  "string/=" => "6",
366  "string>" => "6",
367  "string<" => "6",
368  "string>=" => "6",
369  "string<=" => "6",
370  "string-char" => "6",
371  "string-downcase" => "6",
372  "string-upcase" => "6",
373  "stringp" => "6",
374  "subseq" => "6",
375  "symbol-name" => "6",
376  "symbol-package" => "6",
377  "symbol-values" => "6",
378  "t" => "6",
379  "tagbody" => "6",
380  "tan" => "6",
381  "tenth" => "6",
382  "terpri" => "6",
383  "the" => "6",
384  "third" => "6",
385  "throw" => "6",
386  "time" => "6",
387  "trace" => "6",
388  "truncate" => "6",
389  "typep" => "6",
390  "unless" => "6",
391  "unread-char" => "6",
392  "untrace" => "6",
393  "unwind-protect" => "6",
394  "upper-case-p" => "6",
395  "use-package" => "6",
396  "values" => "6",
397  "values-list" => "6",
398  "variable" => "6",
399  "vector" => "6",
400  "vectorp" => "6",
401  "when" => "6",
402  "with-input-from-string" => "6",
403  "with-open-file" => "6",
404  "with-output-to-string" => "6",
405  "write" => "6",
406  "write-char" => "6",
407  "write-to-string" => "6",
408  "=" => "7",
409  "//" => "7",
410  "/=" => "7",
411  "/" => "7",
412  ">" => "7",
413  ">=" => "7",
414  "<" => "7",
415  "<=" => "7",
416  "+" => "7",
417  "-" => "7",
418  "*" => "7",
419  "1+" => "7",
420  "1-" => "7",
421  "evenp" => "7",
422  "minusp" => "7",
423  "oddp" => "7",
424  "plusp" => "7",
425  "zerop" => "7");
426 
427  // Special extensions
428 
429  // Each category can specify a PHP function that returns an altered
430  // version of the keyword.
431 
432 
433 
434  $this->linkscripts = array(
435  "1" => "donothing",
436  "2" => "donothing",
437  "3" => "donothing",
438  "4" => "donothing",
439  "5" => "donothing",
440  "6" => "donothing",
441  "7" => "donothing");
442  }
443 
444 
445 
446  public function donothing($keywordin)
447  {
448  return $keywordin;
449  }
450  }
Create styles array
The data for the language used.
Definition: HFile.php:21
$BEAUT_PATH
Definition: HFile_lisp.php:3
donothing($keywordin)
Definition: HFile_lisp.php:446