xref: /vim-8.2.3635/runtime/syntax/sd.vim (revision cb03397a)
1" Language: streaming descriptor file
2" Maintainer: Puria Nafisi Azizi (pna) <[email protected]>
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/
6" Last Change: 2012 Feb 03 by Thilo Six
7
8if version < 600
9        syntax clear
10elseif exists("b:current_syntax")
11        finish
12endif
13
14let s:cpo_save = &cpo
15set cpo&vim
16
17" Always ignore case
18syn case ignore
19
20" Comments
21syn match sdComment /\s*[#;].*$/
22
23" IP Adresses
24syn cluster sdIPCluster contains=sdIPError,sdIPSpecial
25syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained
26syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained
27syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster
28
29" Statements
30syn keyword sdStatement AGGREGATE AUDIO_CHANNELS
31syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE
32syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR
33syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite
34syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite
35syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE
36syn keyword sdStatement LICENSE
37syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite
38syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite
39syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY
40syn keyword sdStatement SAMPLE_RATE
41syn keyword sdStatement TITLE TWIN
42syn keyword sdStatement VERIFY
43
44" Known Options
45syn keyword sdEncoding H26L MPV MP2T MP4V-ES
46syn keyword sdCoding FRAME SAMPLE
47syn keyword sdSource STORED LIVE
48
49"Specials
50syn keyword sdSpecial TRUE FALSE NULL
51syn keyword sdDelimiter STREAM STREAM_END
52syn match sdError /^search .\{257,}/
53
54if 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
76endif
77
78let b:current_syntax = "sd"
79
80let &cpo = s:cpo_save
81unlet s:cpo_save
82