1
0
mirror of https://github.com/golang/go synced 2024-10-05 03:21:23 -06:00
go/src/cmd/yacc
Matthew Dempsky 4f2a73011f cmd/internal/gc, cmd/yacc: restore remaining custom error messages
This CL extends cmd/yacc to expose a yyErrorVerbose variable that
changes the error messages from just "syntax error" to "syntax error:
unexpected ${tokname}".

It also moves the yyToknames table generation to after rules have been
processed so that entries can be generated for tokens that aren't
mentioned in the preamble (e.g., '.' in the case of go.y).

Lastly, it restores gc's old code for applying yytfix to yyToknames,
except that substituting "LLITERAL" with litbuf happens in Yyerror.

Fixes #9968.

Change-Id: Icec188d11fdabc1dae31b8a471c35b5c7f6deec7
Reviewed-on: https://go-review.googlesource.com/8432
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-04-03 23:40:40 +00:00
..
testdata/expr cmd/yacc/testdata/expr: fix handling of negative numbers 2015-03-11 04:20:42 +00:00
doc.go cmd/yacc: fix path in documentation 2015-03-17 04:53:21 +00:00
yacc.go cmd/internal/gc, cmd/yacc: restore remaining custom error messages 2015-04-03 23:40:40 +00:00