xref: /vim-8.2.3635/runtime/syntax/cuplsim.vim (revision 5f1920ad)
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
50
51" append to the highlighting links in cupl.vim
52" The default highlighting.
53hi def link cuplsimOrder		cuplStatement
54hi def link cuplsimBase		cuplStatement
55hi def link cuplsimBaseType	cuplStatement
56hi def link cuplsimVectors		cuplStatement
57hi def link cuplsimStimulus	cuplNumber
58hi def link cuplsimOutput		cuplNumber
59hi def link cuplsimOrderFormat	cuplNumber
60
61
62let b:current_syntax = "cuplsim"
63" vim:ts=8
64