2020-11-14  Akim Demaille  <akim.demaille@gmail.com>

	version 3.7.4
	* NEWS: Record release date.

2020-11-13  Akim Demaille  <akim.demaille@gmail.com>

	c++: shorten the assertions that check whether tokens are correct
	Before:

	    YY_ASSERT (tok == token::YYEOF || tok == token::YYerror || tok == token::YYUNDEF || tok == 120 || tok == 49 || tok == 50 || tok == 51 || tok == 52 || tok == 53 || tok == 54 || tok == 55 || tok == 56 || tok == 57 || tok == 97 || tok == 98);

	After:

	    YY_ASSERT (tok == token::YYEOF
	               || (token::YYerror <= tok && tok <= token::YYUNDEF)
	               || tok == 120
	               || (49 <= tok && tok <= 57)
	               || (97 <= tok && tok <= 98));

	Clauses are now also wrapped on several lines.  This is nicer to read
	and diff, but also avoids pushing Visual C++ to its arbitrary
	limits (640K and lines of 16380 bytes ought to be enough for anybody,
	otherwise make an C2026 error).

	The useless parens are there for the dummy warnings about
	precedence (in the future, will we also have to put parens in
	`1+2*3`?).

	* data/skeletons/variant.hh (_b4_filter_tokens, b4_tok_in, b4_tok_in):
	New.
	(_b4_token_constructor_define): Use them.

2020-11-13  Akim Demaille  <akim.demaille@gmail.com>

	c++: don't glue functions together
	* data/skeletons/bison.m4 (b4_type_foreach): Accept a separator.
	* data/skeletons/c++.m4: Use it.
	And fix an incorrect comment.

2020-11-13  Akim Demaille  <akim.demaille@gmail.com>

	lalr1.cc: YY_ASSERT should use api.prefix
	Working on the previous commit I realized that YY_ASSERT was used in
	the generated headers, so must follow api.prefix to avoid clashes when
	multiple C++ parser with variants are used.

	Actually many more macros should obey api.prefix (YY_CPLUSPLUS,
	YY_COPY, etc.).  There was no complaint so far, so it's not urgent
	enough for 3.7.4, but it should be addressed in 3.8.

	* data/skeletons/variant.hh (b4_assert): New.
	Use it.
	* tests/local.at (AT_YYLEX_RETURN): Fix.
	* tests/headers.at: Make sure variant-based C++ parsers are checked
	too.
	This test did find that YY_ASSERT escaped renaming (before the fix in
	this commit).

