diff --git a/ChangeLog b/ChangeLog index c7b0b6f5..9f6763b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,5 @@ xx YYY 2011: 0.0.1 Miek Gieben * Private key file parsing from BIND9 * TSIG * EDNS0 - * Parsng from strings * Cherry picked GRONG for server side ideas diff --git a/Makefile b/Makefile index b1426861..130886d6 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,12 @@ GOFILES=\ dnssec.go\ keygen.go\ string.go\ - y.go\ +# y.go\ include $(GOROOT)/src/Make.pkg -y.go: dns.y - goyacc dns.y +#y.go: dns.y +# goyacc dns.y all: package diff --git a/dns.y b/dns.y index 6e20951b..fc67667b 100644 --- a/dns.y +++ b/dns.y @@ -51,45 +51,12 @@ rrtype: type DnsLex int -func (DnsLex) Lex(yylval *yySymType) int { +func (DnsLex) Lex(lval *yySymType) int { // yylval.rrtype = Str_rr($XX) //give back TypeA, TypeNS // return Y_A this should be the token, another map? - return 0 -} - - -func isSeparator(c byte) bool { - switch c { - case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t': - return true - } - return false -} - -func isSpace(c byte) bool { - switch c { - case ' ', '\t', '\r', '\n': - return true - } - return false -} - -func isCtl(c byte) bool { return (0 <= c && c <= 31) || c == 127 } - -func isChar(c byte) bool { return 0 <= c && c <= 127 } - -func isAnyText(c byte) bool { return !isCtl(c) } - -func isQdText(c byte) bool { return isAnyText(c) && c != '"' } - -func isToken(c byte) bool { return isChar(c) && !isCtl(c) && !isSeparator(c) } - -// This is a best effort parse, so errors are not returned, instead not all of -// the input string might be parsed. result is always non-nil. -// must never begin with a string -func scan(s string) (string, int) { +//func scan(s string) (string, int) { if len(s) == 0 { println("a bit short") }