You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go tool yacc -o main.go main.y
$ go build main.go
Expected results
The code should compile without errors.
Actual results
Compilation fails with the error message:
yaccpar:161[main.go:253]: yyDollar declared and not used
Additional information
The compilation error occurs in the Parse(yylex yyLexer) int method on the *yyParserImpl type. Line 253 of the generated main.go file defines a variable var yyDollar []yySymType, which is never referenced by the rest of the auto-generated method.
I've followed the same steps on Go 1.4, and checked that they produce the expected result. In fact, I believe the issue originated with commit 2e78447, which first introduced the yyDollar variable.
The text was updated successfully, but these errors were encountered:
I'm testing go1.5rc1 on linux/amd64, and I've come across an issue that prevents the compilation of an empty yacc grammar.
Steps to reproduce
Create a file named
main.y
with the following contents:Run the following commands:
Expected results
The code should compile without errors.
Actual results
Compilation fails with the error message:
Additional information
The compilation error occurs in the
Parse(yylex yyLexer) int
method on the*yyParserImpl
type. Line 253 of the generatedmain.go
file defines a variablevar yyDollar []yySymType
, which is never referenced by the rest of the auto-generated method.I've followed the same steps on Go 1.4, and checked that they produce the expected result. In fact, I believe the issue originated with commit 2e78447, which first introduced the
yyDollar
variable.The text was updated successfully, but these errors were encountered: