ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_hugo.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  class HFile_hugo extends HFile{
6  function HFile_hugo(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // Hugo
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "1";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "gray", "brown", "blue", "brown", "purple", "gray");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("{");
28 $this->unindent = array("}");
29 
30 // String characters and delimiters
31 
32 $this->stringchars = array("!");
33 $this->delimiters = array("!", "*", "(", ")", "-", "+", "=", "|", "/", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
34 $this->escchar = "";
35 
36 // Comment settings
37 
38 $this->linecommenton = array("");
39 $this->blockcommenton = array("\"");
40 $this->blockcommentoff = array("\"");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "Below" => "",
46  "is" => "1",
47  "a" => "",
48  "new" => "",
49  "UltraEdit" => "",
50  "word" => "",
51  "file" => "",
52  "for" => "1",
53  "Hugo." => "",
54  "Since" => "",
55  "doesn\'t" => "",
56  "yet" => "",
57  "support" => "",
58  "multi-line" => "",
59  "string" => "1",
60  "coloring," => "",
61  "I" => "",
62  "have" => "",
63  "hacked" => "",
64  "around" => "",
65  "that" => "",
66  "by" => "",
67  "defining" => "",
68  "strings" => "",
69  "as" => "",
70  "the" => "",
71  "default" => "",
72  "block" => "",
73  "comment," => "",
74  "which" => "",
75  "Inform" => "",
76  "lacks" => "",
77  "anyway." => "",
78  "However," => "",
79  "this" => "",
80  "means" => "",
81  "any" => "",
82  "enclosed" => "",
83  "\"" => "",
84  "must" => "",
85  "be" => "",
86  "preceded" => "",
87  "with" => "",
88  "space," => "",
89  "i.e." => "",
90  "print" => "1",
91  "\"Hello," => "",
92  "world^^" => "",
93  "You" => "",
94  "died\"" => "",
95  "will" => "",
96  "work," => "",
97  "but" => "",
98  "Format(\"Hello" => "",
99  "World\")" => "",
100  "not." => "",
101  "To" => "",
102  "use" => "",
103  "syntax" => "",
104  "coloring" => "",
105  "mode," => "",
106  "cut-and-paste" => "",
107  "all" => "",
108  "below" => "",
109  "\"dotted" => "",
110  "line\"" => "",
111  "and" => "1",
112  "drop" => "",
113  "it" => "",
114  "into" => "",
115  "your" => "",
116  "WORDFILE.TXT." => "",
117  "Depending" => "",
118  "on" => "",
119  "how" => "",
120  "few/many" => "",
121  "languages" => "",
122  "you" => "",
123  "defined," => "",
124  "might" => "",
125  "to" => "1",
126  "change" => "",
127  "\"/L10\"" => "",
128  "an" => "",
129  "unused" => "",
130  "number." => "",
131  "Also" => "",
132  "note" => "",
133  "definition" => "",
134  "(starting" => "",
135  "\"/L10\")" => "",
136  "*all*" => "",
137  "*on*" => "",
138  "*one*" => "",
139  "*line*" => "",
140  "up" => "",
141  "including" => "",
142  "\"File" => "",
143  "Extensions" => "",
144  "=" => "",
145  "H" => "",
146  "G" => "",
147  "HUG\"" => "",
148  "or" => "1",
149  "won\'t" => "",
150  "work." => "",
151  "If" => "",
152  "find" => "",
153  "useful" => "",
154  "library" => "",
155  "routines," => "",
156  "constants" => "",
157  "anything" => "1",
158  "else" => "1",
159  "I\'ve" => "",
160  "missed," => "",
161  "if" => "1",
162  "comments" => "",
163  "at" => "",
164  "all," => "",
165  "contact" => "",
166  "me!" => "",
167  "Version" => "",
168  "2.19991201" => "",
169  "Gunther" => "",
170  "Schmidl" => "",
171  "<gschmidl@gmx.at>" => "",
172  "---cut" => "",
173  "here---cut" => "",
174  "here---" => "",
175  "array" => "1",
176  "attribute" => "1",
177  "break" => "1",
178  "call" => "1",
179  "capital" => "1",
180  "case" => "1",
181  "child" => "1",
182  "children" => "1",
183  "cls" => "1",
184  "color" => "1",
185  "colour" => "1",
186  "constant" => "1",
187  "class" => "1",
188  "dict" => "1",
189  "do" => "1",
190  "elder" => "1",
191  "eldest" => "1",
192  "elseif" => "1",
193  "false" => "1",
194  "global" => "1",
195  "held" => "1",
196  "hex" => "1",
197  "in" => "1",
198  "input" => "1",
199  "jump" => "1",
200  "local" => "1",
201  "locate" => "1",
202  "move" => "1",
203  "multi" => "1",
204  "multiheld" => "1",
205  "multinotheld" => "1",
206  "music" => "1",
207  "nearby" => "1",
208  "newline" => "1",
209  "not" => "1",
210  "notheld" => "1",
211  "number" => "1",
212  "object" => "1",
213  "parent" => "1",
214  "parse$" => "1",
215  "pause" => "1",
216  "picture" => "1",
217  "playback" => "1",
218  "printchar" => "1",
219  "player_character" => "1",
220  "property" => "1",
221  "quit" => "1",
222  "random" => "1",
223  "readfile" => "1",
224  "readval" => "1",
225  "recordoff" => "1",
226  "recordon" => "1",
227  "remove" => "1",
228  "restart" => "1",
229  "restore" => "1",
230  "return" => "1",
231  "run" => "1",
232  "runevents" => "1",
233  "routine" => "1",
234  "replace" => "1",
235  "room" => "1",
236  "removal" => "1",
237  "save" => "1",
238  "scriptoff" => "1",
239  "scripton" => "1",
240  "select" => "1",
241  "serial$" => "1",
242  "sibling" => "1",
243  "sound" => "1",
244  "system" => "1",
245  "text" => "1",
246  "true" => "1",
247  "undo" => "1",
248  "verb" => "1",
249  "while" => "1",
250  "window" => "1",
251  "writefile" => "1",
252  "writeval" => "1",
253  "xobject" => "1",
254  "xverb" => "1",
255  "younger" => "1",
256  "youngest" => "1",
257  "already_listed" => "2",
258  "clothing" => "2",
259  "container" => "2",
260  "enterable" => "2",
261  "female" => "2",
262  "hidden" => "2",
263  "known" => "2",
264  "light" => "2",
265  "living" => "2",
266  "lockable" => "2",
267  "locked" => "2",
268  "mobile" => "2",
269  "moved" => "2",
270  "open" => "2",
271  "openable" => "2",
272  "platform" => "2",
273  "plural" => "2",
274  "quiet" => "2",
275  "readable" => "2",
276  "special" => "2",
277  "static" => "2",
278  "switchable" => "2",
279  "switchedon" => "2",
280  "transparent" => "2",
281  "unfriendly" => "2",
282  "visited" => "2",
283  "workflag" => "2",
284  "worn" => "2",
285  "actor" => "3",
286  "after_period" => "3",
287  "best_parse_rank" => "3",
288  "bgcolor" => "3",
289  "boldcolor" => "3",
290  "counter" => "3",
291  "customerror_flag" => "3",
292  "default_font" => "3",
293  "endflag" => "3",
294  "event_flag" => "3",
295  "format" => "3",
296  "general" => "3",
297  "her_obj" => "3",
298  "him_obj" => "3",
299  "indent_size" => "3",
300  "it_obj" => "3",
301  "last_object" => "3",
302  "light_source" => "3",
303  "list_nest" => "3",
304  "location" => "3",
305  "max_rank" => "3",
306  "max_score" => "3",
307  "need_newline" => "3",
308  "number_scripts" => "3",
309  "objects" => "3",
310  "obstacle" => "3",
311  "old_location" => "3",
312  "oldword" => "3",
313  "override_indent" => "3",
314  "player" => "3",
315  "player_person" => "3",
316  "prompt" => "3",
317  "ranking" => "3",
318  "replace_pronoun" => "3",
319  "score" => "3",
320  "scriptdata" => "3",
321  "self" => "3",
322  "setscript" => "3",
323  "sl_bgcolor" => "3",
324  "sl_textcolor" => "3",
325  "speaking" => "3",
326  "statustype" => "3",
327  "textcolor" => "3",
328  "them_obj" => "3",
329  "verbosity" => "3",
330  "verbroutine" => "3",
331  "words" => "3",
332  "_temp_array" => "4",
333  "and_word" => "4",
334  "are_word" => "4",
335  "banner" => "4",
336  "black" => "4",
337  "blue" => "4",
338  "bold_off" => "4",
339  "bold_on" => "4",
340  "bright_white" => "4",
341  "brown" => "4",
342  "cyan" => "4",
343  "dark_gray" => "4",
344  "def_background" => "4",
345  "def_foreground" => "4",
346  "def_sl_background" => "4",
347  "def_sl_foreground" => "4",
348  "descform_f" => "4",
349  "down_arrow" => "4",
350  "enter_key" => "4",
351  "escape_key" => "4",
352  "file_check" => "4",
353  "green" => "4",
354  "groupplurals_f" => "4",
355  "here_word" => "4",
356  "in_word" => "4",
357  "is_word" => "4",
358  "italic_off" => "4",
359  "italic_on" => "4",
360  "left_arrow" => "4",
361  "light_blue" => "4",
362  "light_cyan" => "4",
363  "light_green" => "4",
364  "light_magenta" => "4",
365  "light_red" => "4",
366  "list_f" => "4",
367  "magenta" => "4",
368  "match_foreground" => "4",
369  "max_scripts" => "4",
370  "max_words" => "4",
371  "menu_bgcolor" => "4",
372  "menu_selectbgcolor" => "4",
373  "menu_selectcolor" => "4",
374  "menu_textcolor" => "4",
375  "menuitem" => "4",
376  "noindent_f" => "4",
377  "norecurse_f" => "4",
378  "on_word" => "4",
379  "prop_off" => "4",
380  "prop_on" => "4",
381  "red" => "4",
382  "right_arrow" => "4",
383  "underline_off" => "4",
384  "underline_on" => "4",
385  "up_arrow" => "4",
386  "white" => "4",
387  "yellow" => "4",
388  "adjective" => "5",
389  "adjectives" => "5",
390  "after" => "5",
391  "article" => "5",
392  "before" => "5",
393  "cant_go" => "5",
394  "capacity" => "5",
395  "contains_desc" => "5",
396  "cursor_column" => "5",
397  "cursor_row" => "5",
398  "d_to" => "5",
399  "desc_detail" => "5",
400  "door_to" => "5",
401  "e_to" => "5",
402  "exclude_from_all" => "5",
403  "found_in" => "5",
404  "hasgraphics" => "5",
405  "holding" => "5",
406  "ignore_response" => "5",
407  "in_scope" => "5",
408  "in_to" => "5",
409  "initial_desc" => "5",
410  "inv_desc" => "5",
411  "key_object" => "5",
412  "linelength" => "5",
413  "list_contents" => "5",
414  "long_desc" => "5",
415  "misc" => "5",
416  "n_to" => "5",
417  "name" => "5",
418  "ne_to" => "5",
419  "noun" => "5",
420  "nouns" => "5",
421  "nw_to" => "5",
422  "order_response" => "5",
423  "out_to" => "5",
424  "parse_rank" => "5",
425  "prep" => "5",
426  "preposition" => "5",
427  "pronoun" => "5",
428  "reach" => "5",
429  "s_to" => "5",
430  "screenheight" => "5",
431  "screenwidth" => "5",
432  "se_to" => "5",
433  "short_desc" => "5",
434  "size" => "5",
435  "statusline_height" => "5",
436  "sw_to" => "5",
437  "title_caption" => "5",
438  "type" => "5",
439  "u_to" => "5",
440  "w_to" => "5",
441  "when_closed" => "5",
442  "when_open" => "5",
443  "windowlines" => "5",
444  "**" => "8",
445  "Do" => "6",
446  "&Do" => "6",
447  "&Char" => "6",
448  "&Loop" => "6",
449  "Acquire" => "7",
450  "AnyVerb" => "7",
451  "AssignPronoun" => "7",
452  "Activate" => "7",
453  "Art" => "7",
454  "abs" => "7",
455  "CThe" => "7",
456  "CArt" => "7",
457  "CalculateHolding" => "7",
458  "CenterTitle" => "7",
459  "CheckReach" => "7",
460  "Contains" => "7",
461  "CustomError" => "7",
462  "CancelScript" => "7",
463  "DarkWarning" => "7",
464  "DeleteWord" => "7",
465  "DescribePlace" => "7",
466  "Deactivate" => "7",
467  "EndGame" => "7",
468  "ExcludeFromAll" => "7",
469  "FindLight" => "7",
470  "Font" => "7",
471  "FindObject" => "7",
472  "GetInput" => "7",
473  "HoursMinutes" => "7",
474  "higher" => "7",
475  "Indent" => "7",
476  "InList" => "7",
477  "InsertWord" => "7",
478  "IsorAre" => "7",
479  "ListObjects" => "7",
480  "lower" => "7",
481  "MatchPlural" => "7",
482  "MatchSubject" => "7",
483  "Menu" => "7",
484  "Message" => "7",
485  "MovePlayer" => "7",
486  "mod" => "7",
487  "NumberWord" => "7",
488  "ObjectIs" => "7",
489  "ObjectisKnown" => "7",
490  "ObjectisLight" => "7",
491  "ObjWord" => "7",
492  "Parse" => "7",
493  "ParseError" => "7",
494  "PauseScript" => "7",
495  "PreParse" => "7",
496  "PrintEndGame" => "7",
497  "PrintScore" => "7",
498  "pow" => "7",
499  "PrintStatusLine" => "7",
500  "PropertyList" => "7",
501  "PutInScope" => "7",
502  "RemoveFromScope" => "7",
503  "ResumeScript" => "7",
504  "RunScripts" => "7",
505  "Script" => "7",
506  "SetObjWord" => "7",
507  "ShortDescribe" => "7",
508  "SpecialDesc" => "7",
509  "SkipScript" => "7",
510  "SpeakTo" => "7",
511  "StringPrint" => "7",
512  "StringCompare" => "7",
513  "StringCopy" => "7",
514  "StringDictCompare" => "7",
515  "StringEqual" => "7",
516  "StringLength" => "7",
517  "The" => "7",
518  "WhatsIn" => "7",
519  "YesOrNo" => "7",
520  "#" => "8",
521  "NO_" => "8",
522  "clear" => "8",
523  "defined" => "8",
524  "error" => "8",
525  "set" => "8",
526  "undefined" => "8",
527  "warning" => "8");
528 
529 // Special extensions
530 
531 // Each category can specify a PHP function that returns an altered
532 // version of the keyword.
533 
534 
535 
536 $this->linkscripts = array(
537  "" => "donothing",
538  "1" => "donothing",
539  "2" => "donothing",
540  "3" => "donothing",
541  "4" => "donothing",
542  "5" => "donothing",
543  "8" => "donothing",
544  "6" => "donothing",
545  "7" => "donothing");
546 }
547 
548 
549 function donothing($keywordin)
550 {
551  return $keywordin;
552 }
553 
554 }?>