cznic / goyacc

github.com/cznic/goyacc has moved to modernc.org/goyacc
https://godoc.org/modernc.org/goyacc
BSD 3-Clause "New" or "Revised" License
208 stars 24 forks source link

fix: throw error when the length of the prefix [-p] is greater than 2 #27

Closed lyzzmo closed 6 years ago

lyzzmo commented 6 years ago

goyacc -p Calc calc.y

error ` panic: strings: negative Repeat count

goroutine 1 [running]: strings.Repeat(0x1175d50, 0x1, 0xfffffffffffffffe, 0x1176553, 0x7) /usr/local/Cellar/go/1.10.1/libexec/src/strings/strings.go:538 +0x1c7 main.main1(0x7ffeefbffafe, 0x3, 0x0, 0x0) .../go/src/f/x.go:386 +0xfdf main.main() .../go/src/f/x.go:181 +0x79 `

cznic commented 6 years ago

@lyzzmo Gentle ping.

cznic commented 6 years ago

Timed out waiting for feedback.