blob: 0782ceae9aa7119f61300e5cb724dc161c436f4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd" [
<!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#%@-]*">
<!ENTITY varname "\b(?!(?:process|constant|signal|variable))([A-Za-z_][A-Za-z0-9_]*)\b">
<!ENTITY bos "(\b)"> <!-- bol or space following -->
<!-- <!ENTITY bos "^(|.*\s)">--> <!-- bol or space following -->
<!ENTITY eos "\b"> <!-- eol or space following -->
<!-- <!ENTITY eos "(?=($|\s))">--> <!-- eol or space following -->
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
<!ENTITY label "((&varname;)\s*:\s*)?">
]>
<language name="VHDL" version="1.11" kateversion="2.5" section="Hardware" extensions="*.vhdl;*.vhd" mimetype="text/x-vhdl" author="Rocky Scaletta ([email protected]), Stefan Endrullis ([email protected]), Florent Ouchet ([email protected]), Chris Higgs ([email protected]), Jan Michel ([email protected])">
<highlighting>
<list name="keywordsToplevel">
<item> file </item>
<!-- <item> package </item>-->
<item> library </item>
<item> use </item>
<!--
<item> entity </item>
<item> architecture </item>
<item> of </item>
<item> configuration </item>
-->
</list>
<list name="keywords">
<item> access </item>
<item> after </item>
<item> alias </item>
<item> all </item>
<item> array </item>
<item> assert </item>
<item> assume </item>
<item> assume_guarantee </item>
<item> attribute </item>
<item> begin </item>
<item> block </item>
<item> body </item>
<item> bus </item>
<item> component </item>
<item> constant </item>
<item> context </item>
<item> cover </item>
<item> default </item>
<item> disconnect </item>
<item> downto </item>
<item> end </item>
<item> exit </item>
<item> fairness </item>
<item> file </item>
<item> force </item>
<item> function </item>
<item> generate </item>
<item> generic </item>
<item> group </item>
<item> guarded </item>
<item> impure </item>
<item> inertial </item>
<item> is </item>
<item> label </item>
<item> linkage </item>
<item> literal </item>
<item> map </item>
<item> new </item>
<item> next </item>
<item> null </item>
<item> of </item>
<item> on </item>
<item> open </item>
<item> others </item>
<item> parameter </item>
<item> port </item>
<item> postponed </item>
<item> procedure </item>
<item> process </item>
<item> property </item>
<item> protected </item>
<item> pure </item>
<item> range </item>
<item> record </item>
<item> register </item>
<item> reject </item>
<item> release </item>
<item> report </item>
<item> return </item>
<item> select </item>
<item> sequence </item>
<item> severity </item>
<item> signal </item>
<item> shared </item>
<item> strong </item>
<item> subtype </item>
<item> to </item>
<item> transport </item>
<item> type </item>
<item> unaffected </item>
<item> units </item>
<item> until </item>
<item> variable </item>
<item> vmode </item>
<item> vprop </item>
<item> vunit </item>
<item> wait </item>
<item> when </item>
<item> with </item>
<item> note </item>
<item> warning </item>
<item> error </item>
<item> failure </item>
<item> in </item>
<item> inout </item>
<item> out </item>
<item> buffer </item>
<item> and </item>
<item> abs </item>
<item> or </item>
<item> xor </item>
<item> xnor </item>
<item> not </item>
<item> mod </item>
<item> nand </item>
<item> nor </item>
<item> rem </item>
<item> rol </item>
<item> ror </item>
<item> sla </item>
<item> sra </item>
<item> sll </item>
<item> srl </item>
</list>
<list name="if">
<item> if </item>
<item> else </item>
<item> elsif </item>
<item> then </item>
</list>
<list name="forOrWhile">
<item> loop </item>
</list>
<list name="directions">
<item> in </item>
<item> inout </item>
<item> out </item>
<item> buffer </item>
<item> linkage </item>
</list>
<list name="signals">
<item> signal </item>
<item> variable </item>
<item> constant </item>
<item> type </item>
</list>
<!-- <list name="logics">
<item> and </item>
<item> or </item>
<item> xor </item>
<item> not </item>
</list>-->
<list name="range">
<item> to </item>
<item> downto </item>
<item> others </item>
</list>
<list name="case">
<item> case </item>
<item> when </item>
</list>
<list name="types">
<item> bit </item>
<item> bit_vector </item>
<item> character </item>
<item> boolean </item>
<item> boolean_vector </item>
<item> integer </item>
<item> integer_vector </item>
<item> real </item>
<item> real_vector </item>
<item> time </item>
<item> time_vector </item>
<item> delay_length </item>
<item> string </item>
<item> severity_level </item>
<item> positive </item>
<item> natural </item>
<item> file_open_kind </item>
<item> file_open_status </item>
<item> signed </item>
<item> unsigned </item>
<item> unresolved_unsigned </item>
<item> unresolved_signed </item>
<item> line </item>
<item> text </item>
<item> side </item>
<item> width </item>
<item> std_logic </item>
<item> std_logic_vector </item>
<item> std_ulogic </item>
<item> std_ulogic_vector </item>
<item> x01 </item>
<item> x01z </item>
<item> ux01 </item>
<item> ux01z </item>
<item> qsim_state </item>
<item> qsim_state_vector </item>
<item> qsim_12state </item>
<item> qsim_12state_vector </item>
<item> qsim_strength </item>
<item> mux_bit </item>
<item> mux_vector </item>
<item> reg_bit </item>
<item> reg_vector </item>
<item> wor_bit </item>
<item> wor_vector </item>
</list>
<contexts>
<!-- start / global environment -->
<context name="start" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="architecture_main" insensitive="true" dynamic="true" lookAhead="true"
String="architecture\s+(&varname;)" />
<StringDetect attribute="Control" context="entity" String="entity" />
<RegExpr attribute="Normal Text" context="package" insensitive="true" lookAhead="true" beginRegion="PackageRegion1"
String="&bos;(package\s+(&varname;)\s+is)&eos;"/>
<RegExpr attribute="Normal Text" context="packagebody" lookAhead="true" insensitive="true" beginRegion="PackageBodyRegion1"
String="&bos;(package\s+body\s+(&varname;)\s+is)&eos;"/>
<!-- <StringDetect attribute="Control" context="arch_decl" String="package" />temporary-->
<keyword attribute="Keyword" context="#stay" String="keywordsToplevel"/>
</context>
<context name="package" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<StringDetect attribute="Redirection" context="#stay" String="%2" dynamic="true" />
<IncludeRules context="preDetection" />
<StringDetect attribute="Redirection" context="#stay" String="begin" insensitive="true" />
<RegExpr attribute="Redirection" context="#pop" String="&bos;end(\s+package)?(\s+%3)?\s*;" dynamic="true" endRegion="PackageRegion1" insensitive="true" />
<IncludeRules context="generalDetection" />
</context>
<!-- package body environment -->
<context name="packagebody" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<StringDetect attribute="Redirection" context="#stay" String="%2" dynamic="true" />
<IncludeRules context="preDetection" />
<StringDetect attribute="Redirection" context="#stay" String="begin" insensitive="true" />
<RegExpr attribute="Redirection" context="#pop" String="&bos;end(\s+package)?(\s+%3)?\s*;" dynamic="true" endRegion="PackageBodyRegion1" insensitive="true" />
<IncludeRules context="generalDetection" />
</context>
<!--====ARCHITECTURE ===============-->
<context name="architecture_main" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="arch_decl" insensitive="true" beginRegion="ArchitectureRegion1"
String="architecture\s+(&varname;)\s+of\s+(&varname;)\s+is" />
<RegExpr attribute="Control" context="#pop#pop" insensitive="true" dynamic="true" endRegion="ArchitectureRegion1"
String="&bos;end(\s+architecture)?(\s+%1)?\s*;" />
<RegExpr attribute="Error" context="#pop#pop" insensitive="true" dynamic="true" endRegion="ArchitectureRegion1"
String="&bos;end(\s+architecture)?(\s+&varname;)\s*;" />
<IncludeRules context="detect_arch_parts" />
</context>
<!-- architecture environment "before begin" -->
<context name="arch_decl" attribute="Normal Text" lineEndContext="#stay" >
<IncludeRules context="preDetection" />
<keyword attribute="Signal" context="signal" insensitive="true" String="signals"/>
<StringDetect attribute="Control" context="entity" insensitive="true" String="component"/>
<StringDetect attribute="Control" context="#pop" insensitive="true" String="begin"/>
<IncludeRules context="generalDetection" />
</context>
<!-- parts of architecture body -->
<context name="detect_arch_parts" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Normal Text" context="generate1" lookAhead="true" insensitive="true" dynamic="true"
String="&bos;((&varname;)\s*:\s*)(if|for).*\s+generate&eos;" />
<RegExpr attribute="Normal Text" context="process1" lookAhead="true" insensitive="true" dynamic="true"
String="&bos;((&varname;)\s*:\s*)?process&eos;" />
<RegExpr attribute="Normal Text" context="instance" lookAhead="true" insensitive="true" dynamic="true" beginRegion="InstanceRegion1"
String="\b(&varname;)\s*:\s*(&varname;)" />
<IncludeRules context="generalDetection" />
</context>
<!--====generate ===============-->
<context name="generate1" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="generate2" insensitive="true" beginRegion="GenerateRegion"
String="&bos;generate&eos;" />
<RegExpr attribute="Name" context="#stay" dynamic="true" insensitive="true"
String="&bos;%3&eos;" />
<StringDetect attribute="Control" context="#stay" insensitive="true" String="for"/>
<StringDetect attribute="Control" context="#stay" insensitive="true" String="if"/>
<IncludeRules context="generalDetection" />
</context>
<context name="generate2" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<StringDetect attribute="Control" context="#stay" insensitive="true"
String="begin"/>
<RegExpr attribute="Control" context="#pop#pop" insensitive="true" endRegion="GenerateRegion"
String="&bos;end\s+generate(\s+&varname;)?\s*;"/>
<IncludeRules context="detect_arch_parts" />
</context>
<!--====process ===============-->
<!-- process environment -->
<context name="process1" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Process" context="#pop" insensitive="true" dynamic="true" endRegion="RegionProcess"
String="end\s+process(\s+%3)?\s*;" />
<RegExpr attribute="Error" context="#pop" insensitive="true" dynamic="true" endRegion="RegionProcess"
String="end\s+process(\s+&varname;)?" />
<StringDetect attribute="Process" context="#stay" insensitive="true" beginRegion="RegionProcess"
String="process" />
<StringDetect attribute="Process" context="#stay" insensitive="true"
String="begin" />
<IncludeRules context="proc_rules" />
</context>
<context name="proc_rules" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Name" context="#stay" insensitive="true"
String="&bos;&varname;(?=\s*:(?!=))" />
<RegExpr attribute="Control" context="if_start" insensitive="true"
String="&bos;(if)&eos;" />
<RegExpr attribute="Control" context="case1" lookAhead="true" insensitive="true" dynamic="true" beginRegion="CaseRegion1"
String="&bos;(case)&eos;" />
<RegExpr attribute="Control" context="forOrWhile" insensitive="true" beginRegion="ForOrWhileRegion1"
String="&bos;&label;((for|while)\s+.+\s+)?loop&eos;"/>
<IncludeRules context="generalDetection" />
</context>
<!--====instance =============== -->
<context name="instance" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Name" context="#stay" String="\b%1\b" dynamic="true" />
<RegExpr attribute="Name" context="#stay" String="\b%2\b" dynamic="true" />
<Detect2Chars attribute="Normal Text" context="#pop" char=")" char1=";" endRegion="InstanceRegion1" />
<!-- <DetectChar attribute="Error" context="#stay" char=";" />-->
<IncludeRules context="generalDetection" />
</context>
<!--====loop ===============-->
<context name="forOrWhile" attribute="Normal Text" lineEndContext="#stay">
<RegExpr attribute="Control" context="#pop" endRegion="ForOrWhileRegion1" insensitive="true"
String="&bos;end\s+loop(\s+&varname;)?\s*;"/>
<keyword attribute="Control" context="#stay" String="forOrWhile"/>
<IncludeRules context="proc_rules" />
</context>
<!--====if ===============-->
<context name="if_start" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<StringDetect attribute="Control" context="if" insensitive="true" beginRegion="IfRegion1"
String="then" />
<IncludeRules context="generalDetection" />
</context>
<context name="if" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="#pop#pop" insensitive="true" endRegion="IfRegion1"
String="&bos;end\s+if(\s+&varname;)?\s*;"/>
<IncludeRules context="proc_rules" />
<keyword attribute="Control" context="#stay" insensitive="true"
String="if"/>
</context>
<!--====case ===============-->
<context name="case1" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="preDetection" />
<StringDetect attribute="Keyword" context="case2" insensitive="true"
String="is"/>
<keyword attribute="Control" context="#stay" insensitive="true"
String="case"/>
</context>
<context name="case2" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="#pop#pop" insensitive="true" endRegion="CaseRegion1"
String="&bos;end\s+case(\s+&varname;)?\s*;"/>
<StringDetect attribute="Control" context="caseWhen" insensitive="true" beginRegion="CaseWhenRegion1"
String="when"/>
<IncludeRules context="proc_rules" />
</context>
<context name="caseWhen" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="#pop" lookAhead="true" insensitive="true" endRegion="CaseWhenRegion1"
String="&bos;when&eos;" />
<RegExpr attribute="Control" context="#pop" lookAhead="true" insensitive="true" endRegion="CaseWhenRegion1"
String="&bos;end\s+case(\s+&varname;)?\s*;"/>
<IncludeRules context="proc_rules" />
</context>
<!--====ENTITY ===============-->
<!-- entity environment -->
<context name="entity" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Name" context="entity_main" beginRegion="EntityRegion1" insensitive="true" String="(&varname;)" />
<IncludeRules context="generalDetection" />
</context>
<context name="entity_main" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<IncludeRules context="preDetection" />
<RegExpr attribute="Control" context="#pop#pop" dynamic="true" insensitive="true" endRegion="EntityRegion1"
String="&bos;end(\s+(entity|component))?(\s+%1)?\s*;" />
<RegExpr attribute="Error" context="#pop#pop" dynamic="true" insensitive="true" endRegion="EntityRegion1"
String="&bos;end(\s+(entity|component))?(\s+&varname;)?\s*;" />
<RegExpr attribute="Control" context="#stay" String="generic"/>
<RegExpr attribute="Control" context="#stay" String="port"/>
<IncludeRules context="generalDetection" />
</context>
<!--====Basic Stuff ===============-->
<!-- basic rules -->
<context name="preDetection" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars attribute="Comment" context="comment" char="-" char1="-" />
<DetectChar attribute="Vector" context="string" char=""" />
<AnyChar attribute="Operator" context="#stay" String="[&><=:+\-*\/|].," />
<DetectChar attribute="Attribute" context="attribute" char="'" />
</context>
<!-- general detection -->
<context name="generalDetection" attribute="Normal Text" lineEndContext="#stay">
<keyword attribute="Data Type" context="#stay" String="types"/>
<keyword attribute="Signal" context="signal" String="signals" beginRegion="sig"/>
<keyword attribute="Range" context="#stay" String="range"/>
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<Int attribute="Integer" context="#stay" />
<HlCChar attribute="Bit" context="#stay" />
<DetectSpaces attribute="Normal Text" context="#stay" />
</context>
<!-- other environments -->
<context name="comment" attribute="Comment" lineEndContext="#pop" />
<context name="string" attribute="Vector" lineEndContext="#stay" >
<DetectChar attribute="Vector" context="#pop" char=""" />
</context>
<context name="attribute" attribute="Attribute" lineEndContext="#pop">
<DetectChar attribute="Attribute" context="quot in att" char=""" />
<DetectChar attribute="Normal Text" context="#pop" char=" " />
<DetectChar attribute="Attribute" context="#pop" char="'" />
<AnyChar attribute="Attribute" context="#pop" String="()=<>" />
</context>
<context name="quot in att" attribute="Attribute" lineEndContext="#stay">
<DetectChar attribute="Attribute" context="#pop" char=""" />
</context>
<context name="signal" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="preDetection" />
<DetectChar attribute="Normal Text" context="#pop" char=";" endRegion="sig" />
<IncludeRules context="generalDetection" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Data Type" defStyleNum="dsDataType" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Integer" defStyleNum="dsDecVal" />
<itemData name="Bit" defStyleNum="dsChar" />
<itemData name="Error" defStyleNum="dsError" color="#f00" bold="1" />
<itemData name="Vector" defStyleNum="dsString" />
<itemData name="Operator" defStyleNum="dsOthers" />
<itemData name="Attribute" defStyleNum="dsBaseN" />
<itemData name="Region Marker" defStyleNum="dsRegionMarker" />
<itemData name="Signal" defStyleNum="dsOthers"/>
<itemData name="Range" defStyleNum="dsOthers"/>
<itemData name="Redirection" defStyleNum="dsKeyword" color="#238" />
<itemData name="Process" defStyleNum="dsKeyword" color="#09A" />
<itemData name="Control" defStyleNum="dsKeyword" color="#238" />
<itemData name="Name" defStyleNum="dsKeyword" color="#b60" bold="1" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="--" />
</comments>
<keywords casesensitive="0" />
</general>
</language>
|