annotate runtime/syntax/resolv.vim @ 2223:81b83a19e127 vim73

More strict checks for the undo file.
author Bram Moolenaar <bram@vim.org>
date Wed, 26 May 2010 21:21:00 +0200
parents 5117153003bd
children 8dcf3ea92b63
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
2 " Language: resolver configuration file
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
3 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
4 " Original Maintaner: Radu Dineiu <littledragon@altern.org>
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
5 " License: This file can be redistribued and/or modified under the same terms
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
6 " as Vim itself.
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
7 " URL: http://trific.ath.cx/Ftp/vim/syntax/resolv.vim
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
8 " Last Change: 2006-04-16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Errors, comments and operators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match resolvError /./
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
18 syn match resolvComment /\s*[#;].*$/
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match resolvOperator /[\/:]/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " IP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " General
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Particular
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
32 syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
33 syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
34 syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\+/ contains=resolvOperator,@resolvIPCluster
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Identifiers
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
37 syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
38 syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
39 syn match resolvDomain /^\s*domain\>/ nextgroup=resolvHostname skipwhite
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
40 syn match resolvSearch /^\s*search\>/ nextgroup=resolvHostnameSearch skipwhite
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
41 syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skipwhite
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
42 syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Options
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
45 " FIXME: The manual page and the source code do not exactly agree on the set
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
46 " of allowed options
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
47 syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
48 syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Additional errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match resolvError /^search .\{257,}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 if version >= 508 || !exists("did_config_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 let did_config_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 command! -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 command! -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink resolvIP Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink resolvIPNetmask Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink resolvHostname String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink resolvOption String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink resolvIPNameserver Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink resolvHostnameSearch String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink resolvIPNetmaskSortList Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink resolvNameServer Identifier
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
71 HiLink resolvLwserver Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink resolvDomain Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink resolvSearch Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink resolvSortList Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink resolvOptions Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink resolvComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink resolvOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink resolvError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink resolvIPError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink resolvIPSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 let b:current_syntax = "resolv"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " vim: ts=8 ft=vim