From e5352bc7bfd45be91568d0c7bcf6417d127f7a83 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 4 Mar 2002 13:58:20 +0000 Subject: [PATCH] * tests/sets.at (Broken Closure): Add the ending `;'. * src/reader.at (readgram): Complain if a rule is not ended with a semi-colon. --- ChangeLog | 6 ++++++ src/reader.c | 5 ++++- tests/sets.at | 16 ++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index af90d410..aaa162bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-03-04 Akim Demaille + + * 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 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. diff --git a/src/reader.c b/src/reader.c index 10411fa2..5f2419ff 100644 --- a/src/reader.c +++ b/src/reader.c @@ -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; diff --git a/tests/sets.at b/tests/sets.at index 872cd872..2c447cd2 100644 --- a/tests/sets.at +++ b/tests/sets.at @@ -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]) -- 2.47.2