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

* 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 13:58:20 +00:00
parent 914feea9d0
commit e5352bc7bf
3 changed files with 18 additions and 9 deletions

View File

@@ -1,3 +1,9 @@
2002-03-04 Akim Demaille <akim@epita.fr>
* tests/sets.at (Broken Closure): Add the ending `;'.
* src/reader.at (readgram): Complain if a rule is not ended with a
semi-colon.
2002-03-04 Akim Demaille <akim@epita.fr>
* src/conflicts.c (set_conflicts): Use bitset_disjoint_p.

View File

@@ -1326,7 +1326,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;

View File

@@ -151,14 +151,14 @@ AT_SETUP([Broken Closure])
AT_DATA([input.y],
[[%%
a: b
b: c
c: d
d: e
e: f
f: g
g: h
h: 'h'
a: b;
b: c;
c: d;
d: e;
e: f;
f: g;
g: h;
h: 'h';
]])
AT_CHECK([[bison --trace input.y]], [], [], [stderr])