Commit 5f120242 authored by Russ Cox's avatar Russ Cox

add empty var ( ), type ( ), const ( ) factorings

suggested by rob (could make programs generating
go easier to write).

R=ken
DELTA=13  (13 added, 0 deleted, 0 changed)
OCL=16766
CL=16766
parent bbb00c62
...@@ -117,6 +117,7 @@ imports: ...@@ -117,6 +117,7 @@ imports:
import: import:
LIMPORT import_stmt LIMPORT import_stmt
| LIMPORT '(' import_stmt_list_r osemi ')' | LIMPORT '(' import_stmt_list_r osemi ')'
| LIMPORT '(' ')'
import_stmt: import_stmt:
import_here import_package import_there import_here import_package import_there
...@@ -223,6 +224,10 @@ Acommon_dcl: ...@@ -223,6 +224,10 @@ Acommon_dcl:
{ {
$$ = rev($3); $$ = rev($3);
} }
| LVAR '(' ')'
{
$$ = N;
}
| LCONST '(' constdcl osemi ')' | LCONST '(' constdcl osemi ')'
{ {
iota = 0; iota = 0;
...@@ -235,6 +240,10 @@ Acommon_dcl: ...@@ -235,6 +240,10 @@ Acommon_dcl:
lastconst = N; lastconst = N;
$$ = N; $$ = N;
} }
| LCONST '(' ')'
{
$$ = N;
}
| LTYPE Atypedcl | LTYPE Atypedcl
{ {
$$ = N; $$ = N;
...@@ -243,6 +252,10 @@ Acommon_dcl: ...@@ -243,6 +252,10 @@ Acommon_dcl:
{ {
$$ = N; $$ = N;
} }
| LTYPE '(' ')'
{
$$ = N;
}
Bcommon_dcl: Bcommon_dcl:
LVAR Bvardcl LVAR Bvardcl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment