ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_teradatasql.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_teradatasql extends HFile{
6  function HFile_teradatasql(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // Teradata SQL
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", "gray", "purple");
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  "ABORTSESSION" => "1",
47  "ABS" => "1",
48  "ACCESS_LOCK" => "1",
49  "ACCOUNT" => "1",
50  "ADD" => "1",
51  "ADD_MONTHS" => "1",
52  "AFTER" => "1",
53  "ALIAS" => "1",
54  "ALL" => "1",
55  "ALTER" => "1",
56  "AMP" => "1",
57  "AND" => "1",
58  "ANSIDATE" => "1",
59  "ANY" => "1",
60  "AS" => "1",
61  "ASC" => "1",
62  "ASCII" => "1",
63  "AT" => "1",
64  "ATOMIC" => "1",
65  "AUTHORIZATION" => "1",
66  "AVE" => "1",
67  "AVERAGE" => "1",
68  "AVG" => "1",
69  "BACKUP" => "1",
70  "BEFORE" => "1",
71  "BEGIN" => "1",
72  "BETWEEN" => "1",
73  "BOTH" => "1",
74  "BT" => "1",
75  "BUT" => "1",
76  "BY" => "1",
77  "BYTE" => "1",
78  "BYTEINT" => "1",
79  "BYTES" => "1",
80  "CASE" => "1",
81  "CASESPECIFIC" => "1",
82  "CAST" => "1",
83  "CD" => "1",
84  "CHAR" => "1",
85  "CHAR2HEXINT" => "1",
86  "CHARACTER" => "1",
87  "CHARACTERS" => "1",
88  "CHARACTER_LENGTH" => "1",
89  "CHARS" => "1",
90  "CHAR_LENGTH" => "1",
91  "CHECK" => "1",
92  "CHECKPOINT" => "1",
93  "CHECKSUM" => "1",
94  "CLUSTER" => "1",
95  "CM" => "1",
96  "COALESCE" => "1",
97  "COLLATION" => "1",
98  "COLLECT" => "1",
99  "COLUMN" => "1",
100  "COMMENT" => "1",
101  "COMMIT" => "1",
102  "COMPRESS" => "1",
103  "CONSTRAINT" => "1",
104  "CONVERT" => "1",
105  "CONVERT_TABLE_HEADER" => "1",
106  "COUNT" => "1",
107  "CREATE" => "1",
108  "CROSS" => "1",
109  "CS" => "1",
110  "CSUM" => "1",
111  "CT" => "1",
112  "CURRENT" => "1",
113  "CURRENT_DATE" => "1",
114  "CURRENT_TIME" => "1",
115  "CURRENT_TIMESTAMP" => "1",
116  "CURSOR" => "1",
117  "CV" => "1",
118  "DATABASE" => "1",
119  "DATABLOCKSIZE" => "1",
120  "DATE" => "1",
121  "DATEFORM" => "1",
122  "DAY" => "1",
123  "DEC" => "1",
124  "DECIMAL" => "1",
125  "DEFAULT" => "1",
126  "DEL" => "1",
127  "DELETE" => "1",
128  "DESC" => "1",
129  "DESCRIPTOR" => "1",
130  "DIAGNOSTIC" => "1",
131  "DISABLED" => "1",
132  "DISTINCT" => "1",
133  "DOUBLE" => "1",
134  "DROP" => "1",
135  "DUAL" => "1",
136  "DUMP" => "1",
137  "EACH" => "1",
138  "EBCDIC" => "1",
139  "ECHO" => "1",
140  "ELSE" => "1",
141  "ENABLED" => "1",
142  "END" => "1",
143  "EQ" => "1",
144  "ERROR" => "1",
145  "ERRORFILES" => "1",
146  "ERRORTABLES" => "1",
147  "ESCAPE" => "1",
148  "ET" => "1",
149  "EXCEPT" => "1",
150  "EXCL" => "1",
151  "EXCLUSIVE" => "1",
152  "EXEC" => "1",
153  "EXECUTE" => "1",
154  "EXISTS" => "1",
155  "EXP" => "1",
156  "EXPLAIN" => "1",
157  "EXTRACT" => "1",
158  "FALLBACK" => "1",
159  "FASTEXPORT" => "1",
160  "FIRST" => "1",
161  "FLOAT" => "1",
162  "FOR" => "1",
163  "FOREIGN" => "1",
164  "FORMAT" => "1",
165  "FREESPACE" => "1",
166  "FROM" => "1",
167  "FULL" => "1",
168  "GE" => "1",
169  "GIVE" => "1",
170  "GLOBAL" => "1",
171  "GO" => "1",
172  "GOTO" => "1",
173  "GRANT" => "1",
174  "GRAPHIC" => "1",
175  "GROUP" => "1",
176  "GT" => "1",
177  "HASH" => "1",
178  "HASHAMP" => "1",
179  "HASHBAKAMP" => "1",
180  "HASHBUCKET" => "1",
181  "HASHROW" => "1",
182  "HAVING" => "1",
183  "HELP" => "1",
184  "HOUR" => "1",
185  "IMMEDIATE" => "1",
186  "IN" => "1",
187  "INCONSISTENT" => "1",
188  "INDEX" => "1",
189  "INDICATOR" => "1",
190  "INITIATE" => "1",
191  "INNER" => "1",
192  "INS" => "1",
193  "INSERT" => "1",
194  "INSTEAD" => "1",
195  "INT" => "1",
196  "INTEGER" => "1",
197  "INTEGERDATE" => "1",
198  "INTERSECT" => "1",
199  "INTERVAL" => "1",
200  "INTO" => "1",
201  "IS" => "1",
202  "JOIN" => "1",
203  "JOURNAL" => "1",
204  "KANJI1" => "1",
205  "KANJISJIS" => "1",
206  "KBYTES" => "1",
207  "KEY" => "1",
208  "KILOBYTES" => "1",
209  "LAST" => "1",
210  "LATIN" => "1",
211  "LE" => "1",
212  "LEADING" => "1",
213  "LEFT" => "1",
214  "LEVEL" => "1",
215  "LIKE" => "1",
216  "LN" => "1",
217  "LOADING" => "1",
218  "LOCAL" => "1",
219  "LOCK" => "1",
220  "LOCKING" => "1",
221  "LOG" => "1",
222  "LOGGING" => "1",
223  "LOGON" => "1",
224  "LONG" => "1",
225  "LOWER" => "1",
226  "LT" => "1",
227  "MACRO" => "1",
228  "MAVG" => "1",
229  "MAX" => "1",
230  "MAXIMUM" => "1",
231  "MCHARACTERS" => "1",
232  "MDIFF" => "1",
233  "MIN" => "1",
234  "MINDEX" => "1",
235  "MINIMUM" => "1",
236  "MINUS" => "1",
237  "MINUTE" => "1",
238  "MLINREG" => "1",
239  "MLOAD" => "1",
240  "MOD" => "1",
241  "MODE" => "1",
242  "MODIFY" => "1",
243  "MONITOR" => "1",
244  "MONRESOURCE" => "1",
245  "MONSESSION" => "1",
246  "MONTH" => "1",
247  "MSUBSTR" => "1",
248  "MSUM" => "1",
249  "MULTISET" => "1",
250  "NAMED" => "1",
251  "NATURAL" => "1",
252  "NE" => "1",
253  "NEW" => "1",
254  "NEW_TABLE" => "1",
255  "NO" => "1",
256  "NOT" => "1",
257  "NOWAIT" => "1",
258  "NULL" => "1",
259  "NULLIF" => "1",
260  "NULLIFZERO" => "1",
261  "NUMERIC" => "1",
262  "OCTET_LENGTH" => "1",
263  "OF" => "1",
264  "OFF" => "1",
265  "OLD" => "1",
266  "OLD_TABLE" => "1",
267  "ON" => "1",
268  "OPTION" => "1",
269  "OR" => "1",
270  "ORDER" => "1",
271  "OUTER" => "1",
272  "OVERLAP" => "1",
273  "OVERLAPS" => "1",
274  "OVERRIDE" => "1",
275  "PASSWORD" => "1",
276  "PERCENT" => "1",
277  "PERM" => "1",
278  "PERMANENT" => "1",
279  "PN" => "1",
280  "POSITION" => "1",
281  "PRECISION" => "1",
282  "PRESERVE" => "1",
283  "PRIMARY" => "1",
284  "PRIVATE" => "1",
285  "PRIVILEGES" => "1",
286  "PROTECTION" => "1",
287  "PUBLIC" => "1",
288  "QUALIFY" => "1",
289  "QUANTILE" => "1",
290  "RANK" => "1",
291  "READ" => "1",
292  "REAL" => "1",
293  "REFERENCES" => "1",
294  "REFERENCING" => "1",
295  "RELEASE" => "1",
296  "RENAME" => "1",
297  "REPLACE" => "1",
298  "REPLICATION" => "1",
299  "REPOVERRIDE" => "1",
300  "REQUEST" => "1",
301  "RESTART" => "1",
302  "RESTORE" => "1",
303  "RESUME" => "1",
304  "RET" => "1",
305  "RETRIEVE" => "1",
306  "REVALIDATE" => "1",
307  "REVOKE" => "1",
308  "RIGHT" => "1",
309  "RIGHTS" => "1",
310  "ROLE" => "1",
311  "ROLLBACK" => "1",
312  "ROLLFORWARD" => "1",
313  "ROW" => "1",
314  "ROWID" => "1",
315  "SAMPLE" => "1",
316  "SAMPLEID" => "1",
317  "SECOND" => "1",
318  "SEL" => "1",
319  "SELECT" => "1",
320  "SESSION" => "1",
321  "SET" => "1",
322  "SETRESRATE" => "1",
323  "SETSESSRATE" => "1",
324  "SHARE" => "1",
325  "SHOW" => "1",
326  "SMALLINT" => "1",
327  "SOME" => "1",
328  "SPOOL" => "1",
329  "SQRT" => "1",
330  "SS" => "1",
331  "STARTUP" => "1",
332  "STATEMENT" => "1",
333  "STATISTICS" => "1",
334  "STRING_CHK" => "1",
335  "STRING_CS" => "1",
336  "SUBSCRIBER" => "1",
337  "SUBSTR" => "1",
338  "SUBSTRING" => "1",
339  "SUM" => "1",
340  "SUSPEND" => "1",
341  "SYS_CALENDAR" => "1",
342  "TABLE" => "1",
343  "TBL_CS" => "1",
344  "TEMPORARY" => "1",
345  "TERMINATE" => "1",
346  "THEN" => "1",
347  "TIME" => "1",
348  "TIMESTAMP" => "1",
349  "TIMEZONE_HOUR" => "1",
350  "TIMEZONE_MINUTE" => "1",
351  "TITLE" => "1",
352  "TO" => "1",
353  "TRAILING" => "1",
354  "TRANSACTION" => "1",
355  "TRANSLATE" => "1",
356  "TRANSLATE_CHK" => "1",
357  "TRIGGER" => "1",
358  "TRIM" => "1",
359  "TYPE" => "1",
360  "UC" => "1",
361  "UNDEFINED" => "1",
362  "UNICODE" => "1",
363  "UNION" => "1",
364  "UNIQUE" => "1",
365  "UPD" => "1",
366  "UPDATE" => "1",
367  "UPPER" => "1",
368  "UPPERCASE" => "1",
369  "USER" => "1",
370  "USING" => "1",
371  "VALUES" => "1",
372  "VARBYTE" => "1",
373  "VARCHAR" => "1",
374  "VARGRAPHIC" => "1",
375  "VARYING" => "1",
376  "VIEW" => "1",
377  "VOLATILE" => "1",
378  "WAIT" => "1",
379  "WHEN" => "1",
380  "WHERE" => "1",
381  "WITH" => "1",
382  "WORK" => "1",
383  "WRITE" => "1",
384  "YEAR" => "1",
385  "ZEROIFNULL" => "1",
386  "ZONE" => "1",
387  "=" => "3",
388  "BTEQ" => "2",
389  "CHARSET" => "2",
390  "CMS" => "2",
391  "CONTROLS" => "2",
392  "DEFAULTS" => "2",
393  "ECHOREQ" => "2",
394  "ERRORLEVEL" => "2",
395  "ERROROUT" => "2",
396  "EXECUTION" => "2",
397  "EXIT" => "2",
398  "EXPORT" => "2",
399  "FOLDLINE" => "2",
400  "FOOTING" => "2",
401  "FORMCHAR" => "2",
402  "HALT" => "2",
403  "HANG" => "2",
404  "HEADING" => "2",
405  "IF" => "2",
406  "IMPORT" => "2",
407  "INDICDATA" => "2",
408  "LABEL" => "2",
409  "LOGOFF" => "2",
410  "MAXERROR" => "2",
411  "OMIT" => "2",
412  "PAGEBREAK" => "2",
413  "PAGELENGTH" => "2",
414  "QUIET" => "2",
415  "QUIT" => "2",
416  "RECORDMODE" => "2",
417  "REMARK" => "2",
418  "REPEAT" => "2",
419  "RETCANCEL" => "2",
420  "RETLIMIT" => "2",
421  "RETRY" => "2",
422  "RTITLE" => "2",
423  "RUN" => "2",
424  "SEPARATOR" => "2",
425  "SESSIONS" => "2",
426  "SIDETITLES" => "2",
427  "SKIPDOUBLE" => "2",
428  "SKIPLINE" => "2",
429  "SQLFLAG" => "2",
430  "SUPPRESS" => "2",
431  "TDP" => "2",
432  "TITLEDASHES" => "2",
433  "TSO" => "2",
434  "UNDERLINE" => "2",
435  "VERSIONS" => "2",
436  "WIDTH" => "2",
437  "!" => "3",
438  "\"" => "3",
439  "$" => "3",
440  "%" => "3",
441  "&" => "3",
442  "'" => "3",
443  "(" => "3",
444  ")" => "3",
445  "*" => "3",
446  "+" => "3",
447  "," => "3",
448  "-" => "3",
449  "." => "3",
450  ":" => "3",
451  ";" => "3",
452  "<" => "3",
453  ">" => "3",
454  "?" => "3",
455  "@" => "3",
456  "[" => "3",
457  "\\" => "3",
458  "]" => "3",
459  "^" => "3",
460  "{" => "3",
461  "|" => "3",
462  "}" => "3",
463  "~" => "3");
464 
465 // Special extensions
466 
467 // Each category can specify a PHP function that returns an altered
468 // version of the keyword.
469 
470 
471 
472 $this->linkscripts = array(
473  "1" => "donothing",
474  "3" => "donothing",
475  "2" => "donothing");
476 }
477 
478 
479 function donothing($keywordin)
480 {
481  return $keywordin;
482 }
483 
484 }?>