annotate runtime/syntax/asterisk.vim @ 7121:a497a9868255 v7.4.872

commit https://github.com/vim/vim/commit/0600f3511c6018cbcdb170a904bcf6533a06bf2d Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 15 19:18:18 2015 +0200 patch 7.4.872 Problem: Not using CI services available. Solution: Add configuration files for travis and appveyor. (PR #401)
author Christian Brabandt <cb@256bit.org>
date Tue, 15 Sep 2015 19:30:04 +0200
parents 3af822eb4da5
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
1 " Vim syntax file
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
2 " Language: Asterisk config file
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
3 " Maintainer: Jean Aunis <jean.aunis@yahoo.fr>
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
4 " Previous Maintainer: brc007
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
5 " Updated for 1.2 by Tilghman Lesher (Corydon76)
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
6 " Last Change: 2015 Feb 27
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
7 " version 0.4
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
8 "
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
9 if version < 600
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
10 syntax clear
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
12 finish
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
13 endif
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
14
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
15 syn sync clear
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
16 syn sync fromstart
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
17
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
18 syn keyword asteriskTodo TODO contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
19 syn match asteriskComment ";.*" contains=asteriskTodo
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
20 syn match asteriskContext "\[.\{-}\]"
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
21 syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
22 syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
23 syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
24 syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
25 syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
26 syn match asteriskApp ",\zs[a-zA-Z]\+\ze$"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
27 syn match asteriskApp ",\zs[a-zA-Z]\+\ze("
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
28 " Digits plus oldlabel (newlabel)
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
29 syn match asteriskPriority "\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
30 " oldlabel plus digits (newlabel)
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
31 syn match asteriskPriority "\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
32 " s or n plus digits (newlabel)
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 792
diff changeset
33 syn match asteriskPriority "\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
34 syn match asteriskLabel "(\zs[[:alpha:]][[:alnum:]]*\ze)" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
35 syn match asteriskError "^\s*#\s*[[:alnum:]]*"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
36 syn match asteriskInclude "^\s*#\s*\(include\|exec\)\s.*"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
37 syn match asteriskVar "\${_\{0,2}[[:alpha:]][[:alnum:]_]*\(:-\?[[:digit:]]\+\(:[[:digit:]]\+\)\?\)\?}"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
38 syn match asteriskVar "_\{0,2}[[:alpha:]][[:alnum:]_]*\ze="
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
39 syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]*(.*)}" contains=asteriskVar,asteriskVarLen,asteriskExp
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
40 syn match asteriskVarLen "(\zs[[:alpha:]][[:alnum:]_]*(.\{-})\ze=" contains=asteriskVar,asteriskVarLen,asteriskExp
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
41 syn match asteriskExp "\$\[.\{-}\]" contains=asteriskVar,asteriskVarLen,asteriskExp
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
42 syn match asteriskCodecsPermit "^\s*\(allow\|disallow\)\s*=\s*.*$" contains=asteriskCodecs
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
43 syn match asteriskCodecs "\(g723\|gsm\|ulaw\|alaw\|g726\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|all\s*$\)"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
44 syn match asteriskError "^\(type\|auth\|permit\|deny\|bindaddr\|host\)\s*=.*$"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
45 syn match asteriskType "^\zstype=\ze\<\(peer\|user\|friend\)\>$" contains=asteriskTypeType
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
46 syn match asteriskTypeType "\<\(peer\|user\|friend\)\>" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
47 syn match asteriskAuth "^\zsauth\s*=\ze\s*\<\(md5\|rsa\|plaintext\)\>$" contains=asteriskAuthType
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
48 syn match asteriskAuthType "\<\(md5\|rsa\|plaintext\)\>"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
49 syn match asteriskAuth "^\zs\(secret\|inkeys\|outkey\)\s*=\ze.*$"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
50 syn match asteriskAuth "^\(permit\|deny\)\s*=\s*\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\s*$" contains=asteriskIPRange
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
51 syn match asteriskIPRange "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
52 syn match asteriskIP "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
53 syn match asteriskHostname "[[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
54 syn match asteriskPort "\d\{1,5}" contained
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
55 syn match asteriskSetting "^bindaddr\s*=\s*\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}$" contains=asteriskIP
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
56 syn match asteriskSetting "^port\s*=\s*\d\{1,5}\s*$" contains=asteriskPort
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
57 syn match asteriskSetting "^host\s*=\s*\(dynamic\|\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\|\([[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}\)\)" contains=asteriskIP,asteriskHostname
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
58
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
59 " Define the default highlighting.
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
60 " For version 5.7 and earlier: only when not done already
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
61 " For version 5.8 and later: only when an item doesn't have highlighting yet
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
62 if version >= 508 || !exists("did_conf_syntax_inits")
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
63 if version < 508
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
64 let did_conf_syntax_inits = 1
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
65 command -nargs=+ HiLink hi link <args>
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
66 else
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
67 command -nargs=+ HiLink hi def link <args>
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
68 endif
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
69
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
70 HiLink asteriskComment Comment
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
71 HiLink asteriskExten String
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
72 HiLink asteriskContext Preproc
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
73 HiLink asteriskPattern Type
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
74 HiLink asteriskApp Statement
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
75 HiLink asteriskInclude Preproc
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
76 HiLink asteriskIncludeBad Error
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
77 HiLink asteriskPriority Preproc
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
78 HiLink asteriskLabel Type
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
79 HiLink asteriskVar String
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
80 HiLink asteriskVarLen Function
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
81 HiLink asteriskExp Type
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
82 HiLink asteriskCodecsPermit Preproc
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
83 HiLink asteriskCodecs String
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
84 HiLink asteriskType Statement
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
85 HiLink asteriskTypeType Type
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
86 HiLink asteriskAuth String
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
87 HiLink asteriskAuthType Type
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
88 HiLink asteriskIPRange Identifier
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
89 HiLink asteriskIP Identifier
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
90 HiLink asteriskPort Identifier
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
91 HiLink asteriskHostname Identifier
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
92 HiLink asteriskSetting Statement
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
93 HiLink asteriskError Error
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
94 delcommand HiLink
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
95 endif
792
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
96 let b:current_syntax = "asterisk"
860b73800cd7 updated for version 7.0231
vimboss
parents: 531
diff changeset
97 " vim: ts=8 sw=2
531
da9142bd190a updated for version 7.0149
vimboss
parents:
diff changeset
98