ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_plsql.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_plsql extends HFile{
6  function HFile_plsql(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // PL/SQL
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "1";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "brown", "blue", "purple", "gray");
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  "ABORT" => "1",
46  "ACCEPT" => "1",
47  "ACCESS" => "1",
48  "ADD" => "1",
49  "ALL" => "1",
50  "ALTER" => "1",
51  "AND" => "1",
52  "ANY" => "1",
53  "ARRAY" => "1",
54  "ARRAYLEN" => "1",
55  "AS" => "1",
56  "ASC" => "1",
57  "ASSERT" => "1",
58  "ASSIGN" => "1",
59  "AT" => "1",
60  "AUDIT" => "1",
61  "AUTHORIZATION" => "1",
62  "AVG" => "1",
63  "BASE_TABLE" => "1",
64  "BEGIN" => "1",
65  "BETWEEN" => "1",
66  "BINARY_INTEGER" => "1",
67  "BODY" => "1",
68  "BOOLEAN" => "1",
69  "BY" => "1",
70  "CASE" => "1",
71  "CHAR" => "1",
72  "CHAR_BASE" => "1",
73  "CHECK" => "1",
74  "CLOSE" => "1",
75  "CLUSTER" => "1",
76  "CLUSTERS" => "1",
77  "COLAUTH" => "1",
78  "COLUMN" => "1",
79  "COMMENT" => "1",
80  "COMMIT" => "1",
81  "COMPRESS" => "1",
82  "CONNECT" => "1",
83  "CONSTANT" => "1",
84  "CRASH" => "1",
85  "CREATE" => "1",
86  "CURRENT" => "1",
87  "CURRVAL" => "1",
88  "CURSOR" => "1",
89  "DATABASE" => "1",
90  "DATA_BASE" => "1",
91  "DATE" => "1",
92  "DBA" => "1",
93  "DEBUGOFF" => "1",
94  "DEBUGON" => "1",
95  "DECLARE" => "1",
96  "DECIMAL" => "1",
97  "DEFAULT" => "1",
98  "DEFINITION" => "1",
99  "DELAY" => "1",
100  "DELETE" => "1",
101  "DESC" => "1",
102  "DIGITS" => "1",
103  "DISPOSE" => "1",
104  "DISTINCT" => "1",
105  "DO" => "1",
106  "DROP" => "1",
107  "ELSE" => "1",
108  "ELSIF" => "1",
109  "END" => "1",
110  "ENTRY" => "1",
111  "EXCEPTION" => "1",
112  "EXCEPTION_INIT" => "1",
113  "EXCLUSIVE" => "1",
114  "EXISTS" => "1",
115  "EXIT" => "1",
116  "FALSE" => "1",
117  "FETCH" => "1",
118  "FILE" => "1",
119  "FLOAT" => "1",
120  "FOR" => "6",
121  "FORM" => "1",
122  "FROM" => "1",
123  "FUNCTION" => "1",
124  "GENERIC" => "1",
125  "GOTO" => "1",
126  "GRANT" => "4",
127  "GROUP" => "1",
128  "HAVING" => "1",
129  "IDENTIFIED" => "1",
130  "IF" => "1",
131  "IMMEDIATE" => "1",
132  "IN" => "1",
133  "INCREMENT" => "1",
134  "INDEX" => "1",
135  "INDEXES" => "1",
136  "INDICATOR" => "1",
137  "INITIAL" => "1",
138  "INSERT" => "1",
139  "INTEGER" => "1",
140  "INTERFACE" => "1",
141  "INTERSECT" => "1",
142  "INTO" => "1",
143  "IS" => "1",
144  "LEVEL" => "1",
145  "LIKE" => "1",
146  "LIMITED" => "1",
147  "LOCK" => "1",
148  "LONG" => "1",
149  "LOOP" => "1",
150  "MAX" => "1",
151  "MAXEXTENTS" => "1",
152  "MIN" => "1",
153  "MINEXTENTS" => "1",
154  "MINUS" => "1",
155  "MISLABEL" => "1",
156  "MOD" => "5",
157  "MODE" => "1",
158  "NATURAL" => "1",
159  "NATURALN" => "1",
160  "NEW" => "1",
161  "NEXTVAL" => "1",
162  "NOAUDIT" => "1",
163  "NOCOMPRESS" => "1",
164  "NOLOGGING" => "1",
165  "NOT" => "1",
166  "NOWAIT" => "1",
167  "NULL" => "1",
168  "NUMBER" => "1",
169  "NUMBER_BASE" => "1",
170  "OF" => "1",
171  "OFFLINE" => "1",
172  "ON" => "1",
173  "ONLINE" => "1",
174  "OPEN" => "1",
175  "OPTION" => "1",
176  "OR" => "1",
177  "ORDER" => "1",
178  "OTHERS" => "1",
179  "OUT" => "1",
180  "PACKAGE" => "1",
181  "PARTITION" => "1",
182  "PCTFREE" => "1",
183  "PCTUSED" => "1",
184  "PLS_INTEGER" => "1",
185  "POSITIVE" => "1",
186  "POSITIVEN" => "1",
187  "PRAGMA" => "1",
188  "PRIOR" => "1",
189  "PRIVATE" => "1",
190  "PRIVILEGES" => "1",
191  "PROCEDURE" => "1",
192  "PUBLIC" => "1",
193  "RAISE" => "1",
194  "RANGE" => "1",
195  "RAW" => "1",
196  "REAL" => "1",
197  "RECORD" => "1",
198  "REF" => "1",
199  "RELEASE" => "1",
200  "REMR" => "1",
201  "RENAME" => "1",
202  "RESOURCE" => "1",
203  "RETURN" => "1",
204  "REVERSE" => "1",
205  "REVOKE" => "1",
206  "ROLLBACK" => "1",
207  "ROW" => "1",
208  "ROWID" => "1",
209  "ROWLABEL" => "1",
210  "ROWNUM" => "1",
211  "ROWS" => "1",
212  "ROWTYPE" => "1",
213  "RUN" => "4",
214  "SAVEPOINT" => "1",
215  "SCHEMA" => "1",
216  "SELECT" => "1",
217  "SEPARATE" => "1",
218  "SESSION" => "1",
219  "SET" => "1",
220  "SHARE" => "1",
221  "SMALLINT" => "1",
222  "SPACE" => "1",
223  "SQL" => "1",
224  "SQLCODE" => "1",
225  "SQLERRM" => "1",
226  "START" => "4",
227  "STATEMENT" => "1",
228  "STDDEV" => "1",
229  "SUBTYPE" => "1",
230  "SUCCESSFUL" => "1",
231  "SUM" => "1",
232  "SYNONYM" => "1",
233  "SYSDATE" => "1",
234  "TABAUTH" => "1",
235  "TABLE" => "1",
236  "TABLES" => "1",
237  "TASK" => "1",
238  "TERMINATE" => "1",
239  "THEN" => "1",
240  "TO" => "1",
241  "TRIGGER" => "1",
242  "TRUE" => "1",
243  "TYPE" => "1",
244  "UID" => "1",
245  "UNION" => "1",
246  "UNIQUE" => "1",
247  "UPDATE" => "1",
248  "USE" => "1",
249  "USER" => "1",
250  "VALIDATE" => "1",
251  "VALUES" => "1",
252  "VARCHAR" => "1",
253  "VARCHAR2" => "1",
254  "VARIANCE" => "1",
255  "VIEW" => "1",
256  "VIEWS" => "1",
257  "WHEN" => "6",
258  "WHENEVER" => "1",
259  "WHERE" => "6",
260  "WHILE" => "6",
261  "WITH" => "1",
262  "WORK" => "1",
263  "WRITE" => "1",
264  "XOR" => "1",
265  "DBMS_OUTPUT" => "2",
266  "DBMS_JOB" => "2",
267  "DBMS_SQL" => "2",
268  "BIND_VARIABLE" => "3",
269  "BIND_VARIABLE_CHAR" => "3",
270  "BIND_VARIABLE_RAW" => "3",
271  "BIND_VARIABLE_ROWID" => "3",
272  "BROKEN" => "3",
273  "CHANGE" => "3",
274  "CLOSE_CURSOR" => "3",
275  "COLUMN_VALUE" => "3",
276  "COLUMN_VALUE_CHAR" => "3",
277  "COLUMN_VALUE_RAW" => "3",
278  "COLUMN_VALUE_ROWID" => "3",
279  "DEFINE_COLUMN" => "3",
280  "DEFINE_COLUMN_CHAR" => "3",
281  "DEFINE_COLUMN_RAW" => "3",
282  "DEFINE_COLUMN_ROWID" => "3",
283  "DISABLE" => "3",
284  "ENABLE" => "3",
285  "EXECUTE" => "4",
286  "EXECUTE_AND_FETCH" => "3",
287  "FETCH_ROWS" => "3",
288  "GET_LINE" => "3",
289  "GET_LINES" => "3",
290  "INTERVAL" => "3",
291  "IS_OPEN" => "3",
292  "LAST_ERROR_POSITION" => "3",
293  "LAST_ROW_COUNT" => "3",
294  "LAST_ROW_ID" => "3",
295  "LAST_SQL_FUNCTION_CODE" => "3",
296  "NEW_LINE" => "3",
297  "NEXT_DATE" => "3",
298  "PARSE" => "3",
299  "PUT" => "3",
300  "PUT_LINE" => "3",
301  "REMOVE" => "3",
302  "SUBMIT" => "3",
303  "WHAT" => "3",
304  "REPLACE" => "5",
305  "ABS" => "5",
306  "ADD_MONTHS" => "5",
307  "ASCII" => "5",
308  "CEIL" => "5",
309  "CHR" => "5",
310  "CONCAT" => "5",
311  "CONVERT" => "5",
312  "COS" => "5",
313  "COSH" => "5",
314  "DECODE" => "5",
315  "EXP" => "5",
316  "FLOOR" => "5",
317  "GREATEST" => "5",
318  "HEXTORAW" => "5",
319  "INITCAP" => "5",
320  "INSTR" => "5",
321  "LAST_DAY" => "5",
322  "LENGTH" => "5",
323  "LN" => "5",
324  "LOG" => "5",
325  "LOWER" => "5",
326  "LPAD" => "5",
327  "LTRIM" => "5",
328  "MONTHS_BETWEEN" => "5",
329  "NEXT_DAY" => "5",
330  "NEW_TIME" => "5",
331  "NLS_INITCAP" => "5",
332  "NLS_LOWER" => "5",
333  "NLS_UPPER" => "5",
334  "NVL" => "5",
335  "POWER" => "5",
336  "RAWTOHEX" => "5",
337  "ROUND" => "5",
338  "ROWIDTOCHAR" => "5",
339  "RPAD" => "5",
340  "RTRIM" => "5",
341  "SIGN" => "5",
342  "SIN" => "5",
343  "SINH" => "5",
344  "SOUNDEX" => "5",
345  "SQRT" => "5",
346  "SUBSTR" => "5",
347  "SUBSTRB" => "5",
348  "TAN" => "5",
349  "TANH" => "5",
350  "TO_CHAR" => "5",
351  "TO_DATE" => "5",
352  "TO_LABEL" => "5",
353  "TO_MULTI_BYTE" => "5",
354  "TO_NUMBER" => "5",
355  "TO_SINGLE_TYPE" => "5",
356  "TRANSLATE" => "5",
357  "TRUNC" => "5",
358  "UPPER" => "5",
359  "USERENV" => "5",
360  "VSIZE" => "5",
361  "BEFORE" => "6",
362  "EACH" => "6",
363  "KEY" => "6",
364  "PRIMARY" => "6");
365 
366 // Special extensions
367 
368 // Each category can specify a PHP function that returns an altered
369 // version of the keyword.
370 
371 
372 
373 $this->linkscripts = array(
374  "1" => "donothing",
375  "6" => "donothing",
376  "4" => "donothing",
377  "5" => "donothing",
378  "2" => "donothing",
379  "3" => "donothing");
380 }
381 
382 
383 function donothing($keywordin)
384 {
385  return $keywordin;
386 }
387 
388 }?>