ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_sap.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_sap extends HFile{
6  function HFile_sap(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // SAP - ABAP/4
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");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("FORM", "CONSTANTS:", "DATA:", "TABLES:", "TYPE-POOLS:", "PARAMETERS:", "FUNCITON", "IF", "ELSE", "ELSEIF", "SELECT", "LOOP", "DO", "WHILE", "CASE", "AT", "ON", "MODULE", "PROVIDE");
28 $this->unindent = array("ENDFORM", "ENDFUNCTION", "ENDIF", "ENDSELECT", "ENDLOOP", "ENDDO", "ENDWHILE", "ENDCASE", "ENDAT", "ENDON", "ENDMODULE", "ENDPROVIDE");
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  "ACOS" => "1",
47  "ADD" => "1",
48  "ADD-CORRESPONDING" => "1",
49  "ADJACENT" => "1",
50  "ALL" => "1",
51  "AND" => "1",
52  "ANALYZER" => "1",
53  "APPEND" => "1",
54  "ASCENDING" => "1",
55  "ASIN" => "1",
56  "AT" => "1",
57  "ATAN" => "1",
58  "AUTHORITY-CHECK" => "1",
59  "AVG" => "1",
60  "BACK" => "1",
61  "BEGIN" => "1",
62  "BETWEEN" => "1",
63  "BINARY" => "1",
64  "BLANK" => "1",
65  "BLOCK" => "1",
66  "BREAK-POINT" => "1",
67  "BY" => "1",
68  "CA" => "1",
69  "CALL" => "1",
70  "CASE" => "1",
71  "CATCH" => "1",
72  "CEIL" => "1",
73  "CENTERED" => "1",
74  "CHANGE" => "1",
75  "CHECK" => "1",
76  "CHECKBOX" => "1",
77  "CLEAR" => "1",
78  "CLEAR:" => "1",
79  "CLOSE" => "1",
80  "CN" => "1",
81  "CNT" => "1",
82  "CO" => "1",
83  "COLLECT" => "1",
84  "COLOR" => "1",
85  "COMMIT" => "1",
86  "COMMUNICATION" => "1",
87  "COMPUTE" => "1",
88  "CONCATENATE" => "1",
89  "CONDENSE" => "1",
90  "CONSTANTS" => "1",
91  "CONSTANTS:" => "1",
92  "CONTINUE" => "1",
93  "CONTROL" => "1",
94  "CONTROLS" => "1",
95  "CONVERT" => "1",
96  "COPY" => "1",
97  "COS" => "1",
98  "COSH" => "1",
99  "COUNT" => "1",
100  "COUNTRY" => "1",
101  "CP" => "1",
102  "CURRENCY" => "1",
103  "CUSTOMER-FUNCTION" => "1",
104  "DATA" => "1",
105  "DATA:" => "1",
106  "DATASET" => "1",
107  "DECIMALS" => "1",
108  "DEFINE" => "1",
109  "DEFAULT" => "1",
110  "DELETE" => "1",
111  "DESCENDING" => "1",
112  "DESCRIBE" => "1",
113  "DIALOG" => "1",
114  "DISTINCT" => "1",
115  "DIV" => "1",
116  "DIVIDE" => "1",
117  "DIVIDE-CORRESPONDING" => "1",
118  "DO" => "1",
119  "DUPLICATES" => "1",
120  "EDITOR-CALL" => "1",
121  "ELSE" => "1",
122  "ELSEIF" => "1",
123  "END" => "1",
124  "ENDCATCH" => "1",
125  "END-OF-DEFINITION" => "1",
126  "END-OF-PAGE" => "1",
127  "END-OF-SELECTION" => "1",
128  "ENDAT" => "1",
129  "ENDCASE" => "1",
130  "ENDDO" => "1",
131  "ENDFORM" => "1",
132  "ENDFUNCTION" => "1",
133  "ENDIF" => "1",
134  "ENDLOOP" => "1",
135  "ENDMODULE" => "1",
136  "ENDON" => "1",
137  "ENDPROVIDE" => "1",
138  "ENDSELECT" => "1",
139  "ENDWHILE" => "1",
140  "ENTRIES" => "1",
141  "EQ" => "1",
142  "EXCEPTIONS" => "1",
143  "EXEC" => "1",
144  "EXIT" => "1",
145  "EXP" => "1",
146  "EXPONENT" => "1",
147  "EXPORT" => "1",
148  "EXPORTING" => "1",
149  "EXTENDED" => "1",
150  "EXTRACT" => "1",
151  "FETCH" => "1",
152  "FIELD-GROUP" => "1",
153  "FIELD-SYMBOLS" => "1",
154  "FIELD-SYMBOLS:" => "1",
155  "FLOOR" => "1",
156  "FOR" => "1",
157  "FORM" => "1",
158  "FORMAT" => "1",
159  "FRAC" => "1",
160  "FRAME" => "1",
161  "FREE" => "1",
162  "FROM" => "1",
163  "FUNCTION" => "1",
164  "FUNCTION-POOL" => "1",
165  "GE" => "1",
166  "GENERATE" => "1",
167  "GET" => "1",
168  "GT" => "1",
169  "HIDE" => "1",
170  "HOTSPOT" => "1",
171  "HEADER" => "1",
172  "HEADING." => "1",
173  "HEADING" => "1",
174  "ICON" => "1",
175  "IF" => "1",
176  "IMPORT" => "1",
177  "IMPORTING" => "1",
178  "IN" => "1",
179  "INCLUDE" => "1",
180  "INDEX" => "1",
181  "INFOTYPES" => "1",
182  "INITIAL" => "1",
183  "INITIALIZATION" => "1",
184  "INPUT" => "1",
185  "INSERT" => "1",
186  "INTO" => "1",
187  "INTENSIFIED" => "1",
188  "INVERSE" => "1",
189  "IS" => "1",
190  "KEY" => "1",
191  "LANGUAGE" => "1",
192  "LE" => "1",
193  "LEAVE" => "1",
194  "LEFT-JUSTIFIED" => "1",
195  "LIKE" => "1",
196  "LINE" => "1",
197  "LINE-COUNT" => "1",
198  "LINE-SIZE" => "1",
199  "LINES" => "1",
200  "LIST-PROCESSING" => "1",
201  "LOAD" => "1",
202  "LOCAL" => "1",
203  "LOCALE" => "1",
204  "LOG" => "1",
205  "LOG10" => "1",
206  "LOOP" => "1",
207  "LT" => "1",
208  "MESSAGE-ID" => "1",
209  "MESSAGE" => "1",
210  "M" => "1",
211  "MARGIN" => "1",
212  "MAX" => "1",
213  "MIN" => "1",
214  "MOD" => "1",
215  "MODE" => "1",
216  "MODIFY" => "1",
217  "MODULE" => "1",
218  "MOVE" => "1",
219  "MOVE-CORRESPONDING" => "1",
220  "MULTIPLY" => "1",
221  "MULTIPLY-CORRESPONDING" => "1",
222  "NA" => "1",
223  "NE" => "1",
224  "NEW-LINE" => "1",
225  "NEW-PAGE" => "1",
226  "NO-GAP" => "1",
227  "NO-HEADING" => "1",
228  "NO-SCROLLING" => "1",
229  "NO-SIGN" => "1",
230  "NO-TITLE" => "1",
231  "NO-ZERO" => "1",
232  "NOT" => "1",
233  "NP" => "1",
234  "NS" => "1",
235  "NO" => "1",
236  "STANDARD" => "1",
237  "PAGE" => "1",
238  "O" => "1",
239  "OBLIGATORY" => "1",
240  "OCCURS" => "1",
241  "OF" => "1",
242  "OFF" => "1",
243  "ON" => "1",
244  "OPEN" => "1",
245  "OR" => "1",
246  "ORDER" => "1",
247  "OUTPUT" => "1",
248  "OVERLAY" => "1",
249  "PACK" => "1",
250  "PARAMETERS" => "1",
251  "PARAMETERS:" => "1",
252  "PERFORM" => "1",
253  "PF-STATUS" => "1",
254  "POSITION" => "1",
255  "PRINT" => "1",
256  "PRINT-CONTROL" => "1",
257  "PROGRAM" => "1",
258  "PROVIDE" => "1",
259  "PUT" => "1",
260  "RADIOBUTTON" => "1",
261  "RAISE" => "1",
262  "RAISING" => "1",
263  "RANGES" => "1",
264  "READ" => "1",
265  "RECEIVE" => "1",
266  "REFRESH" => "1",
267  "REJECT" => "1",
268  "REPLACE" => "1",
269  "REPORT" => "1",
270  "RESERVE" => "1",
271  "RESET" => "1",
272  "RIGHT-JUSTIFIED" => "1",
273  "ROLLBACK" => "1",
274  "ROUND" => "1",
275  "RUN" => "1",
276  "SCAN" => "1",
277  "SCREEN" => "1",
278  "SCROLL" => "1",
279  "SCROLL-BOUNDARY" => "1",
280  "SEARCH" => "1",
281  "SELECT" => "1",
282  "SELECT-OPTIONS" => "1",
283  "SELECT-OPTIONS:" => "1",
284  "SELECTION-SCREEN" => "1",
285  "SELECTION-SCREEN:" => "1",
286  "SELECTION-TABLE" => "1",
287  "SET" => "1",
288  "SHIFT" => "1",
289  "SIGN" => "1",
290  "SIN" => "1",
291  "SINGLE" => "1",
292  "SINH" => "1",
293  "SKIP" => "1",
294  "SORT" => "1",
295  "SPACE" => "1",
296  "SPLIT" => "1",
297  "SQL" => "1",
298  "SQRT" => "1",
299  "START-OF-SELECTION" => "1",
300  "STATICS" => "1",
301  "STOP" => "1",
302  "STRLEN" => "1",
303  "STRUCTURE" => "1",
304  "SUBMIT" => "1",
305  "SUBSTRACT" => "1",
306  "SUBSTRACT-CORRESPONDING" => "1",
307  "SUM" => "1",
308  "SUPPRESS" => "1",
309  "SYMBOL" => "1",
310  "SYNTAX-CHECK" => "1",
311  "SYNTAX-TRACE" => "1",
312  "SYSTEM-EXCEPTIONS" => "1",
313  "TABLE" => "1",
314  "TABLES" => "1",
315  "TABLES:" => "1",
316  "TAN" => "1",
317  "TANH" => "1",
318  "THEN" => "1",
319  "TIME" => "1",
320  "TITLE" => "1",
321  "TITLEBAR" => "1",
322  "TO" => "1",
323  "TOP-OF-PAGE" => "1",
324  "TRANSACTION" => "1",
325  "TRANSFER" => "1",
326  "TRANSLATE" => "1",
327  "TRUNC" => "1",
328  "TYPE-POOLS" => "1",
329  "TYPE-POOL" => "1",
330  "TYPES" => "1",
331  "TYPE" => "1",
332  "ULINE" => "1",
333  "UNDER" => "1",
334  "UNIT" => "1",
335  "UNPACK" => "1",
336  "UPDATE" => "1",
337  "USER-COMMAND" => "1",
338  "USING" => "1",
339  "USING:" => "1",
340  "VALUE" => "1",
341  "WHEN" => "1",
342  "WHERE" => "1",
343  "WHILE" => "1",
344  "WINDOW" => "1",
345  "WITH" => "1",
346  "WITH-TITLE" => "1",
347  "WORK" => "1",
348  "WRITE" => "1",
349  "WRITE:" => "1",
350  "WRITE-TO" => "1",
351  "Z" => "1",
352  "BDCDATA" => "2",
353  "SY-ABCDE" => "2",
354  "SY-APPLI" => "2",
355  "SY-BATCH" => "2",
356  "SY-BATZD" => "2",
357  "SY-BATZM" => "2",
358  "SY-BATZO" => "2",
359  "SY-BATZS" => "2",
360  "SY-BATZW" => "2",
361  "SY-BINPT" => "2",
362  "SY-BREP4" => "2",
363  "SY-BSPLD" => "2",
364  "SY-CALLD" => "2",
365  "SY-CALLR" => "2",
366  "SY-CCURS" => "2",
367  "SY-CCURT" => "2",
368  "SY-CDATE" => "2",
369  "SY-COLNO" => "2",
370  "SY-CPAGE" => "2",
371  "SY-CPROG" => "2",
372  "SY-CTABL" => "2",
373  "SY-CTYPE" => "2",
374  "SY-CUCOL" => "2",
375  "SY-CUROW" => "2",
376  "SY-DATAR" => "2",
377  "SY-DATLO" => "2",
378  "SY-DATUM" => "2",
379  "SY-DATUT" => "2",
380  "SY-DAYST" => "2",
381  "SY-DBCNT" => "2",
382  "SY-DBNAM" => "2",
383  "SY-DBSYS" => "2",
384  "SY-DCSYS" => "2",
385  "SY-DSNAM" => "2",
386  "SY-DYNGR" => "2",
387  "SY-DYNNR" => "2",
388  "SY-FDAYW" => "2",
389  "SY-FDPOS" => "2",
390  "SY-FMKEY" => "2",
391  "SY-HOST" => "2",
392  "SY-INDEX" => "2",
393  "SY-LANGU" => "2",
394  "SY-LDBPG" => "2",
395  "SY-LILLI" => "2",
396  "SY-LINCT" => "2",
397  "SY-LINNO" => "2",
398  "SY-LINSZ" => "2",
399  "SY-LISEL" => "2",
400  "SY-LISTI" => "2",
401  "SY-LOCDB" => "2",
402  "SY-LOCOP" => "2",
403  "SY-LOOPC" => "2",
404  "SY-LSIND" => "2",
405  "SY-LSTAT" => "2",
406  "SY-MACDB" => "2",
407  "SY-MACOL" => "2",
408  "SY-MANDT" => "2",
409  "SY-MARKY" => "2",
410  "SY-MAROW" => "2",
411  "SY-MODNO" => "2",
412  "SY-MSGID" => "2",
413  "SY-MSGLI" => "2",
414  "SY-MSGNO" => "2",
415  "SY-MSGTY" => "2",
416  "SY-MSGV1" => "2",
417  "SY-MSGV2" => "2",
418  "SY-MSGV3" => "2",
419  "SY-MSGV4" => "2",
420  "SY-OPSYS" => "2",
421  "SY-PAART" => "2",
422  "SY-PAGCT" => "2",
423  "SY-PAGNO" => "2",
424  "SY-PDEST" => "2",
425  "SY-PEXPI" => "2",
426  "SY-PFKEY" => "2",
427  "SY-PLIST" => "2",
428  "SY-PRABT" => "2",
429  "SY-PRBIG" => "2",
430  "SY-PRCOP" => "2",
431  "SY-PRDSN" => "2",
432  "SY-PREFX" => "2",
433  "SY-PRIMM" => "2",
434  "SY-PRNEW" => "2",
435  "SY-PRREC" => "2",
436  "SY-PRREL" => "2",
437  "SY-PRTXT" => "2",
438  "SY-REPID" => "2",
439  "SY-SPONR" => "2",
440  "SY-SROWS" => "2",
441  "SY-STACO" => "2",
442  "SY-STARO" => "2",
443  "SY-STEPL" => "2",
444  "SY-SUBRC" => "2",
445  "SY-SUBTY" => "2",
446  "SY-SYSID" => "2",
447  "SY-TABIX" => "2",
448  "SY-TCODE" => "2",
449  "SY-TFDSN" => "2",
450  "SY-TFILL" => "2",
451  "SY-TIMLO" => "2",
452  "SY-TIMUT" => "2",
453  "SY-TITLE" => "2",
454  "SY-TLENG" => "2",
455  "SY-TMAXL" => "2",
456  "SY-TNAME" => "2",
457  "SY-TOCCU" => "2",
458  "SY-TPAGI" => "2",
459  "SY-TSTLO" => "2",
460  "SY-TSTUT" => "2",
461  "SY-TTABC" => "2",
462  "SY-TTABI" => "2",
463  "SY-TVAR0" => "2",
464  "SY-TVAR1" => "2",
465  "SY-TVAR2" => "2",
466  "SY-TVAR3" => "2",
467  "SY-TVAR4" => "2",
468  "SY-TVAR5" => "2",
469  "SY-TVAR6" => "2",
470  "SY-TVAR7" => "2",
471  "SY-TVAR8" => "2",
472  "SY-TVAR9" => "2",
473  "SY-TZONE" => "2",
474  "SY-UCOMM" => "2",
475  "SY-ULINE" => "2",
476  "SY-UNAME" => "2",
477  "SY-UZEIT" => "2",
478  "SY-VLINE" => "2",
479  "SY-WAERS" => "2",
480  "SY-WILLI" => "2",
481  "SY-WINCO" => "2",
482  "SY-WINDI" => "2",
483  "SY-WINRO" => "2",
484  "SY-WINSL" => "2",
485  "SY-WINX2" => "2",
486  "SY-WINXI" => "2",
487  "SY-WINY1" => "2",
488  "SY-WINY2" => "2",
489  "SY-WTITL" => "2",
490  "SY-XCODE" => "2",
491  "SY-ZON" => "2");
492 
493 // Special extensions
494 
495 // Each category can specify a PHP function that returns an altered
496 // version of the keyword.
497 
498 
499 
500 $this->linkscripts = array(
501  "1" => "donothing",
502  "2" => "donothing");
503 }
504 
505 
506 function donothing($keywordin)
507 {
508  return $keywordin;
509 }
510 
511 }?>