newer version

This commit is contained in:
ceriel
1986-06-06 02:22:09 +00:00
parent db258b68ea
commit caf99ea472
17 changed files with 224 additions and 301 deletions

View File

@@ -22,7 +22,6 @@ static char *RcsId = "$Header$";
#include "main.h"
int proclevel = 0; /* nesting level of procedures */
extern char *sprint();
}
ProcedureDeclaration
@@ -566,23 +565,22 @@ ConstantDeclaration
VariableDeclaration
{
struct node *VarList;
register struct node *nd;
struct type *tp;
} :
IdentAddrList(&VarList)
IdentAddr(&VarList)
{ nd = VarList; }
[
',' IdentAddr(&(nd->nd_right))
{ nd = nd->nd_right; }
]*
':' type(&tp)
{ EnterVarList(VarList, tp, proclevel > 0);
FreeNode(VarList);
}
;
IdentAddrList(struct node **pnd;)
{
} :
IdentAddr(struct node **pnd;) :
IDENT { *pnd = MkLeaf(Name, &dot); }
ConstExpression(&(*pnd)->nd_left)?
[ { pnd = &((*pnd)->nd_right); }
',' IDENT
{ *pnd = MkLeaf(Name, &dot); }
ConstExpression(&(*pnd)->nd_left)?
]*
ConstExpression(&((*pnd)->nd_left))?
;