On Sat, 19 Dec 2009, Joel E. Denny wrote: > I pushed this to master. The bug does not exist on branch-2.5. The test > case makes this bug look pretty obscure, and maybe that's right, but I > really didn't spend much time searching for a simpler test case. > > >From d59beda068aef97834ea84ce4f5cc99b487e4b68 Mon Sep 17 00:00:00 2001 > From: Joel E. Denny <[email protected]> > Date: Fri, 18 Dec 2009 23:57:18 -0500 > Subject: [PATCH] lalr1.cc: don't discard non-existent lookahead on syntax > error. > > * data/lalr1.cc (parser::parse): Check yyempty first. > * tests/c++.at (Syntax error discarding no lookahead): New test > group.
I pushed the following to master. >From 5335b65a79189afbbd27ecb55d76e74a4fe31863 Mon Sep 17 00:00:00 2001 From: Joel E. Denny <[email protected]> Date: Sun, 20 Dec 2009 16:03:07 -0500 Subject: [PATCH] tests: cleanup. * tests/c++.at (Syntax error discarding no lookahead): Don't ignore stderr. Instead, eliminate remaining warnings. --- ChangeLog | 6 ++++++ tests/c++.at | 6 +++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c15cc5..e984569 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-20 Joel E. Denny <[email protected]> + + tests: cleanup. + * tests/c++.at (Syntax error discarding no lookahead): Don't + ignore stderr. Instead, eliminate remaining warnings. + 2009-12-18 Joel E. Denny <[email protected]> lalr1.cc: don't discard non-existent lookahead on syntax error. diff --git a/tests/c++.at b/tests/c++.at index ce64d6d..6a8d2c5 100644 --- a/tests/c++.at +++ b/tests/c++.at @@ -412,6 +412,10 @@ consistent-error: | /*empty*/ %prec 'a' ; +// Provide another context in which all rules are useful so that this +// test case looks a little more realistic. +start: 'b' consistent-error ; + %% int @@ -434,7 +438,7 @@ main (void) return parser.parse (); } ]]) -AT_BISON_CHECK([[-o input.cc input.yy]], [[0]], [[]], [[ignore-nolog]]) +AT_BISON_CHECK([[-o input.cc input.yy]]) AT_COMPILE_CXX([[input]]) # This used to print "Discarding 'a'." again at the end. AT_PARSER_CHECK([[./input]], [[1]], [[]], -- 1.5.4.3
