diff --git a/zscan.go b/zscan.go index a7d9f462..32d1852e 100644 --- a/zscan.go +++ b/zscan.go @@ -26,9 +26,9 @@ const ( _RRTYPE _OWNER _CLASS - _DIRORIGIN // $ORIGIN - _DIRTTL // $TTL - _INCLUDE // $INCLUDE + _DIRORIGIN // $ORIGIN + _DIRTTL // $TTL + _INCLUDE // $INCLUDE // Privatekey file _VALUE @@ -330,17 +330,24 @@ func zlexer(s scanner.Scanner, c chan lex) { commt = false rrtype = false str = "" + // If not in a brace this ends the comment AND the RR + if brace == 0 { + owner = true + } + l.value = _NEWLINE + l.token = "\n" + c <- l break } if str != "" { l.value = _STRING l.token = str - if !rrtype { + if !rrtype { if _, ok := Str_rr[strings.ToUpper(l.token)]; ok { l.value = _RRTYPE rrtype = true } - } + } c <- l } if brace > 0 { diff --git a/zscan_rr.go b/zscan_rr.go index 97e92440..abf23f07 100644 --- a/zscan_rr.go +++ b/zscan_rr.go @@ -267,6 +267,7 @@ func setRRSIG(h RR_Header, c chan lex) (RR, *ParseError) { l = <-c s := "" for l.value != _NEWLINE && l.value != _EOF { + println("Wat hebben we hier", l.token, l.value) switch l.value { case _STRING: s += l.token @@ -277,6 +278,7 @@ func setRRSIG(h RR_Header, c chan lex) (RR, *ParseError) { } l = <-c } + println("S", s) rr.Signature = s return rr, nil }