7
|
1 " Vim syntax file
|
|
2 " Language: CUPL simulation
|
|
3 " Maintainer: John Cook <john.cook@kla-tencor.com>
|
|
4 " Last Change: 2001 Apr 25
|
|
5
|
|
6 " For version 5.x: Clear all syntax items
|
|
7 " For version 6.x: Quit when a syntax file was already loaded
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " Read the CUPL syntax to start with
|
|
15 if version < 600
|
|
16 source <sfile>:p:h/cupl.vim
|
|
17 else
|
|
18 runtime! syntax/cupl.vim
|
|
19 unlet b:current_syntax
|
|
20 endif
|
|
21
|
|
22 " omit definition-specific stuff
|
|
23 syn clear cuplStatement
|
|
24 syn clear cuplFunction
|
|
25 syn clear cuplLogicalOperator
|
|
26 syn clear cuplArithmeticOperator
|
|
27 syn clear cuplAssignmentOperator
|
|
28 syn clear cuplEqualityOperator
|
|
29 syn clear cuplTruthTableOperator
|
|
30 syn clear cuplExtension
|
|
31
|
|
32 " simulation order statement
|
|
33 syn match cuplsimOrder "order:" nextgroup=cuplsimOrderSpec skipempty
|
|
34 syn region cuplsimOrderSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimOrderFormat,cuplBitVector,cuplSpecialChar,cuplLogicalOperator,cuplCommaOperator contained
|
|
35
|
|
36 " simulation base statement
|
|
37 syn match cuplsimBase "base:" nextgroup=cuplsimBaseSpec skipempty
|
|
38 syn region cuplsimBaseSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimBaseType contained
|
|
39 syn keyword cuplsimBaseType octal decimal hex contained
|
|
40
|
|
41 " simulation vectors statement
|
|
42 syn match cuplsimVectors "vectors:"
|
|
43
|
|
44 " simulator format control
|
|
45 syn match cuplsimOrderFormat "%\d\+\>" contained
|
|
46
|
|
47 " simulator control
|
|
48 syn match cuplsimStimulus "[10ckpx]\+"
|
|
49 syn match cuplsimStimulus +'\(\x\|x\)\+'+
|
|
50 syn match cuplsimOutput "[lhznx*]\+"
|
|
51 syn match cuplsimOutput +"\x\+"+
|
|
52
|
|
53 syn sync minlines=1
|
|
54
|
|
55 " Define the default highlighting.
|
|
56 " For version 5.7 and earlier: only when not done already
|
|
57 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
58 if version >= 508 || !exists("did_cuplsim_syn_inits")
|
|
59 if version < 508
|
|
60 let did_cuplsim_syn_inits = 1
|
|
61 command -nargs=+ HiLink hi link <args>
|
|
62 else
|
|
63 command -nargs=+ HiLink hi def link <args>
|
|
64 endif
|
|
65
|
|
66 " append to the highlighting links in cupl.vim
|
|
67 " The default highlighting.
|
|
68 HiLink cuplsimOrder cuplStatement
|
|
69 HiLink cuplsimBase cuplStatement
|
|
70 HiLink cuplsimBaseType cuplStatement
|
|
71 HiLink cuplsimVectors cuplStatement
|
|
72 HiLink cuplsimStimulus cuplNumber
|
|
73 HiLink cuplsimOutput cuplNumber
|
|
74 HiLink cuplsimOrderFormat cuplNumber
|
|
75
|
|
76 delcommand HiLink
|
|
77 endif
|
|
78
|
|
79 let b:current_syntax = "cuplsim"
|
|
80 " vim:ts=8
|