Mercurial > vim
annotate runtime/syntax/ahdl.vim @ 21996:808edde1e97d v8.2.1547
patch 8.2.1547: various comment problems
Commit: https://github.com/vim/vim/commit/02c037a4be6aeb7f6376e7dcc3ab41cfc6db3ede
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 30 19:26:45 2020 +0200
patch 8.2.1547: various comment problems
Problem: Various comment problems.
Solution: Update comments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Aug 2020 19:30:13 +0200 |
parents | 46763b01cd9a |
children | 11b656e74444 |
rev | line source |
---|---|
7 | 1 " Vim syn file |
2 " Language: Altera AHDL | |
3 " Maintainer: John Cook <john.cook@kla-tencor.com> | |
4 " Last Change: 2001 Apr 25 | |
5 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 "this language is oblivious to case. | |
12 syn case ignore | |
13 | |
14 " a bunch of keywords | |
15 syn keyword ahdlKeyword assert begin bidir bits buried case clique | |
16 syn keyword ahdlKeyword connected_pins constant defaults define design | |
17 syn keyword ahdlKeyword device else elsif end for function generate | |
18 syn keyword ahdlKeyword gnd help_id if in include input is machine | |
19 syn keyword ahdlKeyword node of options others output parameters | |
20 syn keyword ahdlKeyword returns states subdesign table then title to | |
21 syn keyword ahdlKeyword tri_state_node variable vcc when with | |
22 | |
23 " a bunch of types | |
24 syn keyword ahdlIdentifier carry cascade dffe dff exp global | |
25 syn keyword ahdlIdentifier jkffe jkff latch lcell mcell memory opendrn | |
26 syn keyword ahdlIdentifier soft srffe srff tffe tff tri wire x | |
27 | |
28 syn keyword ahdlMegafunction lpm_and lpm_bustri lpm_clshift lpm_constant | |
29 syn keyword ahdlMegafunction lpm_decode lpm_inv lpm_mux lpm_or lpm_xor | |
30 syn keyword ahdlMegafunction busmux mux | |
31 | |
32 syn keyword ahdlMegafunction divide lpm_abs lpm_add_sub lpm_compare | |
33 syn keyword ahdlMegafunction lpm_counter lpm_mult | |
34 | |
35 syn keyword ahdlMegafunction altdpram csfifo dcfifo scfifo csdpram lpm_ff | |
36 syn keyword ahdlMegafunction lpm_latch lpm_shiftreg lpm_ram_dq lpm_ram_io | |
37 syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc | |
38 | |
39 syn keyword ahdlTodo contained TODO | |
40 | |
41 " String contstants | |
42 syn region ahdlString start=+"+ skip=+\\"+ end=+"+ | |
43 | |
44 " valid integer number formats (decimal, binary, octal, hex) | |
45 syn match ahdlNumber '\<\d\+\>' | |
46 syn match ahdlNumber '\<b"\(0\|1\|x\)\+"' | |
47 syn match ahdlNumber '\<\(o\|q\)"\o\+"' | |
48 syn match ahdlNumber '\<\(h\|x\)"\x\+"' | |
49 | |
50 " operators | |
51 syn match ahdlOperator "[!&#$+\-<>=?:\^]" | |
52 syn keyword ahdlOperator not and nand or nor xor xnor | |
53 syn keyword ahdlOperator mod div log2 used ceil floor | |
54 | |
55 " one line and multi-line comments | |
56 " (define these after ahdlOperator so -- overrides -) | |
57 syn match ahdlComment "--.*" contains=ahdlNumber,ahdlTodo | |
58 syn region ahdlComment start="%" end="%" contains=ahdlNumber,ahdlTodo | |
59 | |
60 " other special characters | |
61 syn match ahdlSpecialChar "[\[\]().,;]" | |
62 | |
63 syn sync minlines=1 | |
64 | |
65 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
66 " Only when an item doesn't have highlighting yet |
7 | 67 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
68 " The default highlighting. |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link ahdlNumber ahdlString |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link ahdlMegafunction ahdlIdentifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link ahdlSpecialChar SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link ahdlKeyword Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link ahdlString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link ahdlComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
75 hi def link ahdlIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link ahdlOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link ahdlTodo Todo |
7 | 78 |
79 | |
80 let b:current_syntax = "ahdl" | |
81 " vim:ts=8 |