ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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)) {
4  return;
5 }
6 require_once("$BEAUT_PATH/Beautifier/HFile.php");
7  class HFile_ampl extends HFile
8  {
9  public function HFile_ampl()
10  {
11  $this->HFile();
12  /*************************************/
13  // Beautifier Highlighting Configuration File
14  // AMPL
15  /*************************************/
16  // Flags
17 
18  $this->nocase = "0";
19  $this->notrim = "0";
20  $this->perl = "0";
21 
22  // Colours
23 
24  $this->colours = array("blue", "purple", "gray");
25  $this->quotecolour = "blue";
26  $this->blockcommentcolour = "green";
27  $this->linecommentcolour = "green";
28 
29  // Indent Strings
30 
31  $this->indent = array("{");
32  $this->unindent = array("}");
33 
34  // String characters and delimiters
35 
36  $this->stringchars = array("\"", "'");
37  $this->delimiters = array("~", "!", "@", "$", "%", "^", "*", "(", ")", "+", "=", "\\", "|", "&", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", "?");
38  $this->escchar = "";
39 
40  // Comment settings
41 
42  $this->linecommenton = array("#");
43  $this->blockcommenton = array("/*");
44  $this->blockcommentoff = array("*/");
45 
46  // Keywords (keyword mapping to colour number)
47 
48  $this->keywords = array(
49  "and" => "1",
50  "arc" => "1",
51  "by" => "1",
52  "check" => "1",
53  "cross" => "1",
54  "close" => "1",
55  "diff" => "1",
56  "difference" => "1",
57  "div" => "1",
58  "data" => "1",
59  "display" => "1",
60  "drop" => "1",
61  "else" => "1",
62  "exists" => "1",
63  "end" => "1",
64  "forall" => "1",
65  "fix" => "1",
66  "function" => "1",
67  "if" => "1",
68  "in" => "1",
69  "inter" => "1",
70  "intersection" => "1",
71  "interval" => "1",
72  "include" => "1",
73  "less" => "1",
74  "let" => "1",
75  "maximize" => "1",
76  "minimize" => "1",
77  "min" => "1",
78  "max" => "1",
79  "mod" => "1",
80  "model" => "1",
81  "node" => "1",
82  "not" => "1",
83  "or" => "1",
84  "objective" => "1",
85  "option" => "1",
86  "param" => "1",
87  "prod" => "1",
88  "product" => "1",
89  "print" => "1",
90  "printf" => "1",
91  "quit" => "1",
92  "reset" => "1",
93  "restore" => "1",
94  "set" => "1",
95  "setof" => "1",
96  "subject" => "1",
97  "subj" => "1",
98  "s.t." => "1",
99  "symdiff" => "1",
100  "sum" => "1",
101  "shell" => "1",
102  "solution" => "1",
103  "then" => "1",
104  "to" => "1",
105  "union" => "1",
106  "update" => "1",
107  "unfix" => "1",
108  "var" => "1",
109  "write" => "1",
110  "binary" => "2",
111  "circular" => "2",
112  "coeff" => "2",
113  "coef" => "2",
114  "cover" => "2",
115  "dimen" => "2",
116  "dimension" => "2",
117  "default" => "2",
118  "display_1col" => "2",
119  "display_eps" => "2",
120  "display_max_2d_cols" => "2",
121  "display_precison" => "2",
122  "display_round" => "2",
123  "display_transpose" => "2",
124  "display_width" => "2",
125  "from" => "2",
126  "gutter_width" => "2",
127  "integer" => "2",
128  "Infinity" => "2",
129  "ordered" => "2",
130  "obj" => "2",
131  "objective_precision" => "2",
132  "omit_zero_cols" => "2",
133  "omit_zero_rows" => "2",
134  "output_precision" => "2",
135  "print_precision" => "2",
136  "print_round" => "2",
137  "print_seperator" => "2",
138  "symbolic" => "2",
139  "within" => "2",
140  "abs" => "3",
141  "acos" => "3",
142  "acosh" => "3",
143  "alias" => "3",
144  "asin" => "3",
145  "asinh" => "3",
146  "atan" => "3",
147  "atan2" => "3",
148  "atanh" => "3",
149  "Beta" => "3",
150  "ceil" => "3",
151  "cos" => "3",
152  "card" => "3",
153  "Cauchy" => "3",
154  "exp" => "3",
155  "Exponential" => "3",
156  "floor" => "3",
157  "first" => "3",
158  "Gamma" => "3",
159  "Irand224" => "3",
160  "int" => "3",
161  "log" => "3",
162  "log10" => "3",
163  "last" => "3",
164  "member" => "3",
165  "Normal" => "3",
166  "next" => "3",
167  "nextw" => "3",
168  "ord" => "3",
169  "ord0" => "3",
170  "Poisson" => "3",
171  "precision" => "3",
172  "prev" => "3",
173  "prevw" => "3",
174  "round" => "3",
175  "sin" => "3",
176  "sinh" => "3",
177  "sqrt" => "3",
178  "tan" => "3",
179  "tanh" => "3",
180  "trunc" => "3",
181  "Uniform" => "3",
182  "Uniform01" => "3");
183 
184  // Special extensions
185 
186  // Each category can specify a PHP function that returns an altered
187  // version of the keyword.
188 
189 
190 
191  $this->linkscripts = array(
192  "1" => "donothing",
193  "2" => "donothing",
194  "3" => "donothing");
195  }
196 
197 
198  public function donothing($keywordin)
199  {
200  return $keywordin;
201  }
202  }
$BEAUT_PATH
Definition: HFile_ampl.php:2
Create styles array
The data for the language used.
donothing($keywordin)
Definition: HFile_ampl.php:198
Definition: HFile.php:21