I have the following files:
main.go:
package main
func main() {
p := &Parser{Buffer:"test"}
p.Init()
err := p.Parse()
if err != nil {panic(err)}
}
grammer.peg
package main
type Parser Peg {}
Rule <- ( "t" / "test" ) !.
running peg grammar.go && go run . results in the following error:
panic:
parse error near Unknown (line 1 symbol 1 - line 1 symbol 1):
""
goroutine 1 [running]:
main.main()
/home/binarycat/go/src/github.com/lolbinarycat/peg-bug/main.go:7 +0xb4
exit status 2
This doesn't seem intended, as it makes lots of things much harder to do. If it was intended, then this behavior should be clarified on the readme.
I have the following files:
main.go:
grammer.peg
running
peg grammar.go && go run .results in the following error:This doesn't seem intended, as it makes lots of things much harder to do. If it was intended, then this behavior should be clarified on the readme.