annotate runtime/syntax/pf.vim @ 9416:cbf052ccb120 v7.4.1989

commit https://github.com/vim/vim/commit/b33c7eb5b813cb631b2b0ca5c4029e1788a09bde Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 4 22:29:49 2016 +0200 patch 7.4.1989 Problem: filter() and map() only accept a string argument. Solution: Implement using a Funcref argument (Yasuhiro Matsumoto, Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Mon, 04 Jul 2016 22:30:05 +0200
parents 2d1383658bb4
children be72f4201a1d
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 " pf syntax file
4264
2d1383658bb4 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
2 " Language: OpenBSD packet filter configuration (pf.conf)
2d1383658bb4 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Original Author: Camiel Dobbelaar <cd@sentia.nl>
2d1383658bb4 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Maintainer: Lauri Tirkkonen <lotheac@iki.fi>
2d1383658bb4 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Last Change: 2013 Apr 02
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 setlocal foldmethod=syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
4264
2d1383658bb4 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
18 syn cluster pfNotLS contains=pfTodo,pfVarAssign
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword pfCmd altq anchor antispoof binat nat pass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword pfCmd queue rdr scrub table set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword pfService auth bgp domain finger ftp http https ident
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword pfService imap irc isakmp kerberos mail nameserver nfs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword pfService tftp www
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword pfTodo TODO XXX contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword pfWildAddr all any
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match pfCmd /block\s/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match pfComment /#.*$/ contains=pfTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match pfCont /\\$/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match pfErrClose /}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match pfIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match pfNetmask /\/\d\+/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 if version >= 508 || !exists("did_c_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let did_c_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink pfCmd Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink pfComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink pfCont Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink pfErrClose Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink pfIPv4 Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink pfIPv6 Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink pfNetmask Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink pfNum Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink pfService Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink pfTable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink pfTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink pfVar Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink pfVarAssign Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink pfWildAddr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 let b:current_syntax = "pf"