minor changes to many files

This commit is contained in:
ceriel
1987-06-03 19:05:14 +00:00
parent 1fb8da7a02
commit 25dd5857c2
5 changed files with 31 additions and 24 deletions

View File

@@ -130,16 +130,22 @@ search(type,str,option) register string str; {
if (type1 == LITERAL || type == LITERAL) {
continue;
}
if (type != UNKNOWN) {
if (type == TERMINAL) {
error(linecount,
"%s : illegal type",
"%s: is already a nonterminal",
str);
continue;
}
else if (type == NONTERM) {
error(linecount,
"%s : is already a token",
str);
continue;
}
}
if (option==ENTERING) {
error(linecount,
"%s : already defined",str);
"%s : is already defined",str);
}
p->h_type.g_lineno = linecount;
return &(p->h_type);