ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_vhdl.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_vhdl extends HFile
8  {
9  public function HFile_vhdl()
10  {
11  $this->HFile();
12  /*************************************/
13  // Beautifier Highlighting Configuration File
14  // VHDL
15  /*************************************/
16  // Flags
17 
18  $this->nocase = "1";
19  $this->notrim = "0";
20  $this->perl = "0";
21 
22  // Colours
23 
24  $this->colours = array("blue", "purple", "gray", "brown", "blue", "purple");
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  "abs" => "1",
50  "access" => "1",
51  "after" => "1",
52  "alias" => "1",
53  "all" => "1",
54  "and" => "1",
55  "architecture" => "1",
56  "array" => "1",
57  "assert" => "1",
58  "attribute" => "1",
59  "begin" => "1",
60  "block" => "1",
61  "body" => "1",
62  "buffer" => "1",
63  "bus" => "1",
64  "case" => "1",
65  "component" => "1",
66  "configuration" => "1",
67  "constant" => "1",
68  "disconnect" => "1",
69  "downto" => "1",
70  "else" => "1",
71  "elsif" => "1",
72  "end" => "1",
73  "entity" => "1",
74  "exit" => "1",
75  "file" => "1",
76  "for" => "1",
77  "function" => "1",
78  "generate" => "1",
79  "generic" => "1",
80  "group" => "1",
81  "guarded" => "1",
82  "if" => "1",
83  "impure" => "1",
84  "in" => "1",
85  "inertial" => "1",
86  "inout" => "1",
87  "is" => "1",
88  "label" => "1",
89  "library" => "1",
90  "linkage" => "1",
91  "literal" => "1",
92  "loop" => "1",
93  "map" => "1",
94  "mod" => "1",
95  "nand" => "1",
96  "new" => "1",
97  "next" => "1",
98  "nor" => "1",
99  "not" => "1",
100  "null" => "1",
101  "of" => "1",
102  "on" => "1",
103  "open" => "1",
104  "or" => "1",
105  "others" => "1",
106  "out" => "1",
107  "package" => "1",
108  "port" => "1",
109  "postponed" => "1",
110  "procedure" => "1",
111  "process" => "1",
112  "pure" => "1",
113  "range" => "1",
114  "record" => "1",
115  "register" => "1",
116  "reject" => "1",
117  "rem" => "1",
118  "report" => "1",
119  "return" => "1",
120  "rol" => "1",
121  "ror" => "1",
122  "select" => "1",
123  "severity" => "1",
124  "signal" => "1",
125  "shared" => "1",
126  "sla" => "1",
127  "sll" => "1",
128  "sra" => "1",
129  "srl" => "1",
130  "subtype" => "1",
131  "then" => "1",
132  "to" => "1",
133  "transport" => "1",
134  "type" => "1",
135  "unaffected" => "1",
136  "units" => "1",
137  "until" => "1",
138  "use" => "1",
139  "variable" => "1",
140  "wait" => "1",
141  "when" => "1",
142  "while" => "1",
143  "with" => "1",
144  "xnor" => "1",
145  "xor" => "1",
146  "bit" => "2",
147  "bit_vector" => "2",
148  "boolean" => "2",
149  "integer" => "2",
150  "real" => "2",
151  "std_logic" => "2",
152  "std_logic_vector" => "2",
153  "=" => "3",
154  "<" => "3",
155  ">" => "3",
156  ":" => "3",
157  "\'event" => "4",
158  "\'right" => "4",
159  "ActivPullUp" => "5",
160  "AndN" => "5",
161  "And2FF" => "5",
162  "AndNFF" => "5",
163  "Cnt1Bit" => "5",
164  "CntNBit" => "5",
165  "CntNBitDown" => "5",
166  "CntNBitMod" => "5",
167  "CntNBitOe" => "5",
168  "CntNBitSLd" => "5",
169  "CntNBitSR" => "5",
170  "CntNBitUpDown" => "5",
171  "CompNBit" => "5",
172  "CompNBitFF" => "5",
173  "DiffH2LWithFF" => "5",
174  "DiffL2HWithFF" => "5",
175  "Dff1" => "5",
176  "Dff1NegClk" => "5",
177  "Dffn" => "5",
178  "Encode4to5" => "5",
179  "Mux1of2" => "5",
180  "Mux1of8" => "5",
181  "Mux1Vof2V" => "5",
182  "Mux1Vof3V" => "5",
183  "Mux1Vof4V" => "5",
184  "PreScale1Bit" => "5",
185  "PreScale1BitAR" => "5",
186  "PreScale1BitARNegClk" => "5",
187  "PreScaleNBit" => "5",
188  "PreScaleNBitAR" => "5",
189  "Reg1Bit" => "5",
190  "Reg1BitAR" => "5",
191  "Reg1BitR" => "5",
192  "RegNBit" => "5",
193  "RegNBitAR" => "5",
194  "RSFFAsync" => "5",
195  "RSFFsync" => "5",
196  "RsSynchronizer" => "5",
197  "ShiftP2SRegNBitAR" => "5",
198  "ShiftRegNBitAR" => "5",
199  "ShiftS2SRegNBit" => "5",
200  "SRFFsync" => "5",
201  "SyncAndDiffL2HWithFF" => "5",
202  "SyncAndDiffH2LWithFF" => "5",
203  "SyncAndDiffL2HWithFFAndFg" => "5",
204  "SyncAndDiffH2LWithFFAndFg" => "5",
205  "SyncAndDiffLL2HHWithFF" => "5",
206  "SyncAndDiffHH2LLWithFF" => "5",
207  "SyncAndDiffLL2HHWithFFAndFg" => "5",
208  "SyncAndDiffHH2LLWithFFAndFg" => "5",
209  "ActivPullUp_arch" => "6",
210  "AndN_arch" => "6",
211  "And2FF_arch" => "6",
212  "AndNFF_arch" => "6",
213  "Cnt1Bit_arch" => "6",
214  "CntNBit_arch" => "6",
215  "CntNBitDown_arch" => "6",
216  "CntNBitMod_arch" => "6",
217  "CntNBitOe_arch" => "6",
218  "CntNBitSLd_arch" => "6",
219  "CntNBitSR_arch" => "6",
220  "CntNBitUpDown_arch" => "6",
221  "CompNBit_arch" => "6",
222  "CompNBitFF_arch" => "6",
223  "DiffH2LWithFF_arch" => "6",
224  "DiffL2HWithFF_arch" => "6",
225  "Dff1_arch" => "6",
226  "Dff1NegClk_arch" => "6",
227  "Dffn_arch" => "6",
228  "Encode4to5_arch" => "6",
229  "Mux1of2_arch" => "6",
230  "Mux1of8_arch" => "6",
231  "Mux1Vof2V_arch" => "6",
232  "Mux1Vof3V_arch" => "6",
233  "Mux1Vof4V_arch" => "6",
234  "PreScale1Bit_arch" => "6",
235  "PreScale1BitAR_arch" => "6",
236  "PreScale1BitARNegClk_arch" => "6",
237  "PreScaleNBit_arch" => "6",
238  "PreScaleNBitAR_arch" => "6",
239  "Reg1Bit_arch" => "6",
240  "Reg1BitAR_arch" => "6",
241  "Reg1BitR_arch" => "6",
242  "RegNBit_arch" => "6",
243  "RegNBitAR_arch" => "6",
244  "RSFFAsync_arch" => "6",
245  "RSFFsync_arch" => "6",
246  "RsSynchronizer_arch" => "6",
247  "ShiftP2SRegNBitAR_arch" => "6",
248  "ShiftRegNBitAR_arch" => "6",
249  "ShiftS2SRegNBit_arch" => "6",
250  "SRFFsync_arch" => "6",
251  "SyncAndDiffL2HWithFF_arch" => "6",
252  "SyncAndDiffH2LWithFF_arch" => "6",
253  "SyncAndDiffL2HWithFFAndFg_arch" => "6",
254  "SyncAndDiffH2LWithFFAndFg_arch" => "6",
255  "SyncAndDiffLL2HHWithFF_arch" => "6",
256  "SyncAndDiffHH2LLWithFF_arch" => "6",
257  "SyncAndDiffLL2HHWithFFAndFg_arch" => "6",
258  "SyncAndDiffHH2LLWithFFAndFg_arch" => "6");
259 
260  // Special extensions
261 
262  // Each category can specify a PHP function that returns an altered
263  // version of the keyword.
264 
265 
266 
267  $this->linkscripts = array(
268  "1" => "donothing",
269  "2" => "donothing",
270  "3" => "donothing",
271  "4" => "donothing",
272  "5" => "donothing",
273  "6" => "donothing");
274  }
275 
276 
277  public function donothing($keywordin)
278  {
279  return $keywordin;
280  }
281  }
donothing($keywordin)
Definition: HFile_vhdl.php:277
$BEAUT_PATH
Definition: HFile_vhdl.php:2
Create styles array
The data for the language used.
Definition: HFile.php:21