From: Rob Pike Date: Fri, 20 Jan 2012 18:22:41 +0000 (-0800) Subject: goyacc: fix indexing bug when yydebug >= 2 X-Git-Tag: weekly.2012-01-27~141 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a67c69cbaee1e419b1950832afb295cc951b202e;p=gostls13.git goyacc: fix indexing bug when yydebug >= 2 Fixes #2701. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5556070 --- diff --git a/src/cmd/goyacc/goyacc.go b/src/cmd/goyacc/goyacc.go index ff18fa7e70..e1b99bed2b 100644 --- a/src/cmd/goyacc/goyacc.go +++ b/src/cmd/goyacc/goyacc.go @@ -3271,10 +3271,9 @@ $$default: } } - /* the current p has no shift onn "error", pop stack */ + /* the current p has no shift on "error", pop stack */ if $$Debug >= 2 { - fmt.Printf("error recovery pops state %d, uncovers %d\n", - $$S[$$p].yys, $$S[$$p-1].yys) + fmt.Printf("error recovery pops state %d\n", $$S[$$p].yys) } $$p-- }