2020-11-13  Akim Demaille  <akim.demaille@gmail.com>

	c++: don't use YY_ASSERT at all if parse.assert is disabled
	In some extreme situations (about 800 tokens), we generate a
	single-line assertion long enough for Visual C++ to discard the end of
	the line, thus falling into parse ends for the missing `);`.  On a
	shorter example:

	    YY_ASSERT (tok == token::TOK_YYEOF || tok == token::TOK_YYerror || tok == token::TOK_YYUNDEF || tok == token::TOK_ASSIGN || tok == token::TOK_MINUS || tok == token::TOK_PLUS || tok == token::TOK_STAR || tok == token::TOK_SLASH || tok == token::TOK_LPAREN || tok == token::TOK_RPAREN);

	Whether NDEBUG is used or not is irrelevant, the parser dies anyway.

	Reported by Jot Dot <jotdot@shaw.ca>.
	https://lists.gnu.org/r/bug-bison/2020-11/msg00002.html

	We should avoid emitting lines so long.

	We probably should also use a range-based assertion (with extraneous
	parens to pacify fascist compilers):

	    YY_ASSERT ((token::TOK_YYEOF <= tok && tok <= token::TOK_YYUNDEF)
	               || (token::TOK_ASSIGN <= tok && ...)

	But anyway, we should simply not emit this assertion at all when not
	asked for.

	* data/skeletons/variant.hh: Do not define, nor use, YY_ASSERT when it
	is not enabled.

2020-11-13  Akim Demaille  <akim.demaille@gmail.com>

	c++: style: follow the Bison m4 quoting pattern
	* data/skeletons/variant.hh: here.

2020-11-11  Akim Demaille  <akim.demaille@gmail.com>

	yacc.c: provide the Bison version as an integral macro
	Suggested by Balazs Scheidler.
	https://github.com/akimd/bison/issues/55

	* src/muscle-tab.c (muscle_init): Move/rename `b4_version` to/as...
	* src/output.c (prepare): `b4_version_string`.
	Also define `b4_version`.
	* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/d.m4,
	* data/skeletons/java.m4: Adjust.
	* doc/bison.texi: Document it.

2020-11-11  Akim Demaille  <akim.demaille@gmail.com>

	regen

2020-11-11  Akim Demaille  <akim.demaille@gmail.com>

	style: make conversion of version string to int public
	* src/parse-gram.y (str_to_version): Rename as/move to...
	* src/strversion.h, src/strversion.c (strversion_to_int): these new
	files.

2020-11-11  Akim Demaille  <akim.demaille@gmail.com>

	%require: accept version numbers with three parts ("3.7.4")
	* src/parse-gram.y (str_to_version): Support three parts.
	* data/skeletons/location.cc, data/skeletons/stack.hh:
	Adjust.

2020-11-11  Todd C. Miller  <Todd.Miller@sudo.ws>

	yacc.c: fix #definition of YYEMPTY
	When generating a C parser, YYEMPTY is present in enum yytokentype but
	there is no corresponding #define like there is for the other values.
	There is a special case for YYEMPTY in b4_token_enums but no
	corresponding case in b4_token_defines.

	* data/skeletons/c.m4 (b4_token_defines): Do define YYEMPTY.

2020-11-10  Akim Demaille  <akim.demaille@gmail.com>

	gnulib: update

2020-11-01  Akim Demaille  <akim.demaille@gmail.com>

	doc: fix incorrect section title
	Reported by Gaurav Singh <gaurav.singh199709@yahoo.com>.
	https://lists.gnu.org/r/bug-bison/2020-11/msg00000.html

	* doc/bison.texi (Rpcalc Expr): Rename as...
	(Rpcalc Exp): this, as the nterm is named 'exp'.

2020-10-28  Nick Gasson  <nick@nickg.me.uk>

	doc: minor grammar fixes in counterexamples section
	* doc/bison.texi: Minor fixes in counterexamples section.

2020-10-14  Akim Demaille  <akim.demaille@gmail.com>

	doc: fix typo
	* README: here.

2020-10-13  Akim Demaille  <akim.demaille@gmail.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2020-10-13  Akim Demaille  <akim.demaille@gmail.com>

	version 3.7.3
	* NEWS: Record release date.

2020-10-13  Akim Demaille  <akim.demaille@gmail.com>

	build: don't link bison against libreadline
	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.

2020-10-13  Akim Demaille  <akim.demaille@gmail.com>

	gnulib: update

2020-09-27  Akim Demaille  <akim.demaille@gmail.com>

	glr.cc: fix: use symbol_name
	* data/skeletons/glr.cc: here.

2020-09-06  Akim Demaille  <akim.demaille@gmail.com>

	build: fix a concurrent build issue in examples
	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].

2020-09-05  Akim Demaille  <akim.demaille@gmail.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2020-09-05  Akim Demaille  <akim.demaille@gmail.com>

	version 3.7.2
	* NEWS: Record release date.

2020-09-05  Akim Demaille  <akim.demaille@gmail.com>

	build: disable syntax-check warning
	error_message_uppercase
	etc/bench.pl.in-419-static int yylex (@{[is_pure (@directive) ? "YYSTYPE *yylvalp" : "void"]});

	* cfg.mk: here.

2020-09-05  Akim Demaille  <akim.demaille@gmail.com>

	gnulib: update

2020-09-05  Akim Demaille  <akim.demaille@gmail.com>

	build: fix incorrect dependencies
	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.

2020-09-02  Akim Demaille  <akim.demaille@gmail.com>

	doc: updates
	* NEWS, TODO: here.

2020-08-30  Akim Demaille  <akim.demaille@gmail.com>

	gnulib: update

