summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* gnulib: updateAkim Demaille2019-11-111-0/+2
|
* diagnostics: suggest fixes for undeclared symbolsAkim Demaille2019-10-062-0/+7
| | | | | | | | | | | | | | | | | | | | | | From input.y:1.17-19: warning: symbol baz is used, but is not defined as a token and has no rules [-Wother] 1 | %printer {} foo baz | ^~~ to input.y:1.17-19: warning: symbol 'baz' is used, but is not defined as a token and has no rules; did you mean 'bar'? [-Wother] 1 | %printer {} foo baz | ^~~ | bar * bootstrap.conf: We need fstrcmp. * src/symtab.c (symbol_from_uniqstr_fuzzy): New. (complain_symbol_undeclared): Use it. * tests/diagnostics.at (Suggestions): New. * data/bison-default.css (insertion): Rename as... (fixit-insert): this, as this is what GCC uses.
* diagnostics: learn how to count column number with multibyte charsAkim Demaille2019-09-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | So far diagnostics were cheating: in addition to the 'column' field of locations (based on actual screen width per multibyte characters and on tabulation expansion), the scanner sets the 'byte' field. Diagnostics used this byte count to decide where to insert (color) style. We want to be able to truncate the quoted lines when there are too wide to fit the screen. This requires that the diagnostics learn how to count columns, the byte-in-boundary trick no longer works. Bytes are still used for fix-its. * bootstrap.conf: We need mbfile for mbf_getc. * src/location.c (caret_info): We need an mbfile. (caret_set_file): Initialize it. (caret_getc): Convert to mbfile. (location_caret): Instead of relying on the byte position to decide where to insert the color style, count the current column using boundary_compute.
* git: update ignoresAkim Demaille2019-09-221-0/+2
|
* gnulib: updateAkim Demaille2019-09-111-13/+18
| | | | | | | | Contains the creation of the xhash module. https://lists.gnu.org/archive/html/bug-gnulib/2019-09/msg00046.html * src/muscle-tab.c, src/state.c, src/symtab.c, src/uniqstr.c: Use hash_xinitialize.
* gnulib: updateAkim Demaille2019-06-221-0/+7
|
* diagnostics: use gnulib's libtextstyle-optionalAkim Demaille2019-03-241-0/+2
| | | | | | | | | | 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.
* style: prefer snprintf to sprintfAkim Demaille2019-02-031-0/+1
| | | | | | * src/symtab.c (dummy_symbol_get): There's no need for the buffer to be so big and static. Use snprintf for safety.
* diagnostics: update the grammar fileAkim Demaille2019-01-141-0/+3
| | | | | | | | | 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.
* diagnostics: keep the fixitsAkim Demaille2019-01-141-36/+42
| | | | | | | | | | 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.
* package: bump copyrights to 2019Akim Demaille2019-01-058-10/+13
|
* package: make bison a relocatable packageAkim Demaille2018-12-251-0/+15
| | | | | | | | | | | | | | | | | | 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.
* gnulib: updateAkim Demaille2018-11-291-11/+1
|
* gnulib: update ignoresAkim Demaille2018-11-261-13/+11
|
* gnulib: update to use its bitsetsAkim Demaille2018-11-2619-6719/+17
| | | | | | | | | | | | | | 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.
* bitset: fix warningAkim Demaille2018-10-301-1/+1
| | | | | | | Reported by Hans Ã…berg. http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00047.html * lib/bitset.c (bitset_count_): here.
* build: fix use of gnulib Make variablesAkim Demaille2018-10-301-9/+0
| | | | | | | | 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.
* bitset: clean up bbitset.hAkim Demaille2018-10-273-41/+11
| | | | | | * lib/libiberty.h: Inline in... * lib/bbitset.h: here. * lib/local.mk: Adjust.
* bitset: clean up bitset.hAkim Demaille2018-10-271-10/+5
| | | | * lib/bitset.h: Fix include order.
* bitset: clean up vbitset.cAkim Demaille2018-10-271-103/+65
| | | | * lib/vbitset.c: Reduce scopes, etc.
* bitset: clean up lbitset.cAkim Demaille2018-10-271-60/+41
| | | | * lib/lbitset.c: Reduce scopes, etc.
* bitset: clean up ebitset.cAkim Demaille2018-10-271-12/+4
| | | | * lib/ebitset.c: Reduce scopes, etc.
* bitset: clean up bitset_stats.cAkim Demaille2018-10-271-42/+53
| | | | * lib/bitset_stats.c: Reduce scopes, etc.
* bitset: clean up bitset.cAkim Demaille2018-10-271-25/+19
| | | | * lib/bitset.c: Reduce scopes, etc.
* bitset: clean up abitset.cAkim Demaille2018-10-271-24/+11
| | | | * lib/abitset.c: Reduce scopes, etc.
* build: remove a few copies of the Copyright from the generated MakefileAkim Demaille2018-10-241-14/+14
| | | | | | | | | * 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.
* build: add missing gnulib libsAkim Demaille2018-10-201-3/+12
| | | | | | Reported by Denis Excoffier. * lib/local.mk, src/local.mk: here.
* pacify syntax-checksAkim Demaille2018-10-161-1/+1
| | | | | * lib/lbitset.c, tests/c++.at: here. * cfg.mk: Add exceptions.
* gnulib: update timevarAkim Demaille2018-10-141-1/+12
| | | | | See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00005.html.
* style: modernize lib/vbitset.hAkim Demaille2018-10-111-2/+2
|
* style: modernize lib/vbitset.cAkim Demaille2018-10-111-236/+121
|
* style: modernize lib/lbitset.cAkim Demaille2018-10-111-124/+69
|
* style: modernize lib/lbitset.hAkim Demaille2018-10-111-3/+3
|
* style: modernize lib/ebitset.cAkim Demaille2018-10-111-242/+117
|
* style: modernize lib/ebitset.hAkim Demaille2018-10-111-3/+3
|
* style: modernize lib/bitsetv.cAkim Demaille2018-10-111-35/+14
|
* style: modernize lib/bitsetv.hAkim Demaille2018-10-111-9/+9
|
* style: modernize lib/bitsetv-print.cAkim Demaille2018-10-111-7/+6
|
* style: modernize lib/bitsetv-print.hAkim Demaille2018-10-111-1/+1
|
* style: modernize lib/bitset_stats.cAkim Demaille2018-10-111-46/+37
|
* style: modernize lib/bitset_stats.hAkim Demaille2018-10-111-3/+3
|
* style: modernize lib/bitset.cAkim Demaille2018-10-111-34/+16
|
* style: modernize lib/bitset.hAkim Demaille2018-10-111-25/+25
|
* style: modernize lib/bbitset.hAkim Demaille2018-10-111-10/+10
|
* style: modernize lib/abitset.cAkim Demaille2018-10-111-101/+58
|
* style: modernize lib/abitset.hAkim Demaille2018-10-101-2/+2
|
* build: let timevar be dealt with by gnulibAkim Demaille2018-10-071-6/+0
| | | | * lib/local.mk (lib_libbison_a_SOURCES): Remove timevar.
* lib: introduce xpath_joinAkim Demaille2018-10-063-1/+78
| | | | | | * lib/path-join.h, lib/path-join.c: New. * lib/local.mk: Adjust. * src/output.c: Use it.
* spelling: outputtingJosh Soref2018-10-051-5/+5
|
* spelling: enumJosh Soref2018-10-051-1/+1
|