1" Vim syntax file 2" Language: DCL (Digital Command Language - vms) 3" Maintainer: Charles E. Campbell <[email protected]> 4" Last Change: Mar 26, 2019 5" Version: 13 6" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL 7 8" quit when a syntax file was already loaded 9if exists("b:current_syntax") 10 finish 11endif 12 13if (v:version == 704 && has("patch-7.4.1142")) || v:version > 704 14 syn iskeyword $,@,48-57,_ 15else 16 setlocal iskeyword=$,@,48-57,_ 17endif 18 19syn case ignore 20syn keyword dclInstr accounting del[ete] gen[cat] mou[nt] run 21syn keyword dclInstr all[ocate] dep[osit] gen[eral] ncp run[off] 22syn keyword dclInstr ana[lyze] dia[gnose] gos[ub] ncs sca 23syn keyword dclInstr app[end] dif[ferences] got[o] on sea[rch] 24syn keyword dclInstr ass[ign] dir[ectory] hel[p] ope[n] set 25syn keyword dclInstr att[ach] dis[able] ico[nv] pas[cal] sho[w] 26syn keyword dclInstr aut[horize] dis[connect] if pas[sword] sor[t] 27syn keyword dclInstr aut[ogen] dis[mount] ini[tialize] pat[ch] spa[wn] 28syn keyword dclInstr bac[kup] dpm[l] inq[uire] pca sta[rt] 29syn keyword dclInstr cal[l] dqs ins[tall] pho[ne] sto[p] 30syn keyword dclInstr can[cel] dsr job pri[nt] sub[mit] 31syn keyword dclInstr cc dst[graph] lat[cp] pro[duct] sub[routine] 32syn keyword dclInstr clo[se] dtm lib[rary] psw[rap] swx[cr] 33syn keyword dclInstr cms dum[p] lic[ense] pur[ge] syn[chronize] 34syn keyword dclInstr con[nect] edi[t] lin[k] qde[lete] sys[gen] 35syn keyword dclInstr con[tinue] ena[ble] lmc[p] qse[t] sys[man] 36syn keyword dclInstr con[vert] end[subroutine] loc[ale] qsh[ow] tff 37syn keyword dclInstr cop[y] eod log[in] rea[d] then 38syn keyword dclInstr cre[ate] eoj log[out] rec[all] typ[e] 39syn keyword dclInstr cxx exa[mine] lse[dit] rec[over] uil 40syn keyword dclInstr cxx[l_help] exc[hange] mac[ro] ren[ame] unl[ock] 41syn keyword dclInstr dea[llocate] exi[t] mai[l] rep[ly] ves[t] 42syn keyword dclInstr dea[ssign] fdl mer[ge] req[uest] vie[w] 43syn keyword dclInstr deb[ug] flo[wgraph] mes[sage] ret[urn] wai[t] 44syn keyword dclInstr dec[k] fon[t] mms rms wri[te] 45syn keyword dclInstr def[ine] for[tran] 46 47syn keyword dclLexical f$context f$edit f$getjpi f$message f$setprv 48syn keyword dclLexical f$csid f$element f$getqui f$mode f$string 49syn keyword dclLexical f$cvsi f$environment f$getsyi f$parse f$time 50syn keyword dclLexical f$cvtime f$extract f$identifier f$pid f$trnlnm 51syn keyword dclLexical f$cvui f$fao f$integer f$privilege f$type 52syn keyword dclLexical f$device f$file_attributes f$length f$process f$user 53syn keyword dclLexical f$directory f$getdvi f$locate f$search f$verify 54 55syn match dclMdfy "/\I\i*" nextgroup=dclMdfySet,dclMdfySetString 56syn match dclMdfySet "=[^ \t"]*" contained 57syn region dclMdfySet matchgroup=dclMdfyBrkt start="=\[" matchgroup=dclMdfyBrkt end="]" contains=dclMdfySep 58syn region dclMdfySetString start='="' skip='""' end='"' contained 59syn match dclMdfySep "[:,]" contained 60 61" Numbers 62syn match dclNumber "\d\+" 63 64" Varname (mainly to prevent dclNumbers from being recognized when part of a dclVarname) 65syn match dclVarname "\I\i*" 66 67" Filenames (devices, paths) 68syn match dclDevice "\I\i*\(\$\I\i*\)\=:[^=]"me=e-1 nextgroup=dclDirPath,dclFilename 69syn match dclDirPath "\[\(\I\i*\.\)*\I\i*\]" contains=dclDirSep nextgroup=dclFilename 70syn match dclFilename "\I\i*\$\(\I\i*\)\=\.\(\I\i*\)*\(;\d\+\)\=" contains=dclDirSep 71syn match dclFilename "\I\i*\.\(\I\i*\)\=\(;\d\+\)\=" contains=dclDirSep contained 72syn match dclDirSep "[[\].;]" 73 74" Strings 75syn region dclString start='"' skip='""' end='"' contains=@Spell 76 77" $ stuff and comments 78syn cluster dclCommentGroup contains=dclStart,dclTodo,@Spell 79syn match dclStart "^\$" skipwhite nextgroup=dclExe 80syn match dclContinue "-$" 81syn match dclComment "^\$!.*$" contains=@dclCommentGroup 82syn match dclExe "\I\i*" contained 83syn keyword dclTodo contained COMBAK DEBUG FIXME TODO XXX 84 85" Assignments and Operators 86syn match dclAssign ":==\=" 87syn match dclAssign "=" 88syn match dclOper "--\|+\|\*\|/" 89syn match dclLogOper "\.[a-zA-Z][a-zA-Z][a-zA-Z]\=\." contains=dclLogical,dclLogSep 90syn keyword dclLogical contained and ge gts lt nes 91syn keyword dclLogical contained eq ges le lts not 92syn keyword dclLogical contained eqs gt les ne or 93syn match dclLogSep "\." contained 94 95" @command procedures 96syn match dclCmdProcStart "@" nextgroup=dclCmdProc 97syn match dclCmdProc "\I\i*\(\.\I\i*\)\=" contained 98syn match dclCmdProc "\I\i*:" contained nextgroup=dclCmdDirPath,dclCmdProc 99syn match dclCmdDirPath "\[\(\I\i*\.\)*\I\i*\]" contained nextgroup=delCmdProc 100 101" labels 102syn match dclGotoLabel "^\$\s*\I\i*:\s*$" contains=dclStart 103 104" parameters 105syn match dclParam "'\I[a-zA-Z0-9_$]*'\=" 106 107" () matching (the clusters are commented out until a vim/vms comes out for v5.2+) 108"syn cluster dclNextGroups contains=dclCmdDirPath,dclCmdProc,dclCmdProc,dclDirPath,dclFilename,dclFilename,dclMdfySet,dclMdfySetString,delCmdProc,dclExe,dclTodo 109"syn region dclFuncList matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,@dclNextGroups 110syn region dclFuncList matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,dclCmdDirPath,dclCmdProc,dclCmdProc,dclDirPath,dclFilename,dclFilename,dclMdfySet,dclMdfySetString,delCmdProc,dclExe,dclTodo 111syn match dclError ")" 112 113" Define the default highlighting. 114if !exists("skip_dcl_syntax_inits") 115 116 hi def link dclLogOper dclError 117 hi def link dclLogical dclOper 118 hi def link dclLogSep dclSep 119 120 hi def link dclAssign Operator 121 hi def link dclCmdProc Special 122 hi def link dclCmdProcStart Operator 123 hi def link dclComment Comment 124 hi def link dclContinue Statement 125 hi def link dclDevice Identifier 126 hi def link dclDirPath Identifier 127 hi def link dclDirPath Identifier 128 hi def link dclDirSep Delimiter 129 hi def link dclError Error 130 hi def link dclExe Statement 131 hi def link dclFilename NONE 132 hi def link dclGotoLabel Label 133 hi def link dclInstr Statement 134 hi def link dclLexical Function 135 hi def link dclMdfy Type 136 hi def link dclMdfyBrkt Delimiter 137 hi def link dclMdfySep Delimiter 138 hi def link dclMdfySet Type 139 hi def link dclMdfySetString String 140 hi def link dclNumber Number 141 hi def link dclOper Operator 142 hi def link dclParam Special 143 hi def link dclSep Delimiter 144 hi def link dclStart Delimiter 145 hi def link dclString String 146 hi def link dclTodo Todo 147 148endif 149 150let b:current_syntax = "dcl" 151 152" vim: ts=16 153