2020-08-30  Akim Demaille  <akim.demaille@gmail.com>

	tests: beware of sed portability issues
	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 '#'.

2020-08-30  Akim Demaille  <akim.demaille@gmail.com>

	c: always use YYMALLOC/YYFREE
	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.

2020-08-30  Akim Demaille  <akim.demaille@gmail.com>

	build: beware of POSIX mode
	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.

2020-08-30  Akim Demaille  <akim.demaille@gmail.com>

	doc: history of api.prefix
	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.

2020-08-11  Akim Demaille  <akim.demaille@gmail.com>

	CI: intel moved the script for ICC
	* .travis.yml: Adjust.

2020-08-08  Akim Demaille  <akim.demaille@gmail.com>

	fix: unterminated \-escape
	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.

2020-08-07  Akim Demaille  <akim.demaille@gmail.com>

	fix: crash when redefining the EOF token
	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.

2020-08-07  Akim Demaille  <akim.demaille@gmail.com>

	style: fix missing space before paren
	* 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.

2020-08-07  Akim Demaille  <akim.demaille@gmail.com>

	style: fix comments and more debug trace
	* src/location.c, src/symtab.h, src/symtab.c: here.

2020-08-07  Akim Demaille  <akim.demaille@gmail.com>

	style: more uses of const
	* src/symtab.c: here.

2020-08-07  Akim Demaille  <akim.demaille@gmail.com>

	bench: fix support for pure parser
	* 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.

2020-08-03  Akim Demaille  <akim.demaille@gmail.com>

	portability: multiple typedefs
	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.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	style: revert "avoid warnings with GCC 4.6"
	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.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	version 3.7.1
	* NEWS: Record release date.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	portability: we use termios.h and sys/ioctl.h
	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.

2020-08-02  Maarten De Braekeleer  <maarten.debraekeleer@gmail.com>

	portability: rename accept to acceptsymbol because of MSVC
	MSVC already defines this symbol.

	* src/symtab.h, src/symtab.c (accept): Rename as...
	(acceptsymbol): this.
	Adjust dependencies.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	regen

2020-08-02  Maarten De Braekeleer  <maarten.debraekeleer@gmail.com>

	portability: use CHAR_LITERAL instead of CHAR because MSVC defines CHAR
	* src/parse-gram.y, src/scan-gram.l: here.

2020-08-02  Maarten De Braekeleer  <maarten.debraekeleer@gmail.com>

	portability: use INT_LITERAL instead of INT because MSVC defines INT
	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.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	portability: beware of max () with MSVC
	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.

2020-08-02  Akim Demaille  <akim.demaille@gmail.com>

	libtextstyle: be sure to have ostream_printf and hyperlink support
	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.

2020-08-01  Akim Demaille  <akim.demaille@gmail.com>

	CI: comment changes

2020-08-01  Akim Demaille  <akim.demaille@gmail.com>

	regen

2020-08-01  Akim Demaille  <akim.demaille@gmail.com>

	diagnostics: better location for type redeclarations
	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.

2020-07-30  Akim Demaille  <akim.demaille@gmail.com>

	todo: updates for D

2020-07-29  Akim Demaille  <akim.demaille@gmail.com>

	cex: style: comment changes
	* src/parse-simulation.c: here.

2020-07-29  Akim Demaille  <akim.demaille@gmail.com>

	cex: style: prefer "res" for the returned value
	* src/derivation.c (derivation_new): here.

2020-07-29  Akim Demaille  <akim.demaille@gmail.com>

	cex: style: prefer FOO_print to print_FOO
	* 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.

2020-07-28  Akim Demaille  <akim.demaille@gmail.com>

	scanner: don't crash on strings containing a NUL byte
	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.

2020-07-28  Akim Demaille  <akim.demaille@gmail.com>

	doc: refer to cex from sections dealing with conflicts
	The documentation about -Wcex should be put forward.

	* doc/bison.texi: Refer to -Wcex from the sections about conflicts.

2020-07-28  Akim Demaille  <akim.demaille@gmail.com>

	doc: factor ifnottex/iftex examples
	* doc/bison.texi: Factor the common bits out of ifnottex/iftex.

