ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_delphi.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)) return;
5 require_once("$BEAUT_PATH/Beautifier/HFile.php");
6  class HFile_delphi extends HFile{
7  function HFile_delphi(){
8  $this->HFile();
9 
10 /*************************************/
11 // Beautifier Highlighting Configuration File
12 // Delphi 4
13 /*************************************/
14 // Flags
15 
16 $this->nocase = "1";
17 $this->notrim = "0";
18 $this->perl = "0";
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("begin", "repeat", "asm", "type");
30 $this->unindent = array("end", "until");
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  "array" => "1",
48  "asm" => "1",
49  "begin" => "1",
50  "case" => "1",
51  "class" => "1",
52  "const" => "1",
53  "constructor" => "1",
54  "destructor" => "1",
55  "dispinterface" => "1",
56  "do" => "1",
57  "downto" => "1",
58  "else" => "1",
59  "end" => "1",
60  "except" => "1",
61  "exports" => "1",
62  "file" => "1",
63  "finalization" => "1",
64  "finally" => "1",
65  "for" => "1",
66  "function" => "1",
67  "goto" => "1",
68  "if" => "1",
69  "implementation" => "1",
70  "inherited" => "1",
71  "initialization" => "1",
72  "inline" => "1",
73  "interface" => "1",
74  "label" => "1",
75  "library" => "1",
76  "nil" => "1",
77  "object" => "1",
78  "of" => "1",
79  "out" => "1",
80  "packed" => "1",
81  "procedure" => "1",
82  "program" => "1",
83  "property" => "1",
84  "raise" => "1",
85  "record" => "1",
86  "repeat" => "1",
87  "resourcestring" => "1",
88  "set" => "1",
89  "string" => "1",
90  "then" => "1",
91  "threadvar" => "1",
92  "to" => "1",
93  "try" => "1",
94  "type" => "1",
95  "unit" => "1",
96  "until" => "1",
97  "uses" => "1",
98  "var" => "1",
99  "while" => "1",
100  "with" => "1",
101  "absolute" => "2",
102  "abstract" => "2",
103  "assembler" => "2",
104  "automated" => "2",
105  "cdecl" => "2",
106  "contains" => "2",
107  "default" => "2",
108  "dispid" => "2",
109  "dynamic" => "2",
110  "export" => "2",
111  "external" => "2",
112  "far" => "2",
113  "forward" => "2",
114  "implements" => "2",
115  "index" => "2",
116  "message" => "2",
117  "name" => "2",
118  "near" => "2",
119  "nodefault" => "2",
120  "overload" => "2",
121  "override" => "2",
122  "package" => "2",
123  "pascal" => "2",
124  "private" => "2",
125  "protected" => "2",
126  "public" => "2",
127  "published" => "2",
128  "read" => "2",
129  "readonly" => "2",
130  "register" => "2",
131  "reintroduce" => "2",
132  "requires" => "2",
133  "resident" => "2",
134  "safecall" => "2",
135  "stdcall" => "2",
136  "stored" => "2",
137  "virtual" => "2",
138  "write" => "2",
139  "writeonly" => "2",
140  "*" => "3",
141  "+" => "3",
142  "-" => "3",
143  "//" => "3",
144  "/" => "3",
145  "<" => "3",
146  "<=" => "3",
147  "<>" => "3",
148  "=" => "3",
149  ">" => "3",
150  ">=" => "3",
151  "@" => "3",
152  "and" => "3",
153  "as" => "3",
154  "div" => "3",
155  "in" => "3",
156  "is" => "3",
157  "mod" => "3",
158  "not" => "3",
159  "or" => "3",
160  "shl" => "3",
161  "shr" => "3",
162  "xor" => "3",
163  "#" => "4",
164  "$" => "4",
165  "&" => "4",
166  "(" => "4",
167  "(." => "4",
168  ")" => "4",
169  "," => "4",
170  "." => "4",
171  ".)" => "4",
172  ".." => "4",
173  ":" => "4",
174  ":=" => "4",
175  ";" => "4",
176  "[" => "4",
177  "]" => "4",
178  "^" => "4");
179 
180 // Special extensions
181 
182 
183 // Each category can specify a PHP function that returns an altered
184 // version of the keyword.
185 
186 
187 
188 
189 
190 $this->linkscripts = array(
191  "1" => "donothing",
192  "2" => "donothing",
193  "3" => "donothing",
194  "4" => "donothing");
195 
196 }
197 
198 
199 
200 function donothing($keywordin)
201 {
202  return $keywordin;
203 }
204 
205 }
206 
207 ?>