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