1121
|
1 " Language: streaming descriptor file
|
|
2 " Maintainer: Puria Nafisi Azizi (pna) <pna@netstudent.polito.it>
|
|
3 " License: This file can be redistribued and/or modified under the same terms
|
|
4 " as Vim itself.
|
|
5 " URL: http://netstudent.polito.it/vim_syntax/
|
3312
|
6 " Last Change: 2012 Feb 03 by Thilo Six
|
1121
|
7
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
3312
|
14 let s:cpo_save = &cpo
|
|
15 set cpo&vim
|
|
16
|
1121
|
17 " Always ignore case
|
|
18 syn case ignore
|
|
19
|
|
20 " Comments
|
|
21 syn match sdComment /\s*[#;].*$/
|
|
22
|
|
23 " IP Adresses
|
|
24 syn cluster sdIPCluster contains=sdIPError,sdIPSpecial
|
|
25 syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained
|
|
26 syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained
|
|
27 syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster
|
|
28
|
|
29 " Statements
|
3312
|
30 syn keyword sdStatement AGGREGATE AUDIO_CHANNELS
|
1121
|
31 syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE
|
|
32 syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR
|
|
33 syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite
|
|
34 syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite
|
|
35 syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE
|
3312
|
36 syn keyword sdStatement LICENSE
|
1121
|
37 syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite
|
|
38 syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite
|
|
39 syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY
|
|
40 syn keyword sdStatement SAMPLE_RATE
|
|
41 syn keyword sdStatement TITLE TWIN
|
|
42 syn keyword sdStatement VERIFY
|
|
43
|
|
44 " Known Options
|
|
45 syn keyword sdEncoding H26L MPV MP2T MP4V-ES
|
|
46 syn keyword sdCoding FRAME SAMPLE
|
|
47 syn keyword sdSource STORED LIVE
|
|
48
|
|
49 "Specials
|
|
50 syn keyword sdSpecial TRUE FALSE NULL
|
|
51 syn keyword sdDelimiter STREAM STREAM_END
|
|
52 syn match sdError /^search .\{257,}/
|
|
53
|
|
54 if version >= 508 || !exists("did_config_syntax_inits")
|
|
55 if version < 508
|
|
56 let did_config_syntax_inits = 1
|
|
57 command! -nargs=+ HiLink hi link <args>
|
|
58 else
|
|
59 command! -nargs=+ HiLink hi def link <args>
|
|
60 endif
|
|
61
|
|
62 HiLink sdIP Number
|
|
63 HiLink sdHostname Type
|
|
64 HiLink sdEncoding Identifier
|
|
65 HiLink sdCoding Identifier
|
|
66 HiLink sdSource Identifier
|
|
67 HiLink sdComment Comment
|
|
68 HiLink sdIPError Error
|
|
69 HiLink sdError Error
|
|
70 HiLink sdStatement Statement
|
|
71 HiLink sdIPSpecial Special
|
|
72 HiLink sdSpecial Special
|
|
73 HiLink sdDelimiter Delimiter
|
|
74
|
|
75 delcommand HiLink
|
|
76 endif
|
|
77
|
|
78 let b:current_syntax = "sd"
|
3312
|
79
|
|
80 let &cpo = s:cpo_save
|
|
81 unlet s:cpo_save
|