* 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.
+2002-03-04 Akim Demaille <akim@epita.fr>
+
+ * 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.
+
2002-02-28 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (check_SCRIPTS): New.
Bison News
----------
-Changes in version 1.33a:
+Changes in version 1.33b:
+
+* A missing `;' ending a rule triggers a warning
+ In accordance with POSIX, and in agreement with other
+ Yacc implementations, Bison will mandate this semicolon in a near
+ future. This eases the implementation of a Bison parser of Bison
+ grammars by making this grammar LALR(1) instead of LR(2). To
+ facilitate the transition, this release introduces a warning.
* Revert the C++ namespace changes introduced in 1.31, as they caused too
many portability hassles.
unlex (t1);
symval = ssave;
if (t1 == tok_colon)
- break;
+ {
+ complain (_("previous rule lacks an ending `;'"));
+ break;
+ }
if (!first_rhs) /* JF */
first_rhs = symval;
/* 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 ();
}
}
else if (t == tok_start)
{
- parse_start_decl ();
+ parse_start_decl (;)
t = lex ();
}
#endif
AT_DATA([input.y],
[[%%
-exp: { $$ = $1 ; }
+exp: { $$ = $1 ; };
]])
AT_CHECK([bison input.y], [1], [],
AT_DATA([input.y],
[[%%
-exp: { @$ = @1 ; }
+exp: { @$ = @1 ; };
]])
AT_CHECK([bison input.y], [1], [],
AT_DATA([$1],
[[$2
%%
-foo: {}
+foo: {};
]])
AT_CHECK([bison $3 $1], 0)
[[/* Bison used to swallow the character after `}'. */
%%
-exp: { tests = {{{{{{{{{{}}}}}}}}}}; }
+exp: { tests = {{{{{{{{{{}}}}}}}}}}; };
%%
]])
{
-}
+};
]])
AT_CHECK([bison input.y -o input.c -v], 0, [], [])
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 2>&1 |