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