ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_euphoria.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_euphoria extends HFile
9  {
10  public function HFile_euphoria()
11  {
12  $this->HFile();
13  /*************************************/
14  // Beautifier Highlighting Configuration File
15  // Euphoria
16  /*************************************/
17  // Flags
18 
19  $this->nocase = "0";
20  $this->notrim = "0";
21  $this->perl = "0";
22 
23  // Colours
24 
25  $this->colours = array("blue", "purple", "gray", "brown");
26  $this->quotecolour = "blue";
27  $this->blockcommentcolour = "green";
28  $this->linecommentcolour = "green";
29 
30  // Indent Strings
31 
32  $this->indent = array("do", "global function", "if");
33  $this->unindent = array("end if", "end while", "end for", "end function", "end procedure", "end type");
34 
35  // String characters and delimiters
36 
37  $this->stringchars = array("\"");
38  $this->delimiters = array("~", "@", "%", "^", "&", "*", "(", ")", "-", "+", "|", "\\", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ");
39  $this->escchar = "\\";
40 
41  // Comment settings
42 
43  $this->linecommenton = array("--");
44  $this->blockcommenton = array("");
45  $this->blockcommentoff = array("");
46 
47  // Keywords (keyword mapping to colour number)
48 
49  $this->keywords = array(
50  "and" => "1",
51  "by" => "1",
52  "constant" => "1",
53  "do" => "1",
54  "else" => "1",
55  "elsif" => "1",
56  "end" => "1",
57  "exit" => "1",
58  "for" => "1",
59  "function" => "1",
60  "global" => "1",
61  "if" => "1",
62  "include" => "1",
63  "not" => "1",
64  "or" => "1",
65  "procedure" => "1",
66  "return" => "1",
67  "then" => "1",
68  "to" => "1",
69  "type" => "1",
70  "while" => "1",
71  "with" => "1",
72  "without" => "1",
73  "xor" => "1",
74  "atom" => "2",
75  "integer" => "2",
76  "object" => "2",
77  "sequence" => "2",
78  "?" => "3",
79  "append" => "3",
80  "arcsin" => "3",
81  "arccos" => "3",
82  "arctan" => "3",
83  "and_bits" => "3",
84  "allow_break" => "3",
85  "abort" => "3",
86  "all_palette" => "3",
87  "allocate" => "3",
88  "allocate_low" => "3",
89  "allocate_string" => "3",
90  "atom_to_float64" => "3",
91  "atom_to_float32" => "3",
92  "bk_color" => "3",
93  "bytes_to_int" => "3",
94  "bits_to_int" => "3",
95  "compare" => "3",
96  "custom_sort" => "3",
97  "cos" => "3",
98  "close" => "3",
99  "current_dir" => "3",
100  "chdir" => "3",
101  "check_break" => "3",
102  "command_line" => "3",
103  "clear_screen" => "3",
104  "cursor" => "3",
105  "call" => "3",
106  "crash_file" => "3",
107  "crash_message" => "3",
108  "call_proc" => "3",
109  "call_func" => "3",
110  "c_proc" => "3",
111  "c_func" => "3",
112  "call_back" => "3",
113  "dir" => "3",
114  "date" => "3",
115  "display_text_image" => "3",
116  "draw_line" => "3",
117  "display_image" => "3",
118  "dos_interrupt" => "3",
119  "define_c_proc" => "3",
120  "define_c_func" => "3",
121  "define_c_var" => "3",
122  "equal" => "3",
123  "ellipse" => "3",
124  "find" => "3",
125  "floor" => "3",
126  "flush" => "3",
127  "free" => "3",
128  "free_low" => "3",
129  "float64_to_atom" => "3",
130  "float32_to_atom" => "3",
131  "free_console" => "3",
132  "get" => "3",
133  "getc" => "3",
134  "gets" => "3",
135  "get_bytes" => "3",
136  "get_key" => "3",
137  "get_mouse" => "3",
138  "getenv" => "3",
139  "get_position" => "3",
140  "graphics_mode" => "3",
141  "get_all_palette" => "3",
142  "get_active_page" => "3",
143  "get_display_page" => "3",
144  "get_screen_char" => "3",
145  "get_pixel" => "3",
146  "get_vector" => "3",
147  "int_to_bytes" => "3",
148  "int_to_bits" => "3",
149  "instance" => "3",
150  "length" => "3",
151  "lower" => "3",
152  "log" => "3",
153  "lock_file" => "3",
154  "lock_memory" => "3",
155  "match" => "3",
156  "mouse_events" => "3",
157  "mouse_pointer" => "3",
158  "machine_func" => "3",
159  "machine_proc" => "3",
160  "mem_copy" => "3",
161  "mem_set" => "3",
162  "message_box" => "3",
163  "not_bits" => "3",
164  "or_bits" => "3",
165  "open" => "3",
166  "open_dll" => "3",
167  "PI" => "3",
168  "prepend" => "3",
169  "power" => "3",
170  "print" => "3",
171  "printf" => "3",
172  "puts" => "3",
173  "prompt_string" => "3",
174  "prompt_number" => "3",
175  "platform" => "3",
176  "profile" => "3",
177  "position" => "3",
178  "palette" => "3",
179  "put_screen_char" => "3",
180  "pixel" => "3",
181  "polygon" => "3",
182  "peek" => "3",
183  "peek4s" => "3",
184  "peek4u" => "3",
185  "poke" => "3",
186  "poke4" => "3",
187  "rand" => "3",
188  "repeat" => "3",
189  "reverse" => "3",
190  "remainder" => "3",
191  "read_bitmap" => "3",
192  "register_block" => "3",
193  "routine_id" => "3",
194  "sin" => "3",
195  "sort" => "3",
196  "sqrt" => "3",
197  "sprintf" => "3",
198  "seek" => "3",
199  "system" => "3",
200  "system_exec" => "3",
201  "sleep" => "3",
202  "scroll" => "3",
203  "save_bitmap" => "3",
204  "set_active_page" => "3",
205  "set_display_page" => "3",
206  "sound" => "3",
207  "save_text_image" => "3",
208  "save_screen" => "3",
209  "save_image" => "3",
210  "set_vector" => "3",
211  "set_rand" => "3",
212  "tan" => "3",
213  "time" => "3",
214  "tick_rate" => "3",
215  "trace" => "3",
216  "text_color" => "3",
217  "text_rows" => "3",
218  "upper" => "3",
219  "unlock_file" => "3",
220  "unregister_block" => "3",
221  "use_vesa" => "3",
222  "value" => "3",
223  "video_config" => "3",
224  "wildcard_match" => "3",
225  "wildcard_file" => "3",
226  "wait_key" => "3",
227  "where" => "3",
228  "walk_dir" => "3",
229  "wrap" => "3",
230  "xor_bits" => "3",
231  "<" => "4",
232  "<=" => "4",
233  ">" => "4",
234  ">=" => "4",
235  "=" => "4",
236  "!=" => "4",
237  "+" => "4",
238  "+=" => "4",
239  "-" => "4",
240  "-=" => "4",
241  "*" => "4",
242  "*=" => "4",
243  "//" => "4",
244  "/" => "4",
245  "/=" => "4",
246  ".." => "4",
247  "&" => "4",
248  "&=" => "4");
249 
250  // Special extensions
251 
252  // Each category can specify a PHP function that returns an altered
253  // version of the keyword.
254 
255 
256 
257  $this->linkscripts = array(
258  "1" => "donothing",
259  "2" => "donothing",
260  "3" => "donothing",
261  "4" => "donothing");
262  }
263 
264 
265 
266  public function donothing($keywordin)
267  {
268  return $keywordin;
269  }
270  }
donothing($keywordin)
$BEAUT_PATH
Create styles array
The data for the language used.
Definition: HFile.php:21