bison-patches
[Top][All Lists]
Advanced

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

[PATCH 0/6] {maint} errors: output prefixing


From: Theophile Ranquet
Subject: [PATCH 0/6] {maint} errors: output prefixing
Date: Wed, 26 Sep 2012 15:45:10 +0200

Hi,

I'm Theophile Ranquet.  I'm an intern at the LRDE for a few months, and, among
other duties, Akim asked me to work on some issues about Bison. The LRDE has
filed a global disclaimer for its staff for both Bison and Gnulib, so my
contributions can applied.

As a first contribution, I will pursue work initiated by Victor Santet on the
handling of the warnings in Bison (master).  Yet, for a start, I submit these
changes for maint.

These patches focus on improving the readability of errors in the way they are
reported. This is done in two ways: seperating the actual error from the context
information given about it on additional lines by indenting those lines (maybe
"note: " should be considered a potential prefix there); and adding
the "error: " prefix to the actual error.

For example, this used to be the format of many error reports:

  foo.y:5.2-9: result type clash on merge function 'merge': <t3> != <t2>
  foo.y:3.1-8: previous declaration

It is now:

  foo.y:5.2-9: error: result type clash on merge function 'merge': <t3> != <t2>
  foo.y:3.1-8:     previous declaration

More work on this problem is underway in {master}.

The last patch featured here addresses the absence of Wdeprecated from the
usage information, probably an oversight from back when that warning was
introduced.

Theophile Ranquet (6):
  errors: indent "result type clash" error context
  errors: indent "symbol redeclaration" context
  errors: indent "%define var" redefinition context
  errors: indent "invalid value for %define" context
  errors: prefix the output with "error: "
  warnings: introduce -Wdeprecated in the usage info

 NEWS                    |   14 ++-
 THANKS                  |    2 +
 src/complain.c          |    8 +-
 src/complain.h          |    3 +
 src/getargs.c           |    3 +-
 src/muscle-tab.c        |   21 ++--
 src/reader.c            |   16 +--
 src/symtab.c            |   64 ++++++-----
 tests/conflicts.at      |   10 +-
 tests/glr-regression.at |    8 +-
 tests/input.at          |  275 ++++++++++++++++++++++++-----------------------
 tests/named-refs.at     |   94 ++++++++--------
 tests/output.at         |    2 +-
 tests/push.at           |    2 +-
 tests/regression.at     |   20 ++--
 tests/skeletons.at      |    8 +-
 16 files changed, 296 insertions(+), 254 deletions(-)

-- 
1.7.10




reply via email to

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