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