2020-07-28  Akim Demaille  <akim.demaille@gmail.com>

	doc: fix colors
	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.

2020-07-28  Akim Demaille  <akim.demaille@gmail.com>

	doc: fixes
	* doc/bison.texi: Fix spello.
	Fix missing colors, and factor.

2020-07-23  Akim Demaille  <akim.demaille@gmail.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2020-07-23  Akim Demaille  <akim.demaille@gmail.com>

	version 3.7
	* NEWS: Record release date.

2020-07-23  Akim Demaille  <akim.demaille@gmail.com>

	style: avoid warnings with GCC 4.6
	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.

2020-07-23  Akim Demaille  <akim.demaille@gmail.com>

	doc: fix definition of -Wall
	* doc/bison.texi (Diagnostics): here.

2020-07-23  Akim Demaille  <akim.demaille@gmail.com>

	gnulib: update
	* bootstrap.conf: We need stpncpy.

2020-07-23  Akim Demaille  <akim.demaille@gmail.com>

	tests: fixes
	Fix 6b78e50cef3c2cd8e6f4e7938be987e8769f8eef, "cex: make "rerun with
	'-Wcex'" a note instead of a warning"

	* tests/conflicts.at (-W versus %expect and %expect-rr): Fix
	expectations.

2020-07-22  Akim Demaille  <akim.demaille@gmail.com>

	cex: update NEWS for 3.7
	* NEWS: Update to the current style of cex display.

2020-07-22  Akim Demaille  <akim.demaille@gmail.com>

	doc: catch up with the current display of cex
	Unfortunately I found no way to use the ↳ glyph in Texinfo, so I used
	@arrow{} instead, which has a different width, so we have to have all
	the examples doubled, once for TeX, another for the rest of the world.

	* doc/bison.texi: Use the current display in the examples.
	* doc/calc.y, doc/ids.y, doc/if-then-else.y, doc/sequence.y: New.

2020-07-21  Akim Demaille  <akim.demaille@gmail.com>

	cex: make "rerun with '-Wcex'" a note instead of a warning
	Currently the suggestion to rerun is a -Wother warning:

	    warning: 2 shift/reduce conflicts [-Wconflicts-sr]
	    warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother]

	Instead, let's attach it as a subnote of the diagnostic (in the
	current case, -Wconflicts-sr):

	    warning: 2 shift/reduce conflicts [-Wconflicts-sr]
	    note: rerun with option '-Wcounterexamples' to generate conflict counterexamples

	* src/conflicts.c (conflicts_print): Do that.
	Adjust the test suite.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	version 3.6.93
	* NEWS: Record release date.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	cex: label all the derivations by their initial action
	From

	    input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
	      Example: A b .
	      First derivation
	        a
	        `-> A b .
	      Second derivation
	        a
	        `-> A b
	              `-> b .

	to

	    input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
	      Example: A b .
	      First reduce derivation
	        a
	        `-> A b .
	      Second reduce derivation
	        a
	        `-> A b
	              `-> b .

	* src/counterexample.c (print_counterexample): here.
	Compute the width of the labels to properly align the values.
	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
	* tests/report.at: Adjust.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	cex: improve readability of the subsections
	Now that the derivation is no longer printed on one line, aligning the
	example and the derivation is no longer useful.  It can actually be
	harmful, as it makes the overall structure less clear.

	* src/derivation.h, src/derivation.c (derivation_print_leaves): Remove
	the `prefix` argument.
	* src/counterexample.c (print_counterexample): Put the example next to
	its label.
	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
	* tests/report.at: Adjust.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	cex: don't issue an empty line between counterexamples
	Now that we use complain, the "sections" are clearer.

	* src/counterexample.c (print_counterexample): Use the empty line only
	in reports.
	* tests/counterexample.at, tests/diagnostics.at, tests/report.at: Adjust.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	cex: use usual routines for diagnostics about S/R conflicts
	See previous commit.  We go from

	    input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
	    Shift/reduce conflict on token "⊕":
	      Example              exp "+" exp • "⊕" exp
	      Shift derivation
	        exp
	        ↳ exp "+" exp
	                  ↳ exp • "⊕" exp

	to

	    input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
	    input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
	      Example              exp "+" exp • "⊕" exp
	      Shift derivation
	        exp
	        ↳ exp "+" exp
	                  ↳ exp • "⊕" exp

	with an hyperlink on -Wcounterexamples.

	* src/counterexample.c (counterexample_report_shift_reduce):
	Use complain.
	* tests/counterexample.at, tests/diagnostics.at, tests/report.at:
	Adjust.

