bison-patches
[Top][All Lists]
Advanced

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

[PATCH 00/17] style: modernize bitsets


From: Akim Demaille
Subject: [PATCH 00/17] style: modernize bitsets
Date: Thu, 11 Oct 2018 13:31:31 +0200

The core algorithms of the computation of the parsing tables heavily
use bitsets.  Initially Bison used its own routines for bitset
manipulation (actually, a lot was done by hand, without abstraction),
but at some point I saw a very nice submission from Michael Hayes on
the GCC lists for a fully featured lib on bitsets.
(https://gcc.gnu.org/ml/gcc/2002-01/msg00825.html).

I don't know whether it finally made it in GCC
(https://gcc.gnu.org/ml/gcc/2002-05/msg01564.html), but I included it
in Bison.  Paul (Eggert) also cleaned it.

Now I think it should move to gnulib: it's way more powerful than what
we use in Bison only.

But before actually submitting it, let's clean it:
- always ANSI C
- don't use `extern` for function declarations
- reduce scopes

More can be done on scope reduction, but it's a quite painful
refactoring, I'll have a break.

Akim Demaille (17):
  style: modernize lib/abitset.h
  style: modernize lib/abitset.c
  style: modernize lib/bbitset.h
  style: modernize lib/bitset.h
  style: modernize lib/bitset.c
  style: modernize lib/bitset_stats.h
  style: modernize lib/bitset_stats.c
  style: modernize lib/bitsetv-print.h
  style: modernize lib/bitsetv-print.c
  style: modernize lib/bitsetv.h
  style: modernize lib/bitsetv.c
  style: modernize lib/ebitset.h
  style: modernize lib/ebitset.c
  style: modernize lib/lbitset.h
  style: modernize lib/lbitset.c
  style: modernize lib/vbitset.c
  style: modernize lib/vbitset.h

 lib/abitset.c       | 159 +++++++-------------
 lib/abitset.h       |   4 +-
 lib/bbitset.h       |  20 +--
 lib/bitset.c        |  50 ++----
 lib/bitset.h        |  50 +++---
 lib/bitset_stats.c  |  83 +++++-----
 lib/bitset_stats.h  |   6 +-
 lib/bitsetv-print.c |  13 +-
 lib/bitsetv-print.h |   2 +-
 lib/bitsetv.c       |  49 ++----
 lib/bitsetv.h       |  18 +--
 lib/ebitset.c       | 359 +++++++++++++++-----------------------------
 lib/ebitset.h       |   6 +-
 lib/lbitset.c       | 193 +++++++++---------------
 lib/lbitset.h       |   6 +-
 lib/vbitset.c       | 354 +++++++++++++++----------------------------
 lib/vbitset.h       |   4 +-
 17 files changed, 495 insertions(+), 881 deletions(-)

-- 
2.19.1




reply via email to

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