[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_,
http://pubs.opengroup.org/onlinepubs/009695399/utilities/yacc.html
reads:
STDERR
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/conflicts.at | 133 ++++++++++++++++++++-----------
tests/existing.at | 10 ++-
tests/glr-regression.at | 70 +++++++++--------
tests/reduce.at | 2 +-
tests/regression.at | 4 +-
7 files changed, 280 insertions(+), 193 deletions(-)
--
1.7.12.1
- [PATCH 0/3] {master} convert the conflict messages to a more bison-like form,
Akim Demaille <=
- [PATCH 1/3] %expect-rr is for GLR only, Akim Demaille, 2012/09/21
- [PATCH 2/3] conflicts: refactor the counting routines, Akim Demaille, 2012/09/21
- [PATCH 3/3] use the regular warning interface for s/r and r/r conflicts, Akim Demaille, 2012/09/21
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Paul Eggert, 2012/09/21
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Akim Demaille, 2012/09/23
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Paul Eggert, 2012/09/23
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Akim Demaille, 2012/09/23
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Paul Eggert, 2012/09/23
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Akim Demaille, 2012/09/24
- Re: [PATCH 0/3] {master} convert the conflict messages to a more bison-like form, Akim Demaille, 2012/09/24