Commit Graph

407 Commits

Author SHA1 Message Date
Akim Demaille
7ab275214b gnulib: update 2019-06-22 09:03:19 +02:00
Akim Demaille
4d34b06fb3 diagnostics: use gnulib's libtextstyle-optional
Bruno Haible just added a default implementation of libtextstyle's
interface when the library is not available.
https://lists.gnu.org/archive/html/bison-patches/2019-03/msg00025.html

* gnulib: Update.
* bootstrap.conf: Replace libtextstyle with libtextstyle-optional.
* src/complain.c, src/getargs.c: Remove now useless cpp guards.
2019-03-24 18:40:46 +01:00
Akim Demaille
d459a5b8e6 style: prefer snprintf to sprintf
* src/symtab.c (dummy_symbol_get): There's no need for the buffer to
be so big and static.
Use snprintf for safety.
2019-02-03 07:28:57 +01:00
Akim Demaille
41aaa8374c diagnostics: update the grammar file
Let's use the fixits to actually update the grammar files.

* src/getargs.h, src/getargs.c (update_flag): New.
* src/fixits.h, src/fixits.c (fixits_run): New.
* src/main.c (main): Invoke fixits_run when --update is passed.
* tests/input.at (Deprecated directives): Check --update.
2019-01-14 19:57:37 +01:00
Akim Demaille
ffe2e4aaec diagnostics: keep the fixits
Introduce proper support for fixits, instead of just printing them on
demand.

* bootstrap.conf: We need gnulib's xlists.
* src/fixits.h, src/fixits.c: New.
* src/complain.c (deprecated_directive): Use fixits_register.
* src/main.c (main): Use fixits_free.
2019-01-14 19:57:37 +01:00
Akim Demaille
2471733f1a package: bump copyrights to 2019 2019-01-05 14:58:05 +01:00
Akim Demaille
a4ede8f85b package: make bison a relocatable package
Suggested by David Barto
https://lists.gnu.org/archive/html/help-bison/2015-02/msg00004.html
and Victor Zverovich.
https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00121.html

This is very easy to do, thanks to work by Bruno Haible in gnulib.
See "Supporting Relocation" in gnulib's documentation.

* bootstrap.conf: We need relocatable-prog and relocatable-script (for yacc).

* src/yacc.in: New.
* configure.ac, src/local.mk: Instantiate it.
* src/main.c, src/output.c (main, pkgdatadir): Use relocatable2.

* doc/bison.texi (FAQ): Document it.
2018-12-25 10:05:36 +01:00
Akim Demaille
36e587b1f6 gnulib: update 2018-11-29 06:16:20 +01:00
Akim Demaille
647bf48797 gnulib: update ignores 2018-11-26 07:03:55 +01:00
Akim Demaille
bcecfbafab gnulib: update to use its bitsets
Bison's bitset were moved to gnulib.

* lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
* lib/bitset.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
* lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c,
* lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h,
* lib/lbitset.h, lib/vbitset.c, lib/vbitset.h:
Remove.

* gnulib: Update.
* bootstrap.conf, lib/local.mk: Adjust.
2018-11-26 06:33:45 +01:00
Akim Demaille
5d07f4f726 bitset: fix warning
Reported by Hans Åberg.
http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00047.html

* lib/bitset.c (bitset_count_): here.
2018-10-30 07:01:57 +01:00
Akim Demaille
e605ad9679 build: fix use of gnulib Make variables
Reported by Kiyoshi Kanazawa.
http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00048.html

* lib/local.mk (lib_libbison_a_LIBADD): Merge into...
* src/local.mk (src_bison_LDADD): here.
2018-10-30 07:01:21 +01:00
Akim Demaille
22aaad0c45 bitset: clean up bbitset.h
* lib/libiberty.h: Inline in...
* lib/bbitset.h: here.
* lib/local.mk: Adjust.
2018-10-27 19:27:41 +02:00
Akim Demaille
a45ed4ecc1 bitset: clean up bitset.h
* lib/bitset.h: Fix include order.
2018-10-27 19:27:41 +02:00
Akim Demaille
fef272bdf3 bitset: clean up vbitset.c
* lib/vbitset.c: Reduce scopes, etc.
2018-10-27 19:27:41 +02:00
Akim Demaille
d1f57a4ae5 bitset: clean up lbitset.c
* lib/lbitset.c: Reduce scopes, etc.
2018-10-27 19:27:41 +02:00
Akim Demaille
5d5f12fb0d bitset: clean up ebitset.c
* lib/ebitset.c: Reduce scopes, etc.
2018-10-27 19:09:08 +02:00
Akim Demaille
9f6013a0fd bitset: clean up bitset_stats.c
* lib/bitset_stats.c: Reduce scopes, etc.
2018-10-27 19:09:08 +02:00
Akim Demaille
fad0f9231b bitset: clean up bitset.c
* lib/bitset.c: Reduce scopes, etc.
2018-10-27 19:09:08 +02:00
Akim Demaille
81df326649 bitset: clean up abitset.c
* lib/abitset.c: Reduce scopes, etc.
2018-10-27 18:46:01 +02:00
Akim Demaille
7c4b40de61 build: remove a few copies of the Copyright from the generated Makefile
* build-aux/local.mk, cfg.mk, examples/calc++/local.mk,
* examples/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk, lib/local.mk, src/local.mk,
* tests/local.mk:
Use Automake comments so that we don't get a copy of each in the
generated Makefile.
2018-10-24 06:18:57 +02:00
Akim Demaille
d2192653db build: add missing gnulib libs
Reported by Denis Excoffier.

