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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
19 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
20 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
21
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " This is not VHDL. I use the C-Preprocessor cpp to generate different binaries
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " from one VHDL source file. Unfortunately there is no preprocessor for VHDL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " case is not significant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " VHDL keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword vhdlStatement access after alias all assert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword vhdlStatement begin block body buffer bus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword vhdlStatement elsif end entity exit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword vhdlStatement generate generic group guarded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword vhdlStatement impure in inertial inout is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword vhdlStatement label library linkage literal loop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword vhdlStatement map
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword vhdlStatement new next null
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword vhdlStatement of on open others out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword vhdlStatement select severity signal shared
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword vhdlStatement then to transport type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword vhdlStatement note warning error failure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Special match for "if" and "else" since "else if" shouldn't be highlighted.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " The right keyword is "elsif"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match vhdlStatement "\<\(if\|else\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match vhdlNone "\<else\s\+if\>$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match vhdlNone "\<else\s\+if\>\s"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3312
diff changeset
68 " Predefined VHDL types
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword vhdlType bit bit_vector
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword vhdlType string severity_level
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3312
diff changeset
73 " Predefined standard ieee VHDL types
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword vhdlType line text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword vhdlType std_logic std_logic_vector
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword vhdlType std_ulogic std_ulogic_vector
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " array attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match vhdlAttribute "\'high"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match vhdlAttribute "\'left"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match vhdlAttribute "\'length"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match vhdlAttribute "\'low"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match vhdlAttribute "\'range"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match vhdlAttribute "\'reverse_range"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match vhdlAttribute "\'right"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match vhdlAttribute "\'ascending"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match vhdlAttribute "\'simple_name"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match vhdlAttribute "\'instance_name"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 " signal attribute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match vhdlAttribute "\'active"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match vhdlAttribute "\'delayed"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match vhdlAttribute "\'event"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match vhdlAttribute "\'last_active"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match vhdlAttribute "\'last_event"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match vhdlAttribute "\'last_value"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match vhdlAttribute "\'quiet"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match vhdlAttribute "\'stable"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match vhdlAttribute "\'transaction"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match vhdlAttribute "\'driving"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match vhdlAttribute "\'driving_value"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " type attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn match vhdlAttribute "\'leftof"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match vhdlAttribute "\'pos"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn match vhdlAttribute "\'pred"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn match vhdlAttribute "\'rightof"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match vhdlAttribute "\'succ"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn match vhdlAttribute "\'val"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn match vhdlAttribute "\'image"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn match vhdlAttribute "\'value"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn keyword vhdlBoolean true false
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 " for this vector values case is significant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " Values for standard VHDL types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn match vhdlVector "\'[0L1HXWZU\-\?]\'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn match vhdlVector "B\"[01_]\+\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match vhdlVector "O\"[0-7_]\+\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn match vhdlVector "X\"[0-9a-f_]\+\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 " floating numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn match vhdlNumber "-\=\<\d\+\.\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 " integer numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 syn match vhdlNumber "-\=\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 " time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
203 syn keyword vhdlTodo contained TODO NOTE
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
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
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
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
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
214 syn match vhdlPreProc "/\* pragma .* \*/"
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
215 syn match vhdlPreProc "/\* synopsys .* \*/"
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
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
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
218 syn match vhdlPreProc "--\s*pragma .*"
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
219 syn match vhdlPreProc "--\s*synopsys .*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 if version >= 508 || !exists("did_vhdl_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 let did_vhdl_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234
6823
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
235 HiLink vhdlSpecial Special
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
236 HiLink vhdlStatement Statement
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
237 HiLink vhdlCharacter Character
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
238 HiLink vhdlString String
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
239 HiLink vhdlVector Number
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
240 HiLink vhdlBoolean Number
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
241 HiLink vhdlTodo Todo
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
242 HiLink vhdlFixme Fixme
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
243 HiLink vhdlComment Comment
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
244 HiLink vhdlNumber Number
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
245 HiLink vhdlTime Number
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
246 HiLink vhdlType Type
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
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
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
249 HiLink vhdlAttribute Special
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5362
diff changeset
250 HiLink vhdlPreProc PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 let b:current_syntax = "vhdl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
257 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
258 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 " vim: ts=8