Commit 81a0b36e authored by Petr Špaček's avatar Petr Špaček

Deckard: support RFC 3597 syntax in message definitions

parent 9c32bfcc
......@@ -24,7 +24,8 @@ let domain = [ label "domain" . store domain_re ]
let ttl = [label "ttl" . store /[0-9]+/]
let class = [label "class" . store class_re ]
let type = [label "type" . store ((/[^0-9#;\n \t][^\t\n\/#; ]*/) - class_re) ]
let data_re = /([^ \t\n#;][^\n#;]*[^ \t\n#;])|[^ \t\n#;]/ (*Can not start nor end with whitespace but can have whitespace in the middle. Disjunction is there so we match strings of length one.*)
(* RFC 3597 section 5 rdata syntax is "\# 1 ab"*)
let data_re = /((\\\#[ \t])?[^ \t\n#;][^\n#;]*[^ \t\n#;])|[^ \t\n#;]/ (*Can not start nor end with whitespace but can have whitespace in the middle. Disjunction is there so we match strings of length one.*)
let data = [label "data" . store data_re ]
let ip_re = /[0-9a-f.:]+/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment