ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_modula2.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_modula2 extends HFile{
6  function HFile_modula2(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // Modula2/2k-02-6-nr
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "0";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "purple", "gray", "brown", "blue");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("ARRAY", "BEGIN", "CONST", "DO", "ELSE", "ELSIF", "FOR", "FROM", "IF", "IMPORT", "LOOP", "PROCEDURE", "RECORD", "REPEAT", "TYPE", "VAR", "WHILE", "WITH");
28 $this->unindent = array("ELSE", "ELSIF", "END", "UNTIL");
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  "ABS" => "1",
46  "AND" => "1",
47  "ADDRESS" => "1",
48  "ARRAY" => "1",
49  "BEGIN" => "1",
50  "BITSET" => "1",
51  "BY" => "1",
52  "CASE" => "1",
53  "CONST" => "1",
54  "DEALLOCATE" => "6",
55  "DEFINITION" => "1",
56  "DO" => "1",
57  "ELSE" => "1",
58  "ELSIF" => "1",
59  "END" => "1",
60  "EXCL" => "1",
61  "EXIT" => "1",
62  "FOR" => "1",
63  "FOREIGN" => "1",
64  "FROM" => "1",
65  "HIGH" => "1",
66  "IF" => "1",
67  "IMPLEMENTATION" => "1",
68  "IMPORT" => "1",
69  "IN" => "1",
70  "INC" => "1",
71  "INCL" => "1",
72  "LOOP" => "1",
73  "MAX" => "1",
74  "MIN" => "1",
75  "MODULE" => "1",
76  "NOT" => "1",
77  "OF" => "1",
78  "OR" => "1",
79  "POINTER" => "1",
80  "PROCEDURE" => "1",
81  "RECORD" => "1",
82  "REPEAT" => "1",
83  "RETURN" => "1",
84  "SET" => "1",
85  "STEP" => "1",
86  "THEN" => "1",
87  "TO" => "1",
88  "TYPE" => "1",
89  "UNTIL" => "1",
90  "VAR" => "1",
91  "WHILE" => "1",
92  "WITH" => "1",
93  "^" => "2",
94  "BOOLEAN" => "2",
95  "BYTE" => "2",
96  "CARDINAL" => "2",
97  "CHAR" => "2",
98  "FLOAT" => "2",
99  "INTEGER" => "2",
100  "IntSet" => "2",
101  "NIL" => "2",
102  "REAL" => "2",
103  "=" => "3",
104  ":" => "3",
105  "<=" => "3",
106  ">=" => "3",
107  "#" => "3",
108  "+" => "3",
109  "-" => "3",
110  "*" => "3",
111  "//" => "3",
112  "/" => "3",
113  "DIV" => "3",
114  "MOD" => "3",
115  "[" => "4",
116  "]" => "4",
117  "FALSE" => "5",
118  "TRUE" => "5",
119  "ALLOCATE" => "6",
120  "CHR" => "6",
121  "DEC" => "6",
122  "DISPOSE" => "6",
123  "NEW" => "6",
124  "ORD" => "6",
125  "SIZE" => "6",
126  "SYSTEM" => "6",
127  "TRUNC" => "6");
128 
129 // Special extensions
130 
131 // Each category can specify a PHP function that returns an altered
132 // version of the keyword.
133 
134 
135 
136 $this->linkscripts = array(
137  "1" => "donothing",
138  "6" => "donothing",
139  "2" => "donothing",
140  "3" => "donothing",
141  "4" => "donothing",
142  "5" => "donothing");
143 }
144 
145 
146 function donothing($keywordin)
147 {
148  return $keywordin;
149 }
150 
151 }?>