summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* version 3.7.3v3.7.3Akim Demaille2020-10-131-1/+1
| | | | * NEWS: Record release date.
* build: don't link bison against libreadlineAkim Demaille2020-10-132-1/+7
| | | | | | | Reported by Paul Smith <psmith@gnu.org>. https://lists.gnu.org/r/bug-bison/2020-10/msg00001.html * src/local.mk (src_bison_LDADD): here.
* gnulib: updateAkim Demaille2020-10-131-0/+0
|
* glr.cc: fix: use symbol_nameAkim Demaille2020-09-271-1/+1
| | | | * data/skeletons/glr.cc: here.
* build: fix a concurrent build issue in examplesAkim Demaille2020-09-061-0/+7
| | | | | | | Reported by Thomas Deutschmann <whissi@gentoo.org>. https://lists.gnu.org/r/bug-bison/2020-09/msg00010.html * examples/c/lexcalc/local.mk: scan.o depends on parse.[ch].
* maint: post-release administriviaAkim Demaille2020-09-052-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.7.2v3.7.2Akim Demaille2020-09-051-1/+1
| | | | * NEWS: Record release date.
* build: disable syntax-check warningAkim Demaille2020-09-051-0/+1
| | | | | | | error_message_uppercase etc/bench.pl.in-419-static int yylex (@{[is_pure (@directive) ? "YYSTYPE *yylvalp" : "void"]}); * cfg.mk: here.
* gnulib: updateAkim Demaille2020-09-051-0/+0
|
* build: fix incorrect dependenciesAkim Demaille2020-09-052-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit af000bab111768a04021bf5ffa4bbe91d44e231c ("doc: work around Texinfo 6.7 bug"), published in 3.4.91, added a dependency on the "all" target. This is a super bad idea, since "make all" will run this target *before* "all", which builds bison. It turns out that this new dependency actually needed bison to be built. So all the regular process (i) build $(BUILT_SOURCES) and then (ii) build bison, was wrecked since some of the $(BUILT_SOURCES) depended on bison... It was "easy" to see in the logs of "make V=1" because we were building bison files (such as src/files.o) *before* displaying the banner for "all-recursive". With this fix, we finally get again the proper sequence: rm -f examples/c/reccalc/scan.stamp examples/c/reccalc/scan.stamp.tmp /opt/local/libexec/gnubin/mkdir -p examples/c/reccalc touch examples/c/reccalc/scan.stamp.tmp flex -oexamples/c/reccalc/scan.c --header=examples/c/reccalc/scan.h ./examples/c/reccalc/scan.l mv examples/c/reccalc/scan.stamp.tmp examples/c/reccalc/scan.stamp rm -f lib/fcntl.h-t lib/fcntl.h && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ... } > lib/fcntl.h-t && \ mv lib/fcntl.h-t lib/fcntl.h ... mv -f lib/alloca.h-t lib/alloca.h make all-recursive Reported by Mingli Yu <mingli.yu@windriver.com>. https://github.com/akimd/bison/issues/31 https://lists.gnu.org/r/bison-patches/2020-05/msg00055.html Reported by Claudio Calvelli <bugb@w42.org>. https://lists.gnu.org/r/bug-bison/2020-09/msg00001.html https://bugs.gentoo.org/716516 * doc/local.mk (all): Rename as... (all-local): this. So that we don't compete with BUILT_SOURCES.
* doc: updatesAkim Demaille2020-09-022-3/+27
| | | | * NEWS, TODO: here.
* gnulib: updateAkim Demaille2020-08-303-0/+2
|
* tests: beware of sed portability issuesAkim Demaille2020-08-301-2/+2
| | | | | | | | Reported by David Laxer <davidl@softintel.com>. https://lists.gnu.org/r/bug-bison/2020-08/msg00027.html * tests/output.at: Don't use + with sed. While at it, fix a quotation problem hidden by the use of '#'.
* c: always use YYMALLOC/YYFREEAkim Demaille2020-08-304-2/+12
| | | | | | | | Reported by Kovalex <kovalex.pro@gmail.com>. https://lists.gnu.org/r/bug-bison/2020-08/msg00015.html * data/skeletons/yacc.c: Don't make direct calls to malloc/free. * tests/calc.at: Check it.
* build: beware of POSIX modeAkim Demaille2020-08-303-3/+3
| | | | | | | | | Reported by Dennis Clarke. https://lists.gnu.org/r/bug-bison/2020-08/msg00013.html * examples/d/local.mk, examples/java/calc/local.mk, * examples/java/simple/local.mk: Pass bison's options before its argument, in case we're in POSIX mode.
* doc: history of api.prefixAkim Demaille2020-08-301-1/+4
| | | | | | | Reported by Matthew Fernandez <matthew.fernandez@gmail.com>. https://lists.gnu.org/r/help-bison/2020-08/msg00015.html * doc/bison.texi (api.prefix): We move to {} in 3.0.
* CI: intel moved the script for ICCAkim Demaille2020-08-113-1/+4
| | | | * .travis.yml: Adjust.
* fix: unterminated \-escapeAkim Demaille2020-08-082-10/+106
| | | | | | | | | | An assertion failed when the last character is a '\' and we're in a character or a string. Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00009.html * src/scan-gram.l: Catch unterminated escapes. * tests/input.at (Unexpected end of file): New.
* fix: crash when redefining the EOF tokenAkim Demaille2020-08-074-28/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered to be EOF, which is already known to be a token, so we increment ntokens for it, and need to cancel this). This "works well" when EOF is properly defined in one go, but here it is first defined and later only assign token code 0. In the meanwhile BAR was given the token number that we just decremented. To fix this, assign symbol numbers after parsing, not during parsing, so that we also saw all the explicit token codes. To maintain the current numbers (I'd like to keep no difference in the output, not just equivalence), we need to make sure the symbols are numbered in the same order: that of appearance in the source file. So we need the locations to be correct, which was almost the case, except for nterms that appeared several times as LHS (i.e., several times as "foo: ..."). Fixing the use of location_of_lhs sufficed (it appears it was intended for this use, but its implementation was unfinished: it was always set to "false" only). * src/symtab.c (symbol_location_as_lhs_set): Update location_of_lhs. (symbol_code_set): Remove broken hack that decremented ntokens. (symbol_class_set, dummy_symbol_get): Don't set number, ntokens and nnterms. (symbol_check_defined): Do it. (symbols): Don't count nsyms here. Actually, don't count nsyms at all: let it be done in... * src/reader.c (check_and_convert_grammar): here. Define nsyms from ntokens and nnterms after parsing. * tests/input.at (EOF redeclared): New. * examples/c/bistromathic/bistromathic.test: Adjust the traces: in "%nterm <double> exp %% input: ...", exp used to be numbered before input.
* style: fix missing space before parenAkim Demaille2020-08-073-7/+7
| | | | | | * cfg.mk (_space_before_paren_exempt): Be less laxist. * src/output.c, src/reader.c: Fix space before paren issues. Pacify the warnings where applicable.
* style: fix comments and more debug traceAkim Demaille2020-08-075-12/+20
| | | | * src/location.c, src/symtab.h, src/symtab.c: here.
* style: more uses of constAkim Demaille2020-08-071-9/+7
| | | | * src/symtab.c: here.
* bench: fix support for pure parserAkim Demaille2020-08-071-29/+41
| | | | | | | * etc/bench.pl.in (is_pure): New. (generate_grammar_calc): Use code provides where needed. Use is_pure to call yylex properly. Coding style fixes.
* portability: multiple typedefsAkim Demaille2020-08-031-2/+2
| | | | | | | | | | | | | | Older versions of GCC (4.1.2 here) don't like repeated typedefs. CC src/bison-parse-simulation.o src/parse-simulation.c:61: error: redefinition of typedef 'parse_state' src/parse-simulation.h:74: error: previous declaration of 'parse_state' was here make: *** [Makefile:7876: src/bison-parse-simulation.o] Error 1 Reported by Nelson H. F. Beebe. * src/parse-simulation.c (parse_state): Don't typedef, parse-simulation.h did it already.
* style: revert "avoid warnings with GCC 4.6"Akim Demaille2020-08-021-3/+3
| | | | | | | | | This reverts commit d0bec3175ff5cf6582ffbf584b73ea6aaea838d0 (which should have read "We have a clash...", not "With have a clash..."). Now that `max()` was renamed `max_int()`, we can use `max` again, as elsewhere in the code. * src/counterexample.c (visited_hasher): Alpha reconversion.
* maint: post-release administriviaAkim Demaille2020-08-022-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.7.1v3.7.1Akim Demaille2020-08-021-1/+1
| | | | * NEWS: Record release date.
* portability: we use termios.h and sys/ioctl.hAkim Demaille2020-08-026-1/+12
| | | | | | | Reported by Maarten De Braekeleer. https://lists.gnu.org/r/bison-patches/2020-07/msg00079.html * bootstrap.conf (gnulib_modules): Add termios and sys_ioctl.
* portability: rename accept to acceptsymbol because of MSVCMaarten De Braekeleer2020-08-025-12/+12
| | | | | | | | MSVC already defines this symbol. * src/symtab.h, src/symtab.c (accept): Rename as... (acceptsymbol): this. Adjust dependencies.
* regenAkim Demaille2020-08-022-20/+20
|
* portability: use CHAR_LITERAL instead of CHAR because MSVC defines CHARMaarten De Braekeleer2020-08-022-5/+5
| | | | * src/parse-gram.y, src/scan-gram.l: here.
* portability: use INT_LITERAL instead of INT because MSVC defines INTMaarten De Braekeleer2020-08-023-12/+13
| | | | | | | It is defined as a typedef, not a macro. https://lists.gnu.org/r/bison-patches/2020-08/msg00001.html * src/parse-gram.y, src/scan-gram.l: here.
* portability: beware of max () with MSVCAkim Demaille2020-08-024-27/+20
| | | | | | | | | | | | Reported by Maarten De Braekeleer. https://lists.gnu.org/r/bison-patches/2020-07/msg00080.html We don't want to use gnulib's min and max macros, since we use function calls in min/max arguments. * src/location.c (max_int, min_int): Move to... * src/system.h: here. * src/counterexample.c, src/derivation.c: Use max_int instead of max.
* libtextstyle: be sure to have ostream_printf and hyperlink supportAkim Demaille2020-08-027-8/+20
| | | | | | | | | | | | | | | | | | | | | | Older versions of libtextstyle do not support them, rule them out. Reported by Lars Wendler https://lists.gnu.org/r/bug-bison/2020-07/msg00030.html and by Arnold Robbins https://lists.gnu.org/r/bug-bison/2020-07/msg00041.html and https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003988.html and by Nelson H. F. Beebe https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003993.html With support from Bruno Haible in gnulib https://lists.gnu.org/r/bug-gnulib/2020-08/msg00000.html thread starting at https://lists.gnu.org/r/bug-gnulib/2020-07/msg00148.html * configure.ac: Require libtextstyle 0.20.5. * gnulib: Update.
* CI: comment changesAkim Demaille2020-08-011-0/+2
|
* regenAkim Demaille2020-08-012-9/+9
|
* diagnostics: better location for type redeclarationsAkim Demaille2020-08-015-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | From foo.y:1.7-11: error: %type redeclaration for bar 1 | %type <foo> bar bar | ^~~~~ foo.y:1.7-11: note: previous declaration 1 | %type <foo> bar bar | ^~~~~ to foo.y:1.17-19: error: %type redeclaration for bar 1 | %type <foo> bar bar | ^~~ foo.y:1.13-15: note: previous declaration 1 | %type <foo> bar bar | ^~~ * src/symlist.h, src/symlist.c (symbol_list_type_set): There's no need for the tag's location, use that of the symbol. * src/parse-gram.y: Adjust. * tests/input.at: Adjust.
* todo: updates for DAkim Demaille2020-07-301-15/+293
|
* cex: style: comment changesAkim Demaille2020-07-291-15/+11
| | | | * src/parse-simulation.c: here.
* cex: style: prefer "res" for the returned valueAkim Demaille2020-07-291-6/+6
| | | | * src/derivation.c (derivation_new): here.
* cex: style: prefer FOO_print to print_FOOAkim Demaille2020-07-295-14/+15
| | | | | | | * src/state-item.h, src/state-item.c (print_state_item): Rename as... (state_item_print): this. * src/counterexample.c (print_counterexample): Rename as... (counterexample_print): this.
* scanner: don't crash on strings containing a NUL byteAkim Demaille2020-07-284-12/+50
| | | | | | | | | | | | We crash if the input contains a string containing a NUL byte. Reported by Suhwan Song. https://lists.gnu.org/r/bug-bison/2020-07/msg00051.html * src/flex-scanner.h (STRING_FREE): Avoid accidental use of last_string. * src/scan-gram.l: Don't call STRING_FREE without calling STRING_FINISH first. * tests/input.at (Invalid inputs): Check that case.
* doc: refer to cex from sections dealing with conflictsAkim Demaille2020-07-282-39/+68
| | | | | | The documentation about -Wcex should be put forward. * doc/bison.texi: Refer to -Wcex from the sections about conflicts.
* doc: factor ifnottex/iftex examplesAkim Demaille2020-07-281-15/+4
| | | | * doc/bison.texi: Factor the common bits out of ifnottex/iftex.
* doc: fix colorsAkim Demaille2020-07-281-14/+27
| | | | | | | | | | | The original Texinfo macros introducing colors were made for diagnostics, which are printed in bold. So by copy-paste accident the styles we introduced for counterexamples were also in bold. They should not. * doc/bison.texi: Separate the styling of diagnostics from the styling for counterexamples. Don't use bold in the latter case.
* doc: fixesAkim Demaille2020-07-281-16/+10
| | | | | * doc/bison.texi: Fix spello. Fix missing colors, and factor.
* maint: post-release administriviaAkim Demaille2020-07-232-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.7v3.7Akim Demaille2020-07-231-1/+1
| | | | * NEWS: Record release date.
* style: avoid warnings with GCC 4.6Akim Demaille2020-07-231-3/+3
| | | | | | | | | | With have a clash with the "max" function. src/counterexample.c: In function 'visited_hasher': src/counterexample.c:720:48: error: declaration of 'max' shadows a global declaration [-Werror=shadow] src/counterexample.c:116:12: error: shadowed declaration is here [-Werror=shadow] * src/counterexample.c (visited_hasher): Alpha conversion.
* doc: fix definition of -WallAkim Demaille2020-07-232-2/+3
| | | | * doc/bison.texi (Diagnostics): here.