1
0
mirror of https://github.com/golang/go synced 2024-10-05 05:11:25 -06:00
go/src/cmd/yacc
Matthew Dempsky e7d9f81645 cmd/internal/gc, cmd/yacc: implement "expecting" syntax error messages
Bison includes suggestions about what tokens are expected in the
current state when there's only four or fewer of them.  For example:

  syntax error: unexpected literal 2.01, expecting semicolon or newline or }

This CL adds the same functionality to cmd/yacc, which fully restores
the previous error message behavior from Go 1.4.

Updates #9968.

Change-Id: I2c1a1677c6d829a829d812c05e8813aa8829d09c
Reviewed-on: https://go-review.googlesource.com/8494
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-04-07 00:18:02 +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: implement "expecting" syntax error messages 2015-04-07 00:18:02 +00:00