]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/gc, cmd/yacc: restore custom syntax error messages
authorMatthew Dempsky <mdempsky@google.com>
Tue, 10 Mar 2015 00:40:23 +0000 (17:40 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 2 Apr 2015 21:56:24 +0000 (21:56 +0000)
commit398bf9d5a09fdcc14088dc42f953d6e3142fd343
tree94fe5042d90d0e67e5ff5f4f24f6dcde47e67a5d
parente5a0d6399e00cec2a35b77a79d81a9435b0ee909
cmd/internal/gc, cmd/yacc: restore custom syntax error messages

This restores go.errors from before 3af0d79 along with a fixed up
version of the bisonerrors AWK script, translated to Go.

However, this means Yyerror needs access to the yacc parser's state,
which is currently private.  To workaround that, add a "state"
accessor method like the Lookahead method added in c7fa3c6.

Update issue #9968.

Change-Id: Ib868789e92fdb7d135442120a392457923e50121
Reviewed-on: https://go-review.googlesource.com/7270
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/gc/go.errors [new file with mode: 0644]
src/cmd/internal/gc/lex.go
src/cmd/internal/gc/subr.go
src/cmd/internal/gc/y.go
src/cmd/internal/gc/yaccerrors.go [new file with mode: 0644]
src/cmd/internal/gc/yymsg.go [new file with mode: 0644]
src/cmd/yacc/yacc.go
test/fixedbugs/bug121.go
test/fixedbugs/issue4468.go