* lib/local.mk, src/local.mk: here.
2018-10-20 09:11:22 +02:00
Akim Demaille
5cdbc97c9d pacify syntax-checks
* lib/lbitset.c, tests/c++.at: here.
* cfg.mk: Add exceptions.
2018-10-16 18:54:06 +02:00
Akim Demaille
dc73dc4fb2 gnulib: update timevar
See
https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00005.html.
2018-10-14 15:15:29 +02:00
Akim Demaille
677a91aef2 style: modernize lib/vbitset.h 2018-10-11 08:54:14 +02:00
Akim Demaille
dab2ee0f74 style: modernize lib/vbitset.c 2018-10-11 08:54:14 +02:00
Akim Demaille
7f49dc7d1d style: modernize lib/lbitset.c 2018-10-11 07:00:34 +02:00
Akim Demaille
5f26baa748 style: modernize lib/lbitset.h 2018-10-11 07:00:34 +02:00
Akim Demaille
80752c0dc1 style: modernize lib/ebitset.c 2018-10-11 07:00:34 +02:00
Akim Demaille
f8c9c7acae style: modernize lib/ebitset.h 2018-10-11 07:00:34 +02:00
Akim Demaille
7d324cf00c style: modernize lib/bitsetv.c 2018-10-11 07:00:34 +02:00
Akim Demaille
98364385a6 style: modernize lib/bitsetv.h 2018-10-11 07:00:34 +02:00
Akim Demaille
b5197d5770 style: modernize lib/bitsetv-print.c 2018-10-11 07:00:34 +02:00
Akim Demaille
e9b69f8655 style: modernize lib/bitsetv-print.h 2018-10-11 07:00:34 +02:00
Akim Demaille
099339df0a style: modernize lib/bitset_stats.c 2018-10-11 07:00:34 +02:00
Akim Demaille
8e4ca87228 style: modernize lib/bitset_stats.h 2018-10-11 07:00:34 +02:00
Akim Demaille
72e2a94d5f style: modernize lib/bitset.c 2018-10-11 07:00:34 +02:00
Akim Demaille
059cb26ca2 style: modernize lib/bitset.h 2018-10-11 07:00:34 +02:00
Akim Demaille
c3d32f4a9a style: modernize lib/bbitset.h 2018-10-11 07:00:34 +02:00
Akim Demaille
74484f42f3 style: modernize lib/abitset.c 2018-10-11 07:00:34 +02:00
Akim Demaille
6565b9a566 style: modernize lib/abitset.h 2018-10-10 22:42:58 +02:00
Akim Demaille
1cb6c26b4f build: let timevar be dealt with by gnulib
* lib/local.mk (lib_libbison_a_SOURCES): Remove timevar.
2018-10-07 14:16:30 +02:00
Akim Demaille
d13a7fdb0a lib: introduce xpath_join
* lib/path-join.h, lib/path-join.c: New.
* lib/local.mk: Adjust.
* src/output.c: Use it.
2018-10-06 15:44:24 +02:00
Josh Soref
9188385b55 spelling: outputting 2018-10-05 07:01:05 +02:00
Josh Soref
57e3f5a80c spelling: enum 2018-10-05 07:01:04 +02:00
Akim Demaille
8d64416e8c gnulib: update 2018-10-05 06:14:20 +02:00
Akim Demaille
f84a8e96d1 gnulib: move timevar to it
* lib/timevar.c, lib/timevar.h, m4/timevar.m4: Remove.
* gnulib: Update.
* configure.ac: Adjust.
* lib/timevar.def: Use lower case for the timevvars.
Adjust dependencies.
2018-09-30 14:19:53 +02:00
Akim Demaille
a990213582 timevar: don't declare getrusage if we don't use it
This fails on MinGW.
Reported by Simon Sobisch.
http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00058.html

* lib/timevar.c: Don't provide default prototypes for functions
we don't use.
2018-09-22 15:58:27 +02:00
Akim Demaille
9dfd46a5d5 timevar: get rid of a useless macro
* lib/timevar.h (timevar_report): Rename as...
(timevar_enabled): this.
* lib/timevar.c (TIMEVAR_ENABLE): Remove.
2018-09-22 15:58:27 +02:00
Akim Demaille
984d8cc72c timevar: introduce and use get_current_time
* lib/timevar.c: here.
Remove useless prototypes.
(timevar_accumulate): Be const correct.
2018-09-22 15:58:27 +02:00