From: Rémy Oudompheng Date: Tue, 30 Jul 2013 02:31:15 +0000 (+0200) Subject: cmd/gc: make bisonerrors compatible with GNU Bison 3.0 X-Git-Tag: go1.2rc2~899 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4eaf91a7a729f96b020324cc78e66bc687f549f5;p=gostls13.git cmd/gc: make bisonerrors compatible with GNU Bison 3.0 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11990043 --- diff --git a/src/cmd/gc/bisonerrors b/src/cmd/gc/bisonerrors index 8886a8e529..1f97fc8cec 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 }