blob: ce0ef9c41d059afbb5f6aa884c806b59b9105cfe [file] [log] [blame]
Benno Schulenbergad1f1bc2015-12-02 09:14:45 +00001## Here is an example for nftables.
2
3syntax "nftables" "\.(nft|nftables)$"
4header "^#!.*(nft|nftables)"
Mike Scalora6a2032f2016-05-25 22:13:50 +02005comment "#"
Benno Schulenbergad1f1bc2015-12-02 09:14:45 +00006
7# Objects and operations
8color green "\<(chain|hook|policy|priority|ruleset|set|table|type|v?map)\>"
9color green "\<(define|include)\>"
10color red "\<(add|delete|flush|insert|remove|replace)\>"
11
12# Families
Arturo Borrero González2fbb71d2016-12-21 13:40:58 +010013color yellow "\<(arp|bridge|inet|ingress|ip6?|netdev)\>"
Benno Schulenbergad1f1bc2015-12-02 09:14:45 +000014
15# Terminal statements
16color red "\<(drop|reject)\>"
17color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>"
18
19# Comments
20color cyan "(^|[[:space:]])#.*$"
21
22# Trailing whitespace
23color ,green "[[:space:]]+$"
24
25# Strings and others
26color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
27color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
28
29# Basic variable names
Arturo Borrero González2fbb71d2016-12-21 13:40:58 +010030color brightred "(\$|@)[[:alpha:]_-][[:alnum:]_.-]*"