ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_hartddl.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_hartddl extends HFile{
6  function HFile_hartddl(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // HART DDL
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", "gray", "brown", "blue");
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  "ARRAY" => "1",
46  "COMMAND" => "1",
47  "DEVICE" => "1",
48  "DEVICE_TYPE" => "1",
49  "DD_REVISION" => "1",
50  "DEVICE_REVISION" => "1",
51  "EDIT_DISPLAY" => "1",
52  "IMPORT" => "1",
53  "MANUFACTURER" => "1",
54  "MENU" => "1",
55  "METHOD" => "1",
56  "VARIABLE" => "1",
57  "WRITE_AS_ONE" => "1",
58  "ALL" => "2",
59  "AO" => "2",
60  "ARRAYS" => "2",
61  "AUTO" => "2",
62  "BAD" => "2",
63  "CASE" => "2",
64  "CLASS" => "2",
65  "COLLECTION" => "2",
66  "COMMANDS" => "2",
67  "COMM_ERROR" => "2",
68  "CONSTANT_UNIT" => "2",
69  "CORRECTABLE" => "2",
70  "DATA" => "2",
71  "DATA_ENTRY_ERROR" => "2",
72  "DATA_ENTRY_WARNING" => "2",
73  "DATE" => "2",
74  "DATE_AND_TIME" => "2",
75  "DEFAULT" => "2",
76  "DEFINITION" => "2",
77  "DETAIL" => "2",
78  "DISPLAY_ITEMS" => "2",
79  "DURATION" => "2",
80  "DV" => "2",
81  "EDIT_DISPLAYS" => "2",
82  "EDIT_ITEMS" => "2",
83  "ELEMENTS" => "2",
84  "ELSE" => "2",
85  "EVENT" => "2",
86  "EVERYTHING" => "2",
87  "FALSE" => "2",
88  "GOOD" => "2",
89  "HANDLING" => "2",
90  "HARDWARE" => "2",
91  "HELP" => "2",
92  "IF" => "2",
93  "IGNORE_IN_HANDHELD" => "2",
94  "INFO" => "2",
95  "ITEMS" => "2",
96  "LABEL" => "2",
97  "MANUAL" => "2",
98  "MEMBERS" => "2",
99  "MISC" => "2",
100  "MORE" => "2",
101  "NUMBER" => "2",
102  "OPERATION" => "2",
103  "POST_EDIT_ACTIONS" => "2",
104  "POST_READ_ACTIONS" => "2",
105  "POST_WRITE_ACTIONS" => "2",
106  "PRE_EDIT_ACTIONS" => "2",
107  "PRE_READ_ACTIONS" => "2",
108  "PRE_WRITE_ACTIONS" => "2",
109  "PROCESS" => "2",
110  "PROCESS_ERROR" => "2",
111  "READ_TIMEOUT" => "2",
112  "REDEFINITIONS" => "2",
113  "REFRESH" => "2",
114  "RELATIONS" => "2",
115  "RELEASED" => "2",
116  "RESPONSE_CODES" => "2",
117  "REVIEW" => "2",
118  "REVISION" => "2",
119  "SELECT" => "2",
120  "SELF_CORRECTING" => "2",
121  "SOFTWORE" => "2",
122  "STATE" => "2",
123  "SUMMARY" => "2",
124  "TIME" => "2",
125  "TRANSACTION" => "2",
126  "TRUE" => "2",
127  "TV" => "2",
128  "TYPE" => "2",
129  "UNCORRECTABLE" => "2",
130  "UNIT" => "2",
131  "VALIDITY" => "2",
132  "VARIABLES" => "2",
133  "WRITE_ITMEOUT" => "2",
134  "break" => "2",
135  "char" => "2",
136  "continue" => "2",
137  "default" => "2",
138  "do" => "2",
139  "double" => "2",
140  "else" => "2",
141  "float" => "2",
142  "for" => "2",
143  "if" => "2",
144  "int" => "2",
145  "long" => "2",
146  "return" => "2",
147  "short" => "2",
148  "signed" => "2",
149  "switch" => "2",
150  "unsigned" => "2",
151  "while" => "2",
152  "ABORT_ON_ALL_COMM_STATUS" => "3",
153  "ABORT_ON_ALL_DEVICE_STATUS" => "3",
154  "ABORT_ON_ALL_RESPONSE_CODES" => "3",
155  "ABORT_ON_COMM_ERROR" => "3",
156  "ABORT_ON_COMM_STATUS" => "3",
157  "ABORT_ON_DEVICE_STATUS" => "3",
158  "ABORT_ON_NO_DEVICE" => "3",
159  "ABORT_ON_RESPONSE_CODE" => "3",
160  "ACKNOWLEDGE" => "3",
161  "acknowledge" => "3",
162  "add_abort_method" => "3",
163  "assign_double" => "3",
164  "assign_float" => "3",
165  "assign_int" => "3",
166  "assign_var" => "3",
167  "DELAY" => "3",
168  "DELAY_TIME" => "3",
169  "dassign" => "3",
170  "delay" => "3",
171  "display" => "3",
172  "display_comm_status" => "3",
173  "display_device_status" => "3",
174  "display_response_status" => "3",
175  "display_xmtr_status" => "3",
176  "ext_send_command" => "3",
177  "ext_send_command_trans" => "3",
178  "fassign" => "3",
179  "fgetval" => "3",
180  "float_value" => "3",
181  "fsetval" => "3",
182  "fvar_value" => "3",
183  "GET_DEV_VAR_VALUE" => "3",
184  "GET_LOCAL_VAR_VALUE" => "3",
185  "get_dev_var_value" => "3",
186  "get_dictionary_string" => "3",
187  "get_local_var_value" => "3",
188  "get_more_status" => "3",
189  "get_status_code_string" => "3",
190  "IGNORE_ALL_COMM_STATUS" => "3",
191  "IGNORE_ALL_DEVICE_STATUS" => "3",
192  "IGNORE_ALL_RESPONSE_CODES" => "3",
193  "IGNORE_COMM_ERROR" => "3",
194  "IGNORE_COMM_STATUS" => "3",
195  "IGNORE_DEVICE_STATUS" => "3",
196  "IGNORE_NO_DEVICE" => "3",
197  "IGNORE_RESPONSE_CODE" => "3",
198  "iassign" => "3",
199  "igetval" => "3",
200  "int_value" => "3",
201  "isetval" => "3",
202  "ivar_value" => "3",
203  "lassign" => "3",
204  "lgetval" => "3",
205  "long_value" => "3",
206  "lsetval" => "3",
207  "lvar_value" => "3",
208  "PUT_MESSAGE" => "3",
209  "process_abort" => "3",
210  "put_message" => "3",
211  "RETRY_ON_ALL_COMM_STATUS" => "3",
212  "RETRY_ON_ALL_DEVICE_STATUS" => "3",
213  "RETRY_ON_ALL_RESPONSE_CODES" => "3",
214  "RETRY_ON_COMM_ERROR" => "3",
215  "RETRY_ON_COMM_STATUS" => "3",
216  "RETRY_ON_DEVICE_STATUS" => "3",
217  "RETRY_ON_NO_DEVICE" => "3",
218  "RETRY_ON_RESPONSE_CODE" => "3",
219  "remove_abort_method" => "3",
220  "remove_all_abort_methods" => "3",
221  "rspcode_string" => "3",
222  "SELECT_FROM_LIST" => "3",
223  "SET_NUMBER_OF_RETRIES" => "3",
224  "save_values" => "3",
225  "select_from_list" => "3",
226  "send" => "3",
227  "send_command" => "3",
228  "send_command_trans" => "3",
229  "send_trans" => "3",
230  "VARID" => "3",
231  "vassign" => "3",
232  "XMTR_ABORT_ON_ALL_COMM_STATUS" => "3",
233  "XMTR_ABORT_ON_ALL_DEVICE_STATUS" => "3",
234  "XMTR_ABORT_ON_ALL_RESPONSE_CODES" => "3",
235  "XMTR_ABORT_ON_COMM_ERROR" => "3",
236  "XMTR_ABORT_ON_COMM_STATUS" => "3",
237  "XMTR_ABORT_ON_DATA" => "3",
238  "XMTR_ABORT_ON_DEVICE_STATUS" => "3",
239  "XMTR_ABORT_ON_NO_DEVICE" => "3",
240  "XMTR_ABORT_ON_RESPONSE_CODE" => "3",
241  "XMTR_IGNORE_ALL_COMM_STATUS" => "3",
242  "XMTR_IGNORE_ALL_DEVICE_STATUS" => "3",
243  "XMTR_IGNORE_ALL_RESPONSE_CODES" => "3",
244  "XMTR_IGNORE_COMM_ERROR" => "3",
245  "XMTR_IGNORE_COMM_STATUS" => "3",
246  "XMTR_IGNORE_DEVICE_STATUS" => "3",
247  "XMTR_IGNORE_NO_DEVICE" => "3",
248  "XMTR_IGNORE_RESPONSE_CODE" => "3",
249  "XMTR_RETRY_ON_ALL_COMM_STATUS" => "3",
250  "XMTR_RETRY_ON_ALL_DEVICE_STATUS" => "3",
251  "XMTR_RETRY_ON_ALL_RESPONSE_CODES" => "3",
252  "XMTR_RETRY_ON_COMM_ERROR" => "3",
253  "XMTR_RETRY_ON_COMM_STATUS" => "3",
254  "XMTR_RETRY_ON_DATA" => "3",
255  "XMTR_RETRY_ON_DEVICE_STATUS" => "3",
256  "XMTR_RETRY_ON_NO_DEVICE" => "3",
257  "XMTR_RETRY_ON_RESPONSE_CODE" => "3",
258  "ANALOG_OUTPUT" => "4",
259  "ASCII" => "4",
260  "BIT_ENUMERATED" => "4",
261  "BITSTRING" => "4",
262  "CORRECTION" => "4",
263  "COMPUTATION" => "4",
264  "DISCRETE" => "4",
265  "DYNAMIC" => "4",
266  "DIAGNOSTIC" => "4",
267  "DISPLAY_FORMAT" => "4",
268  "DISPLAY_VALUE" => "4",
269  "DOUBLE" => "4",
270  "EDIT_FORMAT" => "4",
271  "ENUMERATED" => "4",
272  "FLOAT" => "4",
273  "FREQUENCY" => "4",
274  "HART" => "4",
275  "INDEX" => "4",
276  "INPUT" => "4",
277  "INTEGER" => "4",
278  "LOCAL" => "4",
279  "LOCAL_DISPLAY" => "4",
280  "MAX_VALUE" => "4",
281  "MIN_VALUE" => "4",
282  "MISC_ERROR" => "4",
283  "MISC_WARNING" => "4",
284  "MODE" => "4",
285  "MODE_ERROR" => "4",
286  "PACKED_ASCII" => "4",
287  "PASSWORD" => "4",
288  "READ" => "4",
289  "REPLY" => "4",
290  "REQUEST" => "4",
291  "READ_ONLY" => "4",
292  "SCALING_FACTOR" => "4",
293  "SERVICE" => "4",
294  "SUCCESS" => "4",
295  "UNSIGNED_INTEGER" => "4",
296  "USER_INTERFACE" => "4",
297  "WRITE" => "4",
298  "[]" => "5",
299  "ADD" => "5",
300  "DELETE" => "5",
301  "REDEFINE" => "5",
302  "+" => "5",
303  "-" => "5",
304  "=" => "5",
305  "//" => "5",
306  "/" => "5",
307  "%" => "5",
308  "&" => "5",
309  ">" => "5",
310  "<" => "5",
311  "^" => "5",
312  "!" => "5",
313  "|" => "5");
314 
315 // Special extensions
316 
317 // Each category can specify a PHP function that returns an altered
318 // version of the keyword.
319 
320 
321 
322 $this->linkscripts = array(
323  "1" => "donothing",
324  "2" => "donothing",
325  "3" => "donothing",
326  "4" => "donothing",
327  "5" => "donothing");
328 }
329 
330 
331 function donothing($keywordin)
332 {
333  return $keywordin;
334 }
335 
336 }?>