warnings: use the regular interface for s/r and r/r conflicts
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 21 Sep 2012 15:21:01 +0000 (17:21 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Tue, 25 Sep 2012 18:19:41 +0000 (20:19 +0200)
commitd87ea54cf6cc98d52356c138bd142d1b450bbc9a
tree014472f9df4709a41782ab4c95376439478c5260
parent6c094ad0e389136b7b5c7b6eba72fbd4ec2897b6
warnings: use the regular interface for s/r and r/r conflicts

The current routines used to display s/r and r/r conflicts are both
inconvenient from the programmer point of view (they do not use the
warning infrastructure) and for the user (the messages are rather
terse, not necessarily pleasant to read, and because they don't use
the same routines, they look different).

It was due to the belief (dating back to the initial checked-in
version of Bison) that, at some point, POSIX Yacc mandated the format
for these messages.  Today, the Open Group's manual page for Yacc,
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/yacc.html>,
explicitly states that the format of these messages is unspecified.
See commit be7280480c175bed203883f524c7dcd6cf37c13d and
<http://lists.gnu.org/archive/html/bison-patches/2002-12/msg00027.html>.

For a discussion on the chosen warning format, see
http://lists.gnu.org/archive/html/bison-patches/2012-09/msg00039.html

In an effort to factor the handling of errors and warnings, use the
Bison warning routines to report these messages.

* src/conflicts.c (conflicts_print): Rewrite with clearer sections
about S/R and then R/R conflicts.
(conflict_report): Remove, inlined in its sole
caller...
(conflicts_output): here.
* tests/conflicts.at, tests/existing.at, tests/glr-regression.at,
* tests/reduce.at, tests/regression.at: Adjust the expected results.
* NEWS: Update.
NEWS
src/conflicts.c
tests/conflicts.at
tests/existing.at
tests/glr-regression.at
tests/reduce.at
tests/regression.at