Added a check that a tokenset in a stackpattern contains tokens

that all have the same size.
This commit is contained in:
ceriel 1987-01-26 16:14:39 +00:00
parent 88ea6fb11d
commit edae1fc950

View file

@ -20,6 +20,7 @@ int startline;
int npatterns;
int att_type;
int patindex[MAXPATTERNS];
extern set_t l_sets[];
int emhere=0; /* lexical analyzer flag */
int optexact=0; /* Inside "with exact" rule */
@ -742,6 +743,9 @@ setlist
{ NEXT(tokpatlen,TOKPATMAX,"Stack pattern");
tokpatset[tokpatlen-1] = $2;
checkunstacking($2);
if (l_sets[$2].set_size == 0) {
error("Tokenset is empty or has elements with different sizes");
}
}
;
kills