ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_ampl.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_ampl extends HFile{
6  function HFile_ampl(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // AMPL
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", "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  "and" => "1",
46  "arc" => "1",
47  "by" => "1",
48  "check" => "1",
49  "cross" => "1",
50  "close" => "1",
51  "diff" => "1",
52  "difference" => "1",
53  "div" => "1",
54  "data" => "1",
55  "display" => "1",
56  "drop" => "1",
57  "else" => "1",
58  "exists" => "1",
59  "end" => "1",
60  "forall" => "1",
61  "fix" => "1",
62  "function" => "1",
63  "if" => "1",
64  "in" => "1",
65  "inter" => "1",
66  "intersection" => "1",
67  "interval" => "1",
68  "include" => "1",
69  "less" => "1",
70  "let" => "1",
71  "maximize" => "1",
72  "minimize" => "1",
73  "min" => "1",
74  "max" => "1",
75  "mod" => "1",
76  "model" => "1",
77  "node" => "1",
78  "not" => "1",
79  "or" => "1",
80  "objective" => "1",
81  "option" => "1",
82  "param" => "1",
83  "prod" => "1",
84  "product" => "1",
85  "print" => "1",
86  "printf" => "1",
87  "quit" => "1",
88  "reset" => "1",
89  "restore" => "1",
90  "set" => "1",
91  "setof" => "1",
92  "subject" => "1",
93  "subj" => "1",
94  "s.t." => "1",
95  "symdiff" => "1",
96  "sum" => "1",
97  "shell" => "1",
98  "solution" => "1",
99  "then" => "1",
100  "to" => "1",
101  "union" => "1",
102  "update" => "1",
103  "unfix" => "1",
104  "var" => "1",
105  "write" => "1",
106  "binary" => "2",
107  "circular" => "2",
108  "coeff" => "2",
109  "coef" => "2",
110  "cover" => "2",
111  "dimen" => "2",
112  "dimension" => "2",
113  "default" => "2",
114  "display_1col" => "2",
115  "display_eps" => "2",
116  "display_max_2d_cols" => "2",
117  "display_precison" => "2",
118  "display_round" => "2",
119  "display_transpose" => "2",
120  "display_width" => "2",
121  "from" => "2",
122  "gutter_width" => "2",
123  "integer" => "2",
124  "Infinity" => "2",
125  "ordered" => "2",
126  "obj" => "2",
127  "objective_precision" => "2",
128  "omit_zero_cols" => "2",
129  "omit_zero_rows" => "2",
130  "output_precision" => "2",
131  "print_precision" => "2",
132  "print_round" => "2",
133  "print_seperator" => "2",
134  "symbolic" => "2",
135  "within" => "2",
136  "abs" => "3",
137  "acos" => "3",
138  "acosh" => "3",
139  "alias" => "3",
140  "asin" => "3",
141  "asinh" => "3",
142  "atan" => "3",
143  "atan2" => "3",
144  "atanh" => "3",
145  "Beta" => "3",
146  "ceil" => "3",
147  "cos" => "3",
148  "card" => "3",
149  "Cauchy" => "3",
150  "exp" => "3",
151  "Exponential" => "3",
152  "floor" => "3",
153  "first" => "3",
154  "Gamma" => "3",
155  "Irand224" => "3",
156  "int" => "3",
157  "log" => "3",
158  "log10" => "3",
159  "last" => "3",
160  "member" => "3",
161  "Normal" => "3",
162  "next" => "3",
163  "nextw" => "3",
164  "ord" => "3",
165  "ord0" => "3",
166  "Poisson" => "3",
167  "precision" => "3",
168  "prev" => "3",
169  "prevw" => "3",
170  "round" => "3",
171  "sin" => "3",
172  "sinh" => "3",
173  "sqrt" => "3",
174  "tan" => "3",
175  "tanh" => "3",
176  "trunc" => "3",
177  "Uniform" => "3",
178  "Uniform01" => "3");
179 
180 // Special extensions
181 
182 // Each category can specify a PHP function that returns an altered
183 // version of the keyword.
184 
185 
186 
187 $this->linkscripts = array(
188  "1" => "donothing",
189  "2" => "donothing",
190  "3" => "donothing");
191 }
192 
193 
194 function donothing($keywordin)
195 {
196  return $keywordin;
197 }
198 
199 }?>