xref: /vim-8.2.3635/runtime/syntax/slpconf.vim (revision 214641f7)
1" Vim syntax file
2" Language:             RFC 2614 - An API for Service Location configuration file
3" Previous Maintainer:  Nikolai Weibull <[email protected]>
4" Latest Revision:      2006-04-19
5
6if exists("b:current_syntax")
7  finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13syn keyword slpconfTodo         contained TODO FIXME XXX NOTE
14
15syn region  slpconfComment      display oneline start='^[#;]' end='$'
16                                \ contains=slpconfTodo,@Spell
17
18syn match   slpconfBegin        display '^'
19                                \ nextgroup=slpconfTag,
20                                \ slpconfComment skipwhite
21
22syn keyword slpconfTag          contained net
23                                \ nextgroup=slpconfNetTagDot
24
25syn match   slpconfNetTagDot    contained display '.'
26                                \ nextgroup=slpconfNetTag
27
28syn keyword slpconfNetTag       contained slp
29                                \ nextgroup=slpconfNetSlpTagdot
30
31syn match   slpconfNetSlpTagDot contained display '.'
32                                \ nextgroup=slpconfNetSlpTag
33
34syn keyword slpconfNetSlpTag    contained isDA traceDATraffic traceMsg
35                                \ traceDrop traceReg isBroadcastOnly
36                                \ passiveDADetection securityEnabled
37                                \ nextgroup=slpconfBooleanEq,slpconfBooleanHome
38                                \ skipwhite
39
40syn match   slpconfBooleanHome  contained display
41                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
42                                \ nextgroup=slpconfBooleanEq skipwhite
43
44syn match   slpconfBooleanEq    contained display '='
45                                \ nextgroup=slpconfBoolean skipwhite
46
47syn keyword slpconfBoolean      contained true false TRUE FALSE
48
49syn keyword slpconfNetSlpTag    contained DAHeartBeat multicastTTL
50                                \ DAActiveDiscoveryInterval
51                                \ multicastMaximumWait multicastTimeouts
52                                \ randomWaitBound MTU maxResults
53                                \ nextgroup=slpconfIntegerEq,slpconfIntegerHome
54                                \ skipwhite
55
56syn match   slpconfIntegerHome  contained display
57                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
58                                \ nextgroup=slpconfIntegerEq skipwhite
59
60syn match   slpconfIntegerEq    contained display '='
61                                \ nextgroup=slpconfInteger skipwhite
62
63syn match   slpconfInteger      contained display '\<\d\+\>'
64
65syn keyword slpconfNetSlpTag    contained DAAttributes SAAttributes
66                                \ nextgroup=slpconfAttrEq,slpconfAttrHome
67                                \ skipwhite
68
69syn match   slpconfAttrHome     contained display
70                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
71                                \ nextgroup=slpconfAttrEq skipwhite
72
73syn match   slpconfAttrEq       contained display '='
74                                \ nextgroup=slpconfAttrBegin skipwhite
75
76syn match   slpconfAttrBegin    contained display '('
77                                \ nextgroup=slpconfAttrTag skipwhite
78
79syn match   slpconfAttrTag      contained display
80                                \ '[^* \t_(),\\!<=>~[:cntrl:]]\+'
81                                \ nextgroup=slpconfAttrTagEq skipwhite
82
83syn match   slpconfAttrTagEq    contained display '='
84                                \ nextgroup=@slpconfAttrValue skipwhite
85
86syn cluster slpconfAttrValueCon contains=slpconfAttrValueSep,slpconfAttrEnd
87
88syn cluster slpconfAttrValue    contains=slpconfAttrIValue,slpconfAttrSValue,
89                                \ slpconfAttrBValue,slpconfAttrSSValue
90
91syn match   slpconfAttrSValue   contained display '[^ (),\\!<=>~[:cntrl:]]\+'
92                                \ nextgroup=@slpconfAttrValueCon skipwhite
93
94syn match   slpconfAttrSSValue  contained display '\\FF\%(\\\x\x\)\+'
95                                \ nextgroup=@slpconfAttrValueCon skipwhite
96
97syn match   slpconfAttrIValue   contained display '[-]\=\d\+\>'
98                                \ nextgroup=@slpconfAttrValueCon skipwhite
99
100syn keyword slpconfAttrBValue   contained true false
101                                \ nextgroup=@slpconfAttrValueCon skipwhite
102
103syn match   slpconfAttrValueSep contained display ','
104                                \ nextgroup=@slpconfAttrValue skipwhite
105
106syn match   slpconfAttrEnd      contained display ')'
107                                \ nextgroup=slpconfAttrSep skipwhite
108
109syn match   slpconfAttrSep      contained display ','
110                                \ nextgroup=slpconfAttrBegin skipwhite
111
112syn keyword slpconfNetSlpTag    contained useScopes typeHint
113                                \ nextgroup=slpconfStringsEq,slpconfStringsHome
114                                \ skipwhite
115
116syn match   slpconfStringsHome  contained display
117                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
118                                \ nextgroup=slpconfStringsEq skipwhite
119
120syn match   slpconfStringsEq    contained display '='
121                                \ nextgroup=slpconfStrings skipwhite
122
123syn match   slpconfStrings      contained display
124                                \ '\%([[:digit:][:alpha:]]\|[!-+./:-@[-`{-~-]\|\\\x\x\)\+'
125                                \ nextgroup=slpconfStringsSep skipwhite
126
127syn match   slpconfStringsSep   contained display ','
128                                \ nextgroup=slpconfStrings skipwhite
129
130syn keyword slpconfNetSlpTag    contained DAAddresses
131                                \ nextgroup=slpconfAddressesEq,slpconfAddrsHome
132                                \ skipwhite
133
134syn match   slpconfAddrsHome    contained display
135                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
136                                \ nextgroup=slpconfAddressesEq skipwhite
137
138syn match   slpconfAddressesEq  contained display '='
139                                \ nextgroup=@slpconfAddresses skipwhite
140
141syn cluster slpconfAddresses    contains=slpconfFQDNs,slpconfHostnumbers
142
143syn match   slpconfFQDNs        contained display
144                                \ '\a[[:alnum:]-]*[[:alnum:]]\|\a'
145                                \ nextgroup=slpconfAddressesSep skipwhite
146
147syn match   slpconfHostnumbers  contained display
148                                \ '\d\{1,3}\%(\.\d\{1,3}\)\{3}'
149                                \ nextgroup=slpconfAddressesSep skipwhite
150
151syn match   slpconfAddressesSep contained display ','
152                                \ nextgroup=@slpconfAddresses skipwhite
153
154syn keyword slpconfNetSlpTag    contained serializedRegURL
155                                \ nextgroup=slpconfStringEq,slpconfStringHome
156                                \ skipwhite
157
158syn match   slpconfStringHome   contained display
159                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
160                                \ nextgroup=slpconfStringEq skipwhite
161
162syn match   slpconfStringEq     contained display '='
163                                \ nextgroup=slpconfString skipwhite
164
165syn match   slpconfString       contained display
166                                \ '\%([!-+./:-@[-`{-~-]\|\\\x\x\)\+\|[[:digit:][:alpha:]]'
167
168syn keyword slpconfNetSlpTag    contained multicastTimeouts DADiscoveryTimeouts
169                                \ datagramTimeouts
170                                \ nextgroup=slpconfIntegersEq,
171                                \ slpconfIntegersHome skipwhite
172
173syn match   slpconfIntegersHome contained display
174                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
175                                \ nextgroup=slpconfIntegersEq skipwhite
176
177syn match   slpconfIntegersEq   contained display '='
178                                \ nextgroup=slpconfIntegers skipwhite
179
180syn match   slpconfIntegers     contained display '\<\d\+\>'
181                                \ nextgroup=slpconfIntegersSep skipwhite
182
183syn match   slpconfIntegersSep  contained display ','
184                                \ nextgroup=slpconfIntegers skipwhite
185
186syn keyword slpconfNetSlpTag    contained interfaces
187                                \ nextgroup=slpconfHostnumsEq,
188                                \ slpconfHostnumsHome skipwhite
189
190syn match   slpconfHostnumsHome contained display
191                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
192                                \ nextgroup=slpconfHostnumsEq skipwhite
193
194syn match   slpconfHostnumsEq   contained display '='
195                                \ nextgroup=slpconfOHostnumbers skipwhite
196
197syn match   slpconfOHostnumbers contained display
198                                \ '\d\{1,3}\%(\.\d\{1,3}\)\{3}'
199                                \ nextgroup=slpconfHostnumsSep skipwhite
200
201syn match   slpconfHostnumsSep  contained display ','
202                                \ nextgroup=slpconfOHostnumbers skipwhite
203
204syn keyword slpconfNetSlpTag    contained locale
205                                \ nextgroup=slpconfLocaleEq,slpconfLocaleHome
206                                \ skipwhite
207
208syn match   slpconfLocaleHome   contained display
209                                \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}'
210                                \ nextgroup=slpconfLocaleEq skipwhite
211
212syn match   slpconfLocaleEq     contained display '='
213                                \ nextgroup=slpconfLocale skipwhite
214
215syn match   slpconfLocale       contained display '\a\{1,8}\%(-\a\{1,8}\)\='
216
217hi def link slpconfTodo         Todo
218hi def link slpconfComment      Comment
219hi def link slpconfTag          Identifier
220hi def link slpconfDelimiter    Delimiter
221hi def link slpconfNetTagDot    slpconfDelimiter
222hi def link slpconfNetTag       slpconfTag
223hi def link slpconfNetSlpTagDot slpconfNetTagDot
224hi def link slpconfNetSlpTag    slpconfTag
225hi def link slpconfHome         Special
226hi def link slpconfBooleanHome  slpconfHome
227hi def link slpconfEq           Operator
228hi def link slpconfBooleanEq    slpconfEq
229hi def link slpconfBoolean      Boolean
230hi def link slpconfIntegerHome  slpconfHome
231hi def link slpconfIntegerEq    slpconfEq
232hi def link slpconfInteger      Number
233hi def link slpconfAttrHome     slpconfHome
234hi def link slpconfAttrEq       slpconfEq
235hi def link slpconfAttrBegin    slpconfDelimiter
236hi def link slpconfAttrTag      slpconfTag
237hi def link slpconfAttrTagEq    slpconfEq
238hi def link slpconfAttrIValue   slpconfInteger
239hi def link slpconfAttrSValue   slpconfString
240hi def link slpconfAttrBValue   slpconfBoolean
241hi def link slpconfAttrSSValue  slpconfString
242hi def link slpconfSeparator    slpconfDelimiter
243hi def link slpconfAttrValueSep slpconfSeparator
244hi def link slpconfAttrEnd      slpconfAttrBegin
245hi def link slpconfAttrSep      slpconfSeparator
246hi def link slpconfStringsHome  slpconfHome
247hi def link slpconfStringsEq    slpconfEq
248hi def link slpconfStrings      slpconfString
249hi def link slpconfStringsSep   slpconfSeparator
250hi def link slpconfAddrsHome    slpconfHome
251hi def link slpconfAddressesEq  slpconfEq
252hi def link slpconfFQDNs        String
253hi def link slpconfHostnumbers  Number
254hi def link slpconfAddressesSep slpconfSeparator
255hi def link slpconfStringHome   slpconfHome
256hi def link slpconfStringEq     slpconfEq
257hi def link slpconfString       String
258hi def link slpconfIntegersHome slpconfHome
259hi def link slpconfIntegersEq   slpconfEq
260hi def link slpconfIntegers     slpconfInteger
261hi def link slpconfIntegersSep  slpconfSeparator
262hi def link slpconfHostnumsHome slpconfHome
263hi def link slpconfHostnumsEq   slpconfEq
264hi def link slpconfOHostnumbers slpconfHostnumbers
265hi def link slpconfHostnumsSep  slpconfSeparator
266hi def link slpconfLocaleHome   slpconfHome
267hi def link slpconfLocaleEq     slpconfEq
268hi def link slpconfLocale       slpconfString
269
270let b:current_syntax = "slpconf"
271
272let &cpo = s:cpo_save
273unlet s:cpo_save
274