diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y index cdf84e8e266..d08fb515ca4 100644 --- a/src/cmd/gc/go.y +++ b/src/cmd/gc/go.y @@ -117,6 +117,7 @@ imports: import: LIMPORT import_stmt | LIMPORT '(' import_stmt_list_r osemi ')' +| LIMPORT '(' ')' import_stmt: import_here import_package import_there @@ -223,6 +224,10 @@ Acommon_dcl: { $$ = rev($3); } +| LVAR '(' ')' + { + $$ = N; + } | LCONST '(' constdcl osemi ')' { iota = 0; @@ -235,6 +240,10 @@ Acommon_dcl: lastconst = N; $$ = N; } +| LCONST '(' ')' + { + $$ = N; + } | LTYPE Atypedcl { $$ = N; @@ -243,6 +252,10 @@ Acommon_dcl: { $$ = N; } +| LTYPE '(' ')' + { + $$ = N; + } Bcommon_dcl: LVAR Bvardcl