3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
4 " Last Change: Sep 06, 2005
6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
8 " For version 5.x: Clear all syntax items
9 " For version 6.x: Quit when a syntax file was already loaded
12 elseif exists("b:current_syntax")
16 " Read the C syntax to start with
18 source <sfile>:p:h/c.vim
23 syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName
24 syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone
25 syn region rpcProgZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr
26 syn keyword rpcVersion contained version skipnl skipwhite nextgroup=rpcVersName
27 syn match rpcVersName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcVersZone
28 syn region rpcVersZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment
29 syn keyword rpcDecl contained string
30 syn match rpcProcNmbr contained "=\s*\d\+;"me=e-1
31 syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1
32 syn match rpcPassThru "^\s*%.*$"
34 " Define the default highlighting.
35 " For version 5.7 and earlier: only when not done already
36 " For version 5.8 and later: only when an item doesn't have highlighting yet
37 if version >= 508 || !exists("did_rpcgen_syntax_inits")
39 let did_rpcgen_syntax_inits = 1
40 command -nargs=+ HiLink hi link <args>
42 command -nargs=+ HiLink hi def link <args>
45 HiLink rpcProgName rpcName
46 HiLink rpcProgram rpcStatement
47 HiLink rpcVersName rpcName
48 HiLink rpcVersion rpcStatement
51 HiLink rpcPassThru cComment
53 HiLink rpcName Special
54 HiLink rpcProcNmbr Delimiter
55 HiLink rpcProgNmbrErr Error
56 HiLink rpcStatement Statement
61 let b:current_syntax = "rpcgen"