bison-patches
[Top][All Lists]
Advanced

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

untabify bison


From: Joel E. Denny
Subject: untabify bison
Date: Sun, 24 Jul 2011 18:45:07 -0400 (EDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

A few years ago, Jim Meyering removed tabs from coreutils source code:

  http://lists.gnu.org/archive/html/bug-coreutils/2009-08/msg00219.html

I have long wanted to do the same for bison.  Now, while bison development 
is especially slow, seems like a good time to do so without being too 
disruptive.

The change is, of course, large and difficult to review without git's 
help, so I'm not bothering to post the complete diff here.  Instead, I've 
pushed a new branch, candidates/untabify-master.  There you can, for 
example, try out `git diff -w master' to look for changes other than tab 
removals.

I don't plan to untabify branch-0.5.  That doesn't seem worth the effort.

Any objections to this change?

>From e9690142325711b320ef444768fdd40a087d02f7 Mon Sep 17 00:00:00 2001 
From: Joel E. Denny <address@hidden>
Date: Sun, 24 Jul 2011 17:50:37 -0400
Subject: [PATCH] global: remove unnecessary horizontal tabs.

This change was made by applying emacs' untabify function to
nearly all files in Bison's repository.  Required tabs in make
files, ChangeLog, regexps, and test code were manually skipped.
Other notable exceptions and changes are listed below.
* bootstrap: Skip because we sync this with gnulib.
* data/m4sugar/foreach.m4
* data/m4sugar/m4sugar.m4: Skip because we sync these with
Autoconf.
* djgpp: Skip because I don't know how to test djgpp properly, and
this code appears to be unmaintained anyway.
* README-hacking (Hacking): Specify that tabs should be avoided
where not required.
---
 ChangeLog                   |   16 +
 NEWS                        |   22 +-
 README-hacking              |    7 +
 REFERENCES                  |    4 +-
 TODO                        |   46 +-
 build-aux/cross-options.pl  |   74 +-
 build-aux/local.mk          |    8 +-
 configure.ac                |    8 +-
 data/bison.m4               |   20 +-
 data/c++.m4                 |   12 +-
 data/c.m4                   |   26 +-
 data/glr.c                  | 1372 +++++++++++++++---------------
 data/glr.cc                 |   54 +-
 data/lalr1.cc               |   42 +-
 data/local.mk               |   44 +-
 data/location.cc            |    4 +-
 data/stack.hh               |    2 +-
 data/xslt/xml2dot.xsl       |   20 +-
 data/xslt/xml2text.xsl      |   38 +-
 data/xslt/xml2xhtml.xsl     |  136 ++--
 data/yacc.c                 |  334 ++++----
 doc/Doxyfile.in             |   12 +-
 doc/local.mk                |   20 +-
 etc/bench.pl.in             |   22 +-
 etc/prefix-gnulib-mk        |    2 +-
 examples/calc++/Makefile.am |    6 +-
 examples/extexi             |   18 +-
 lib/abitset.c               |  232 +++---
 lib/bbitset.h               |   28 +-
 lib/bitset.c                |   10 +-
 lib/bitset.h                |   58 +-
 lib/bitset_stats.c          |  100 ++--
 lib/bitsetv-print.c         |    2 +-
 lib/bitsetv.c               |    6 +-
 lib/ebitset.c               |  654 +++++++-------
 lib/lbitset.c               |  754 +++++++++---------
 lib/timevar.c               |   40 +-
 lib/vbitset.c               |  312 ++++----
 m4/c-working.m4             |    2 +-
 m4/cxx.m4                   |   32 +-
 src/LR0.c                   |   70 +-
 src/closure.c               |   38 +-
 src/complain.c              |   16 +-
 src/complain.h              |    4 +-
 src/conflicts.c             |  258 +++---
 src/derives.c               |   16 +-
 src/files.c                 |   62 +-
 src/flex-scanner.h          |    8 +-
 src/getargs.c               |  212 +++---
 src/getargs.h               |   12 +-
 src/gram.c                  |   72 +-
 src/gram.h                  |    6 +-
 src/graphviz.c              |    2 +-
 src/graphviz.h              |    2 +-
 src/lalr.c                  |  176 ++--
 src/local.mk                |  162 ++--
 src/location.c              |   20 +-
 src/location.h              |    6 +-
 src/muscle-tab.c            |    6 +-
 src/muscle-tab.h            |   70 +-
 src/nullable.c              |   84 +-
 src/output.c                |  172 ++--
 src/parse-gram.c            |  362 ++++----
 src/parse-gram.y            |   54 +-
 src/print-xml.c             |  190 +++---
 src/print.c                 |  258 +++---
 src/print_graph.c           |   76 +-
 src/reader.c                |  102 ++--
 src/reader.h                |    6 +-
 src/reduce.c                |  120 ++--
 src/relation.c              |   36 +-
 src/scan-code.l             |  248 +++---
 src/scan-gram.l             |  226 +++---
 src/scan-skel.l             |    4 +-
 src/state.c                 |   54 +-
 src/state.h                 |   16 +-
 src/symlist.c               |    4 +-
 src/symtab.c                |   98 ++--
 src/symtab.h                |    6 +-
 src/system.h                |   56 +-
 src/tables.c                |  312 ++++----
 src/uniqstr.c               |   10 +-
 tests/actions.at            |   58 +-
 tests/atlocal.in            |    2 +-
 tests/c++.at                |    2 +-
 tests/calc.at               |    6 +-
 tests/cxx-type.at           |  166 ++--
 tests/existing.at           | 1962 +++++++++++++++++++++---------------------
 tests/glr-regression.at     |   92 +-
 tests/java.at               |   86 +-
 tests/local.at              |   24 +-
 tests/local.mk              |   42 +-
 tests/named-refs.at         |    4 +-
 tests/output.at             |   68 +-
 tests/regression.at         |    8 +-
 tests/sets.at               |   20 +-
 tests/testsuite.at          |    2 +-
 tests/torture.at            |   18 +-
 98 files changed, 5447 insertions(+), 5424 deletions(-)

diff --git a/README-hacking b/README-hacking
index 6a24062..7cb7928 100644
--- a/README-hacking
+++ b/README-hacking
@@ -46,6 +46,13 @@ of the .output file etc.  This excludes impossible error 
messages
 (comparable to assert/abort), and all the --trace output which is
 meant for the maintainers only.
 
+** Horizontal tabs
+Do not add horizontal tab characters to any file in Bison's repository
+except where required.  For example, do not use tabs to format C code.
+However, make files, ChangeLog, and some regular expressions require
+tabs.  Also, test cases might need to contain tabs to check that Bison
+properly processes tabs in its input.
+
 
 * Working from the repository
 



reply via email to

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