ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
HFile_perl.php
Go to the documentation of this file.
1<?php
2
3$BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
4if (!isset ($BEAUT_PATH)) return;
5require_once("$BEAUT_PATH/Beautifier/HFile.php");
6 class HFile_perl extends HFile{
7 function HFile_perl(){
8 $this->HFile();
9
10/*************************************/
11// Beautifier Highlighting Configuration File
12// Perl
13/*************************************/
14// Flags
15
16$this->nocase = "0";
17$this->notrim = "0";
18$this->perl = "1";
19
20// Colours
21
22$this->colours = array("blue", "purple", "gray", "brown");
23$this->quotecolour = "blue";
24$this->blockcommentcolour = "green";
25$this->linecommentcolour = "green";
26
27// Indent Strings
28
29$this->indent = array("{");
30$this->unindent = array("}");
31
32// String characters and delimiters
33
34$this->stringchars = array();
35$this->delimiters = array("~", "!", "@", "$", "%", "^", "&", "*", "(", ")", "+", "=", "|", "\\", "/", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", " ", ",", ".", "?", "/", " ");
36$this->escchar = "";
37
38// Comment settings
39
40$this->linecommenton = array("#");
41$this->blockcommenton = array("");
42$this->blockcommentoff = array("");
43
44// Keywords (keyword mapping to colour number)
45
46$this->keywords = array(
47 "-A" => "1",
48 "-B" => "1",
49 "-C" => "1",
50 "-M" => "1",
51 "-O" => "1",
52 "-R" => "1",
53 "-S" => "1",
54 "-T" => "1",
55 "-W" => "1",
56 "-X" => "1",
57 "-b" => "1",
58 "-c" => "1",
59 "-d" => "1",
60 "-e" => "1",
61 "-f" => "1",
62 "-g" => "1",
63 "-k" => "1",
64 "-l" => "1",
65 "-o" => "1",
66 "-p" => "1",
67 "-r" => "1",
68 "-s" => "1",
69 "-t" => "1",
70 "-u" => "1",
71 "-w" => "1",
72 "-x" => "1",
73 "-z" => "1",
74 "__DATA__" => "1",
75 "__END__" => "1",
76 "__FILE__" => "1",
77 "__LINE__" => "1",
78 "continue" => "1",
79 "do" => "1",
80 "else" => "1",
81 "elsif" => "1",
82 "for" => "1",
83 "foreach" => "1",
84 "goto" => "1",
85 "if" => "1",
86 "last" => "1",
87 "local" => "1",
88 "my" => "1",
89 "next" => "1",
90 "no" => "1",
91 "package" => "1",
92 "redo" => "1",
93 "return" => "1",
94 "require" => "1",
95 "sub" => "1",
96 "until" => "1",
97 "unless" => "1",
98 "use" => "1",
99 "while" => "1",
100 "accept" => "2",
101 "alarm" => "2",
102 "atan2" => "2",
103 "bind" => "2",
104 "binmode" => "2",
105 "bless" => "2",
106 "caller" => "2",
107 "chdir" => "2",
108 "chmod" => "2",
109 "chomp" => "2",
110 "chop" => "2",
111 "chown" => "2",
112 "chr" => "2",
113 "chroot" => "2",
114 "close" => "2",
115 "closedir" => "2",
116 "connect" => "2",
117 "cos" => "2",
118 "crypt" => "2",
119 "dbmclose" => "2",
120 "dbmopen" => "2",
121 "defined" => "2",
122 "delete" => "2",
123 "die" => "2",
124 "dump" => "2",
125 "each" => "2",
126 "endgrent" => "2",
127 "endhostent" => "2",
128 "endnetent" => "2",
129 "endprotoent" => "2",
130 "endpwent" => "2",
131 "endservent" => "2",
132 "eof" => "2",
133 "eval" => "2",
134 "exec" => "2",
135 "exit" => "2",
136 "exp" => "2",
137 "exists" => "2",
138 "fcntl" => "2",
139 "fileno" => "2",
140 "flock" => "2",
141 "fork" => "2",
142 "formline" => "2",
143 "format" => "2",
144 "getc" => "2",
145 "getgrent" => "2",
146 "getgrgid" => "2",
147 "getgrname" => "2",
148 "gethostbyaddr" => "2",
149 "gethostbyname" => "2",
150 "gethostent" => "2",
151 "getlogin" => "2",
152 "getnetbyaddr" => "2",
153 "getnetbyname" => "2",
154 "getnetent" => "2",
155 "getpeername" => "2",
156 "getpgrp" => "2",
157 "getppid" => "2",
158 "getpriority" => "2",
159 "getprotobyname" => "2",
160 "getprotobynumber" => "2",
161 "getprotoent" => "2",
162 "getpwent" => "2",
163 "getpwnam" => "2",
164 "getpwuid" => "2",
165 "getservbyname" => "2",
166 "getservbyport" => "2",
167 "getservent" => "2",
168 "getsockname" => "2",
169 "getsockopt" => "2",
170 "glob" => "2",
171 "gmtime" => "2",
172 "grep" => "2",
173 "hex" => "2",
174 "index" => "2",
175 "int" => "2",
176 "ioctl" => "2",
177 "join" => "2",
178 "keys" => "2",
179 "kill" => "2",
180 "lc" => "2",
181 "lcfirst" => "2",
182 "length" => "2",
183 "link" => "2",
184 "listen" => "2",
185 "localtime" => "2",
186 "log" => "2",
187 "lstat" => "2",
188 "map" => "2",
189 "mkdir" => "2",
190 "msgctl" => "2",
191 "msgget" => "2",
192 "msgrcv" => "2",
193 "msgsnd" => "2",
194 "oct" => "2",
195 "open" => "2",
196 "opendir" => "2",
197 "ord" => "2",
198 "pack" => "2",
199 "pipe" => "2",
200 "pop" => "2",
201 "pos" => "2",
202 "print" => "2",
203 "printf" => "2",
204 "push" => "2",
205 "quotemeta" => "2",
206 "rand" => "2",
207 "read" => "2",
208 "readdir" => "2",
209 "readline" => "2",
210 "readlink" => "2",
211 "recv" => "2",
212 "ref" => "2",
213 "rename" => "2",
214 "reset" => "2",
215 "reverse" => "2",
216 "rewinddir" => "2",
217 "rindex" => "2",
218 "rmdir" => "2",
219 "scalar" => "2",
220 "seek" => "2",
221 "seekdir" => "2",
222 "select" => "2",
223 "semctl" => "2",
224 "semgett" => "2",
225 "semop" => "2",
226 "send" => "2",
227 "setgrent" => "2",
228 "sethostent" => "2",
229 "setnetent" => "2",
230 "setpgrp" => "2",
231 "setpriority" => "2",
232 "setprotoent" => "2",
233 "setpwent" => "2",
234 "setservent" => "2",
235 "setsockopt" => "2",
236 "shift" => "2",
237 "shmctl" => "2",
238 "shmget" => "2",
239 "shmread" => "2",
240 "shmwrite" => "2",
241 "shutdown" => "2",
242 "sin" => "2",
243 "sleep" => "2",
244 "socket" => "2",
245 "socketpair" => "2",
246 "sort" => "2",
247 "splice" => "2",
248 "split" => "2",
249 "sprintf" => "2",
250 "sqrt" => "2",
251 "srand" => "2",
252 "stat" => "2",
253 "study" => "2",
254 "substr" => "2",
255 "symlink" => "2",
256 "syscall" => "2",
257 "sysopen" => "2",
258 "sysread" => "2",
259 "system" => "2",
260 "syswrite" => "2",
261 "tell" => "2",
262 "telldir" => "2",
263 "tie" => "2",
264 "tied" => "2",
265 "time" => "2",
266 "times" => "2",
267 "truncate" => "2",
268 "uc" => "2",
269 "ucfirst" => "2",
270 "umask" => "2",
271 "undef" => "2",
272 "unlink" => "2",
273 "unpack" => "2",
274 "unshift" => "2",
275 "utime" => "2",
276 "untie" => "2",
277 "values" => "2",
278 "vec" => "2",
279 "wait" => "2",
280 "waitpid" => "2",
281 "wantarray" => "2",
282 "warn" => "2",
283 "write" => "2",
284 "AUTOLOAD" => "3",
285 "and" => "3",
286 "BEGIN" => "3",
287 "CORE" => "3",
288 "cmp" => "3",
289 "DESTROY" => "3",
290 "eq" => "3",
291 "END" => "3",
292 "ge" => "3",
293 "gt" => "3",
294 "le" => "3",
295 "lt" => "3",
296 "ne" => "3",
297 "not" => "3",
298 "m" => "3",
299 "or" => "3",
300 "q" => "3",
301 "qq" => "3",
302 "qw" => "3",
303 "qx" => "3",
304 "SUPER" => "3",
305 "s" => "3",
306 "tr" => "3",
307 "UNIVERSAL" => "3",
308 "x" => "3",
309 "xor" => "3",
310 "y" => "3",
311 "$@" => "4",
312 "@" => "4");
313
314// Special extensions
315
316// Each category can specify a PHP function that returns an altered
317// version of the keyword.
318
319
320
321$this->linkscripts = array(
322 "2" => "dofunction",
323 "1" => "donothing",
324 "3" => "donothing",
325 "4" => "donothing");
326}
327
328function donothing($keywordin)
329{
330 return $keywordin;
331}
332
333function dofunction($keywordin)
334{
335 $outlink = "http://perldoc.perl.org/functions/".$keywordin.".html";
336 return "<a href=\"$outlink\">$keywordin</a>";
337}
338
339
340}
341
342?>
$BEAUT_PATH
Definition: HFile_perl.php:3
donothing($keywordin)
Definition: HFile_perl.php:328
dofunction($keywordin)
Definition: HFile_perl.php:333