ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_ib_sql.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_ib_sql extends HFile{
6  function HFile_ib_sql(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // IB 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", "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  "ACTION" => "1",
46  "ACTIVE" => "1",
47  "ADD" => "1",
48  "ADMIN" => "1",
49  "AFTER" => "1",
50  "ALL" => "1",
51  "ALTER" => "1",
52  "AND" => "1",
53  "ANY" => "1",
54  "AS" => "1",
55  "ASC" => "1",
56  "ASCENDING" => "1",
57  "AT" => "1",
58  "AUTO" => "1",
59  "AUTODDL" => "1",
60  "BASED" => "1",
61  "BASENAME" => "1",
62  "BASE_NAME" => "1",
63  "BEFORE" => "1",
64  "BEGIN" => "1",
65  "BETWEEN" => "1",
66  "BLOB" => "1",
67  "BLOBEDIT" => "1",
68  "BUFFER" => "1",
69  "BY" => "1",
70  "CACHE" => "1",
71  "CASCADE" => "1",
72  "CHARACTER" => "1",
73  "CHARACTER_LENGTH" => "1",
74  "CHAR_LENGTH" => "1",
75  "CHECK" => "1",
76  "CHECK_POINT_LEN" => "1",
77  "CHECK_POINT_LENGTH" => "1",
78  "COLLATE" => "1",
79  "COLLATION" => "1",
80  "COLUMN" => "1",
81  "COMMIT" => "1",
82  "COMMITTED" => "1",
83  "COMPILETIME" => "1",
84  "COMPUTED" => "1",
85  "CLOSE" => "1",
86  "CONDITIONAL" => "1",
87  "CONNECT" => "1",
88  "CONSTRAINT" => "1",
89  "CONTAINING" => "1",
90  "CONTINUE" => "1",
91  "CREATE" => "1",
92  "CURRENT" => "1",
93  "CURSOR" => "1",
94  "DATABASE" => "1",
95  "DB_KEY" => "1",
96  "DEBUG" => "1",
97  "DEC" => "1",
98  "DECLARE" => "1",
99  "DEFAULT" => "1",
100  "DELETE" => "1",
101  "DESC" => "1",
102  "DESCENDING" => "1",
103  "DESCRIBE" => "1",
104  "DESCRIPTOR" => "1",
105  "DISCONNECT" => "1",
106  "DISPLAY" => "1",
107  "DISTINCT" => "1",
108  "DO" => "1",
109  "DOMAIN" => "1",
110  "DROP" => "1",
111  "ECHO" => "1",
112  "EDIT" => "1",
113  "ELSE" => "1",
114  "END" => "1",
115  "ENTRY_POINT" => "1",
116  "ESCAPE" => "1",
117  "EVENT" => "1",
118  "EXCEPTION" => "1",
119  "EXECUTE" => "1",
120  "EXISTS" => "1",
121  "EXIT" => "1",
122  "EXTERN" => "1",
123  "EXTERNAL" => "1",
124  "EXTRACT" => "1",
125  "FETCH" => "1",
126  "FILE" => "1",
127  "FILTER" => "1",
128  "FOR" => "1",
129  "FOREIGN" => "1",
130  "FOUND" => "1",
131  "FREE_IT" => "1",
132  "FROM" => "1",
133  "FULL" => "1",
134  "FUNCTION" => "1",
135  "GDSCODE" => "1",
136  "GENERATOR" => "1",
137  "GEN_ID" => "1",
138  "GLOBAL" => "1",
139  "GOTO" => "1",
140  "GRANT" => "1",
141  "GROUP" => "1",
142  "GROUP_COMMIT_WAIT" => "1",
143  "GROUP_COMMIT_WAIT_TIME" => "1",
144  "HAVING" => "1",
145  "HELP" => "1",
146  "IF" => "1",
147  "IMMEDIATE" => "1",
148  "IN" => "1",
149  "INACTIVE" => "1",
150  "INDEX" => "1",
151  "INDICATOR" => "1",
152  "INIT" => "1",
153  "INNER" => "1",
154  "INPUT" => "1",
155  "INPUT_TYPE" => "1",
156  "INSERT" => "1",
157  "INTO" => "1",
158  "IS" => "1",
159  "ISOLATION" => "1",
160  "ISQL" => "1",
161  "JOIN" => "1",
162  "KEY" => "1",
163  "LC_MESSAGES" => "1",
164  "LC_TYPE" => "1",
165  "LEFT" => "1",
166  "LENGTH" => "1",
167  "LEV" => "1",
168  "LEVEL" => "1",
169  "LIKE" => "1",
170  "LOGFILE" => "1",
171  "LOG_BUFFER_SIZE" => "1",
172  "LOG_BUF_SIZE" => "1",
173  "LONG" => "1",
174  "MANUAL" => "1",
175  "MAXIMUM_SEGMENT" => "1",
176  "MAX_SEGMENT" => "1",
177  "MERGE" => "1",
178  "MESSAGE" => "1",
179  "MODULE_NAME" => "1",
180  "NAMES" => "1",
181  "NATIONAL" => "1",
182  "NATURAL" => "1",
183  "NO" => "1",
184  "NOAUTO" => "1",
185  "NOT" => "1",
186  "NUM_LOG_BUFS" => "1",
187  "NUM_LOG_BUFFERS" => "1",
188  "OCTET_LENGTH" => "1",
189  "OF" => "1",
190  "ON" => "1",
191  "ONLY" => "1",
192  "OPEN" => "1",
193  "OPTION" => "1",
194  "OR" => "1",
195  "ORDER" => "1",
196  "OUTER" => "1",
197  "OUTPUT" => "1",
198  "OUTPUT_TYPE" => "1",
199  "OVERFLOW" => "1",
200  "PAGE" => "1",
201  "PAGELENGTH" => "1",
202  "PAGES" => "1",
203  "PAGE_SIZE" => "1",
204  "PARAMETER" => "1",
205  "PASSWORD" => "1",
206  "PLAN" => "1",
207  "POSITION" => "1",
208  "POST_EVENT" => "1",
209  "PRECISION" => "1",
210  "PREPARE" => "1",
211  "PROCEDURE" => "1",
212  "PROTECTED" => "1",
213  "PRIMARY" => "1",
214  "PRIVILEGES" => "1",
215  "PUBLIC" => "1",
216  "QUIT" => "1",
217  "RAW_PARTITIONS" => "1",
218  "RDB$DB_KEY" => "1",
219  "READ" => "1",
220  "RECORD_VERSION" => "1",
221  "REFERENCES" => "1",
222  "RELEASE" => "1",
223  "RESERV" => "1",
224  "RESERVING" => "1",
225  "RESTRICT" => "1",
226  "RETAIN" => "1",
227  "RETURN" => "1",
228  "RETURNING_VALUES" => "1",
229  "RETURNS" => "1",
230  "REVOKE" => "1",
231  "RIGHT" => "1",
232  "ROLE" => "1",
233  "ROLLBACK" => "1",
234  "RUNTIME" => "1",
235  "SCHEMA" => "1",
236  "SEGMENT" => "1",
237  "SELECT" => "1",
238  "SET" => "1",
239  "SHADOW" => "1",
240  "SHARED" => "1",
241  "SHELL" => "1",
242  "SHOW" => "1",
243  "SINGULAR" => "1",
244  "SIZE" => "1",
245  "SNABeautifierOT" => "1",
246  "SOME" => "1",
247  "SORT" => "1",
248  "SQL" => "1",
249  "SQLERROR" => "1",
250  "SQLWARNING" => "1",
251  "STABILITY" => "1",
252  "STARTING" => "1",
253  "STARTS" => "1",
254  "STATEMENT" => "1",
255  "STATIC" => "1",
256  "STATISTICS" => "1",
257  "SUB_TYPE" => "1",
258  "SUSPEND" => "1",
259  "TABLE" => "1",
260  "TERMINATOR" => "1",
261  "THEN" => "1",
262  "TO" => "1",
263  "TRANSACTION" => "1",
264  "TRANSLATE" => "1",
265  "TRANSLATION" => "1",
266  "TRIGGER" => "1",
267  "TRIM" => "1",
268  "UNCOMMITTED" => "1",
269  "UNION" => "1",
270  "UNIQUE" => "1",
271  "UPDATE" => "1",
272  "UPPER" => "1",
273  "USING" => "1",
274  "VALUE" => "1",
275  "VALUES" => "1",
276  "VARIABLE" => "1",
277  "VERSION" => "1",
278  "VIEW" => "1",
279  "WAIT" => "1",
280  "WHEN" => "1",
281  "WHENEVER" => "1",
282  "WHERE" => "1",
283  "WHILE" => "1",
284  "WITH" => "1",
285  "WORK" => "1",
286  "WRITE" => "1",
287  "AVG" => "2",
288  "COUNT" => "2",
289  "CAST" => "2",
290  "MAX" => "2",
291  "MAXIMUM" => "2",
292  "MIN" => "2",
293  "MINIMUM" => "2",
294  "NULL" => "2",
295  "NOW" => "2",
296  "SQLCODE" => "2",
297  "SUM" => "2",
298  "USER" => "2",
299  "bool" => "3",
300  "CHAR" => "3",
301  "DATE" => "3",
302  "CSTRING" => "3",
303  "DECIMAL" => "3",
304  "DOUBLE" => "3",
305  "FLOAT" => "3",
306  "INT" => "3",
307  "INTEGER" => "3",
308  "hbool" => "3",
309  "NCHAR" => "3",
310  "NUMERIC" => "3",
311  "REAL" => "3",
312  "SMALLINT" => "3",
313  "TIME" => "3",
314  "VARCHAR" => "3",
315  "VARYING" => "3");
316 
317 // Special extensions
318 
319 // Each category can specify a PHP function that returns an altered
320 // version of the keyword.
321 
322 
323 
324 $this->linkscripts = array(
325  "1" => "donothing",
326  "2" => "donothing",
327  "3" => "donothing");
328 }
329 
330 
331 function donothing($keywordin)
332 {
333  return $keywordin;
334 }
335 
336 }?>