]> git.saurik.com Git - bison.git/commitdiff
* tests/sets.at (Broken Closure): Add the ending `;'.
authorAkim Demaille <akim@epita.fr>
Mon, 4 Mar 2002 13:58:20 +0000 (13:58 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 4 Mar 2002 13:58:20 +0000 (13:58 +0000)
* src/reader.at (readgram): Complain if a rule is not ended with a
semi-colon.

ChangeLog
src/reader.c
tests/sets.at

index af90d41023ef8166430d3f77b0bf82bbae94b786..aaa162bda2d1edfe67b5a162c8336712a2776ef9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 10411fa20d4fc4736d57f9b412d0420e9c1f4e5f..5f2419ff0a4ed8fa45ed5eef358bc7f590c62404 100644 (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;
index 872cd8726e3861baa3087cb63eba18d1c36d4d79..2c447cd232b7d0eedf940ea4fe89b8e78ec73e4d 100644 (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])