Upgrade to r59 of Go this means parsing is broken now
Ragel does not support newer versions of Go. But I do want to upgrade to them. So parsing from strings has been disabled and will be re-enabled when Ragel 7 is out
This commit is contained in:
parent
5e94ba32fd
commit
2d9e619c01
17
Makefile
17
Makefile
|
@ -17,12 +17,12 @@ GOFILES=\
|
|||
kparse.go\
|
||||
msg.go\
|
||||
nsec3.go \
|
||||
qnamestring.go\
|
||||
server.go \
|
||||
tsig.go\
|
||||
types.go\
|
||||
xfr.go\
|
||||
zone.go\
|
||||
qnamestring.go\
|
||||
zparse.go\
|
||||
|
||||
|
||||
|
@ -34,11 +34,12 @@ _examples:
|
|||
examples:
|
||||
gomake -C _examples
|
||||
|
||||
# doesn't work with r59 - disabled until Ragel catches up
|
||||
# yes, hardcoded path, yes ugly, yes, deal with it
|
||||
zparse.go: zparse.rl types.rl
|
||||
/home/miekg/svn/ragel/ragel/ragel -Z -G2 -o $@ $<
|
||||
gofmt -w zparse.go
|
||||
|
||||
kparse.go: kparse.rl
|
||||
/home/miekg/svn/ragel/ragel/ragel -Z -G2 -o $@ $<
|
||||
gofmt -w kparse.go
|
||||
#zparse.go: zparse.rl types.rl
|
||||
# /home/miekg/svn/ragel/ragel/ragel -Z -G2 -o $@ $<
|
||||
# gofmt -w zparse.go
|
||||
#
|
||||
#kparse.go: kparse.rl
|
||||
# /home/miekg/svn/ragel/ragel/ragel -Z -G2 -o $@ $<
|
||||
# gofmt -w kparse.go
|
||||
|
|
|
@ -5,7 +5,7 @@ package dns
|
|||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
// "strings"
|
||||
)
|
||||
|
||||
|
||||
|
@ -25,12 +25,14 @@ var k_en_main int = 111
|
|||
// converted to lowercase. All values are returned as-is, except
|
||||
// the algorithm [e.g. 5 (RSASHA1)] is returned as: m[algorithm] = "RSASHA1"
|
||||
func (kp *Parser) PrivateKey() (m map[string]string, err os.Error) {
|
||||
//off Ragel generate illegal code now
|
||||
/*
|
||||
m = make(map[string]string)
|
||||
var (
|
||||
k, data string
|
||||
cs, p, pe int
|
||||
)
|
||||
lines := strings.SplitAfter(string(kp.buf), "\n", -1)
|
||||
lines := strings.SplitAfter(string(kp.buf), "\n")
|
||||
for _, data := range lines {
|
||||
cs, p, pe = 0, 0, len(data)
|
||||
mark := 0
|
||||
|
@ -2434,5 +2436,6 @@ func (kp *Parser) PrivateKey() (m map[string]string, err os.Error) {
|
|||
return nil, nil
|
||||
}
|
||||
}
|
||||
*/
|
||||
return m, nil
|
||||
}
|
||||
|
|
28
zparse.go
28
zparse.go
|
@ -7,7 +7,7 @@ package dns
|
|||
import (
|
||||
"os"
|
||||
"io"
|
||||
"net"
|
||||
// "net"
|
||||
"time"
|
||||
"strings"
|
||||
"strconv"
|
||||
|
@ -103,6 +103,7 @@ func (zp *Parser) RR() (RR, os.Error) {
|
|||
|
||||
// Zone parses an DNS master zone file.
|
||||
func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
||||
/*
|
||||
z = NewZone()
|
||||
data := string(zp.buf)
|
||||
cs, p, pe := 0, 0, len(data)
|
||||
|
@ -743,7 +744,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto st0
|
||||
tr2:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
// line 111 "zparse.rl"
|
||||
{
|
||||
|
@ -836,7 +837,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto st0
|
||||
tr3:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st4
|
||||
st4:
|
||||
|
@ -1353,7 +1354,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr58
|
||||
tr5:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st31
|
||||
st31:
|
||||
|
@ -1767,7 +1768,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr89
|
||||
tr8:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st55
|
||||
st55:
|
||||
|
@ -1858,7 +1859,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr95
|
||||
tr9:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st60
|
||||
st60:
|
||||
|
@ -2359,7 +2360,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr133
|
||||
tr10:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st89
|
||||
st89:
|
||||
|
@ -2464,7 +2465,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr140
|
||||
tr11:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st95
|
||||
st95:
|
||||
|
@ -2597,7 +2598,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr149
|
||||
tr12:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st103
|
||||
st103:
|
||||
|
@ -2908,7 +2909,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto tr172
|
||||
tr13:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
goto st121
|
||||
st121:
|
||||
|
@ -3130,7 +3131,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto st0
|
||||
tr4:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
// line 111 "zparse.rl"
|
||||
{
|
||||
|
@ -3260,7 +3261,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto st0
|
||||
tr6:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
// line 111 "zparse.rl"
|
||||
{
|
||||
|
@ -3284,7 +3285,7 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
goto st0
|
||||
tr7:
|
||||
// line 120 "zparse.rl"
|
||||
{ /* ... */
|
||||
{ // ...
|
||||
}
|
||||
// line 111 "zparse.rl"
|
||||
{
|
||||
|
@ -3807,5 +3808,6 @@ func (zp *Parser) Zone() (z *Zone, err os.Error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return z, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue