syntax/bird.vim
author Mahlon E. Smith <mahlon@martini.nu>
Fri, 24 Dec 2010 20:01:10 -0800
branchvim-stuff
changeset 21 cd1f3381c1ed
parent 18 bf8f3c788cad
permissions -rw-r--r--
Emit file and line for failure source (use gF to jump straight to it!). Show context lines for exception source. Put spec summary run at the top of the screen. Small documentation fixes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     1
"----------------------------------------------------------------------
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     2
" Vim syntax file
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     3
" Language:     Configuration for the Bird Internet Routing Daemon
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     4
" Bird Site:    http://bird.network.cz/
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     5
" Maintainer:   Mahlon E. Smith <mahlon@martini.nu>
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     6
" Version:      $Id$
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     7
"----------------------------------------------------------------------
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     8
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     9
if has( "folding" )
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    10
	setlocal foldmethod=syntax
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    11
endif
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    12
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    13
setlocal iskeyword+=;
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    14
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    15
syntax region  birdInlineComment start=/#/ end=/$/
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    16
syntax region  birdBlockComment  start=/^#/ end=/^\([^#]\|$\)/me=e-1 fold
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    17
highlight link birdInlineComment Comment
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    18
highlight link birdBlockComment  Comment
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    19
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    20
syntax region  birdString start=/"/ skip=/\\"/ end=/"/
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    21
highlight link birdString String
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    22
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    23
syntax match   birdNetworkAddressIP4 /\d\+\.\d\+\.\d\+\.\d\+\(\/\d\+\)\?/
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    24
highlight link birdNetworkAddressIP4 Character
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    25
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    26
syntax match   birdNumber / \d\+\(;\|\s\|$\)/
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    27
highlight link birdNumber Number
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    28
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    29
syntax match   birdOperator /\(+\|-\|*\|\/\|(\|)\|=\|<\|>\|!\|&&\|||\|\~\)/
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    30
highlight link birdOperator Operator
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    31
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    32
syntax region  birdFunctionArguments start=/(/ end=/)/ oneline
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    33
syntax region  birdFunction matchgroup=birdFunctionArguments start=/\S\+(/ end=/)/ oneline transparent
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    34
highlight link birdFunctionArguments Function
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    35
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    36
syntax cluster birdCommon contains=birdInlineComment,birdString,birdNetworkAddressIP4,birdNumber,birdOperator,birdFunction
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    37
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    38
syntax keyword birdGlobals define table eval
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    39
syntax match   birdGlobals /\(router id\|listen bgp\) /
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    40
highlight link birdGlobals PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    41
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    42
syntax region  birdLog start=/^log / end=/$/ keepend contains=@birdCommon,birdLogOptions,birdLogDirective,birdLogLevels
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    43
syntax keyword birdLogOptions syslog stderr contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    44
syntax keyword birdLogLevels all all; info warning error fatal trace remote auth bug contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    45
syntax keyword birdLogDirective log contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    46
highlight link birdLogOptions   Identifier
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    47
highlight link birdLogDirective PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    48
highlight link birdLogLevels    Special
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    49
highlight link birdLog          Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    50
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    51
syntax region  birdDebug start=/debug / end=/$/ keepend contains=@birdCommon,birdDebugOptions,birdDebugDirective,birdDebugTypes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    52
syntax keyword birdDebugOptions protocols commands contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    53
syntax keyword birdDebugTypes all all; off off; states routes filters interfaces events packets messages contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    54
syntax keyword birdDebugDirective debug contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    55
highlight link birdDebugOptions   Identifier
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    56
highlight link birdDebugDirective PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    57
highlight link birdDebugTypes     Special
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    58
highlight link birdDebug          Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    59
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    60
syntax region  birdMrt start=/mrtdump / end=/$/ keepend contains=@birdCommon,birdMrtOptions,birdMrtDirective,birdMrtTypes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    61
syntax keyword birdMrtOptions protocols contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    62
syntax keyword birdMrtTypes all all; off off; states messages contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    63
syntax keyword birdMrtDirective mrtdump contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    64
highlight link birdMrtOptions   Identifier
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    65
highlight link birdMrtDirective PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    66
highlight link birdMrtTypes     Special
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    67
highlight link birdMrt          Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    68
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    69
syntax cluster birdProtoShared contains=birdGlobals,birdDebug,birdMrt
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    70
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    71
syntax region  birdTimeFormat start=/^timeformat / end=/$/ keepend contains=@birdCommon,birdTimeFormatDirective,birdTimeFormatTypes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    72
syntax keyword birdTimeFormatTypes route protocol base log contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    73
syntax keyword birdTimeFormatDirective timeformat contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    74
highlight link birdTimeFormatDirective PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    75
highlight link birdTimeFormatTypes     Identifier
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    76
highlight link birdTimeFormat          Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    77
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    78
syntax region  birdImportExport start=/\(import\|export\) / end=/$/  contains=@birdCommon,birdImportExportDirective,birdImportExportTypes,birdFilter,birdFilterProtoConstants,birdFilterAttributes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    79
syntax keyword birdImportExportDirective import export contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    80
syntax keyword birdImportExportTypes all all; none none; where contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    81
highlight link birdImportExportDirective Type
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    82
highlight link birdImportExportTypes     Special
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    83
highlight link birdImportExport          Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    84
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    85
syntax region  birdProtocol start=/^protocol / end=/^}/ contains=@birdCommon,@birdProtoShared,birdProtocolDirective,birdProtocolTypes,birdProtocolMisc,birdProtocolGlobals,birdImportExport,birdProtocolDisabled,birdProtocolBools,birdProtocolDate,birdFilter,birdProtocolAttributes fold
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    86
syntax keyword birdProtocolDirective protocol area interface networks stubnet neighbors contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    87
syntax match   birdProtocolDirective /virtual link / contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    88
syntax keyword birdProtocolTypes bgp device direct kernel ospf pipe rip static contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    89
syntax keyword birdProtocolMisc as via self self; drop drop; ignore ignore; normal; large; broadcast; nonbroadcast nonbroadcast; pointopoint; none; simple; plain; md5; cryptographic; eligible; opaque; transparent; always; never; neighbor; multicast; reject; prohibit; contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    90
syntax keyword birdProtocolGlobals preference description id password type local neighbor multihop passive passive; persist persist; learn learn; primary rfc1583compat rfc1583compat; tick hidden hidden; summary summary; cost stub stub; hello poll retransmit priority wait authentication strict honor port infinity period mode route contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    91
syntax match   birdProtocolGlobals /generate from\|generate to\|accept from\|accept to\|next hop\|missing lladdr\|source address\|rr client\|rr cluster id\|rs client\|enable route refresh\|interpret communities\|enable as4\|capabilities\|advertise ipv4\|route limit\|disable after error\|\(startup \)\?hold time\|\(scan\|keepalive\|timeout\|garbage\|connect retry\|start delay\|error \(wait\|forget\)\) time\|path metric\|prefer older\|default bgp_med\|default bgp_local_pref\|device routes\|\(kernel\|peer\) table\|stub cost\|dead\( count\)\?\|rx buffer/ contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    92
syntax match   birdProtocolDate /\d\{2\}-\d\{2\}-\d\{4\} \d\{2\}:\d\{2\}:\d\{2\}/ contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    93
syntax keyword birdProtocolDisabled disabled disabled; contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    94
syntax keyword birdProtocolBools yes yes; no no; contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    95
syntax match   birdProtocolAttributes /bgp_path\|bgp_local_pref\|bgp_med\|bgp_origin\|bgp_next_hop\|bgp_atomic_aggr\|bgp_community\|bgp_originator_id\|bgp_cluster_list\|ospf_metric1\|ospf_metric2\|ospf_tag\|rip_metric\|rip_tag/ contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    96
highlight link birdProtocolDirective  PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    97
highlight link birdProtocolTypes      Function
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    98
highlight link birdProtocolMisc       String
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    99
highlight link birdProtocolGlobals    Constant
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   100
highlight link birdProtocolDisabled   Error
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   101
highlight link birdProtocolBools      Boolean
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   102
highlight link birdProtocolDate		  Number
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   103
highlight link birdProtocolAttributes Identifier
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   104
highlight link birdProtocol           Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   105
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   106
syntax keyword birdInternalFunctions accept accept; reject reject; print printn return quitbird defined contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   107
syntax keyword birdInternalControls if then else case contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   108
syntax keyword birdInternalTypes bool int pair quad string ip prefix enum bgppath bgpmask clist contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   109
highlight link birdInternalFunctions Keyword
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   110
highlight link birdInternalControls  Conditional
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   111
highlight link birdInternalTypes     Type
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   112
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   113
" inline, named filters
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   114
syntax match   birdFilter /filter.\+$/ contains=@birdCommon,birdFilterDirective
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   115
" filter definitions
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   116
syntax region  birdFilter start=/^filter\(\s\+\S\+\)\?\s\+/ end=/^}$/ fold contains=@birdCommon,birdFilterDirective,birdFilterProtoConstants,birdInternalFunctions,birdFilterAttributes,birdInternalControls,birdInternalTypes,birdProtocolAttributes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   117
" inline complex filters
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   118
syntax region  birdFilter start=/filter\s\+{/ end=/};/ fold contains=@birdCommon,birdFilterDirective,birdFilterProtoConstants,birdInternalFunctions,birdFilterAttributes,birdInternalControls,birdInternalTypes,birdProtocolAttributes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   119
syntax match   birdFilterDirective /filter/ nextgroup=birdFilterName skipwhite contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   120
syntax match   birdFilterName /[^{;]\+/ skipwhite contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   121
syntax match   birdFilterProtoConstants /\(RTS_DUMMY\|RTS_STATIC\|RTS_INHERIT\|RTS_DEVICE\|RTS_STATIC_DEVICE\|RTS_REDIRECT\|RTS_RIP\|RTS_OSPF\|RTS_OSPF_IA\|RTS_OSPF_EXT1\|RTS_OSPF_EXT2\|RTS_BGP\|RTS_PIPE\)/ contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   122
syntax keyword birdFilterAttributes net scope preference from gw proto source cast dest contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   123
highlight link birdFilterDirective      PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   124
highlight link birdFilterName           Function
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   125
highlight link birdFilterProtoConstants Underlined
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   126
highlight link birdFilterAttributes     Identifier
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   127
highlight link birdFilter               Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   128
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   129
syntax region  birdFunctionDef start=/^function\(\s\+\S\+\)\?\s\+/ end=/^}$/ fold contains=@birdCommon,birdFunctionDirective,birdInternalFunctions,birdInternalControls,birdInternalTypes
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   130
syntax match   birdFunctionDirective /function / nextgroup=birdFunctionName skipwhite contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   131
syntax match   birdFunctionName /[^(]\+/ skipwhite contained
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   132
highlight link birdFunctionDirective PreProc
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   133
highlight link birdFunctionName      Function
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   134
highlight link birdFunctionDef       Normal
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   135
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   136
let b:current_syntax = "bird"
bf8f3c788cad Initial commit of Bird (routing daemon) syntax.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   137