bison-patches
[Top][All Lists]
Advanced

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

[PATCH 00/11] diagnostics: truncate quoted sources to fit the screen wid


From: Akim Demaille
Subject: [PATCH 00/11] diagnostics: truncate quoted sources to fit the screen width
Date: Sat, 21 Sep 2019 11:59:53 +0200

Hi all,

Recently Marc sent privately a few bug reports related to the
diagnostics.  Most of them were covered in 3.4.2.

He also pointed out that when there are many errors in support long
line, bison could spend an insane amount of time spitting over and
over again a huge line that fills any existing screen on Earth.  This
series of patches address this issue by truncating the quoted sources
to fit the screen width.  That's something clang does, but gcc
doesn't.

I would really appreciate if people could stress this in various
environments: I'm somewhat afraid of portability issues.  Paul, your
expertise is most welcome :) I'm also uneasy with the handling of
multibyte characters, I hope I did nothing stupid.

It's currently in the screen-width branch.

Cheers!

Akim Demaille (11):
  diagnostics: style: minor changes
  diagnostics: style: add caret_set_file
  diagnostics: extract boundary_compute from location_compute
  diagnostics: style: use a boundary to track the caret_info
  diagnostics: style: rename member for clariy
  diagnostics: learn how to count column number with multibyte chars
  diagnostics: truncate quoted sources to fit the screen
  diagnostics: check that quoted lines are truncated
  diagnostics: also show truncation at the end of line with "..."
  diagnostics: don't print ellipsis on the caret line
  diagnostics: get the screen width from the terminal

 bootstrap.conf       |   4 +-
 lib/.gitignore       |   5 +
 m4/.gitignore        |   5 +
 src/complain.c       |   2 +
 src/location.c       | 306 ++++++++++++++++++++++++++++++-------------
 src/location.h       |   6 +-
 tests/bison.in       |   5 +
 tests/diagnostics.at |  91 ++++++++++++-
 tests/local.at       |  29 ++--
 9 files changed, 345 insertions(+), 108 deletions(-)

-- 
2.23.0




reply via email to

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