ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_verilog.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_verilog extends HFile{
6  function HFile_verilog(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 //
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  "/L10" => "",
46  "Line" => "",
47  "Comment" => "",
48  "=" => "",
49  "//" => "",
50  "Block" => "",
51  "On" => "",
52  "/*" => "",
53  "Off" => "",
54  "*/" => "",
55  "String" => "",
56  "Chars" => "",
57  "\"" => "",
58  "File" => "",
59  "Extensions" => "",
60  "V" => "",
61  "VMD" => "",
62  "always" => "1",
63  "and" => "1",
64  "assign" => "1",
65  "begin" => "1",
66  "buf" => "1",
67  "bufif0" => "1",
68  "bufif1" => "1",
69  "case" => "1",
70  "casex" => "1",
71  "casez" => "1",
72  "cmos" => "1",
73  "deassign" => "1",
74  "default" => "1",
75  "defparam" => "1",
76  "disable" => "1",
77  "edge" => "1",
78  "else" => "3",
79  "end" => "1",
80  "endcase" => "1",
81  "endmodule" => "1",
82  "endfunction" => "1",
83  "endprimitive" => "1",
84  "endspecify" => "1",
85  "endtable" => "1",
86  "endtask" => "1",
87  "event" => "1",
88  "for" => "1",
89  "force" => "1",
90  "forever" => "1",
91  "fork" => "1",
92  "function" => "1",
93  "highz0" => "1",
94  "highz1" => "1",
95  "if" => "1",
96  "initial" => "1",
97  "inout" => "1",
98  "input" => "1",
99  "integer" => "1",
100  "join" => "1",
101  "large" => "1",
102  "Library" => "1",
103  "macromodule" => "1",
104  "medium" => "1",
105  "module" => "1",
106  "nand" => "1",
107  "negedge" => "1",
108  "nmos" => "1",
109  "nor" => "1",
110  "not" => "1",
111  "notif0" => "1",
112  "notif1" => "1",
113  "or" => "1",
114  "output" => "1",
115  "parameter" => "1",
116  "pmos" => "1",
117  "posedge" => "1",
118  "primitive" => "1",
119  "pull0" => "1",
120  "pull1" => "1",
121  "pullup" => "1",
122  "pulldown" => "1",
123  "rcmos" => "1",
124  "reg" => "1",
125  "release" => "1",
126  "repeat" => "1",
127  "rnmos" => "1",
128  "rpmos" => "1",
129  "rtran" => "1",
130  "rtranif0" => "1",
131  "rtanif1" => "1",
132  "scalared" => "1",
133  "small" => "1",
134  "specify" => "1",
135  "specparam" => "1",
136  "strength" => "1",
137  "strong0" => "1",
138  "strong1" => "1",
139  "supply0" => "1",
140  "supply1" => "1",
141  "table" => "1",
142  "task" => "1",
143  "time" => "1",
144  "tran" => "1",
145  "tranif0" => "1",
146  "tranif1" => "1",
147  "tri1" => "1",
148  "tri0" => "1",
149  "triand" => "1",
150  "trior" => "1",
151  "trireg" => "1",
152  "vectored" => "1",
153  "wait" => "1",
154  "wand" => "1",
155  "weak0" => "1",
156  "weak1" => "1",
157  "while" => "1",
158  "wire" => "1",
159  "wor" => "1",
160  "xnor" => "1",
161  "xor" => "1",
162  "$bitstoreal" => "2",
163  "$countdrivers" => "2",
164  "$display" => "2",
165  "$fclose" => "2",
166  "$fdisplay" => "2",
167  "$finish" => "2",
168  "$fmonitor" => "2",
169  "$fopen" => "2",
170  "$fstrobe" => "2",
171  "$fwrite" => "2",
172  "$getpattern" => "2",
173  "$history" => "2",
174  "$hold" => "2",
175  "$incsave" => "2",
176  "$input" => "2",
177  "$itor" => "2",
178  "$key" => "2",
179  "$list" => "2",
180  "$log" => "2",
181  "$monitor" => "2",
182  "$monitoroff" => "2",
183  "$monitoron" => "2",
184  "$nokey" => "2",
185  "$nolog" => "2",
186  "$period" => "2",
187  "$printtimescale" => "2",
188  "$readmemb" => "2",
189  "$readmemh" => "2",
190  "$realtime" => "2",
191  "$realtobits" => "2",
192  "$recovery" => "2",
193  "$reset" => "2",
194  "$reset_count" => "2",
195  "$reset_value" => "2",
196  "$restart" => "2",
197  "$rtoi" => "2",
198  "$save" => "2",
199  "$scale" => "2",
200  "$scope" => "2",
201  "$setup" => "2",
202  "$setuphold" => "2",
203  "$showscopes" => "2",
204  "$showvariables" => "2",
205  "$showvars" => "2",
206  "$skew" => "2",
207  "$sreadmemb" => "2",
208  "$sreadmemh" => "2",
209  "$stime" => "2",
210  "$stop" => "2",
211  "$strobe" => "2",
212  "$time" => "2",
213  "$timeformat" => "2",
214  "$width" => "2",
215  "$write" => "2",
216  "`accelerate" => "3",
217  "`autoexepand_vectornets" => "3",
218  "`celldefine" => "3",
219  "`default_nettype" => "3",
220  "`define" => "3",
221  "`else" => "3",
222  "`endcelldefine" => "3",
223  "`endif" => "3",
224  "`endprotect" => "3",
225  "`endprotected" => "3",
226  "`expand_vectornets" => "3",
227  "`ifdef" => "3",
228  "`include" => "3",
229  "`noaccelerate" => "3",
230  "`noexpand_vectornets" => "3",
231  "`noremove_gatenames" => "3",
232  "`noremove_netnames" => "3",
233  "`nounconnected_drive" => "3",
234  "`protect" => "3",
235  "`protected" => "3",
236  "`remove_gatenames" => "3",
237  "`remove_netnames" => "3",
238  "`resetall" => "3",
239  "`timescale" => "3",
240  "`unconnected_drive" => "3",
241  "accelerate" => "3",
242  "autoexepand_vectornets" => "3",
243  "celldefine" => "3",
244  "default_nettype" => "3",
245  "define" => "3",
246  "endcelldefine" => "3",
247  "endif" => "3",
248  "endprotect" => "3",
249  "endprotected" => "3",
250  "expand_vectornets" => "3",
251  "ifdef" => "3",
252  "include" => "3",
253  "noaccelerate" => "3",
254  "noexpand_vectornets" => "3",
255  "noremove_gatenames" => "3",
256  "noremove_netnames" => "3",
257  "nounconnected_drive" => "3",
258  "protect" => "3",
259  "protected" => "3",
260  "remove_gatenames" => "3",
261  "remove_netnames" => "3",
262  "resetall" => "3",
263  "timescale" => "3",
264  "unconnected_drive" => "3",
265  "," => "3",
266  ";" => "3",
267  "{" => "3",
268  "}" => "3",
269  "+" => "3",
270  "-" => "3",
271  "*" => "3",
272  "/" => "3",
273  "%" => "3",
274  ">" => "3",
275  ">=" => "3",
276  ">>" => "3",
277  "<" => "3",
278  "<=" => "3",
279  "<<" => "3",
280  "!" => "3",
281  "!=" => "3",
282  "!==" => "3",
283  "&" => "3",
284  "&&" => "3",
285  "|" => "3",
286  "||" => "3",
287  "==" => "3",
288  "===" => "3",
289  "^" => "3",
290  "^~" => "3",
291  "~" => "3",
292  "~^" => "3",
293  "~&" => "3",
294  "~|" => "3",
295  "?" => "3",
296  ":" => "3",
297  "#" => "3",
298  "@" => "3");
299 
300 // Special extensions
301 
302 // Each category can specify a PHP function that returns an altered
303 // version of the keyword.
304 
305 
306 
307 $this->linkscripts = array(
308  "" => "donothing",
309  "1" => "donothing",
310  "3" => "donothing",
311  "2" => "donothing");
312 }
313 
314 
315 function donothing($keywordin)
316 {
317  return $keywordin;
318 }
319 
320 }?>