2020-07-20  Akim Demaille  <akim.demaille@gmail.com>

	cex: use usual routines for diagnostics about R/R conflicts
	This is more consistent, and brings benefits: users know that these
	diagnostics are attached to -Wcounterexamples, and they can also click
	on the hyperlink if permitted by their terminal.

	We go from

	    warning: 1 reduce/reduce conflict [-Wconflicts-rr]
	    Reduce/reduce conflict on token $end:
	      Example              A b .
	      First derivation     a -> [ A b . ]
	      Second derivation    a -> [ A b -> [ b . ] ]

	to

	    warning: 1 reduce/reduce conflict [-Wconflicts-rr]
	    input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
	      Example              A b .
	      First derivation     a -> [ A b . ]
	      Second derivation    a -> [ A b -> [ b . ] ]

	with an hyperlink on -Wcounterexamples.

	* src/counterexample.c (counterexample_report_reduce_reduce):
	Use complain.
	* tests/counterexample.at, tests/diagnostics.at, tests/report.at:
	Adjust.

2020-07-19  Akim Demaille  <akim.demaille@gmail.com>

	diagnostics: use hyperlinks to point to the only documentation
	* src/complain.c (begin_hyperlink, end_hyperlink): New.
	(warnings_print_categories): Use them.
	* tests/local.at (AT_SET_ENV): Disable hyperlinks in the tests, they
	contain random id's, and brackets (which is not so nice for M4).

2020-07-19  Akim Demaille  <akim.demaille@gmail.com>

	doc: add anchors for warnings
	Unfortunately Texinfo somewhat mangles anchors such as `-Werror` into
	`g_t_002dWerror`, so let's not include the dash.

	* doc/bison.texi (Diagnostics): here.

2020-07-19  Akim Demaille  <akim.demaille@gmail.com>

	glyphs: fix types
	The code was written on top of buffers of `char[26]`, and then was
	changed to use `char *`, yet was still using `sizeof buf`, which
	became `sizeof (char *)` instead of `sizeof (char[26])`.

	Reported by Dagobert Michelsen.
	https://lists.gnu.org/r/bug-bison/2020-07/msg00023.html

	* src/glyphs.h, src/glyphs.c: Get rid of uses of `char *`, use only
	glyph_buffer_t.

2020-07-19  Akim Demaille  <akim.demaille@gmail.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

2020-07-19  Akim Demaille  <akim.demaille@gmail.com>

	version 3.6.92
	* NEWS: Record release date.

2020-07-19  Akim Demaille  <akim.demaille@gmail.com>

	style: avoid strncpy
	syntax-check seems to dislike strncpy.  The GNU Coreutils replaced
	their uses of strncpy with stpncpy.

	strlcpy is not an option.
	  http://sources.redhat.com/ml/libc-alpha/2002-01/msg00159.html
	  http://sources.redhat.com/ml/libc-alpha/2002-01/msg00011.html
	  http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00181.html

	* src/glyphs.c: Use stpncpy.

