]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: make bisonerrors compatible with GNU Bison 3.0
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 30 Jul 2013 02:31:15 +0000 (04:31 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 30 Jul 2013 02:31:15 +0000 (04:31 +0200)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11990043

src/cmd/gc/bisonerrors

index 8886a8e529e3f49e6cd3c31b7b982dfbf39f6d1f..1f97fc8cec427610b332e149f1d06b9a2ef56538 100755 (executable)
@@ -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
        }