ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_wapscript.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_wapscript extends HFile{
6  function HFile_wapscript(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // WAPScript
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", "brown");
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  ";" => "1",
46  "access" => "1",
47  "agent" => "1",
48  "block" => "1",
49  "break" => "1",
50  "case" => "1",
51  "catch" => "1",
52  "class" => "1",
53  "Console" => "1",
54  "const" => "1",
55  "continue" => "1",
56  "debugger" => "1",
57  "defaut" => "1",
58  "delete" => "1",
59  "Dialogs" => "1",
60  "div" => "1",
61  "do" => "1",
62  "domain" => "1",
63  "else" => "1",
64  "empty" => "1",
65  "enum" => "1",
66  "export" => "1",
67  "extends" => "1",
68  "expression" => "1",
69  "extern" => "1",
70  "finally" => "1",
71  "Float" => "1",
72  "for" => "1",
73  "function" => "1",
74  "header" => "1",
75  "http" => "1",
76  "if" => "1",
77  "import" => "1",
78  "in" => "1",
79  "Lang" => "1",
80  "lib" => "1",
81  "main" => "1",
82  "meta" => "1",
83  "name" => "1",
84  "new" => "1",
85  "null" => "1",
86  "path" => "1",
87  "private" => "1",
88  "public" => "1",
89  "return" => "1",
90  "sizeot" => "1",
91  "String" => "1",
92  "super" => "1",
93  "switch" => "1",
94  "throw" => "1",
95  "this" => "1",
96  "try" => "1",
97  "typeof" => "1",
98  "URL" => "1",
99  "use" => "1",
100  "var" => "1",
101  "varialbe" => "1",
102  "void" => "1",
103  "while" => "1",
104  "with" => "1",
105  "WMLBrowser" => "1",
106  "{" => "2",
107  "}" => "2",
108  "(" => "2",
109  ")" => "2",
110  "'" => "3",
111  "\"" => "3",
112  "\\" => "3",
113  "abort" => "3",
114  "abs" => "3",
115  "alvert" => "3",
116  "cell" => "3",
117  "characterSet" => "3",
118  "charAt" => "3",
119  "compare" => "3",
120  "confirm" => "3",
121  "elementAt" => "3",
122  "elements" => "3",
123  "escapeString" => "3",
124  "exit" => "3",
125  "find" => "3",
126  "floor" => "3",
127  "format" => "3",
128  "getBase" => "3",
129  "getCurrentCard" => "3",
130  "getFragment" => "3",
131  "getHost" => "3",
132  "getParameters" => "3",
133  "getPath" => "3",
134  "getPort" => "3",
135  "getQuery" => "3",
136  "getReferer" => "3",
137  "getScheme" => "3",
138  "getVar" => "3",
139  "go" => "3",
140  "insertAt" => "3",
141  "int" => "3",
142  "isEmpty" => "3",
143  "isFloat" => "3",
144  "isInt" => "3",
145  "isValid" => "3",
146  "length" => "3",
147  "loadString" => "3",
148  "max" => "3",
149  "maxFloat" => "3",
150  "maxInt" => "3",
151  "min" => "3",
152  "minFloat" => "3",
153  "minInt" => "3",
154  "newContext" => "3",
155  "parseFloat" => "3",
156  "parseInt" => "3",
157  "pow" => "3",
158  "prev" => "3",
159  "print" => "3",
160  "println" => "3",
161  "prompt" => "3",
162  "random" => "3",
163  "refresh" => "3",
164  "removeAt" => "3",
165  "replace" => "3",
166  "replaceAt" => "3",
167  "resolve" => "3",
168  "round" => "3",
169  "seed" => "3",
170  "setVar" => "3",
171  "sqrt" => "3",
172  "squeeze" => "3",
173  "subString" => "3",
174  "toString" => "3",
175  "trim" => "3",
176  "unescapeString" => "3",
177  "+" => "4",
178  "-" => "4",
179  "=" => "4",
180  "*" => "4",
181  "//" => "4",
182  "/" => "4",
183  "%" => "4",
184  "&" => "4",
185  "<=" => "4",
186  "<" => "4",
187  ">=" => "4",
188  ">" => "4",
189  "!" => "4",
190  "|" => "4");
191 
192 // Special extensions
193 
194 // Each category can specify a PHP function that returns an altered
195 // version of the keyword.
196 
197 
198 
199 $this->linkscripts = array(
200  "1" => "donothing",
201  "2" => "donothing",
202  "3" => "donothing",
203  "4" => "donothing");
204 }
205 
206 
207 function donothing($keywordin)
208 {
209  return $keywordin;
210 }
211 
212 }?>