Skip to content

Commit

Permalink
route lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
jessp01 committed Sep 8, 2023
1 parent aad70c3 commit 5cbe31b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions syntax_files/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
filetype: route

detect:
filename: "\\.route$"
header: ".*routing table"

rules:
# header
- magenta: "Kernel IP routing table"
- cyan: "Destination\\s+Gateway\\s+Genmask\\s+Flags\\s+Metric\\s+Ref\\s+Use\\s+Iface"
# numbers
- green: "[\\d+]"
# IP
- yellow: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"
# interface
- red: "\\s([a-z-]+\\d+)"
# hostname
- blue: "\\s+([a-z-]+\\.)?[a-z-]+\\.[a-z-]+\\.[a-z-]+"
- high.green: "ip-\\d+-\\d+-\\d+-\\d+"
# flags
- magenta: "U(G|H|\\s)"
# keywords
- red: "(default|link-local)"

0 comments on commit 5cbe31b

Please sign in to comment.