From 4eaf91a7a729f96b020324cc78e66bc687f549f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudompheng?= Date: Tue, 30 Jul 2013 04:31:15 +0200 Subject: [PATCH] cmd/gc: make bisonerrors compatible with GNU Bison 3.0 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11990043 --- src/cmd/gc/bisonerrors | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmd/gc/bisonerrors b/src/cmd/gc/bisonerrors index 8886a8e529e..1f97fc8cec4 100755 --- a/src/cmd/gc/bisonerrors +++ b/src/cmd/gc/bisonerrors @@ -35,6 +35,9 @@ grammar && NF>0 { } rulelhs[$1] = r rulesize[$1] = NF-2 + if(rulesize[$1] == 1 && $3 == "%empty") { + rulesize[$1] = 0 + } if(rulesize[$1] == 3 && $3 $4 $5 == "/*empty*/") { rulesize[$1] = 0 }