xref: /vim-8.2.3635/runtime/syntax/cuplsim.vim (revision 89bcfda6)
1" Vim syntax file
2" Language:	CUPL simulation
3" Maintainer:	John Cook <[email protected]>
4" Last Change:	2001 Apr 25
5
6" quit when a syntax file was already loaded
7if exists("b:current_syntax")
8  finish
9endif
10
11" Read the CUPL syntax to start with
12runtime! syntax/cupl.vim
13unlet b:current_syntax
14
15" omit definition-specific stuff
16syn clear cuplStatement
17syn clear cuplFunction
18syn clear cuplLogicalOperator
19syn clear cuplArithmeticOperator
20syn clear cuplAssignmentOperator
21syn clear cuplEqualityOperator
22syn clear cuplTruthTableOperator
23syn clear cuplExtension
24
25" simulation order statement
26syn match  cuplsimOrder "order:" nextgroup=cuplsimOrderSpec skipempty
27syn region cuplsimOrderSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimOrderFormat,cuplBitVector,cuplSpecialChar,cuplLogicalOperator,cuplCommaOperator contained
28
29" simulation base statement
30syn match   cuplsimBase "base:" nextgroup=cuplsimBaseSpec skipempty
31syn region  cuplsimBaseSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimBaseType contained
32syn keyword cuplsimBaseType octal decimal hex contained
33
34" simulation vectors statement
35syn match cuplsimVectors "vectors:"
36
37" simulator format control
38syn match cuplsimOrderFormat "%\d\+\>" contained
39
40" simulator control
41syn match cuplsimStimulus "[10ckpx]\+"
42syn match cuplsimStimulus +'\(\x\|x\)\+'+
43syn match cuplsimOutput "[lhznx*]\+"
44syn match cuplsimOutput +"\x\+"+
45
46syn sync minlines=1
47
48" Define the default highlighting.
49" Only when an item doesn't have highlighting yet
50command -nargs=+ HiLink hi def link <args>
51
52" append to the highlighting links in cupl.vim
53" The default highlighting.
54HiLink cuplsimOrder		cuplStatement
55HiLink cuplsimBase		cuplStatement
56HiLink cuplsimBaseType	cuplStatement
57HiLink cuplsimVectors		cuplStatement
58HiLink cuplsimStimulus	cuplNumber
59HiLink cuplsimOutput		cuplNumber
60HiLink cuplsimOrderFormat	cuplNumber
61
62delcommand HiLink
63
64let b:current_syntax = "cuplsim"
65" vim:ts=8
66