blob: 3fb77a2afa27c7a778867738f7827a7668fb7e7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
" Vim syntax file
" Language: SPECMAN E-LANGUAGE
" Maintainer: Or Freund <or@mobilian.com ;omf@gmx.co.uk; OrMeir@yahoo.com>
" Last Update: Wed Oct 24 2001
"---------------------------------------------------------
"| If anyone found an error or fix the parenthesis part |
"| I will be happy to hear about it |
"| Thanks Or. |
"---------------------------------------------------------
" Remove any old syntax stuff hanging around
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn keyword specmanTodo contained TODO todo ToDo FIXME XXX
syn keyword specmanStatement var instance on compute start event expect check that routine
syn keyword specmanStatement specman is also first only with like
syn keyword specmanStatement list of all radix hex dec bin ignore illegal
syn keyword specmanStatement traceable untraceable
syn keyword specmanStatement cover using count_only trace_only at_least transition item ranges
syn keyword specmanStatement cross text call task within
syn keyword specmanMethod initialize non_terminal testgroup delayed exit finish
syn keyword specmanMethod out append print outf appendf
syn keyword specmanMethod post_generate pre_generate setup_test finalize_test extract_test
syn keyword specmanMethod init run copy as_a set_config dut_error add clear lock quit
syn keyword specmanMethod lock unlock release swap quit to_string value stop_run
syn keyword specmanMethod crc_8 crc_32 crc_32_flip get_config add0 all_indices and_all
syn keyword specmanMethod apply average count delete exists first_index get_indices
syn keyword specmanMethod has insert is_a_permutation is_empty key key_exists key_index
syn keyword specmanMethod last last_index max max_index max_value min min_index
syn keyword specmanMethod min_value or_all pop pop0 push push0 product resize reverse
syn keyword specmanMethod sort split sum top top0 unique clear is_all_iterations
syn keyword specmanMethod get_enclosing_unit hdl_path exec deep_compare deep_compare_physical
syn keyword specmanMethod pack unpack warning error fatal
syn match specmanMethod "size()"
syn keyword specmanPacking packing low high
syn keyword specmanType locker address
syn keyword specmanType body code vec chars
syn keyword specmanType integer real bool int long uint byte bits bit time string
syn keyword specmanType byte_array external_pointer
syn keyword specmanBoolean TRUE FALSE
syn keyword specmanPreCondit #ifdef #ifndef #else
syn keyword specmanConditional choose matches
syn keyword specmanConditional if then else when try
syn keyword specmanLabel case casex casez default
syn keyword specmanLogical and or not xor
syn keyword specmanRepeat until repeat while for from to step each do break continue
syn keyword specmanRepeat before next sequence always -kind network
syn keyword specmanRepeat index it me in new return result select
syn keyword specmanTemporal cycle sample events forever
syn keyword specmanTemporal wait change negedge rise fall delay sync sim true detach eventually emit
syn keyword specmanConstant MAX_INT MIN_INT NULL UNDEF
syn keyword specmanDefine define as computed type extend
syn keyword specmanDefine verilog vhdl variable global sys
syn keyword specmanStructure struct unit
syn keyword specmanInclude import
syn keyword specmanConstraint gen keep keeping soft before
syn keyword specmanSpecial untyped symtab ECHO DOECHO
syn keyword specmanFile files load module ntv source_ref script read write
syn keyword specmanFSM initial idle others posedge clock cycles
syn match specmanOperator "[&|~><!)(*%@+/=?:;}{,.\^\-\[\]]"
syn match specmanOperator "+="
syn match specmanOperator "-="
syn match specmanOperator "*="
syn match specmanComment "//.*" contains=specmanTodo
syn match specmanComment "--.*"
syn region specmanComment start="^'>"hs=s+2 end="^<'"he=e-2
syn match specmanHDL "'[`.a-zA-Z0-9_@\[\]]\+\>'"
syn match specmanCompare "=="
syn match specmanCompare "!==="
syn match specmanCompare "==="
syn match specmanCompare "!="
syn match specmanCompare ">="
syn match specmanCompare "<="
syn match specmanNumber "[0-9]:[0-9]"
syn match specmanNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>"
syn match specmanNumber "0[bB]\s*[0-1_xXzZ?]\+\>"
syn match specmanNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>"
syn match specmanNumber "0[oO]\s*[0-9a-fA-F_xXzZ?]\+\>"
syn match specmanNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>"
syn match specmanNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>"
syn match specmanNumber "0[xX]\s*[0-9a-fA-F_xXzZ?]\+\>"
syn match specmanNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>"
syn region specmanString start=+"+ end=+"+
"**********************************************************************
" I took this section from c.vim but I didnt succeded to make it work
" ANY one who dare jumping to this deep watter is more than welocome!
"**********************************************************************
""catch errors caused by wrong parenthesis and brackets
"syn cluster specmanParenGroup contains=specmanParenError
"" ,specmanNumbera,specmanComment
"if exists("specman_no_bracket_error")
"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup
"syn match specmanParenError ")"
"syn match specmanErrInParen contained "[{}]"
"else
"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup,specmanErrInBracket
"syn match specmanParenError "[\])]"
"syn match specmanErrInParen contained "[\]{}]"
"syn region specmanBracket transparent start='\[' end=']' contains=ALLBUT,@specmanParenGroup,specmanErrInParen
"syn match specmanErrInBracket contained "[);{}]"
"endif
"
"Modify the following as needed. The trade-off is performance versus
"functionality.
syn sync lines=50
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_specman_syn_inits")
if version < 508
let did_specman_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
HiLink specmanConditional Conditional
HiLink specmanConstraint Conditional
HiLink specmanRepeat Repeat
HiLink specmanString String
HiLink specmanComment Comment
HiLink specmanConstant Macro
HiLink specmanNumber Number
HiLink specmanCompare Operator
HiLink specmanOperator Operator
HiLink specmanLogical Operator
HiLink specmanStatement Statement
HiLink specmanHDL SpecialChar
HiLink specmanMethod Function
HiLink specmanInclude Include
HiLink specmanStructure Structure
HiLink specmanBoolean Boolean
HiLink specmanFSM Label
HiLink specmanSpecial Special
HiLink specmanType Type
HiLink specmanTemporal Type
HiLink specmanFile Include
HiLink specmanPreCondit Include
HiLink specmanDefine Typedef
HiLink specmanLabel Label
HiLink specmanPacking keyword
HiLink specmanTodo Todo
HiLink specmanParenError Error
HiLink specmanErrInParen Error
HiLink specmanErrInBracket Error
delcommand HiLink
endif
let b:current_syntax = "specman"
|