DNS Esoterica – Why you can't dig Switzerland
The DNS "master file"/"zone file" format is a bloody disaster for the same reason, and practically unparseable. Every implementation  parses them differently when it comes to parenthesis.<p>From the grammar in RFC 1035:<p><pre><code>    <domain-name><rr> [<comment>]

    <blank><rr> [<comment>]

    <rr> contents take one of the following forms:

        [<TTL>] [<class>] <type> <RDATA>

        [<class>] [<TTL>] <type> <RDATA>
</code></pre>
All the columns being optional creates the ambiguity between the <class> and <domain-name> columns in the TTL missing/2nd form. In the real world <class> is always "IN". It's even worse since the set of <type>'s is unbounded and the <RDATA> grammar depends on <type><p>I believe this is one reason why tinydns has its own format <a href="https://cr.yp.to/djbdns/tinydns-data.html" rel="nofollow">https://cr.yp.to/djbdns/tinydns-data.html</a>