[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/3] {master} convert the conflict messages to a more bison-like

From: Akim Demaille
Subject: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form
Date: Fri, 21 Sep 2012 18:00:21 +0200

The following changes somewhat revert changes that were done 10 years
ago.  I have never liked these messages, because they don't look at
all like what we usually do (e.g., "warning: " is not displayed,
although they _are_ warnings).

    $ bison foo.y
    foo.y: conflicts: 1 shift/reduce, 2 reduce/reduce
    $ bison -Werror foo.y
    bison: warnings being treated as errors
    foo.y: conflicts: 1 shift/reduce, 2 reduce/reduce

Yet I tolerated them since they are "mandated by POSIX".

There is currently ongoing work on cleaning the handling of errors and
warnings in Bison, and these messages are a problem.  So, out of
curiosity, I checked the Open Group, and _today_,

   If shift/reduce or reduce/reduce conflicts are detected in grammar,
   yacc shall write a report of those conflicts to the standard error in
   an unspecified format.
   Standard error shall also be used for diagnostic messages.

so I see no reason to keep these messages the way they are.

The third patch was pretty long to tune, especially because the test
suite is now much larger, and quite a few places were to be adjusted.

Paul, if you're not tired of sheperding Bisons (quite a sport) and if
you have some time, of course your opinion will be extremely valuable.

Akim Demaille (3):
  %expect-rr is for GLR only
  conflicts: refactor the counting routines
  use the regular warning interface for s/r and r/r conflicts

 NEWS                    |  52 +++++++++++++
 src/conflicts.c         | 202 +++++++++++++++++++++++-------------------------
 tests/      | 133 ++++++++++++++++++++-----------
 tests/       |  10 ++-
 tests/ |  70 +++++++++--------
 tests/         |   2 +-
 tests/     |   4 +-
 7 files changed, 280 insertions(+), 193 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]