2020-07-18  Akim Demaille  <akim.demaille@gmail.com>

	cex: display derivations as trees
	Sometimes, understanding the derivations is difficult, because they
	are serialized to fit in one line.  For instance, the example taken
	from the NEWS file:

	    %token ID
	    %%
	    s: a ID
	    a: expr
	    expr: expr ID ',' | "expr"

	gave

	    First example        expr • ID ',' ID $end
	    Shift derivation     $accept → [ s → [ a → [ expr → [ expr • ID ',' ] ] ID ] $end ]
	    Second example       expr • ID $end
	    Reduce derivation    $accept → [ s → [ a → [ expr • ] ID ] $end ]

	Printing as trees, it gives:

	    First example        expr • ID ',' ID $end
	    Shift derivation
	      $accept
	      ↳ s                      $end
	        ↳ a                 ID
	          ↳ expr
	            ↳ expr • ID ','
	    Second example       expr • ID $end
	    Reduce derivation
	      $accept
	      ↳ s             $end
	        ↳ a        ID
	          ↳ expr •

	* src/glyphs.h, src/glyphs.c (down_arrow, empty, derivation_separator):
	New.
	* src/derivation.c (derivation_print, derivation_print_impl): Rename
	as...
	(derivation_print_flat, derivation_print_flat_impl): These.
	(fputs_if, derivation_depth, derivation_width, derivation_print_tree)
	(derivation_print_tree_impl, derivation_print): New.
	* src/counterexample.c (print_counterexample): Adjust.
	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
	* tests/report.at: Adjust.

2020-07-16  Akim Demaille  <akim.demaille@gmail.com>

	cex: use the glyphs
	* src/derivation.c: here.
	* src/gram.h, src/gram.c (print_arrow, print_dot, print_fallback):
	Remove.

2020-07-16  Akim Demaille  <akim.demaille@gmail.com>

	cex: factor the handling of graphical symbols
	* src/glyphs.h, src/glyphs.c: New.

2020-07-15  Akim Demaille  <akim.demaille@gmail.com>

	cex: style changes
	* src/counterexample.c: here.

2020-07-15  Akim Demaille  <akim.demaille@gmail.com>

	cex: simplify tests
	* tests/counterexample.at (AT_BISON_CHECK_CEX): Handle the keyword.
	Simplify the signature.

2020-07-15  Akim Demaille  <akim.demaille@gmail.com>

	cex: more colors
	Provided by Daniela Becker.

	* data/bison-default.css: More colors.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	style: comments changes
	* src/print.c: here.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	doc: update GLR sections
	Reported by Christian Schoenebeck.

	* doc/bison.texi (GLR Parsers): Minor fixes.
	(Compiler Requirements for GLR): Remove, quite useless today.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	cex: display shifts before reductions
	When reporting counterexamples for s/r conflicts, put the shift first.
	This is more natural, and displays the default resolution first, which
	is also what happens for r/r conflicts where the smallest rule number
	is displayed first, and "wins".

	* src/counterexample.c (counterexample): Add a shift_reduce member.
	(new_counterexample): Adjust.
	Swap the derivations when this is a s/r conflict.
	(print_counterexample): For s/r conflicts, prefer "Shift derivation"
	and "Reduce derivation" rather than "First/Second derivation".

	* tests/conflicts.at, tests/counterexample.at, tests/report.at: Adjust.
	* NEWS, doc/bison.texi: Ditto.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	style: s/lookahead_tokens/lookaheads/g
	Currently we use both names.  Let's stick to the short one.

	* src/AnnotationList.c, src/conflicts.c, src/counterexample.c,
	* src/getargs.c, src/getargs.h, src/graphviz.c, src/ielr.c,
	* src/lalr.c, src/print-graph.c, src/print-xml.c, src/print.c,
	* src/state-item.c, src/state.c, src/state.h, src/tables.c:
	s/lookahead_token/lookahead/gi.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	cex: factor memory allocation
	* src/counterexample.c (counterexample_report_state): Allocate once
	per conflicted state, instead of once per r/r conflict.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	cex: use state_item_number consistently
	* src/counterexample.c, src/state-item.c: here.
	(counterexample_report_state): While at it, prefer c2 to j/k, to match
	c1.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	cex: more consistent memory allocation/copy
	* src/counterexample.c, src/parse-simulation.c: It is more usual in
	Bison to use sizeof on expressions than on types, especially for
	allocation.
	Let the compiler do it's job instead of calling memcpy ourselves.

2020-07-14  Akim Demaille  <akim.demaille@gmail.com>

	cex: minor renaming
	* src/counterexample.c (has_common_prefix): Rename as...
	(have_common_prefix): this.
