* tests/sets.at (Broken Closure): Add the ending `;'.

* tests/input.at (Invalid $n, Invalid @n): Likewise.
* tests/output.at (AT_CHECK_OUTPUT): Likewise.
* src/reader.at (readgram): Complain if a rule is not ended with a
semi-colon.
This commit is contained in:
Akim Demaille
2002-03-04 14:57:46 +00:00
parent 6f8dd2075e
commit bae3c8d209
7 changed files with 36 additions and 16 deletions

View File

@@ -1440,7 +1440,10 @@ readgram (void)
unlex (t1);
symval = ssave;
if (t1 == tok_colon)
break;
{
complain (_("previous rule lacks an ending `;'"));
break;
}
if (!first_rhs) /* JF */
first_rhs = symval;
@@ -1549,6 +1552,8 @@ readgram (void)
/* Warn if there is no default for $$ but we need one. */
else if (!xactions && !first_rhs && lhs->type_name != 0)
complain (_("empty rule for typed nonterminal, and no action"));
if (t == tok_two_percents || t == tok_eof)
complain (_("previous rule lacks an ending `;'"));
if (t == tok_semicolon)
t = lex ();
}
@@ -1585,7 +1590,7 @@ readgram (void)
}
else if (t == tok_start)
{
parse_start_decl ();
parse_start_decl (;)
t = lex ();
}
#endif