7
|
1 " Vim syntax file
|
|
2 " Language: Cyn++
|
|
3 " Maintainer: Phil Derrick <phild@forteds.com>
|
|
4 " Last change: 2001 Sep 02
|
|
5 "
|
|
6 " Language Information
|
|
7 "
|
|
8 " Cynpp (Cyn++) is a macro language to ease coding in Cynlib.
|
|
9 " Cynlib is a library of C++ classes to allow hardware
|
|
10 " modelling in C++. Combined with a simulation kernel,
|
|
11 " the compiled and linked executable forms a hardware
|
|
12 " simulation of the described design.
|
|
13 "
|
|
14 " Cyn++ is designed to be HDL-like.
|
|
15 "
|
|
16 " Further information can be found from www.forteds.com
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21
|
|
22 " Remove any old syntax stuff hanging around
|
|
23 " For version 5.x: Clear all syntax items
|
|
24 " For version 6.x: Quit when a syntax file was already loaded
|
|
25 if version < 600
|
|
26 syntax clear
|
|
27 elseif exists("b:current_syntax")
|
|
28 finish
|
|
29 endif
|
|
30
|
|
31 " Read the Cynlib syntax to start with - this includes the C++ syntax
|
|
32 if version < 600
|
|
33 source <sfile>:p:h/cynlib.vim
|
|
34 else
|
|
35 runtime! syntax/cynlib.vim
|
|
36 endif
|
|
37 unlet b:current_syntax
|
|
38
|
|
39
|
|
40
|
|
41 " Cyn++ extensions
|
|
42
|
|
43 syn keyword cynppMacro Always EndAlways
|
|
44 syn keyword cynppMacro Module EndModule
|
|
45 syn keyword cynppMacro Initial EndInitial
|
|
46 syn keyword cynppMacro Posedge Negedge Changed
|
|
47 syn keyword cynppMacro At
|
|
48 syn keyword cynppMacro Thread EndThread
|
|
49 syn keyword cynppMacro Instantiate
|
|
50
|
|
51 " Define the default highlighting.
|
|
52 " For version 5.7 and earlier: only when not done already
|
|
53 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
54 if version >= 508 || !exists("did_cynpp_syntax_inits")
|
|
55 if version < 508
|
|
56 let did_cynpp_syntax_inits = 1
|
|
57 command -nargs=+ HiLink hi link <args>
|
|
58 else
|
|
59 command -nargs=+ HiLink hi def link <args>
|
|
60 endif
|
|
61
|
|
62 HiLink cLabel Label
|
|
63 HiLink cynppMacro Statement
|
|
64
|
|
65 delcommand HiLink
|
|
66 endif
|
|
67
|
|
68 let b:current_syntax = "cynpp"
|