2 " Language: RFC 2614 - An API for Service Location registration file
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-04-19
6 if exists("b:current_syntax")
13 syn keyword slpregTodo contained TODO FIXME XXX NOTE
15 syn region slpregComment display oneline start='^[#;]' end='$'
16 \ contains=slpregTodo,@Spell
18 syn match slpregBegin display '^'
19 \ nextgroup=slpregServiceURL,
22 syn match slpregServiceURL contained display 'service:'
23 \ nextgroup=slpregServiceType
25 syn match slpregServiceType contained display '\a[[:alpha:][:digit:]+-]*\%(\.\a[[:alpha:][:digit:]+-]*\)\=\%(:\a[[:alpha:][:digit:]+-]*\)\='
26 \ nextgroup=slpregServiceSAPCol
28 syn match slpregServiceSAPCol contained display ':'
31 syn match slpregSAP contained '[^,]\+'
32 \ nextgroup=slpregLangSep
33 "syn match slpregSAP contained display '\%(//\%(\%([[:alpha:][:digit:]$-_.~!*\'(),+;&=]*@\)\=\%([[:alnum:]][[:alnum:]-]*[[:alnum:]]\|[[:alnum:]]\.\)*\%(\a[[:alnum:]-]*[[:alnum:]]\|\a\)\%(:\d\+\)\=\)\=\|/at/\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}:\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}\|/ipx/\x\{8}:\x\{12}:\x\{4}\)\%(/\%([[:alpha:][:digit:]$-_.~!*\'()+;?:@&=+]\|\\\x\x\)*\)*\%(;[^()\\!<=>~[:cntrl:]* \t_]\+\%(=[^()\\!<=>~[:cntrl:] ]\+\)\=\)*'
35 syn match slpregLangSep contained display ','
36 \ nextgroup=slpregLang
38 syn match slpregLang contained display '\a\{1,8}\%(-\a\{1,8\}\)\='
39 \ nextgroup=slpregLTimeSep
41 syn match slpregLTimeSep contained display ','
42 \ nextgroup=slpregLTime
44 syn match slpregLTime contained display '\d\{1,5}'
45 \ nextgroup=slpregType,slpregUNewline
47 syn match slpregType contained display '\a[[:alpha:][:digit:]+-]*'
48 \ nextgroup=slpregUNewLine
50 syn match slpregUNewLine contained '\s*\n'
51 \ nextgroup=slpregScopes,slpregAttrList skipnl
53 syn keyword slpregScopes contained scopes
54 \ nextgroup=slpregScopesEq
56 syn match slpregScopesEq contained '=' nextgroup=slpregScopeName
58 syn match slpregScopeName contained '[^(),\\!<=>[:cntrl:];*+ ]\+'
59 \ nextgroup=slpregScopeNameSep,
62 syn match slpregScopeNameSep contained ','
63 \ nextgroup=slpregScopeName
65 syn match slpregScopeNewline contained '\s*\n'
66 \ nextgroup=slpregAttribute skipnl
68 syn match slpregAttribute contained '[^(),\\!<=>[:cntrl:]* \t_]\+'
69 \ nextgroup=slpregAttributeEq,
72 syn match slpregAttributeEq contained '='
73 \ nextgroup=@slpregAttrValue
75 syn cluster slpregAttrValueCon contains=slpregAttribute,slpregAttrValueSep
77 syn cluster slpregAttrValue contains=slpregAttrIValue,slpregAttrSValue,
78 \ slpregAttrBValue,slpregAttrSSValue
80 syn match slpregAttrSValue contained display '[^(),\\!<=>~[:cntrl:]]\+'
81 \ nextgroup=@slpregAttrValueCon skipwhite skipnl
83 syn match slpregAttrSSValue contained display '\\FF\%(\\\x\x\)\+'
84 \ nextgroup=@slpregAttrValueCon skipwhite skipnl
86 syn match slpregAttrIValue contained display '[-]\=\d\+\>'
87 \ nextgroup=@slpregAttrValueCon skipwhite skipnl
89 syn keyword slpregAttrBValue contained true false
90 \ nextgroup=@slpregAttrValueCon skipwhite skipnl
92 syn match slpregAttrValueSep contained display ','
93 \ nextgroup=@slpregAttrValue skipwhite skipnl
95 hi def link slpregTodo Todo
96 hi def link slpregComment Comment
97 hi def link slpregServiceURL Type
98 hi def link slpregServiceType slpregServiceURL
99 hi def link slpregServiceSAPCol slpregServiceURL
100 hi def link slpregSAP slpregServiceURL
101 hi def link slpregDelimiter Delimiter
102 hi def link slpregLangSep slpregDelimiter
103 hi def link slpregLang String
104 hi def link slpregLTimeSep slpregDelimiter
105 hi def link slpregLTime Number
106 hi def link slpregType Type
107 hi def link slpregScopes Identifier
108 hi def link slpregScopesEq Operator
109 hi def link slpregScopeName String
110 hi def link slpregScopeNameSep slpregDelimiter
111 hi def link slpregAttribute Identifier
112 hi def link slpregAttributeEq Operator
113 hi def link slpregAttrSValue String
114 hi def link slpregAttrSSValue slpregAttrSValue
115 hi def link slpregAttrIValue Number
116 hi def link slpregAttrBValue Boolean
117 hi def link slpregAttrValueSep slpregDelimiter
119 let b:current_syntax = "slpreg"
121 let &cpo = s:cpo_save