summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* cex: don't assume the terminal supports "•"Akim Demaille2020-06-161-0/+4
| | | | | | | | | | Use of print_unicode_char suggested by Bruno Haible. https://lists.gnu.org/r/bug-gettext/2020-06/msg00012.html * src/gram.h (print_dot_fallback, print_dot): New. * src/gram.c, src/derivation.c: Use it. * tests/counterexample.at, tests/report.at: Adjust the test suite. * .travis.yml, README-hacking.md: Adjust.
* cex: add gnulib dependenciesAkim Demaille2020-05-221-1/+2
| | | | * bootstrap.conf (gnulib_modules): Add linked-list.
* examples: beware of the portability of flex --header-fileAkim Demaille2020-05-031-0/+16
| | | | | | | | | | | | | | The option --header was introduced in version 2.5.6. The option --header-file was introduced in version 2.6.4. Reported by Bruno Haible. https://lists.gnu.org/r/bug-bison/2020-05/msg00013.html So use --header, and do bother with versions that don't support it. * m4/flex.m4: Check whether flex supports --header. * configure.ac (FLEX_WORKS, FLEX_CXX_WORKS): Set to false if it doesn't. * * examples/c/reccalc/local.mk, examples/c/reccalc/Makefile: Use --header rather than --header-file.
* gnulib: updateAkim Demaille2020-04-291-0/+1
|
* gnulib: use readlineAkim Demaille2020-03-011-0/+3
|
* gnulib: updateAkim Demaille2020-02-101-0/+3
|
* git: update ignoresAkim Demaille2020-01-191-0/+1
|
* gnulib: updateAkim Demaille2020-01-111-1/+2
|
* package: bump copyrights to 2020Akim Demaille2020-01-106-6/+6
| | | | Run 'make update-copyright'.
* gnulib: updateAkim Demaille2019-11-111-0/+2
|
* git: update ignoresAkim Demaille2019-11-011-0/+16
| | | | | I don't understand what happened in 10acc148bb90fac8a52a5d35f2bd18bd824c1639.
* version 3.4.90v3.4.90Akim Demaille2019-10-291-16/+0
| | | | * NEWS: Record release date.
* build: remove dmalloc supportAkim Demaille2019-10-241-22/+0
| | | | | | | Today sanitizers are a better alternative. * m4/dmalloc.m4: Remove. * configure.ac, src/system.h: Adjust.
* gnulib:updatePaul Eggert2019-10-171-0/+1
|
* configure: don't require FlexAkim Demaille2019-10-091-3/+4
| | | | | | | | | | | Flex should not be required to build Bison or run the test suite (of course it is needed for maintaining Bison). Yet the Automake conditional FLEX_WORKS does not work. * m4/flex.m4 (_AC_PROG_LEX_YYTEXT_DECL): Since this is called conditionally, don't define LEX_IS_FLEX here, but rather... (AC_PROG_LEX): here. * configure.ac: Be more cautious about possibly undefined variables.
* diagnostics: suggest fixes for undeclared symbolsAkim Demaille2019-10-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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: get the screen width from the terminalAkim Demaille2019-09-221-0/+2
| | | | | | | | | | | * bootstrap.conf: We need winsz-ioctl and winsz-termios. * src/location.c (columns): Use winsize to get the number of columns. Code taken from the GNU Coreutils. * src/location.h, src/location.c (caret_init): New. * src/complain.c (complain_init): Call it. * tests/bison.in: Export COLUMNS so that users of tests/bison can enjoy proper line truncation.
* diagnostics: learn how to count column number with multibyte charsAkim Demaille2019-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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/+1
|
* gnulib: updateAkim Demaille2019-06-221-2/+0
|
* c++: beware of to_string portability issuesAkim Demaille2019-05-201-0/+3
| | | | | | | Reported by Bruno Haible. http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00033.html * m4/bison-cxx-std.m4 (_BISON_CXXSTD_11_snippet): Check it.
* build: use gettext-hAkim Demaille2019-04-251-1/+0
| | | | | | | | | | | We were using the gnulib's gettext module with tricks in bootstrap.conf to avoid useless files. Instead, use gnulib's gettext-h module. * .travis.yml: Force Gettext 0.18.3 on Trusty. * bootstrap.conf: Use gettext-h instead of gettext. (excluded_files): Remove. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.
* diagnostics: use gnulib's libtextstyle-optionalAkim Demaille2019-03-241-22/+24
| | | | | | | | | | 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.
* warnings: don't use _Noreturn with G++ 4.7 in C++98 modeAkim Demaille2019-03-231-0/+1
| | | | | | | | | | | | | | The timevar and bitset modules now use the c99 module which causes $CXX to now include -std=gnu++11 when possible. Unfortunately, G++ 4.7 does not implement [[noreturn]] in C++11 mode, so our tests of glr.cc (which uses _Noreturn) fail with input.cc:954:1: error: expected unqualified-id before '[' token right before [[noreturn]]. 4.8 works fine. * data/skeletons/c.m4 (b4_attribute_define): Do not use [[noreturn]] with GCC 4.7.
* diagnostics: use libtextstyle for colored outputAkim Demaille2019-03-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bruno Haible released libtextstyle, a library for colored output based on CSS. Let's use it to generate colored diagnostics, provided libtextstyle is available. See https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00176.html https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00073.html https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00084.html https://lists.gnu.org/archive/html/bison-patches/2019-03/msg00007.html * bootstrap.conf (gnulib_modules): Use libtextstyle when possible. * data/diagnostics.css: New. * src/complain.c (begin_use_class, end_use_class, flush) (severity_style, complain_init_color): New. Use them. * src/getargs.c (getargs_colors): New. (getargs): Use it. Skip --color and --style. * src/location.h, src/location.c (location_print): Use a style. * tests/bison.in: Force --color=yes when stderr is a tty. * tests/local.at: Disable colors during the test suite. * tests/input.at: Adjust expectations to the extra options passed on the command line.
* package: bump copyrights to 2019Akim Demaille2019-01-054-6/+7
|
* package: make bison a relocatable packageAkim Demaille2018-12-251-0/+4
| | | | | | | | | | | | | | | | | | 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-211-0/+1
|
* tests: don't fail if the C++ compiler does not workAkim Demaille2018-11-041-5/+3
| | | | | | | | | | | | | | | | Also, make sure that `make dist` generates a correct tarball even if the C++ compiler does not work. Reported by Nelson H. F. Beebe. * m4/cxx.m4 (BISON_CXX_WORKS): Define to true/false instead of true/exit 77. The latter is too dangerous to use (it directly quits). (ENABLE_CXX): New name for the Automake conditional, for consistency with ENABLE_CXX11 etc. * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Adjust to the new semantics of BISON_CXX_WORKS. * examples/c++/local.mk: Skip the variant test if C++ does not work. * examples/calc++/local.mk: Likewise.
* gnulib: update timevarAkim Demaille2018-10-141-2/+8
| | | | | See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00005.html.
* gnulib: updateAkim Demaille2018-10-061-0/+1
|
* gnulib: updateAkim Demaille2018-10-051-0/+3
|
* gnulib: move timevar to itAkim Demaille2018-09-302-60/+1
| | | | | | | | * 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.
* build: rename and simplify the -std checks for C++Akim Demaille2018-09-231-106/+45
| | | | | | | | Too much code duplication. * m4/bison-cxx-std.m4: s/BISON_CXX_COMPILE_STDCXX/BISON_CXXSTD/. (BISON_CXXSTD): New. * configure.ac: Use it.
* build: check for C++98 and 03 like the othersAkim Demaille2018-09-231-1/+56
| | | | | | * m4/bison-cxx-std.m4 (BISON_CXX_COMPILE_STDCXX_98) (BISON_CXX_COMPILE_STDCXX_03): New. * configure.ac: Use them.
* build: use our own version of ax_check_link_flagAkim Demaille2018-09-233-57/+49
| | | | | | | | | | | | | | The message on configure is misleading: checking whether the linker accepts -std=c++11... yes checking whether the linker accepts -std=c++14... yes checking whether the linker accepts -std=c++17... no It is the compiler that we check, not just the linker. * m4/ax_check_link_flag.m4: Remove. * m4/bison-check-compiler-flag.m4: New. * m4/bison-cxx-std.m4: Use it.
* build: fix Autoconf macros to check for C++ standard flagsAkim Demaille2018-09-231-4/+4
| | | | | * m4/bison-cxx-std.m4: Since now we link the program, we need a program: main was missing and linking was failing.
* build: don't accept a broken standard lib for C++Akim Demaille2018-09-193-86/+69
| | | | | | | | | | | | | | | | | On the CI, we had failures such as: ./c++.at:401: $PREPARSER ./list stderr: ./list: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory because we accepted `-std=c++ -stdlib=libc++` although libc++ is not installed on the machine. * m4/ax_check_compile_flag.m4 (AX_CHECK_COMPILE_FLAG): Rewrite as... * m4/bison-check-compile-flag.m4 (BISON_CHECK_COMPILE_FLAG): this, so that we use AC_LINK_IFELSE to check the compiler (and its std lib) instead of AC_COMPILE_IFELSE.
* build: strengthen the C++ standard flag testAkim Demaille2018-09-182-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | On the CI, we have this spurious failure with clang 3.9 with -std=c++17: In file included from list.y:23: In file included from /usr/include/c++/4.8/iostream:39: In file included from /usr/include/c++/4.8/ostream:38: In file included from /usr/include/c++/4.8/ios:42: In file included from /usr/include/c++/4.8/bits/ios_base.h:41: In file included from /usr/include/c++/4.8/bits/locale_classes.h:40: In file included from /usr/include/c++/4.8/string:52: In file included from /usr/include/c++/4.8/bits/basic_string.h:2815: In file included from /usr/include/c++/4.8/ext/string_conversions.h:43: /usr/include/c++/4.8/cstdio:120:11: error: no member named 'gets' in the global namespace using ::gets; ~~^ This shows that our test, based on gl_WARN_ADD, is a joke. We have to really check for at least a bit of C++. * m4/ax_check_compile_flag.m4, m4/bison-cxx-std.m4: New. * configure.ac: Use them to make sure the compiler actually works.
* style: m4: remove useless reference to 'int' in integral typesAkim Demaille2018-08-141-3/+3
| | | | * m4/cxx.m4: Prefer 'unsigned' to 'unsigned int'.
* gnulib: updateAkim Demaille2018-08-121-1/+0
| | | | * bootstrap.conf: gnulib_mk is defined again by bootstrap.
* Update copyright yearsAkim Demaille2018-05-125-5/+8
| | | | Run `make update-copyright`.
* gnulib: updateAkim Demaille2018-05-081-0/+2
| | | | | | * README-hacking: Commit before bootstrapping. * bootstrap.conf: gnulib_mk is no longer defined by bootstrap. * bootstrap, gnulib, lib/.gitignore, m4/.gitignore: Update/regen.
* Adjust to recent Gnulib changesPaul Eggert2017-09-161-22/+16
|
* gnulib: strtoul is considered obsolete and now uselessAkim Demaille2015-01-151-2/+0
| | | | * bootstrap.conf: here.
* package: bump to 2015Akim Demaille2015-01-045-5/+5
| | | | | | Which also requires: * gnulib: Update.
* gnulib: updateAkim Demaille2014-12-291-0/+3
|
* package: bump to 2014Akim Demaille2014-02-035-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README, * README-alpha, README-hacking, THANKS, TODO, bootstrap.conf, * build-aux/darwin11.4.0.valgrind, build-aux/local.mk, * build-aux/update-b4-copyright, * build-aux/update-package-copyright-year, cfg.mk, configure.ac, * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4, * data/c-like.m4, data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc, * data/java-skel.m4, data/java.m4, data/lalr1.cc, data/lalr1.java, * data/local.mk, data/location.cc, data/stack.hh, data/variant.hh, * data/xslt/bison.xsl, data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl, * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint, * djgpp/README.in, djgpp/config.bat, djgpp/config.sed, * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat, * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h, * djgpp/testsuite.sed, doc/bison.texi, doc/local.mk, doc/refcard.tex, * etc/README, etc/bench.pl.in, etc/local.mk, * examples/calc++/calc++.test, examples/calc++/local.mk, * examples/extexi, examples/local.mk, examples/mfcalc/local.mk, * examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk, * examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy, * lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c, * lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h, * lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c, * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c, * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h, * lib/local.mk, lib/main.c, lib/timevar.c, lib/timevar.def, * lib/timevar.h, lib/vbitset.c, lib/vbitset.h, lib/yyerror.c, * m4/bison-i18n.m4, m4/c-working.m4, m4/cxx.m4, m4/flex.m4, * m4/timevar.m4, src/AnnotationList.c, src/AnnotationList.h, * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c, src/LR0.h, * src/Sbitset.c, src/Sbitset.h, src/assoc.c, src/assoc.h, * src/closure.c, src/closure.h, src/complain.c, src/complain.h, * src/conflicts.c, src/conflicts.h, src/derives.c, src/derives.h, * src/files.c, src/files.h, src/flex-scanner.h, src/getargs.c, * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c, * src/graphviz.h, src/ielr.c, src/ielr.h, src/lalr.c, src/lalr.h, * src/local.mk, src/location.c, src/location.h, src/main.c, * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c, * src/named-ref.h, src/nullable.c, src/nullable.h, src/output.c, * src/output.h, src/parse-gram.c, src/parse-gram.y, src/print-xml.c, * src/print-xml.h, src/print.c, src/print.h, src/print_graph.c, * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c, * src/reduce.h, src/relation.c, src/relation.h, src/scan-code.h, * src/scan-code.l, src/scan-gram.h, src/scan-gram.l, src/scan-skel.h, * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c, * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h, * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h, * tests/actions.at, tests/atlocal.in, tests/bison.in, tests/c++.at, * tests/calc.at, tests/conflicts.at, tests/cxx-type.at, * tests/existing.at, tests/glr-regression.at, tests/headers.at, * tests/input.at, tests/java.at, tests/javapush.at, tests/local.at, * tests/local.mk, tests/named-refs.at, tests/output.at, tests/push.at, * tests/reduce.at, tests/regression.at, tests/sets.at, * tests/skeletons.at, tests/synclines.at, tests/testsuite.at, * tests/torture.at, tests/types.at: here.
* gnulib: updateAkim Demaille2013-12-051-0/+3
| | | | * gnulib: here.
* maint: update copyright yearsAkim Demaille2013-01-125-5/+5
| | | | | Suggested by Stefano Lattarini. Run "make update-copyright".