Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Zone file EOF uint8 = iota Error String Blank Quote Newline Rrtype Owner Class DirOrigin // $ORIGIN DirTTL // $TTL DirInclude // $INCLUDE DirGenerate // $GENERATE )
Tokenize a RFC 1035 zone file. The tokenizer will normalize it: * Add ownernames if they are left blank; * Suppress sequences of spaces; * Make each RR fit on one line (Newline is send as last) * Handle braces - anywhere.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lex ¶
type Lex struct {
Token string // text of the token
As uint8 // create an RR (asRR), an EDNS0 (asCode) or DSO RR (asStateful)
Value uint8 // value: String, Blank, etc.
Line uint32 // line in the file
Column uint16 // column in the file
Torc uint16 // type or class as parsed in the lexer, we only need to look this up in the grammar
}
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer tokenizes the zone data, so that the grammar implemented in ZoneParser can parse RRs out of an RFC 1035 styled text file.
Click to show internal directories.
Click to hide internal directories.