func (zp *ZoneParser) Comment() string {
	if zp.parseErr != nil {
		return ""
	}
	if zp.sub != nil {
		return zp.sub.Comment()
	}
	return zp.c.Comment()
}
Comment returns an optional text comment that occurred alongside
the RR.
package dns
import (
	"bufio"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"strconv"
	"strings"
)
const maxTok = 2048  
const maxIncludeDepth = 7
const (
	zEOF = iota
	zString
	zBlank
	zQuote
	zNewline
	zRrtpe
	zOwner
	zClass
	zDirOrigin    
	zDirTTL       
	zDirInclude   
	zDirGenerate  
	zValue
	zKey
	zExpectOwnerDir       
	zExpectOwnerBl        
	zExpectAny            
	zExpectAnyNoClass     
	zExpectAnyNoClassBl   
	zExpectAnyNoTTL       
	zExpectAnyNoTTLBl     
	zExpectRrtype         
	zExpectRrtypeBl       
	zExpectRdata          
	zExpectDirTTLBl       
	zExpectDirTTL         
	zExpectDirOriginBl    
	zExpectDirOrigin      
	zExpectDirIncludeBl   
	zExpectDirInclude     
	zExpectDirGenerate    
	zExpectDirGenerateBl  
)
type ParseError struct {
	file string
	err  string
	lex  lex
}
func (e *ParseError) Error() (s string) {
	if e.file != "" {
		s = e.file + ": "
	}
	s += "dns: " + e.err + ": " + strconv.QuoteToASCII(e.lex.token) + " at line: " +
		strconv.Itoa(e.lex.line) + ":" + strconv.Itoa(e.lex.column)
	return
}
type lex struct {
	token  string  
	err    bool    
	value  uint8   
	torc   uint16  
	line   int     
	column int     
}
type ttlState struct {
	ttl           uint32  
	isByDirective bool    
}
func NewRR(s string) (RR, error) {
	if len(s) > 0 && s[len(s)-1] != '\n' {  
		return ReadRR(strings.NewReader(s+"\n"), "")
	}
	return ReadRR(strings.NewReader(s), "")
}
func ReadRR(r io.Reader, file string) (RR, error) {
	zp := NewZoneParser(r, ".", file)
	zp.SetDefaultTTL(defaultTtl)
	zp.SetIncludeAllowed(true)
	rr, _ := zp.Next()
	return rr, zp.Err()
}
type ZoneParser struct {
	c *zlexer
	parseErr *ParseError
	origin string
	file   string
	defttl *ttlState
	h RR_Header
	sub    *ZoneParser
	osFile *os.File
	includeDepth uint8
	includeAllowed     bool
	generateDisallowed bool
}
func NewZoneParser(r io.Reader, origin, file string) *ZoneParser {
	var pe *ParseError
	if origin != "" {
		origin = Fqdn(origin)
		if _, ok := IsDomainName(origin); !ok {
			pe = &ParseError{file, "bad initial origin name", lex{}}
		}
	}
	return &ZoneParser{
		c: newZLexer(r),
		parseErr: pe,
		origin: origin,
		file:   file,
	}
}
func (zp *ZoneParser) SetDefaultTTL(ttl uint32) {
	zp.defttl = &ttlState{ttl, false}
}
func (zp *ZoneParser) SetIncludeAllowed(v bool) {
	zp.includeAllowed = v
}
func (zp *ZoneParser) Err() error {
	if zp.parseErr != nil {
		return zp.parseErr
	}
	if zp.sub != nil {
		if err := zp.sub.Err(); err != nil {
			return err
		}
	}
	return zp.c.Err()
}
func (zp *ZoneParser) setParseError(err string, l lex) (RR, bool) {
	zp.parseErr = &ParseError{zp.file, err, l}
	return nil, false
}