2 " Language: CUPL simulation
3 " Maintainer: John Cook <john.cook@kla-tencor.com>
4 " Last Change: 2001 Apr 25
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
14 " Read the CUPL syntax to start with
16 source <sfile>:p:h/cupl.vim
18 runtime! syntax/cupl.vim
19 unlet b:current_syntax
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
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
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
41 " simulation vectors statement
42 syn match cuplsimVectors "vectors:"
44 " simulator format control
45 syn match cuplsimOrderFormat "%\d\+\>" contained
48 syn match cuplsimStimulus "[10ckpx]\+"
49 syn match cuplsimStimulus +'\(\x\|x\)\+'+
50 syn match cuplsimOutput "[lhznx*]\+"
51 syn match cuplsimOutput +"\x\+"+
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")
60 let did_cuplsim_syn_inits = 1
61 command -nargs=+ HiLink hi link <args>
63 command -nargs=+ HiLink hi def link <args>
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
79 let b:current_syntax = "cuplsim"