Mercurial > vim
annotate runtime/syntax/vhdl.vim @ 7176:30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 13 23:21:27 2015 +0200
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Oct 2015 23:30:05 +0200 |
parents | 0303182665d5 |
children | ffad29dc7eee |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: VHDL | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
3 " Maintainer: Daniel Kho <daniel.kho@tauhop.com> |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
4 " Previous Maintainer: Czo <Olivier.Sirol@lip6.fr> |
7 | 5 " Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn> |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
6 " Last Changed: 2015 Oct 13 by Daniel Kho |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
7 " $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $ |
7 | 8 |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
9 " VHSIC (Very High Speed Integrated Circuit) Hardware Description Language |
7 | 10 |
11 " For version 5.x: Clear all syntax items | |
12 " For version 6.x: Quit when a syntax file was already loaded | |
13 if version < 600 | |
14 syntax clear | |
15 elseif exists("b:current_syntax") | |
16 finish | |
17 endif | |
18 | |
3312 | 19 let s:cpo_save = &cpo |
20 set cpo&vim | |
21 | |
7 | 22 " This is not VHDL. I use the C-Preprocessor cpp to generate different binaries |
23 " from one VHDL source file. Unfortunately there is no preprocessor for VHDL | |
24 " available. If you don't like this, please remove the following lines. | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
25 "syn match cDefine "^#ifdef[ ]\+[A-Za-z_]\+" |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
26 "syn match cDefine "^#endif" |
7 | 27 |
28 " case is not significant | |
29 syn case ignore | |
30 | |
31 " VHDL keywords | |
32 syn keyword vhdlStatement access after alias all assert | |
33 syn keyword vhdlStatement architecture array attribute | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
34 syn keyword vhdlStatement assume assume_guarantee |
7 | 35 syn keyword vhdlStatement begin block body buffer bus |
36 syn keyword vhdlStatement case component configuration constant | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
37 syn keyword vhdlStatement context cover |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
38 syn keyword vhdlStatement default disconnect downto |
7 | 39 syn keyword vhdlStatement elsif end entity exit |
40 syn keyword vhdlStatement file for function | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
41 syn keyword vhdlStatement fairness force |
7 | 42 syn keyword vhdlStatement generate generic group guarded |
43 syn keyword vhdlStatement impure in inertial inout is | |
44 syn keyword vhdlStatement label library linkage literal loop | |
45 syn keyword vhdlStatement map | |
46 syn keyword vhdlStatement new next null | |
47 syn keyword vhdlStatement of on open others out | |
48 syn keyword vhdlStatement package port postponed procedure process pure | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
49 syn keyword vhdlStatement parameter property protected |
7 | 50 syn keyword vhdlStatement range record register reject report return |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
51 syn keyword vhdlStatement release restrict restrict_guarantee |
7 | 52 syn keyword vhdlStatement select severity signal shared |
53 syn keyword vhdlStatement subtype | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
54 syn keyword vhdlStatement sequence strong |
7 | 55 syn keyword vhdlStatement then to transport type |
56 syn keyword vhdlStatement unaffected units until use | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
57 syn keyword vhdlStatement variable |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
58 syn keyword vhdlStatement vmode vprop vunit |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
59 syn keyword vhdlStatement wait when while with |
7 | 60 syn keyword vhdlStatement note warning error failure |
61 | |
62 " Special match for "if" and "else" since "else if" shouldn't be highlighted. | |
63 " The right keyword is "elsif" | |
64 syn match vhdlStatement "\<\(if\|else\)\>" | |
65 syn match vhdlNone "\<else\s\+if\>$" | |
66 syn match vhdlNone "\<else\s\+if\>\s" | |
67 | |
3557 | 68 " Predefined VHDL types |
7 | 69 syn keyword vhdlType bit bit_vector |
70 syn keyword vhdlType character boolean integer real time | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
71 syn keyword vhdlType boolean_vector integer_vector real_vector time_vector |
7 | 72 syn keyword vhdlType string severity_level |
3557 | 73 " Predefined standard ieee VHDL types |
7 | 74 syn keyword vhdlType positive natural signed unsigned |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
75 syn keyword vhdlType unresolved_signed unresolved_unsigned u_signed u_unsigned |
7 | 76 syn keyword vhdlType line text |
77 syn keyword vhdlType std_logic std_logic_vector | |
78 syn keyword vhdlType std_ulogic std_ulogic_vector | |
79 " Predefined non standard VHDL types for Mentor Graphics Sys1076/QuickHDL | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
80 "syn keyword vhdlType qsim_state qsim_state_vector |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
81 "syn keyword vhdlType qsim_12state qsim_12state_vector |
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
82 "syn keyword vhdlType qsim_strength |
7 | 83 " Predefined non standard VHDL types for Alliance VLSI CAD |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
84 "syn keyword vhdlType mux_bit mux_vector reg_bit reg_vector wor_bit wor_vector |
7 | 85 |
86 " array attributes | |
87 syn match vhdlAttribute "\'high" | |
88 syn match vhdlAttribute "\'left" | |
89 syn match vhdlAttribute "\'length" | |
90 syn match vhdlAttribute "\'low" | |
91 syn match vhdlAttribute "\'range" | |
92 syn match vhdlAttribute "\'reverse_range" | |
93 syn match vhdlAttribute "\'right" | |
94 syn match vhdlAttribute "\'ascending" | |
95 " block attributes | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
96 "syn match vhdlAttribute "\'behaviour" " Non-standard VHDL |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
97 "syn match vhdlAttribute "\'structure" " Non-standard VHDL |
7 | 98 syn match vhdlAttribute "\'simple_name" |
99 syn match vhdlAttribute "\'instance_name" | |
100 syn match vhdlAttribute "\'path_name" | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
101 syn match vhdlAttribute "\'foreign" " VHPI |
7 | 102 " signal attribute |
103 syn match vhdlAttribute "\'active" | |
104 syn match vhdlAttribute "\'delayed" | |
105 syn match vhdlAttribute "\'event" | |
106 syn match vhdlAttribute "\'last_active" | |
107 syn match vhdlAttribute "\'last_event" | |
108 syn match vhdlAttribute "\'last_value" | |
109 syn match vhdlAttribute "\'quiet" | |
110 syn match vhdlAttribute "\'stable" | |
111 syn match vhdlAttribute "\'transaction" | |
112 syn match vhdlAttribute "\'driving" | |
113 syn match vhdlAttribute "\'driving_value" | |
114 " type attributes | |
115 syn match vhdlAttribute "\'base" | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
116 syn match vhdlAttribute "\'subtype" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
117 syn match vhdlAttribute "\'element" |
7 | 118 syn match vhdlAttribute "\'leftof" |
119 syn match vhdlAttribute "\'pos" | |
120 syn match vhdlAttribute "\'pred" | |
121 syn match vhdlAttribute "\'rightof" | |
122 syn match vhdlAttribute "\'succ" | |
123 syn match vhdlAttribute "\'val" | |
124 syn match vhdlAttribute "\'image" | |
125 syn match vhdlAttribute "\'value" | |
126 | |
127 syn keyword vhdlBoolean true false | |
128 | |
129 " for this vector values case is significant | |
130 syn case match | |
131 " Values for standard VHDL types | |
132 syn match vhdlVector "\'[0L1HXWZU\-\?]\'" | |
133 " Values for non standard VHDL types qsim_12state for Mentor Graphics Sys1076/QuickHDL | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
134 "syn keyword vhdlVector S0S S1S SXS S0R S1R SXR S0Z S1Z SXZ S0I S1I SXI |
7 | 135 syn case ignore |
136 | |
137 syn match vhdlVector "B\"[01_]\+\"" | |
138 syn match vhdlVector "O\"[0-7_]\+\"" | |
139 syn match vhdlVector "X\"[0-9a-f_]\+\"" | |
140 syn match vhdlCharacter "'.'" | |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
141 syn region vhdlString start=+"+ end=+"+ |
7 | 142 |
143 " floating numbers | |
144 syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>" | |
145 syn match vhdlNumber "-\=\<\d\+\.\d\+\>" | |
146 syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\=" | |
147 syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" | |
148 " integer numbers | |
149 syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>" | |
150 syn match vhdlNumber "-\=\<\d\+\>" | |
151 syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\=" | |
152 syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
153 |
7 | 154 " operators |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
155 syn keyword vhdlOperator and nand or nor xor xnor |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
156 syn keyword vhdlOperator rol ror sla sll sra srl |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
157 syn keyword vhdlOperator mod rem abs not |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
158 " TODO remove the following line. You can't have a sequence of */=+ as an operator for example. |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
159 "syn match vhdlOperator "[&><=:+\-*\/|]" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
160 " The following lines match valid and invalid operators. |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
161 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
162 " Concatenation and math operators |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
163 syn match vhdlOperator "&\|+\|-\|\*\|\/" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
164 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
165 " Equality and comparison operators |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
166 syn match vhdlOperator "=\|\/=\|>\|<\|>=" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
167 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
168 " Assignment operators |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
169 syn match vhdlOperator "<=\|:=" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
170 syn match vhdlOperator "=>" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
171 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
172 " VHDL-2008 conversion, matching equality/non-equality operators |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
173 syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>=" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
174 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
175 " Linting for illegal operators |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
176 " '=' |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
177 syn match vhdlError "\(=\)[<=&+\-\*\/\\]\+" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
178 syn match vhdlError "[=&+\-\*\\]\+\(=\)" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
179 " '>', '<' |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
180 syn match vhdlError "\(>\)[<>&+\-\/\\]\+" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
181 syn match vhdlError "[>&+\-\/\\]\+\(>\)" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
182 syn match vhdlError "\(<\)[<&+\-\/\\]\+" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
183 syn match vhdlError "[<>=&+\-\/\\]\+\(<\)" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
184 " Covers most operators |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
185 syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\-\*\\?:]\+" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
186 syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
187 syn match vhdlError "\(?<\|?>\)[<>&+\-\*\/\\?:]\+" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
188 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
189 "syn match vhdlError "[?]\+\(&\|+\|\-\|\*\*\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|:=\|=>\)" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
190 " '/' |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
191 syn match vhdlError "\(\/\)[<>&+\-\*\/\\?:]\+" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
192 syn match vhdlError "[<>=&+\-\*\/\\:]\+\(\/\)" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
193 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
194 syn match vhdlSpecial "<>" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
195 syn match vhdlSpecial "[().,;]" |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
196 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
197 |
7 | 198 " time |
199 syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" | |
200 syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" | |
201 | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
202 syn case match |
6823 | 203 syn keyword vhdlTodo contained TODO NOTE |
204 syn keyword vhdlFixme contained FIXME | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
205 syn case ignore |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
206 |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
207 syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
208 syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
209 |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
210 " Industry-standard directives. These are not standard VHDL, but are commonly |
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
211 " used in the industry. |
6823 | 212 syn match vhdlPreProc "/\* synthesis .* \*/" |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
213 "syn match vhdlPreProc "/\* simulation .* \*/" |
6823 | 214 syn match vhdlPreProc "/\* pragma .* \*/" |
215 syn match vhdlPreProc "/\* synopsys .* \*/" | |
216 syn match vhdlPreProc "--\s*synthesis .*" | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
217 "syn match vhdlPreProc "--\s*simulation .*" |
6823 | 218 syn match vhdlPreProc "--\s*pragma .*" |
219 syn match vhdlPreProc "--\s*synopsys .*" | |
7 | 220 |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
221 "Modify the following as needed. The trade-off is performance versus functionality. |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
222 syn sync minlines=600 |
5362
ab1508486b12
Update runtime files. Add support for J.
Bram Moolenaar <bram@vim.org>
parents:
3557
diff
changeset
|
223 |
7 | 224 " Define the default highlighting. |
225 " For version 5.7 and earlier: only when not done already | |
226 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
227 if version >= 508 || !exists("did_vhdl_syntax_inits") | |
228 if version < 508 | |
229 let did_vhdl_syntax_inits = 1 | |
230 command -nargs=+ HiLink hi link <args> | |
231 else | |
232 command -nargs=+ HiLink hi def link <args> | |
233 endif | |
234 | |
6823 | 235 HiLink vhdlSpecial Special |
236 HiLink vhdlStatement Statement | |
237 HiLink vhdlCharacter Character | |
238 HiLink vhdlString String | |
239 HiLink vhdlVector Number | |
240 HiLink vhdlBoolean Number | |
241 HiLink vhdlTodo Todo | |
242 HiLink vhdlFixme Fixme | |
243 HiLink vhdlComment Comment | |
244 HiLink vhdlNumber Number | |
245 HiLink vhdlTime Number | |
246 HiLink vhdlType Type | |
247 HiLink vhdlOperator Operator | |
7176
30042ddff503
commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
248 HiLink vhdlError Error |
6823 | 249 HiLink vhdlAttribute Special |
250 HiLink vhdlPreProc PreProc | |
7 | 251 |
252 delcommand HiLink | |
253 endif | |
254 | |
255 let b:current_syntax = "vhdl" | |
256 | |
3312 | 257 let &cpo = s:cpo_save |
258 unlet s:cpo_save | |
7 | 259 " vim: ts=8 |