12021-03-08  Akim Demaille  <akim.demaille@gmail.com>
2
3	version 3.7.6
4	* NEWS: Record release date.
5
62021-03-07  Akim Demaille  <akim.demaille@gmail.com>
7
8	doc: don't mention YY_LOCATION_PRINT
9	* doc/bison.texi (Syntax Error Reporting Function): Don't refer to
10	YY_LOCATION_PRINT, it is a private internal detail.
11
122021-03-07  Akim Demaille  <akim.demaille@gmail.com>
13
14	yacc: fix push parser
15	When a pstate is used for multiple successive parses, some state may
16	leak from one run into the following one.  That was introduced in
17	330552ea499ca474f65967160e9d4e50265f9631 "yacc.c: push: don't clear
18	the parser state when accepting/rejecting".
19
20	Reported by Ryan <dev@splintermail.com>
21	https://lists.gnu.org/r/bug-bison/2021-03/msg00000.html
22
23	* data/skeletons/yacc.c (yypush_parse): We reusing a pstate from a
24	previous run, do behave as if it were the first run.
25	* tests/push.at (Pstate reuse): Check this.
26
272021-03-07  Akim Demaille  <akim.demaille@gmail.com>
28
29	tables: fix again the handling of useless tokens
30	The right-shift added in c22902e360e0fbbe9fd5657dcf107e03166da309
31	("tables: fix handling for useless tokens") is incorrect.  In
32	particular, we need to reset the "new" bits.
33
34	Reported by Balázs Scheidler.
35	https://github.com/akimd/bison/issues/74
36
37	* src/tables.c (pos_set_set): Fix the right-shift.
38
392021-01-30  Paul Eggert  <eggert@cs.ucla.edu>
40
41	Update URLs to prefer https: to http:
42	Also, fix a few http: URLs that were no longer working.
43
442021-01-24  Akim Demaille  <akim.demaille@gmail.com>
45
46	doc: fix typo
47	Reported by Kaz Kylheku.
48	https://lists.gnu.org/r/bison-patches/2020-11/msg00019.html
49
50	* doc/bison.texi (Versioning): here.
51
522021-01-24  Kaz Kylheku  <kaz@kylheku.com>
53
54	doc: document best deployment practices.
55	* doc/bison.texi (Versioning): New node about practices
56	regarding dealing with multiple versions of Bison.
57
582021-01-24  Akim Demaille  <akim.demaille@gmail.com>
59
60	maint: post-release administrivia
61	* NEWS: Add header line for next release.
62	* .prev-version: Record previous version.
63	* cfg.mk (old_NEWS_hash): Auto-update.
64
652021-01-24  Akim Demaille  <akim.demaille@gmail.com>
66
67	version 3.7.5
68	* NEWS: Record release date.
69
702021-01-24  Akim Demaille  <akim.demaille@gmail.com>
71
72	tables: fix handling for useless tokens
73	In some rare conditions, the generated parser can be wrong when there
74	are useless tokens.
75
76	Reported by Balázs Scheidler.
77	https://github.com/akimd/bison/issues/72
78
79	Balázs managed to prove that the bug was introduced in
80
81	    commit af1c6f973a60a51c609903713ff8f7fce0887025
82	    Author: Theophile Ranquet <ranquet@lrde.epita.fr>
83	    Date:   Tue Nov 13 10:38:49 2012 +0000
84
85	    tables: use bitsets for a performance boost
86
87	    Suggested by Yuri at
88	    <http://lists.gnu.org/archive/html/bison-patches/2012-01/msg00000.html>.
89
90	    The improvement is marginal for most grammars, but notable for large
91	    grammars (e.g., PosgreSQL's postgre.y), and very large for the
92	    sample.y grammar submitted by Yuri in
93	    http://lists.gnu.org/archive/html/bison-patches/2012-01/msg00012.html.
94	    Measured with --trace=time -fsyntax-only.
95
96	    parser action tables    postgre.y     sample.y
97	    Before                 0,129 (44%)  37,095 (99%)
98	    After                  0,117 (42%)   5,046 (93%)
99
100	    * src/tables.c (pos): Replace this set of integer coded as an unsorted
101	    array of integers with...
102	    (pos_set): this bitset.
103
104	which was implemented long ago, but that I installed only recently
105	(March 2019), first published in v3.3.90.
106
107	That patch introduces a bitset to represent a set of integers.  It
108	managed negative integers by using a (fixed) base (the smallest
109	integer to represent).  It avoided negative accesses into the bitset
110	by ignoring integers smaller than the base, under the asumption that
111	these cases correspond to useless tokens that are ignored anyway.
112	While it turns out to be true for all the test cases in the test suite
113	(!), Balázs' use case demonstrates that it is not always the case.
114
115	So we need to be able to accept negative integers that are smaller
116	than the current base.
117
118	"Amusingly" enough, the aforementioned patch was visibly unsure about
119	itself:
120
121	    /* Store PLACE into POS_SET.  PLACE might not belong to the set
122	       of possible values for instance with useless tokens.  It
123	       would be more satisfying to eliminate the need for this
124	       'if'.  */
125
126	This commit needs several improvements in the future:
127	- support from bitset for bit assignment and shifts
128	- amortized resizing of pos_set
129	- test cases
130
131	* src/tables.c (pos_set_base, pos_set_dump, pos_set_set, pos_set_test):
132	New.
133	Use them instead of using bitset_set and bitset_test directly.
134
1352021-01-24  Vincent Imbimbo  <vmi6@cornell.edu>
136
137	cex: fix state-item pruning
138	There were several bugs in pruning that would leave the state-item
139	graph in an inconsistent state which could cause crashes later on:
140
141	- Pruning now happens in one pass instead of two.
142
143	- Disabled state-items no longer prune the state-items they transition
144	  to if that state-item has other states that transition to it.
145
146	- State-items that transition to disabled state-items are always
147	  pruned even if they have productions.
148
149	Reported by Michal Bartkowiak <michal.bartkowiak@nokia.com>
150	https://lists.gnu.org/r/bug-bison/2021-01/msg00000.html
151	and Zartaj Majeed
152	https://github.com/akimd/bison/issues/71
153
154	* src/state-item.c (prune_forward, prune_backward): Fuse into...
155	(prune_state_item): this.
156	Adjust callers.
157
1582021-01-23  Akim Demaille  <akim.demaille@gmail.com>
159
160	package: pacify syntax-check
161	* cfg.mk: Currently we cannot update gnulib because of portability
162	issues with ancient versions of clang
163	(https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html).  So skip
164	the check about copyright date for gnulib.
165
1662021-01-23  Akim Demaille  <akim.demaille@gmail.com>
167
168	news: update
169
1702021-01-23  Akim Demaille  <akim.demaille@gmail.com>
171
172	package: bump copyrights to 2021
173	Run 'make update-copyright'.
174
1752021-01-23  Akim Demaille  <akim.demaille@gmail.com>
176
177	%merge: associate it to its first definition, not the latest
178	Currently each time we meet %merge we record this location as the
179	defining location (and symbol).  Instead, record the first definition.
180
181	In the generated code we go from
182
183	    yy0->A = merge (*yy0, *yy1);
184
185	to
186
187	    yy0->S = merge (*yy0, *yy1);
188
189	where S was indeed the first symbol, and in the diagnostics we go from
190
191	    glr-regr18.y:30.18-24: error: result type clash on merge function 'merge': <type2> != <type1>
192	       30 | sym2: sym3 %merge<merge> { $$ = $1; } ;
193	          |                  ^~~~~~~
194	    glr-regr18.y:29.18-24: note: previous declaration
195	       29 | sym1: sym2 %merge<merge> { $$ = $1; } ;
196	          |                  ^~~~~~~
197	    glr-regr18.y:31.13-19: error: result type clash on merge function 'merge': <type3> != <type2>
198	       31 | sym3: %merge<merge> { $$ = 0; } ;
199	          |             ^~~~~~~
200	    glr-regr18.y:30.18-24: note: previous declaration
201	       30 | sym2: sym3 %merge<merge> { $$ = $1; } ;
202	          |                  ^~~~~~~
203
204	to
205
206	    glr-regr18.y:30.18-24: error: result type clash on merge function 'merge': <type2> != <type1>
207	       30 | sym2: sym3 %merge<merge> { $$ = $1; } ;
208	          |                  ^~~~~~~
209	    glr-regr18.y:29.18-24: note: previous declaration
210	       29 | sym1: sym2 %merge<merge> { $$ = $1; } ;
211	          |                  ^~~~~~~
212	    glr-regr18.y:31.13-19: error: result type clash on merge function 'merge': <type3> != <type1>
213	       31 | sym3: %merge<merge> { $$ = 0; } ;
214	          |             ^~~~~~~
215	    glr-regr18.y:29.18-24: note: previous declaration
216	       29 | sym1: sym2 %merge<merge> { $$ = $1; } ;
217	          |                  ^~~~~~~
218
219	where both duplicates are reported against definition 1, rather than
220	using definition 1 as a reference when diagnosing about definition 2,
221	and then 2 as a reference for 3.
222
223	* src/reader.c (record_merge_function_type): Keep the first definition.
224	* tests/glr-regression.at: Adjust.
225
2262021-01-23  Akim Demaille  <akim.demaille@gmail.com>
227
228	%merge: fix compatibility with api.value.type=union
229	Reported by Jot Dot.
230	https://lists.gnu.org/r/help-bison/2020-12/msg00014.html
231
232	* data/skeletons/glr.c, data/skeletons/glr2.cc (b4_call_merger): Use
233	the symbol's slot, not its type.
234	* examples/c/glr/c++-types.y: Use explicit per-symbol typing together
235	with api.value.type=union.
236	(yylex): Use yytoken_kind_t.
237
2382021-01-23  Akim Demaille  <akim.demaille@gmail.com>
239
240	%merge: delegate the generation of calls to mergers to m4
241	Don't generate C code from bison, leave that to the skeletons.
242
243	* src/output.c (merger_output): Emit invocations to b4_call_merger.
244	* data/skeletons/glr.c (b4_call_merger): New.
245
2462021-01-23  Akim Demaille  <akim.demaille@gmail.com>
247
248	%merge: let mergers record a typing-symbol, rather than a type
249	Symbols are richer than types, and in M4 it is my simpler (and more
250	common) to deal with symbols rather than types.  So let's associate
251	mergers to a symbol rather than a type name.
252
253	* src/reader.h (merger_list): Replace the 'type' member by a symbol
254	member.
255	* src/reader.c (record_merge_function_type): Take a symbol as
256	argument, rather than a type name.
257	* src/output.c (merger_output): Adjust.
258
2592021-01-23  Akim Demaille  <akim.demaille@gmail.com>
260
261	%merge: clearer tests on diagnostics
262	* tests/glr-regression.at: Use caret errors.
263
2642021-01-23  Akim Demaille  <akim.demaille@gmail.com>
265
266	skeletons: introduce "slot"s for symbols
267	Extracted from d9cf99b6a5cb0345e91dfb90fe6d6473024ea97a, in the master
268	branch.
269
270	* data/skeletons/bison.m4 (b4_symbol_slot): New, with safer semantics
271	than type and type_tag.
272
2732021-01-23  Akim Demaille  <akim.demaille@gmail.com>
274
275	style: YYUSE is private, make it YY_USE
276	This macro is not exposed to users, make start it with 'YY_'.
277
278	* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/glr.c,
279	* data/skeletons/glr.cc, data/skeletons/lalr1.cc,
280	* src/parse-gram.c, tests/actions.at, tests/c++.at, tests/headers.at,
281	* tests/local.at (YYUSE): Rename as...
282	(YY_USE): this.
283
2842021-01-23  Akim Demaille  <akim.demaille@gmail.com>
285
286	package: codespell
287	* src/parse-gram.y: Fix spelling.
288
2892021-01-23  Akim Demaille  <akim.demaille@gmail.com>
290
291	cex: fix traces: fix display of disabled items
292	The display of disabled state items is incorrect.  The item is
293	stuttered, and lacks on end-of-line.
294
295	From
296
297	    State 7:
298	        1 exp: exp • "⊕" exp
299	        ->     1 exp: exp "⊕" • exp
300	        <-     1 exp: • exp "⊕" exp
301
302	        2 exp: exp • "+" exp    2 exp: exp • "+" exp DISABLED
303	        2 exp: exp "+" exp •
304	        <-     2 exp: exp "+" • exp
305
306	        3 exp: exp • "+" exp    3 exp: exp • "+" exp DISABLED
307	        3 exp: exp "+" exp •
308	        <-     3 exp: exp "+" • exp
309
310	to
311
312	    State 7:
313	        1 exp: exp • "⊕" exp
314	        ->     1 exp: exp "⊕" • exp
315	        <-     1 exp: • exp "⊕" exp
316
317	        2 exp: exp • "+" exp  DISABLED
318
319	        2 exp: exp "+" exp •
320	        <-     2 exp: exp "+" • exp
321
322	        3 exp: exp • "+" exp  DISABLED
323
324	        3 exp: exp "+" exp •
325	        <-     3 exp: exp "+" • exp
326
327	* src/state-item.c (state_items_report): Don't issue disabled items
328	twice, and issue two '\n' at their end.
329	* tests/conflicts.at: Check it.
330
3312021-01-23  Akim Demaille  <akim.demaille@gmail.com>
332
333	cex: fix traces: add missing end-of-lines
334	In 430ca0fc632f5e8072fe468b8a99c640985f6926, I completely forgot that
335	`puts` adds a `\n`.
336
337	* src/lssi.c, src/state-item.c: Restore missing end-of-lines in the
338	output.
339
3402021-01-23  Akim Demaille  <akim.demaille@gmail.com>
341
342	cex: add support for $TIME_LIMIT
343	* src/counterexample.c (TIME_LIMIT): Replace with...
344	(time_limit): this.
345	(counterexample_init): Check $TIME_LIMIT.
346	* src/scan-gram.l: Reorder includes.
347
3482021-01-23  Akim Demaille  <akim.demaille@gmail.com>
349
350	cex: send traces to stderr, not stdout
351	When comparing traces from different machines, the mixture of
352	stdout/stderr in the output are making things uselessly difficult.
353
354	* src/lssi.c, src/state-item.c: Output debug traces on stderr.
355
3562021-01-23  Akim Demaille  <akim.demaille@gmail.com>
357
358	c++: I'm tired of Flex's warnings
359	* doc/bison.texi: Disable another warning I'm tired to see.
360	New releases would be most welcome.
361
3622021-01-23  Akim Demaille  <akim.demaille@gmail.com>
363
364	glr.cc: don't "leak" yyparse
365	When using glr.cc, the C function yyparse is an internal detail that
366	should not be exposed.  Users might call it by accident (I did).
367
368	* data/skeletons/glr.c (yyparse): When used for glr.cc, rename as yy_parse_impl.
369	* data/skeletons/glr.cc: Adjust.
370
3712021-01-23  Akim Demaille  <akim.demaille@gmail.com>
372
373	tables: avoid warnings and save bits
374	The yydefgoto table uses -1 as an invalid for an impossible case (we
375	never use yydefgoto[0], since it corresponds to the reduction to
376	$accept, which never happens).  Since yydefgoto is a table of state
377	numbers, this -1 forces a signed type uselessly, which (1) might
378	trigger compiler warnings when storing a value from yydefgoto into a
379	state number (nonnegative), and (2) wastes bits which might result in
380	using a int16 where a uint8 suffices.
381
382	Reported by Jot Dot <jotdot@shaw.ca>.
383	https://lists.gnu.org/r/bug-bison/2020-11/msg00027.html
384
385	* src/tables.c (default_goto): Use 0 rather than -1 as invalid value.
386	* tests/regression.at: Adjust.
387
3882021-01-23  Akim Demaille  <akim.demaille@gmail.com>
389
390	c++: use noexcept where appropriate
391	Reported by Don Macpherson.
392	https://github.com/akimd/bison/issues/63
393	https://github.com/akimd/bison/issues/64
394
395	* data/skeletons/c++.m4, data/skeletons/lalr1.cc: here.
396
3972021-01-23  Martin Rehak  <martin.rehak@oracle.com>
398
399	examples: avoid "unbound variable" errors
400	When the shell option `nounset` is set, we may get "unbound variable"
401	errors.
402	https://lists.gnu.org/r/bug-bison/2020-11/msg00013.html
403
404	* examples/test (diff_opts): Be sure to initialize it.
405
4062021-01-23  Akim Demaille  <akim.demaille@gmail.com>
407
408	autoconf: update
409
4102021-01-23  Akim Demaille  <akim.demaille@gmail.com>
411
412	c: adjust _Noreturn to pedantic clang
413	Reported by Joe Nelson <joe@begriffs.com>.
414	https://lists.gnu.org/r/help-bison/2021-01/msg00004.html
415	Fixed by Paul Eggert in gnulib.
416	https://lists.gnu.org/r/bug-gnulib/2021-01/msg00156.html
417
418	* data/skeletons/c.m4 (b4_attribute_define): Adjust _Noreturn to
419	pedantic clang.
420
4212021-01-21  Paul Eggert  <eggert@cs.ucla.edu>
422
423	c: port to HP-UX 11.23
424	Problem reported by Albert Chin in:
425	https://lists.gnu.org/r/bug-bison/2021-01/msg00029.html
426	* data/skeletons/c.m4 (b4_c99_int_type_define):
427	Work around HP-UX bug.
428
4292020-11-14  Akim Demaille  <akim.demaille@gmail.com>
430
431	maint: post-release administrivia
432	* NEWS: Add header line for next release.
433	* .prev-version: Record previous version.
434	* cfg.mk (old_NEWS_hash): Auto-update.
435
4362020-11-14  Akim Demaille  <akim.demaille@gmail.com>
437
438	version 3.7.4
439	* NEWS: Record release date.
440
4412020-11-13  Akim Demaille  <akim.demaille@gmail.com>
442
443	c++: shorten the assertions that check whether tokens are correct
444	Before:
445
446	    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);
447
448	After:
449
450	    YY_ASSERT (tok == token::YYEOF
451	               || (token::YYerror <= tok && tok <= token::YYUNDEF)
452	               || tok == 120
453	               || (49 <= tok && tok <= 57)
454	               || (97 <= tok && tok <= 98));
455
456	Clauses are now also wrapped on several lines.  This is nicer to read
457	and diff, but also avoids pushing Visual C++ to its arbitrary
458	limits (640K and lines of 16380 bytes ought to be enough for anybody,
459	otherwise make an C2026 error).
460
461	The useless parens are there for the dummy warnings about
462	precedence (in the future, will we also have to put parens in
463	`1+2*3`?).
464
465	* data/skeletons/variant.hh (_b4_filter_tokens, b4_tok_in, b4_tok_in):
466	New.
467	(_b4_token_constructor_define): Use them.
468
4692020-11-13  Akim Demaille  <akim.demaille@gmail.com>
470
471	c++: don't glue functions together
472	* data/skeletons/bison.m4 (b4_type_foreach): Accept a separator.
473	* data/skeletons/c++.m4: Use it.
474	And fix an incorrect comment.
475
4762020-11-13  Akim Demaille  <akim.demaille@gmail.com>
477
478	lalr1.cc: YY_ASSERT should use api.prefix
479	Working on the previous commit I realized that YY_ASSERT was used in
480	the generated headers, so must follow api.prefix to avoid clashes when
481	multiple C++ parser with variants are used.
482
483	Actually many more macros should obey api.prefix (YY_CPLUSPLUS,
484	YY_COPY, etc.).  There was no complaint so far, so it's not urgent
485	enough for 3.7.4, but it should be addressed in 3.8.
486
487	* data/skeletons/variant.hh (b4_assert): New.
488	Use it.
489	* tests/local.at (AT_YYLEX_RETURN): Fix.
490	* tests/headers.at: Make sure variant-based C++ parsers are checked
491	too.
492	This test did find that YY_ASSERT escaped renaming (before the fix in
493	this commit).
494
4952020-11-13  Akim Demaille  <akim.demaille@gmail.com>
496
497	c++: don't use YY_ASSERT at all if parse.assert is disabled
498	In some extreme situations (about 800 tokens), we generate a
499	single-line assertion long enough for Visual C++ to discard the end of
500	the line, thus falling into parse ends for the missing `);`.  On a
501	shorter example:
502
503	    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);
504
505	Whether NDEBUG is used or not is irrelevant, the parser dies anyway.
506
507	Reported by Jot Dot <jotdot@shaw.ca>.
508	https://lists.gnu.org/r/bug-bison/2020-11/msg00002.html
509
510	We should avoid emitting lines so long.
511
512	We probably should also use a range-based assertion (with extraneous
513	parens to pacify fascist compilers):
514
515	    YY_ASSERT ((token::TOK_YYEOF <= tok && tok <= token::TOK_YYUNDEF)
516	               || (token::TOK_ASSIGN <= tok && ...)
517
518	But anyway, we should simply not emit this assertion at all when not
519	asked for.
520
521	* data/skeletons/variant.hh: Do not define, nor use, YY_ASSERT when it
522	is not enabled.
523
5242020-11-13  Akim Demaille  <akim.demaille@gmail.com>
525
526	c++: style: follow the Bison m4 quoting pattern
527	* data/skeletons/variant.hh: here.
528
5292020-11-11  Akim Demaille  <akim.demaille@gmail.com>
530
531	yacc.c: provide the Bison version as an integral macro
532	Suggested by Balazs Scheidler.
533	https://github.com/akimd/bison/issues/55
534
535	* src/muscle-tab.c (muscle_init): Move/rename `b4_version` to/as...
536	* src/output.c (prepare): `b4_version_string`.
537	Also define `b4_version`.
538	* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/d.m4,
539	* data/skeletons/java.m4: Adjust.
540	* doc/bison.texi: Document it.
541
5422020-11-11  Akim Demaille  <akim.demaille@gmail.com>
543
544	regen
545
5462020-11-11  Akim Demaille  <akim.demaille@gmail.com>
547
548	style: make conversion of version string to int public
549	* src/parse-gram.y (str_to_version): Rename as/move to...
550	* src/strversion.h, src/strversion.c (strversion_to_int): these new
551	files.
552
5532020-11-11  Akim Demaille  <akim.demaille@gmail.com>
554
555	%require: accept version numbers with three parts ("3.7.4")
556	* src/parse-gram.y (str_to_version): Support three parts.
557	* data/skeletons/location.cc, data/skeletons/stack.hh:
558	Adjust.
559
5602020-11-11  Todd C. Miller  <Todd.Miller@sudo.ws>
561
562	yacc.c: fix #definition of YYEMPTY
563	When generating a C parser, YYEMPTY is present in enum yytokentype but
564	there is no corresponding #define like there is for the other values.
565	There is a special case for YYEMPTY in b4_token_enums but no
566	corresponding case in b4_token_defines.
567
568	* data/skeletons/c.m4 (b4_token_defines): Do define YYEMPTY.
569
5702020-11-10  Akim Demaille  <akim.demaille@gmail.com>
571
572	gnulib: update
573
5742020-11-01  Akim Demaille  <akim.demaille@gmail.com>
575
576	doc: fix incorrect section title
577	Reported by Gaurav Singh <gaurav.singh199709@yahoo.com>.
578	https://lists.gnu.org/r/bug-bison/2020-11/msg00000.html
579
580	* doc/bison.texi (Rpcalc Expr): Rename as...
581	(Rpcalc Exp): this, as the nterm is named 'exp'.
582
5832020-10-28  Nick Gasson  <nick@nickg.me.uk>
584
585	doc: minor grammar fixes in counterexamples section
586	* doc/bison.texi: Minor fixes in counterexamples section.
587
5882020-10-14  Akim Demaille  <akim.demaille@gmail.com>
589
590	doc: fix typo
591	* README: here.
592
5932020-10-13  Akim Demaille  <akim.demaille@gmail.com>
594
595	maint: post-release administrivia
596	* NEWS: Add header line for next release.
597	* .prev-version: Record previous version.
598	* cfg.mk (old_NEWS_hash): Auto-update.
599
6002020-10-13  Akim Demaille  <akim.demaille@gmail.com>
601
602	version 3.7.3
603	* NEWS: Record release date.
604
6052020-10-13  Akim Demaille  <akim.demaille@gmail.com>
606
607	build: don't link bison against libreadline
608	Reported by Paul Smith <psmith@gnu.org>.
609	https://lists.gnu.org/r/bug-bison/2020-10/msg00001.html
610
611	* src/local.mk (src_bison_LDADD): here.
612
6132020-10-13  Akim Demaille  <akim.demaille@gmail.com>
614
615	gnulib: update
616
6172020-09-27  Akim Demaille  <akim.demaille@gmail.com>
618
619	glr.cc: fix: use symbol_name
620	* data/skeletons/glr.cc: here.
621
6222020-09-06  Akim Demaille  <akim.demaille@gmail.com>
623
624	build: fix a concurrent build issue in examples
625	Reported by Thomas Deutschmann <whissi@gentoo.org>.
626	https://lists.gnu.org/r/bug-bison/2020-09/msg00010.html
627
628	* examples/c/lexcalc/local.mk: scan.o depends on parse.[ch].
629
6302020-09-05  Akim Demaille  <akim.demaille@gmail.com>
631
632	maint: post-release administrivia
633	* NEWS: Add header line for next release.
634	* .prev-version: Record previous version.
635	* cfg.mk (old_NEWS_hash): Auto-update.
636
6372020-09-05  Akim Demaille  <akim.demaille@gmail.com>
638
639	version 3.7.2
640	* NEWS: Record release date.
641
6422020-09-05  Akim Demaille  <akim.demaille@gmail.com>
643
644	build: disable syntax-check warning
645	error_message_uppercase
646	etc/bench.pl.in-419-static int yylex (@{[is_pure (@directive) ? "YYSTYPE *yylvalp" : "void"]});
647
648	* cfg.mk: here.
649
6502020-09-05  Akim Demaille  <akim.demaille@gmail.com>
651
652	gnulib: update
653
6542020-09-05  Akim Demaille  <akim.demaille@gmail.com>
655
656	build: fix incorrect dependencies
657	Commit af000bab111768a04021bf5ffa4bbe91d44e231c ("doc: work around
658	Texinfo 6.7 bug"), published in 3.4.91, added a dependency on the
659	"all" target.
660
661	This is a super bad idea, since "make all" will run this
662	target *before* "all", which builds bison.  It turns out that this new
663	dependency actually needed bison to be built.  So all the regular
664	process (i) build $(BUILT_SOURCES) and then (ii) build bison, was
665	wrecked since some of the $(BUILT_SOURCES) depended on bison...
666
667	It was "easy" to see in the logs of "make V=1" because we were
668	building bison files (such as src/files.o) *before* displaying the
669	banner for "all-recursive".  With this fix, we finally get again the
670	proper sequence:
671
672	    rm -f examples/c/reccalc/scan.stamp examples/c/reccalc/scan.stamp.tmp
673	    /opt/local/libexec/gnubin/mkdir -p examples/c/reccalc
674	    touch examples/c/reccalc/scan.stamp.tmp
675	    flex   -oexamples/c/reccalc/scan.c --header=examples/c/reccalc/scan.h ./examples/c/reccalc/scan.l
676	    mv examples/c/reccalc/scan.stamp.tmp examples/c/reccalc/scan.stamp
677	    rm -f lib/fcntl.h-t lib/fcntl.h && \
678	    { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
679	      ...
680	    } > lib/fcntl.h-t && \
681	    mv lib/fcntl.h-t lib/fcntl.h
682	    ...
683	    mv -f lib/alloca.h-t lib/alloca.h
684	    make  all-recursive
685
686	Reported by Mingli Yu <mingli.yu@windriver.com>.
687	https://github.com/akimd/bison/issues/31
688	https://lists.gnu.org/r/bison-patches/2020-05/msg00055.html
689
690	Reported by Claudio Calvelli <bugb@w42.org>.
691	https://lists.gnu.org/r/bug-bison/2020-09/msg00001.html
692	https://bugs.gentoo.org/716516
693
694	* doc/local.mk (all): Rename as...
695	(all-local): this.
696	So that we don't compete with BUILT_SOURCES.
697
6982020-09-02  Akim Demaille  <akim.demaille@gmail.com>
699
700	doc: updates
701	* NEWS, TODO: here.
702
7032020-08-30  Akim Demaille  <akim.demaille@gmail.com>
704
705	gnulib: update
706
7072020-08-30  Akim Demaille  <akim.demaille@gmail.com>
708
709	tests: beware of sed portability issues
710	Reported by David Laxer <davidl@softintel.com>.
711	https://lists.gnu.org/r/bug-bison/2020-08/msg00027.html
712
713	* tests/output.at: Don't use + with sed.
714	While at it, fix a quotation problem hidden by the use of '#'.
715
7162020-08-30  Akim Demaille  <akim.demaille@gmail.com>
717
718	c: always use YYMALLOC/YYFREE
719	Reported by Kovalex <kovalex.pro@gmail.com>.
720	https://lists.gnu.org/r/bug-bison/2020-08/msg00015.html
721
722	* data/skeletons/yacc.c: Don't make direct calls to malloc/free.
723	* tests/calc.at: Check it.
724
7252020-08-30  Akim Demaille  <akim.demaille@gmail.com>
726
727	build: beware of POSIX mode
728	Reported by Dennis Clarke.
729	https://lists.gnu.org/r/bug-bison/2020-08/msg00013.html
730
731	* examples/d/local.mk, examples/java/calc/local.mk,
732	* examples/java/simple/local.mk: Pass bison's options before its
733	argument, in case we're in POSIX mode.
734
7352020-08-30  Akim Demaille  <akim.demaille@gmail.com>
736
737	doc: history of api.prefix
738	Reported by Matthew Fernandez <matthew.fernandez@gmail.com>.
739	https://lists.gnu.org/r/help-bison/2020-08/msg00015.html
740
741	* doc/bison.texi (api.prefix): We move to {} in 3.0.
742
7432020-08-11  Akim Demaille  <akim.demaille@gmail.com>
744
745	CI: intel moved the script for ICC
746	* .travis.yml: Adjust.
747
7482020-08-08  Akim Demaille  <akim.demaille@gmail.com>
749
750	fix: unterminated \-escape
751	An assertion failed when the last character is a '\' and we're in a
752	character or a string.
753	Reported by Agency for Defense Development.
754	https://lists.gnu.org/r/bug-bison/2020-08/msg00009.html
755
756	* src/scan-gram.l: Catch unterminated escapes.
757	* tests/input.at (Unexpected end of file): New.
758
7592020-08-07  Akim Demaille  <akim.demaille@gmail.com>
760
761	fix: crash when redefining the EOF token
762	Reported by Agency for Defense Development.
763	https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
764
765	On an empty such as
766
767	    %token FOO
768	           BAR
769	           FOO 0
770	    %%
771	    input: %empty
772
773	we crash because when we find FOO 0, we decrement ntokens (since FOO
774	was discovered to be EOF, which is already known to be a token, so we
775	increment ntokens for it, and need to cancel this).  This "works well"
776	when EOF is properly defined in one go, but here it is first defined
777	and later only assign token code 0.  In the meanwhile BAR was given
778	the token number that we just decremented.
779
780	To fix this, assign symbol numbers after parsing, not during parsing,
781	so that we also saw all the explicit token codes.  To maintain the
782	current numbers (I'd like to keep no difference in the output, not
783	just equivalence), we need to make sure the symbols are numbered in
784	the same order: that of appearance in the source file.  So we need the
785	locations to be correct, which was almost the case, except for nterms
786	that appeared several times as LHS (i.e., several times as "foo:
787	...").  Fixing the use of location_of_lhs sufficed (it appears it was
788	intended for this use, but its implementation was unfinished: it was
789	always set to "false" only).
790
791	* src/symtab.c (symbol_location_as_lhs_set): Update location_of_lhs.
792	(symbol_code_set): Remove broken hack that decremented ntokens.
793	(symbol_class_set, dummy_symbol_get): Don't set number, ntokens and
794	nnterms.
795	(symbol_check_defined): Do it.
796	(symbols): Don't count nsyms here.
797	Actually, don't count nsyms at all: let it be done in...
798	* src/reader.c (check_and_convert_grammar): here.  Define nsyms from
799	ntokens and nnterms after parsing.
800	* tests/input.at (EOF redeclared): New.
801
802	* examples/c/bistromathic/bistromathic.test: Adjust the traces: in
803	"%nterm <double> exp %% input: ...", exp used to be numbered before
804	input.
805
8062020-08-07  Akim Demaille  <akim.demaille@gmail.com>
807
808	style: fix missing space before paren
809	* cfg.mk (_space_before_paren_exempt): Be less laxist.
810	* src/output.c, src/reader.c: Fix space before paren issues.
811	Pacify the warnings where applicable.
812
8132020-08-07  Akim Demaille  <akim.demaille@gmail.com>
814
815	style: fix comments and more debug trace
816	* src/location.c, src/symtab.h, src/symtab.c: here.
817
8182020-08-07  Akim Demaille  <akim.demaille@gmail.com>
819
820	style: more uses of const
821	* src/symtab.c: here.
822
8232020-08-07  Akim Demaille  <akim.demaille@gmail.com>
824
825	bench: fix support for pure parser
826	* etc/bench.pl.in (is_pure): New.
827	(generate_grammar_calc): Use code provides where needed.
828	Use is_pure to call yylex properly.
829	Coding style fixes.
830
8312020-08-03  Akim Demaille  <akim.demaille@gmail.com>
832
833	portability: multiple typedefs
834	Older versions of GCC (4.1.2 here) don't like repeated typedefs.
835
836	      CC       src/bison-parse-simulation.o
837	    src/parse-simulation.c:61: error: redefinition of typedef 'parse_state'
838	    src/parse-simulation.h:74: error: previous declaration of 'parse_state' was here
839	    make: *** [Makefile:7876: src/bison-parse-simulation.o] Error 1
840
841	Reported by Nelson H. F. Beebe.
842
843	* src/parse-simulation.c (parse_state): Don't typedef,
844	parse-simulation.h did it already.
845
8462020-08-02  Akim Demaille  <akim.demaille@gmail.com>
847
848	style: revert "avoid warnings with GCC 4.6"
849	This reverts commit d0bec3175ff5cf6582ffbf584b73ea6aaea838d0 (which
850	should have read "We have a clash...", not "With have a clash...").
851	Now that `max()` was renamed `max_int()`, we can use `max` again, as
852	elsewhere in the code.
853
854	* src/counterexample.c (visited_hasher): Alpha reconversion.
855
8562020-08-02  Akim Demaille  <akim.demaille@gmail.com>
857
858	maint: post-release administrivia
859	* NEWS: Add header line for next release.
860	* .prev-version: Record previous version.
861	* cfg.mk (old_NEWS_hash): Auto-update.
862
8632020-08-02  Akim Demaille  <akim.demaille@gmail.com>
864
865	version 3.7.1
866	* NEWS: Record release date.
867
8682020-08-02  Akim Demaille  <akim.demaille@gmail.com>
869
870	portability: we use termios.h and sys/ioctl.h
871	Reported by Maarten De Braekeleer.
872	https://lists.gnu.org/r/bison-patches/2020-07/msg00079.html
873
874	* bootstrap.conf (gnulib_modules): Add termios and sys_ioctl.
875
8762020-08-02  Maarten De Braekeleer  <maarten.debraekeleer@gmail.com>
877
878	portability: rename accept to acceptsymbol because of MSVC
879	MSVC already defines this symbol.
880
881	* src/symtab.h, src/symtab.c (accept): Rename as...
882	(acceptsymbol): this.
883	Adjust dependencies.
884
8852020-08-02  Akim Demaille  <akim.demaille@gmail.com>
886
887	regen
888
8892020-08-02  Maarten De Braekeleer  <maarten.debraekeleer@gmail.com>
890
891	portability: use CHAR_LITERAL instead of CHAR because MSVC defines CHAR
892	* src/parse-gram.y, src/scan-gram.l: here.
893
8942020-08-02  Maarten De Braekeleer  <maarten.debraekeleer@gmail.com>
895
896	portability: use INT_LITERAL instead of INT because MSVC defines INT
897	It is defined as a typedef, not a macro.
898	https://lists.gnu.org/r/bison-patches/2020-08/msg00001.html
899
900	* src/parse-gram.y, src/scan-gram.l: here.
901
9022020-08-02  Akim Demaille  <akim.demaille@gmail.com>
903
904	portability: beware of max () with MSVC
905	Reported by Maarten De Braekeleer.
906	https://lists.gnu.org/r/bison-patches/2020-07/msg00080.html
907
908	We don't want to use gnulib's min and max macros, since we use
909	function calls in min/max arguments.
910
911	* src/location.c (max_int, min_int): Move to...
912	* src/system.h: here.
913	* src/counterexample.c, src/derivation.c: Use max_int instead of max.
914
9152020-08-02  Akim Demaille  <akim.demaille@gmail.com>
916
917	libtextstyle: be sure to have ostream_printf and hyperlink support
918	Older versions of libtextstyle do not support them, rule them out.
919
920	Reported by Lars Wendler
921	https://lists.gnu.org/r/bug-bison/2020-07/msg00030.html
922
923	and by Arnold Robbins
924	https://lists.gnu.org/r/bug-bison/2020-07/msg00041.html and
925	https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003988.html
926
927	and by Nelson H. F. Beebe
928	https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003993.html
929
930	With support from Bruno Haible in gnulib
931	https://lists.gnu.org/r/bug-gnulib/2020-08/msg00000.html
932	thread starting at
933	https://lists.gnu.org/r/bug-gnulib/2020-07/msg00148.html
934
935	* configure.ac: Require libtextstyle 0.20.5.
936	* gnulib: Update.
937
9382020-08-01  Akim Demaille  <akim.demaille@gmail.com>
939
940	CI: comment changes
941
9422020-08-01  Akim Demaille  <akim.demaille@gmail.com>
943
944	regen
945
9462020-08-01  Akim Demaille  <akim.demaille@gmail.com>
947
948	diagnostics: better location for type redeclarations
949	From
950
951	    foo.y:1.7-11: error: %type redeclaration for bar
952	        1 | %type <foo> bar bar
953	          |       ^~~~~
954	    foo.y:1.7-11: note: previous declaration
955	        1 | %type <foo> bar bar
956	          |       ^~~~~
957
958	to
959
960	    foo.y:1.17-19: error: %type redeclaration for bar
961	        1 | %type <foo> bar bar
962	          |                 ^~~
963	    foo.y:1.13-15: note: previous declaration
964	        1 | %type <foo> bar bar
965	          |             ^~~
966
967	* src/symlist.h, src/symlist.c (symbol_list_type_set): There's no need
968	for the tag's location, use that of the symbol.
969	* src/parse-gram.y: Adjust.
970	* tests/input.at: Adjust.
971
9722020-07-30  Akim Demaille  <akim.demaille@gmail.com>
973
974	todo: updates for D
975
9762020-07-29  Akim Demaille  <akim.demaille@gmail.com>
977
978	cex: style: comment changes
979	* src/parse-simulation.c: here.
980
9812020-07-29  Akim Demaille  <akim.demaille@gmail.com>
982
983	cex: style: prefer "res" for the returned value
984	* src/derivation.c (derivation_new): here.
985
9862020-07-29  Akim Demaille  <akim.demaille@gmail.com>
987
988	cex: style: prefer FOO_print to print_FOO
989	* src/state-item.h, src/state-item.c (print_state_item): Rename as...
990	(state_item_print): this.
991	* src/counterexample.c (print_counterexample): Rename as...
992	(counterexample_print): this.
993
9942020-07-28  Akim Demaille  <akim.demaille@gmail.com>
995
996	scanner: don't crash on strings containing a NUL byte
997	We crash if the input contains a string containing a NUL byte.
998	Reported by Suhwan Song.
999	https://lists.gnu.org/r/bug-bison/2020-07/msg00051.html
1000
1001	* src/flex-scanner.h (STRING_FREE): Avoid accidental use of
1002	last_string.
1003	* src/scan-gram.l: Don't call STRING_FREE without calling
1004	STRING_FINISH first.
1005	* tests/input.at (Invalid inputs): Check that case.
1006
10072020-07-28  Akim Demaille  <akim.demaille@gmail.com>
1008
1009	doc: refer to cex from sections dealing with conflicts
1010	The documentation about -Wcex should be put forward.
1011
1012	* doc/bison.texi: Refer to -Wcex from the sections about conflicts.
1013
10142020-07-28  Akim Demaille  <akim.demaille@gmail.com>
1015
1016	doc: factor ifnottex/iftex examples
1017	* doc/bison.texi: Factor the common bits out of ifnottex/iftex.
1018
10192020-07-28  Akim Demaille  <akim.demaille@gmail.com>
1020
1021	doc: fix colors
1022	The original Texinfo macros introducing colors were made for
1023	diagnostics, which are printed in bold.  So by copy-paste accident the
1024	styles we introduced for counterexamples were also in bold.  They
1025	should not.
1026
1027	* doc/bison.texi: Separate the styling of diagnostics from the styling
1028	for counterexamples.
1029	Don't use bold in the latter case.
1030
10312020-07-28  Akim Demaille  <akim.demaille@gmail.com>
1032
1033	doc: fixes
1034	* doc/bison.texi: Fix spello.
1035	Fix missing colors, and factor.
1036
10372020-07-23  Akim Demaille  <akim.demaille@gmail.com>
1038
1039	maint: post-release administrivia
1040	* NEWS: Add header line for next release.
1041	* .prev-version: Record previous version.
1042	* cfg.mk (old_NEWS_hash): Auto-update.
1043
10442020-07-23  Akim Demaille  <akim.demaille@gmail.com>
1045
1046	version 3.7
1047	* NEWS: Record release date.
1048
10492020-07-23  Akim Demaille  <akim.demaille@gmail.com>
1050
1051	style: avoid warnings with GCC 4.6
1052	With have a clash with the "max" function.
1053
1054	    src/counterexample.c: In function 'visited_hasher':
1055	    src/counterexample.c:720:48: error: declaration of 'max' shadows a global declaration [-Werror=shadow]
1056	    src/counterexample.c:116:12: error: shadowed declaration is here [-Werror=shadow]
1057
1058	* src/counterexample.c (visited_hasher): Alpha conversion.
1059
10602020-07-23  Akim Demaille  <akim.demaille@gmail.com>
1061
1062	doc: fix definition of -Wall
1063	* doc/bison.texi (Diagnostics): here.
1064
10652020-07-23  Akim Demaille  <akim.demaille@gmail.com>
1066
1067	gnulib: update
1068	* bootstrap.conf: We need stpncpy.
1069
10702020-07-23  Akim Demaille  <akim.demaille@gmail.com>
1071
1072	tests: fixes
1073	Fix 6b78e50cef3c2cd8e6f4e7938be987e8769f8eef, "cex: make "rerun with
1074	'-Wcex'" a note instead of a warning"
1075
1076	* tests/conflicts.at (-W versus %expect and %expect-rr): Fix
1077	expectations.
1078
10792020-07-22  Akim Demaille  <akim.demaille@gmail.com>
1080
1081	cex: update NEWS for 3.7
1082	* NEWS: Update to the current style of cex display.
1083
10842020-07-22  Akim Demaille  <akim.demaille@gmail.com>
1085
1086	doc: catch up with the current display of cex
1087	Unfortunately I found no way to use the ↳ glyph in Texinfo, so I used
1088	@arrow{} instead, which has a different width, so we have to have all
1089	the examples doubled, once for TeX, another for the rest of the world.
1090
1091	* doc/bison.texi: Use the current display in the examples.
1092	* doc/calc.y, doc/ids.y, doc/if-then-else.y, doc/sequence.y: New.
1093
10942020-07-21  Akim Demaille  <akim.demaille@gmail.com>
1095
1096	cex: make "rerun with '-Wcex'" a note instead of a warning
1097	Currently the suggestion to rerun is a -Wother warning:
1098
1099	    warning: 2 shift/reduce conflicts [-Wconflicts-sr]
1100	    warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother]
1101
1102	Instead, let's attach it as a subnote of the diagnostic (in the
1103	current case, -Wconflicts-sr):
1104
1105	    warning: 2 shift/reduce conflicts [-Wconflicts-sr]
1106	    note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
1107
1108	* src/conflicts.c (conflicts_print): Do that.
1109	Adjust the test suite.
1110
11112020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1112
1113	maint: post-release administrivia
1114	* NEWS: Add header line for next release.
1115	* .prev-version: Record previous version.
1116	* cfg.mk (old_NEWS_hash): Auto-update.
1117
11182020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1119
1120	version 3.6.93
1121	* NEWS: Record release date.
1122
11232020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1124
1125	cex: label all the derivations by their initial action
1126	From
1127
1128	    input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
1129	      Example: A b .
1130	      First derivation
1131	        a
1132	        `-> A b .
1133	      Second derivation
1134	        a
1135	        `-> A b
1136	              `-> b .
1137
1138	to
1139
1140	    input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
1141	      Example: A b .
1142	      First reduce derivation
1143	        a
1144	        `-> A b .
1145	      Second reduce derivation
1146	        a
1147	        `-> A b
1148	              `-> b .
1149
1150	* src/counterexample.c (print_counterexample): here.
1151	Compute the width of the labels to properly align the values.
1152	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
1153	* tests/report.at: Adjust.
1154
11552020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1156
1157	cex: improve readability of the subsections
1158	Now that the derivation is no longer printed on one line, aligning the
1159	example and the derivation is no longer useful.  It can actually be
1160	harmful, as it makes the overall structure less clear.
1161
1162	* src/derivation.h, src/derivation.c (derivation_print_leaves): Remove
1163	the `prefix` argument.
1164	* src/counterexample.c (print_counterexample): Put the example next to
1165	its label.
1166	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
1167	* tests/report.at: Adjust.
1168
11692020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1170
1171	cex: don't issue an empty line between counterexamples
1172	Now that we use complain, the "sections" are clearer.
1173
1174	* src/counterexample.c (print_counterexample): Use the empty line only
1175	in reports.
1176	* tests/counterexample.at, tests/diagnostics.at, tests/report.at: Adjust.
1177
11782020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1179
1180	cex: use usual routines for diagnostics about S/R conflicts
1181	See previous commit.  We go from
1182
1183	    input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
1184	    Shift/reduce conflict on token "⊕":
1185	      Example              exp "+" exp • "⊕" exp
1186	      Shift derivation
1187	        exp
1188	        ↳ exp "+" exp
1189	                  ↳ exp • "⊕" exp
1190
1191	to
1192
1193	    input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
1194	    input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
1195	      Example              exp "+" exp • "⊕" exp
1196	      Shift derivation
1197	        exp
1198	        ↳ exp "+" exp
1199	                  ↳ exp • "⊕" exp
1200
1201	with an hyperlink on -Wcounterexamples.
1202
1203	* src/counterexample.c (counterexample_report_shift_reduce):
1204	Use complain.
1205	* tests/counterexample.at, tests/diagnostics.at, tests/report.at:
1206	Adjust.
1207
12082020-07-20  Akim Demaille  <akim.demaille@gmail.com>
1209
1210	cex: use usual routines for diagnostics about R/R conflicts
1211	This is more consistent, and brings benefits: users know that these
1212	diagnostics are attached to -Wcounterexamples, and they can also click
1213	on the hyperlink if permitted by their terminal.
1214
1215	We go from
1216
1217	    warning: 1 reduce/reduce conflict [-Wconflicts-rr]
1218	    Reduce/reduce conflict on token $end:
1219	      Example              A b .
1220	      First derivation     a -> [ A b . ]
1221	      Second derivation    a -> [ A b -> [ b . ] ]
1222
1223	to
1224
1225	    warning: 1 reduce/reduce conflict [-Wconflicts-rr]
1226	    input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
1227	      Example              A b .
1228	      First derivation     a -> [ A b . ]
1229	      Second derivation    a -> [ A b -> [ b . ] ]
1230
1231	with an hyperlink on -Wcounterexamples.
1232
1233	* src/counterexample.c (counterexample_report_reduce_reduce):
1234	Use complain.
1235	* tests/counterexample.at, tests/diagnostics.at, tests/report.at:
1236	Adjust.
1237
12382020-07-19  Akim Demaille  <akim.demaille@gmail.com>
1239
1240	diagnostics: use hyperlinks to point to the only documentation
1241	* src/complain.c (begin_hyperlink, end_hyperlink): New.
1242	(warnings_print_categories): Use them.
1243	* tests/local.at (AT_SET_ENV): Disable hyperlinks in the tests, they
1244	contain random id's, and brackets (which is not so nice for M4).
1245
12462020-07-19  Akim Demaille  <akim.demaille@gmail.com>
1247
1248	doc: add anchors for warnings
1249	Unfortunately Texinfo somewhat mangles anchors such as `-Werror` into
1250	`g_t_002dWerror`, so let's not include the dash.
1251
1252	* doc/bison.texi (Diagnostics): here.
1253
12542020-07-19  Akim Demaille  <akim.demaille@gmail.com>
1255
1256	glyphs: fix types
1257	The code was written on top of buffers of `char[26]`, and then was
1258	changed to use `char *`, yet was still using `sizeof buf`, which
1259	became `sizeof (char *)` instead of `sizeof (char[26])`.
1260
1261	Reported by Dagobert Michelsen.
1262	https://lists.gnu.org/r/bug-bison/2020-07/msg00023.html
1263
1264	* src/glyphs.h, src/glyphs.c: Get rid of uses of `char *`, use only
1265	glyph_buffer_t.
1266
12672020-07-19  Akim Demaille  <akim.demaille@gmail.com>
1268
1269	maint: post-release administrivia
1270	* NEWS: Add header line for next release.
1271	* .prev-version: Record previous version.
1272	* cfg.mk (old_NEWS_hash): Auto-update.
1273
12742020-07-19  Akim Demaille  <akim.demaille@gmail.com>
1275
1276	version 3.6.92
1277	* NEWS: Record release date.
1278
12792020-07-19  Akim Demaille  <akim.demaille@gmail.com>
1280
1281	style: avoid strncpy
1282	syntax-check seems to dislike strncpy.  The GNU Coreutils replaced
1283	their uses of strncpy with stpncpy.
1284
1285	strlcpy is not an option.
1286	  http://sources.redhat.com/ml/libc-alpha/2002-01/msg00159.html
1287	  http://sources.redhat.com/ml/libc-alpha/2002-01/msg00011.html
1288	  http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00181.html
1289
1290	* src/glyphs.c: Use stpncpy.
1291
12922020-07-18  Akim Demaille  <akim.demaille@gmail.com>
1293
1294	cex: display derivations as trees
1295	Sometimes, understanding the derivations is difficult, because they
1296	are serialized to fit in one line.  For instance, the example taken
1297	from the NEWS file:
1298
1299	    %token ID
1300	    %%
1301	    s: a ID
1302	    a: expr
1303	    expr: expr ID ',' | "expr"
1304
1305	gave
1306
1307	    First example        expr • ID ',' ID $end
1308	    Shift derivation     $accept → [ s → [ a → [ expr → [ expr • ID ',' ] ] ID ] $end ]
1309	    Second example       expr • ID $end
1310	    Reduce derivation    $accept → [ s → [ a → [ expr • ] ID ] $end ]
1311
1312	Printing as trees, it gives:
1313
1314	    First example        expr • ID ',' ID $end
1315	    Shift derivation
1316	      $accept
1317	      ↳ s                      $end
1318	        ↳ a                 ID
1319	          ↳ expr
1320	            ↳ expr • ID ','
1321	    Second example       expr • ID $end
1322	    Reduce derivation
1323	      $accept
1324	      ↳ s             $end
1325	        ↳ a        ID
1326	          ↳ expr •
1327
1328	* src/glyphs.h, src/glyphs.c (down_arrow, empty, derivation_separator):
1329	New.
1330	* src/derivation.c (derivation_print, derivation_print_impl): Rename
1331	as...
1332	(derivation_print_flat, derivation_print_flat_impl): These.
1333	(fputs_if, derivation_depth, derivation_width, derivation_print_tree)
1334	(derivation_print_tree_impl, derivation_print): New.
1335	* src/counterexample.c (print_counterexample): Adjust.
1336	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
1337	* tests/report.at: Adjust.
1338
13392020-07-16  Akim Demaille  <akim.demaille@gmail.com>
1340
1341	cex: use the glyphs
1342	* src/derivation.c: here.
1343	* src/gram.h, src/gram.c (print_arrow, print_dot, print_fallback):
1344	Remove.
1345
13462020-07-16  Akim Demaille  <akim.demaille@gmail.com>
1347
1348	cex: factor the handling of graphical symbols
1349	* src/glyphs.h, src/glyphs.c: New.
1350
13512020-07-15  Akim Demaille  <akim.demaille@gmail.com>
1352
1353	cex: style changes
1354	* src/counterexample.c: here.
1355
13562020-07-15  Akim Demaille  <akim.demaille@gmail.com>
1357
1358	cex: simplify tests
1359	* tests/counterexample.at (AT_BISON_CHECK_CEX): Handle the keyword.
1360	Simplify the signature.
1361
13622020-07-15  Akim Demaille  <akim.demaille@gmail.com>
1363
1364	cex: more colors
1365	Provided by Daniela Becker.
1366
1367	* data/bison-default.css: More colors.
1368
13692020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1370
1371	style: comments changes
1372	* src/print.c: here.
1373
13742020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1375
1376	doc: update GLR sections
1377	Reported by Christian Schoenebeck.
1378
1379	* doc/bison.texi (GLR Parsers): Minor fixes.
1380	(Compiler Requirements for GLR): Remove, quite useless today.
1381
13822020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1383
1384	cex: display shifts before reductions
1385	When reporting counterexamples for s/r conflicts, put the shift first.
1386	This is more natural, and displays the default resolution first, which
1387	is also what happens for r/r conflicts where the smallest rule number
1388	is displayed first, and "wins".
1389
1390	* src/counterexample.c (counterexample): Add a shift_reduce member.
1391	(new_counterexample): Adjust.
1392	Swap the derivations when this is a s/r conflict.
1393	(print_counterexample): For s/r conflicts, prefer "Shift derivation"
1394	and "Reduce derivation" rather than "First/Second derivation".
1395
1396	* tests/conflicts.at, tests/counterexample.at, tests/report.at: Adjust.
1397	* NEWS, doc/bison.texi: Ditto.
1398
13992020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1400
1401	style: s/lookahead_tokens/lookaheads/g
1402	Currently we use both names.  Let's stick to the short one.
1403
1404	* src/AnnotationList.c, src/conflicts.c, src/counterexample.c,
1405	* src/getargs.c, src/getargs.h, src/graphviz.c, src/ielr.c,
1406	* src/lalr.c, src/print-graph.c, src/print-xml.c, src/print.c,
1407	* src/state-item.c, src/state.c, src/state.h, src/tables.c:
1408	s/lookahead_token/lookahead/gi.
1409
14102020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1411
1412	cex: factor memory allocation
1413	* src/counterexample.c (counterexample_report_state): Allocate once
1414	per conflicted state, instead of once per r/r conflict.
1415
14162020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1417
1418	cex: use state_item_number consistently
1419	* src/counterexample.c, src/state-item.c: here.
1420	(counterexample_report_state): While at it, prefer c2 to j/k, to match
1421	c1.
1422
14232020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1424
1425	cex: more consistent memory allocation/copy
1426	* src/counterexample.c, src/parse-simulation.c: It is more usual in
1427	Bison to use sizeof on expressions than on types, especially for
1428	allocation.
1429	Let the compiler do it's job instead of calling memcpy ourselves.
1430
14312020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1432
1433	cex: minor renaming
1434	* src/counterexample.c (has_common_prefix): Rename as...
1435	(have_common_prefix): this.
1436
14372020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1438
1439	cex: use better type names
1440	There are too many gl_list_t in there, it's hard to understand what is
1441	going on.  Introduce and use more precise types.  I sure can be wrong
1442	in some places, it's hard to tell without proper tool support.
1443
1444	* src/counterexample.c, src/lssi.c, src/lssi.h, src/parse-simulation.c,
1445	* src/parse-simulation.h, src/state-item.c, src/state-item.h
1446	(si_bfs_node_list, search_state_list, ssb_list, lssi_list)
1447	(state_item_list): New.
1448
14492020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1450
1451	cex: minor style changes
1452	* src/counterexample.h, src/derivation.h, src/derivation.c:
1453	More comments.
1454	Use `out` for FILE*, as elsewhere.
1455
14562020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1457
1458	tests: beware of version numbers from git describe
1459	* tests/report.at: Be robust to version numbers such as
1460	3.6.4.133-fbac-dirty.
1461
14622020-07-14  Akim Demaille  <akim.demaille@gmail.com>
1463
1464	tests: fix expectations
1465	Broken in ee86ea88399ed02243fbceb2704c9ea322a12bf9.
1466
1467	* tests/diagnostics.at: here.
1468
14692020-07-12  Akim Demaille  <akim.demaille@gmail.com>
1470
1471	doc: makeinfo wants @arrow{}, not @arrow
1472	* doc/bison.texi: here.
1473
14742020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1475
1476	gnulib: update
1477
14782020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1479
1480	cex: prefer → to ::=
1481	It does not make a lot of sense to use ::= in our counterexamples,
1482	that's not something that belongs to the Bison "vocabulary".  Using
1483	the colon makes sense, but it's too discreet.  Let's use the arrow,
1484	which we already use in some reports (HTML and Dot).
1485
1486	* src/gram.h (print_dot_fallback): Generalize into...
1487	(print_fallback): this.
1488	(print_arrow): New.
1489	* src/derivation.c: Use it.
1490
1491	* NEWS, tests/conflicts.at, tests/counterexample.at,
1492	* tests/diagnostics.at, tests/report.at: Adjust.
1493	* doc/bison.texi: Ditto.
1494	Unfortunately the literal `→` is output as `↦`.  So we need to use
1495	@arrow.
1496
14972020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1498
1499	style: cex: prefer the array notation
1500	Prefer `&foos[i]` to `foos + i` when `foos` is an array.  IMHO, it
1501	makes the semantics clearer.
1502
1503	* src/counterexample.c, src/lssi.c, src/parse-simulation.c,
1504	* src/state-item.c: With arrays, prefer the array notation rather than
1505	the pointer one.
1506
15072020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1508
1509	style: cex: remove variables that don't make it simpler to read
1510	* src/counterexample.c: With arrays, prefer the array notation rather
1511	than the pointer one.
1512
15132020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1514
1515	bistromathic: demonstrate caret-diagnostics
1516	* examples/c/bistromathic/parse.y (user_context): We need the current
1517	line.
1518	(yyreport_syntax_error): Quote the guilty line, with squiggles.
1519	* examples/c/bistromathic/bistromathic.test: Adjust.
1520
15212020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1522
1523	bistromathic: do not display parse errors on completion
1524	Currently autocompletion on a line with errors leaks the error
1525	messages.  It can be useful to let the user know, but GNU Readline
1526	does not provide us with an nice way to display the error.  So we
1527	actually break into the current line of the user.
1528
1529	So instead, do not show these errors.
1530
1531	* examples/c/bistromathic/parse.y (user_context): New.
1532	Use %param to pass it to the parser and scanner.
1533	Keep quiet when in computing autocompletion.
1534
15352020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1536
1537	bistromathic: don't stupidly reset the location for each token
1538	That quite defeats the whole point of locations...  But anyway, we
1539	should not see these messages at all.
1540
1541	* examples/c/bistromathic/parse.y (expected_tokens): Fix (useless)
1542	location tracking.
1543
15442020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1545
1546	bistromathic: promote yytoken_kind_t
1547	* examples/c/bistromathic/parse.y: Use yytoken_kind_t rather than int.
1548
15492020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1550
1551	html: capitalize titles
1552	* data/xslt/xml2xhtml.xsl: Use "State 0", not "state 0".
1553	As we do in text reports.
1554
15552020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1556
1557	html: don't define several times the same anchors
1558	Currently when we output useless rules, they appear before the
1559	grammar, but using the same invocation.  As a result, the anchor is
1560	defined twice, and the wrong one, being first, is honored.
1561
1562	* data/xslt/xml2xhtml.xsl (rule): Take a new 'anchor' parameter to
1563	decide whether being an anchor, or a target.
1564	Let it be true when output the grammar.
1565	* tests/report.at: Adjust.
1566
15672020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1568
1569	html: simplify
1570	* data/xslt/xml2xhtml.xsl: Merge two identical when-clauses.
1571
15722020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1573
1574	reports: let html reports catch up with --report and --graph
1575	* data/xslt/xml2xhtml.xsl: Show the symbol types.
1576	* tests/report.at: Adjust.
1577
15782020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1579
1580	reports: let xml reports catch up with --report and --graph
1581	The text and Dot reports are expected to be identical when generated
1582	directly (--report, --graph) or indirectly (via XML).  The xml
1583	testsuite had not be run for ages, let it catch up a bit.
1584
1585	* src/print-xml.c: Pass the type of the symbols.
1586	* data/xslt/xml2text.xsl
1587	Catch up with the new layout.
1588	Display the symbol types.
1589	Use '•', not '.'
1590	* tests/local.at: Smash '•' to '.' when matching against the direct
1591	text report.
1592	* tests/report.at: Adjust XML expectations.
1593
15942020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1595
1596	reports: update html ouput
1597	* data/xslt/xml2xhtml.xsl: Improve indentation.
1598	Use ul/li rather that pre.
1599
16002020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1601
1602	tests: check html
1603	* tests/report.at: here.
1604
16052020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1606
1607	style: factor complex expressions
1608	* src/print-xml.c, src/print.c: Introduce a variable pointing to the
1609	current symbol.
1610
16112020-07-11  Akim Demaille  <akim.demaille@gmail.com>
1612
1613	maint: make it easier to update expectations
1614	* tests/local.mk (update-tests): New.
1615
16162020-07-09  Akim Demaille  <akim.demaille@gmail.com>
1617
1618	maint: post-release administrivia
1619	* NEWS: Add header line for next release.
1620	* .prev-version: Record previous version.
1621	* cfg.mk (old_NEWS_hash): Auto-update.
1622
16232020-07-09  Akim Demaille  <akim.demaille@gmail.com>
1624
1625	version 3.6.91
1626	* NEWS: Record release date.
1627
16282020-07-09  Akim Demaille  <akim.demaille@gmail.com>
1629
1630	news: update
1631
16322020-07-09  Akim Demaille  <akim.demaille@gmail.com>
1633
1634	gnulib: update
1635
16362020-07-08  Akim Demaille  <akim.demaille@gmail.com>
1637
1638	examples: add license headers
1639	Prompted by Rici Lake.
1640	https://stackoverflow.com/questions/62658368/#comment110853985_62661621
1641	Discussed with Paul Eggert.
1642
1643	* doc/bison.texi, examples/c/bistromathic/parse.y,
1644	* examples/c/lexcalc/parse.y, examples/c/lexcalc/scan.l,
1645	* examples/c/pushcalc/calc.y, examples/c/reccalc/parse.y,
1646	* examples/c/reccalc/scan.l, examples/d/calc.y,
1647	* examples/java/calc/Calc.y, examples/java/simple/Calc.y:
1648	Install the GPL3+ header.
1649
16502020-07-05  Akim Demaille  <akim.demaille@gmail.com>
1651
1652	style: update comments
1653	* src/reader.c: action_obstack was removed in 2002...
1654	* src/parse-gram.y: Better names.
1655	* src/scan-code.h: More comments.
1656
16572020-07-05  Akim Demaille  <akim.demaille@gmail.com>
1658
1659	style: update comments in the skeletons
1660	* data/skeletons/c++.m4, data/skeletons/glr.c, data/skeletons/lalr1.d,
1661	* data/skeletons/lalr1.java, data/skeletons/yacc.c:
1662	Be more accurate about yychar and yytoken.
1663	Don't name local variables as if they were members.
1664
16652020-07-05  Akim Demaille  <akim.demaille@gmail.com>
1666
1667	doc: more details about symbols in m4
1668	* data/README.md: here.
1669	* README-hacking.md (Vocabulary): More.
1670
16712020-07-05  Akim Demaille  <akim.demaille@gmail.com>
1672
1673	regen
1674
16752020-07-05  Akim Demaille  <akim.demaille@gmail.com>
1676
1677	examples: include the generated header
1678	* examples/c/bistromathic/parse.y, examples/c/lexcalc/parse.y,
1679	* examples/c/reccalc/parse.y: here.
1680	Add some comments.
1681
1682	* src/parse-gram.y (api_version): Pull out of handle_require.
1683	Bump to 3.7.
1684
16852020-07-04  Akim Demaille  <akim.demaille@gmail.com>
1686
1687	maint: post-release administrivia
1688	* NEWS: Add header line for next release.
1689	* .prev-version: Record previous version.
1690	* cfg.mk (old_NEWS_hash): Auto-update.
1691
16922020-07-04  Akim Demaille  <akim.demaille@gmail.com>
1693
1694	version 3.6.90
1695	* NEWS: Record release date.
1696
16972020-07-04  Akim Demaille  <akim.demaille@gmail.com>
1698
1699	news: update
1700
17012020-07-04  Akim Demaille  <akim.demaille@gmail.com>
1702
1703	package: fix syntax-check errors
1704	* examples/c/bistromathic/bistromathic.test, po/POTFILES.in: here.
1705
17062020-07-04  Akim Demaille  <akim.demaille@gmail.com>
1707
1708	gnulib: update
1709
17102020-07-04  Akim Demaille  <akim.demaille@gmail.com>
1711
1712	cex: give more details about -Wcex and -rcex
1713	* data/bison-default.css: Cobalt does not seem to be supported.
1714	* doc/bison.texi (Counterexamples): A new section.
1715	(Understanding): Show the counterexamples as it shows in the report:
1716	with its items.
1717	(Bison Options): Document -Wcex and -rcex.
1718
17192020-07-03  Akim Demaille  <akim.demaille@gmail.com>
1720
1721	news: update
1722
17232020-07-03  Akim Demaille  <akim.demaille@gmail.com>
1724
1725	dot: also use a dot in the output
1726	* src/print-graph.c (print_core): Use a dot instead of a point.
1727	* doc/figs/example-reduce.gv, doc/figs/example-reduce.txt,
1728	* doc/figs/example-shift.gv, doc/figs/example-shift.txt,
1729	* doc/figs/example.gv: Update.
1730	* tests/output.at, tests/report.at: Adjust.
1731
17322020-07-02  Akim Demaille  <akim@lrde.epita.fr>
1733
1734	doc: improve a sentence
1735	* doc/bison.texi: here.
1736
17372020-07-01  Akim Demaille  <akim.demaille@gmail.com>
1738
1739	news: formatting changes
1740
17412020-07-01  Akim Demaille  <akim.demaille@gmail.com>
1742
1743	news, todo: update
1744
17452020-06-30  Akim Demaille  <akim.demaille@gmail.com>
1746
1747	doc: clarify that the pcontext interface is *.c only
1748	Reported by Rici Lake.
1749	https://lists.gnu.org/r/bug-bison/2020-06/msg00054.html
1750
1751	* doc/bison.texi (Syntax Error Reporting Function): Make it clear that
1752	this is not exported.
1753	Remove C++ details that landed in the C doc.
1754
17552020-06-30  Akim Demaille  <akim.demaille@gmail.com>
1756
1757	doc: use color in the cex examples
1758	* doc/bison.texi: here.
1759	And use smallexample when it no longer fits in PDF.
1760
17612020-06-30  Akim Demaille  <akim.demaille@gmail.com>
1762
1763	doc: repair the references to the Bibliography
1764	In commit c80cdf2db2b302db4137fabd4ae11e578fa51fca ("doc: simplify
1765	uses of @ref", Jan 27 2020, released in Bison 3.6), I broke the
1766	references to the Bibliography.  For instance:
1767
1768	     For a more detailed exposition of the mysterious behavior in LALR parsers
1769	    -and the benefits of IELR, @pxref{Bibliography,,Denny 2008 March}, and
1770	    -@ref{Bibliography,,Denny 2010 November}.
1771	    +and the benefits of IELR, @pxref{Bibliography}, and
1772	    +@ref{Bibliography}.
1773
1774	which results in "see Bibliography" twice, instead of the more precise
1775	reference.
1776
1777	* doc/bison.texi (@pcite, @tcite): New.
1778	Use them instead of @ref to Bibliography.
1779	Cite only the first author (that's what we did for the other entries).
1780
17812020-06-30  Vincent Imbimbo  <vmi6@cornell.edu>
1782
1783	doc: cex documentation
1784	* NEWS, doc/bison.texi: Add documentation for conflict counterexample
1785	generation.
1786
17872020-06-30  Akim Demaille  <akim.demaille@gmail.com>
1788
1789	doc: update Doxygen template file
1790	* doc/Doxyfile.in: here.
1791
17922020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1793
1794	yacc.c: push: don't clear the parser state when accepting/rejecting
1795	Currently when a push parser finishes its parsing (i.e., it did not
1796	return YYPUSH_MORE), it also clears its state.  It is therefore
1797	impossible to see if it had parse errors.
1798
1799	In the context of autocompletion, because error recovery might have
1800	fired, the parser is actually already in a different state.  For
1801	instance on `(1 + + <TAB>` in the bistromathic, because there's a
1802	`exp: "(" error ")"` recovery rule, `1 + +` tokens have already been
1803	popped, replaced by `error`, and autocompletions think we are ready
1804	for the closing ")".  So here, we would like to see if there was a
1805	syntax error, yet `yynerrs` was cleared.
1806
1807	In the case of a successful parse, we still have a problem: if error
1808	recovery succeeded, we won't know it, since, again, `yynerrs` is
1809	clearer.
1810
1811	It seems much more natural to leave the parser state available for
1812	analysis when there is a failure.
1813
1814	To reuse the parser, we should either:
1815
1816	1. provide an explicit means to reinitialize a parser state for future
1817	   parses.
1818
1819	2. automatically reset the parser state when it is used in a new
1820	   parse.
1821
1822	Option 2 requires to check whether we need to reinitialize the parser
1823	each time we call `yypush_parse`, i.e., each time we give a new token.
1824	This seems expensive compared to Option 1, but benchmarks revealed no
1825	difference.  Option 1 is incompatible with the documentation
1826	("After `yypush_parse` returns a status other than `YYPUSH_MORE`, the
1827	parser instance `yyps` may be reused for a new parse.").
1828
1829	So Option 2 wins, reusing the private `yynew` member to record that a
1830	parse was finished, and therefore that the state must reset in the
1831	next call to `yypull_parse`.
1832
1833	While at it, this implementation now reuses the previously enlarged
1834	stacks from one parse to another.
1835
1836	* data/skeletons/yacc.c (yypstate_new): Set up the stacks in their
1837	initial configurations (setting their bottom to the stack array), and
1838	use yypstate_clear to reset them (moving their top to their bottom).
1839	(yypstate_delete): Adjust.
1840	(yypush_parse): At the beginning, clear yypstate if needed, and at the
1841	end, record when yypstate needs to be clearer.
1842
1843	* examples/c/bistromathic/parse.y (expected_tokens): Do not propose
1844	autocompletion when there are parse errors.
1845	* examples/c/bistromathic/bistromathic.test: Check that case.
1846
18472020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1848
1849	bistromathic: don't display undefined locations
1850	Currently, completion when there is a syntax error shows broken
1851	locations.
1852
1853	* examples/c/bistromathic/parse.y (expected_tokens): Initialize the
1854	location.
1855	* examples/c/bistromathic/bistromathic.test: Check that.
1856
18572020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1858
1859	yacc.c: simplify initialization of push parsers
1860	The previous commit ("yacc.c: declare and initialize and the same
1861	time") made b4_initialize_parser_state_variables useless.
1862
1863	* data/skeletons/yacc.c (b4_initialize_parser_state_variables): Inline
1864	into...
1865	(yypstate_clear): here.
1866
18672020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1868
1869	regen
1870
18712020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1872
1873	yacc.c: declare and initialize and the same time
1874	In order to factor the code of push and pull parsers, the declaration
1875	of the parser's state variable was common (being local variable in
1876	pull parsers, and struct members in push parsers).  This result in
1877	rather poor style in pull parser, with first variable declarations,
1878	and then their initializations.
1879
1880	The initialization is about to differ between push and pull parsers,
1881	so it is no longer worth keeping both cases together.
1882
1883	* data/skeletons/yacc.c (b4_declare_parser_state_variables): Accept an
1884	argument, and when it is set, initialize the variables.
1885	Adjust dependencies.
1886
18872020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1888
1889	yacc.c: style changes in push mode
1890	* data/skeletons/yacc.c: here.
1891
18922020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1893
1894	yacc.c: simplify yypull_parse
1895	Currently yypull_parse takes a yypstate* as argument, and accepts it
1896	to be NULL.  This does not seem to make a lot of sense: rather it is
1897	its callers that should do that.
1898
1899	I believe this is historical: yypull_parse was introduced
1900	first (c3d503425f8014b432601a33b3398446d63b5963), with yyparse being a
1901	macro.  So yyparse could hardly deal with memory allocation properly.
1902	In 7172e23e8ffb95b8cafee24c4f36c46ca709507f that yyparse was turned
1903	into a genuine function.  At that point, it should have allocated its
1904	own yypstate*, which would have left yypull_parse deal with only one
1905	single non-null ypstate* argument.
1906
1907	Fortunately, it is nowhere documented that it is valid to pass NULL to
1908	yypull_parse.  It is now forbidden.
1909
1910	* data/skeletons/yacc.c (yypull_parse): Don't allocate a yypstate.
1911	Needs a location to issue the error message.
1912	(yyparse): Allocate the yypstate.
1913
19142020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1915
1916	doc: tidy the text files
1917	* etc/README: Rename/reformat as...
1918	* etc/README.md: this.
1919	And ship it.
1920
19212020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1922
1923	bench: simplify the `rand` target
1924	* etc/bench.pl.in: There is no need to recompile the bench cases
1925	themselves.
1926
19272020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1928
1929	bench: make it easy to edit the generated files
1930	* etc/bench.pl.in (&compile): Generate rules that compile the
1931	generated files independently of the source files.
1932
19332020-06-29  Akim Demaille  <akim.demaille@gmail.com>
1934
1935	tests: don't use $VERBOSE
1936	It is used by the test suite itself, which results in this test
1937	failing.
1938
1939	* tests/c++.at: Use $DEBUG, not $VERBOSE.
1940
19412020-06-28  Akim Demaille  <akim.demaille@gmail.com>
1942
1943	doc: overhaul of the readmes
1944	* README-hacking.md (Working from the Repository): Make it first to
1945	make it easier to find the instructions to build from the repo.
1946	(Implementation Notes): New.
1947	* README: Provide more links.
1948
19492020-06-28  Akim Demaille  <akim.demaille@gmail.com>
1950
1951	java: rename package as api.package
1952	* data/skeletons/lalr1.java: here.
1953	* doc/bison.texi: Update.
1954	* src/muscle-tab.c: Ensure backward compat.
1955	* tests/java.at: Check it.
1956
19572020-06-28  Akim Demaille  <akim.demaille@gmail.com>
1958
1959	style: shift/reduce, not shift-reduce
1960	* src/reader.c: here.
1961
19622020-06-27  Akim Demaille  <akim.demaille@gmail.com>
1963
1964	style: rename endtoken as eoftoken
1965	* src/symtab.h, src/symtab.c (endtoken): Rename as...
1966	(eoftoken): this.
1967	Adjust dependencies.
1968
19692020-06-27  Akim Demaille  <akim.demaille@gmail.com>
1970
1971	news: fixes
1972	Reported by Jacob L. Mandelson.
1973
1974	* NEWS: here.
1975
19762020-06-27  Akim Demaille  <akim.demaille@gmail.com>
1977
1978	style: use 'nonterminal' consistently
1979	* doc/bison.texi: Formatting changes.
1980	* src/gram.h, src/gram.c (nvars): Rename as...
1981	(nnterms): this.
1982	Adjust dependencies.
1983	(section): New.  Use it.
1984	Replace "non terminal" and "non-terminal" by "nonterminal".
1985
19862020-06-27  Akim Demaille  <akim.demaille@gmail.com>
1987
1988	doc: parse.assert in C++ requires RTTI
1989	* doc/bison.texi (%define Summary): Say it.
1990
19912020-06-27  Akim Demaille  <akim.demaille@gmail.com>
1992
1993	c++: by default, use const std::string for file names
1994	Reported by Martin Blais and Yuriy Solodkyy.
1995	https://lists.gnu.org/r/help-bison/2020-05/msg00011.html
1996	https://lists.gnu.org/r/bug-bison/2020-06/msg00038.html
1997
1998	While at it, modernize filename_type as api.filename.type and document
1999	it properly.
2000
2001	* data/skeletons/c++.m4 (filename_type): Rename as...
2002	(api.filename.type): this.
2003	Default to const std::string.
2004	* data/skeletons/location.cc (position, location): Expose the
2005	filename_type type.
2006	Use api.filename.type.
2007	* doc/bison.texi (%define Summary): Document api.filename.type.
2008	(C++ Location Values): Document position::filename_type.
2009	* src/muscle-tab.c (muscle_percent_variable_update): Ensure backward
2010	compatibility.
2011	* tests/c++.at: Check that using const file names is ok.
2012	tests/input.at: Check backward compat.
2013
20142020-06-27  Akim Demaille  <akim.demaille@gmail.com>
2015
2016	ielr: fix crash on memory management
2017	Reported by Dwight Guth.
2018	https://lists.gnu.org/r/bug-bison/2020-06/msg00037.html
2019
2020	* src/AnnotationList.c (AnnotationList__computePredecessorAnnotations):
2021	Beware that SBITSET__FOR_EACH nests _two_ for-loops, so "break" does
2022	not actually break out of it.
2023	That was the only occurrence in the code.
2024	* src/Sbitset.h (SBITSET__FOR_EACH): Warn passersby.
2025
20262020-06-25  Akim Demaille  <akim.demaille@gmail.com>
2027
2028	style: factor the access to a rule from its items
2029	* src/counterexample.c (item_rule): Move to...
2030	* src/counterexample.h: here.
2031	* src/AnnotationList.c, src/counterexample.c, src/ielr.c: Use it.
2032
20332020-06-25  Akim Demaille  <akim.demaille@gmail.com>
2034
2035	style: clean up nullable
2036	* src/nullable.c: Reduce scopes.
2037	Prefer `r` to `rules_ruleno`, which is truly an ugly name.
2038
20392020-06-25  Akim Demaille  <akim.demaille@gmail.com>
2040
2041	style: clean up ielr
2042	* src/AnnotationList.c, src/ielr.c: Fix include order.
2043	Prefer `res` to `result`.
2044	Reduce scopes.
2045	Be free of the oldish 76 cols limitation when it clutters too much the
2046	code.
2047	Denest when possible (we're starving for horizontal width).
2048
20492020-06-23  Akim Demaille  <akim.demaille@gmail.com>
2050
2051	don't use strlen to compute visual width
2052	* src/output.c (prepare_symbol_names): Use mbswidth.
2053
20542020-06-23  Akim Demaille  <akim.demaille@gmail.com>
2055
2056	doc: use dot/'•' rather than point/'.'
2057	AFAICT, "dotted rule" is a more frequent synonym of "item" than
2058	"pointed rule".  So let's migrate to using "dot" only.
2059
2060	* doc/bison.texi: Use dot/'•' rather than point/'.'.
2061
2062	* src/print-xml.c (print_core): Use dot rather than point.  This is
2063	not backward compatible, but AFAICT, we don't have actual user of the
2064	XML output (but ourselves).  So...
2065	* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl,
2066	* data/xslt/xml2xhtml.xsl, tests/report.at: ... adjust.
2067
20682020-06-23  Akim Demaille  <akim.demaille@gmail.com>
2069
2070	cex: display all the S/R conflicts, not just one per (state, rule)
2071	Before this commit, on
2072
2073	    %%
2074	    exp
2075	    : "if" exp "then" exp
2076	    | "if" exp "then" exp "else" exp
2077	    | exp "+" exp
2078	    | "num"
2079
2080	we used to not display the third counterexample below:
2081
2082	    Shift/reduce conflict on token "+":
2083	      Example              exp "+" exp . "+" exp
2084	      First derivation     exp ::=[ exp ::=[ exp "+" exp . ] "+" exp ]
2085	      Second derivation    exp ::=[ exp "+" exp ::=[ exp . "+" exp ] ]
2086
2087	    Shift/reduce conflict on token "else":
2088	      Example              "if" exp "then" "if" exp "then" exp . "else" exp
2089	      First derivation     exp ::=[ "if" exp "then" exp ::=[ "if" exp "then" exp . ] "else" exp ]
2090	      Second derivation    exp ::=[ "if" exp "then" exp ::=[ "if" exp "then" exp . "else" exp ] ]
2091
2092	    Shift/reduce conflict on token "+":
2093	      Example              "if" exp "then" exp . "+" exp
2094	      First derivation     exp ::=[ exp ::=[ "if" exp "then" exp . ] "+" exp ]
2095	      Second derivation    exp ::=[ "if" exp "then" exp ::=[ exp . "+" exp ] ]
2096
2097	    Shift/reduce conflict on token "+":
2098	      Example              "if" exp "then" exp "else" exp . "+" exp
2099	      First derivation     exp ::=[ exp ::=[ "if" exp "then" exp "else" exp . ] "+" exp ]
2100	      Second derivation    exp ::=[ "if" exp "then" exp "else" exp ::=[ exp . "+" exp ] ]
2101
2102	* src/counterexample.c (counterexample_report_state): Don't stop of
2103	the first conflicts.
2104	* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
2105	* tests/report.at: Adjust.
2106
21072020-06-22  Akim Demaille  <akim.demaille@gmail.com>
2108
2109	cex: don't display twice unifying examples if there is no color
2110	It makes no sense, and is actually confusing, to display twice the
2111	same example with no visible difference.
2112
2113	* src/complain.h, src/complain.c (is_styled): New.
2114	* src/counterexample.c (print_counterexample): Display the unified
2115	example a second time only if it makes a difference.
2116	* tests/conflicts.at, tests/counterexample.at, tests/report.at: Adjust.
2117	* tests/diagnostics.at: Make sure we do display the unifying examples
2118	twice when colors are enabled.  And check those colors.
2119
21202020-06-22  Vincent Imbimbo  <vmi6@cornell.edu>
2121
2122	cex: fix reporting of null nonterminals
2123	I implemented this to print A ::= [ ], but A ::= [ %empty ] might be
2124	clearer.
2125
2126	* src/parse-simulation.c (nullable_closure): Don't generate null
2127	nonterminal derivations as leaves.
2128	* src/derivation.c (derivation_print_impl): Don't print seperator
2129	spaces for null nonterminal.
2130	* tests/counterexample.at: Update test results.
2131
21322020-06-22  Akim Demaille  <akim.demaille@gmail.com>
2133
2134	cex: use the bullet in HTML
2135	* data/xslt/xml2xhtml.xsl: here.
2136
21372020-06-19  Akim Demaille  <akim.demaille@gmail.com>
2138
2139	cex: style changes
2140	* src/counterexample.c: Simplify a bit.
2141	* src/parse-simulation.c, src/parse-simulation.h: Enforce coding style.
2142
21432020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2144
2145	c++: get rid of global_tokens_and_yystype
2146	This was a hack to make it easier for people to migrate from yacc.c to
2147	lalr1.cc and from glr.c to glr.cc: when set, YYSTYPE and YYLTYPE were
2148	`#defined`.  It was never documented (just mentioned in NEWS for Bison
2149	2.2, 2006-05-19), but was used to simplify the test suite.  Stop that:
2150	adjust the test suite to the skeletons, not the converse.
2151
2152	In C++ use yy::parser::semantic_type, yy::parser::location_type, and
2153	yy::parser::token::MY_TOKEN, instead of YYSTYPE, YYLTYPE and MY_TOKEN.
2154
2155	* data/skeletons/glr.cc, data/skeletons/lalr1.cc: Remove its support.
2156	* tests/actions.at, tests/c++.at, tests/calc.at: Adjust.
2157
21582020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2159
2160	cex: don't assume the terminal supports "•"
2161	Use of print_unicode_char suggested by Bruno Haible.
2162	https://lists.gnu.org/r/bug-gettext/2020-06/msg00012.html
2163
2164	* src/gram.h (print_dot_fallback, print_dot): New.
2165	* src/gram.c, src/derivation.c: Use it.
2166	* tests/counterexample.at, tests/report.at: Adjust the test suite.
2167	* .travis.yml, README-hacking.md: Adjust.
2168
21692020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2170
2171	cex: also include in the report on --report=counterexamples
2172	And let --report=all include the counterexamples.
2173
2174	* src/getargs.h, src/getargs.c (report_cex): New.
2175	* src/main.c: Compute counterexamples when -rcex is specified.
2176	* src/print.c: Include the counterexamples when -rcex is specified.
2177
2178	* tests/conflicts.at, tests/existing.at, tests/local.at: Adjust.
2179
21802020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2181
2182	cex: also include the counterexamples in the report
2183	The report is the best place to show the details about
2184	counterexamples, since we have the state right under the nose.
2185
2186	For instance:
2187
2188	State 7
2189
2190	    1 exp: exp . "⊕" exp
2191	    2    | exp . "+" exp
2192	    2    | exp "+" exp .  [$end, "+", "⊕"]
2193	    3    | exp . "+" exp
2194	    3    | exp "+" exp .  [$end, "+", "⊕"]
2195
2196	    "⊕"  shift, and go to state 6
2197
2198	    $end      reduce using rule 2 (exp)
2199	    $end      [reduce using rule 3 (exp)]
2200	    "+"       reduce using rule 2 (exp)
2201	    "+"       [reduce using rule 3 (exp)]
2202	    "⊕"       [reduce using rule 2 (exp)]
2203	    "⊕"       [reduce using rule 3 (exp)]
2204	    $default  reduce using rule 2 (exp)
2205
2206	    Conflict between rule 2 and token "+" resolved as reduce (%left "+").
2207
2208	    Shift/reduce conflict on token "⊕":
2209	        2 exp: exp "+" exp .
2210	        1 exp: exp . "⊕" exp
2211	      Example                  exp "+" exp • "⊕" exp
2212	      First derivation         exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
2213	      Example                  exp "+" exp • "⊕" exp
2214	      Second derivation        exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]
2215
2216	    Reduce/reduce conflict on tokens $end, "+", "⊕":
2217	        2 exp: exp "+" exp .
2218	        3 exp: exp "+" exp .
2219	      Example                  exp "+" exp •
2220	      First derivation         exp ::=[ exp "+" exp • ]
2221	      Example                  exp "+" exp •
2222	      Second derivation        exp ::=[ exp "+" exp • ]
2223
2224	    Shift/reduce conflict on token "⊕":
2225	        3 exp: exp "+" exp .
2226	        1 exp: exp . "⊕" exp
2227	      Example                  exp "+" exp • "⊕" exp
2228	      First derivation         exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
2229	      Example                  exp "+" exp • "⊕" exp
2230	      Second derivation        exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]
2231
2232	* src/conflicts.h, src/conflicts.c (has_conflicts): New.
2233	* src/counterexample.h, src/counterexample.c (print_counterexample):
2234	Add a `prefix` argument.
2235	(counterexample_report_shift_reduce)
2236	(counterexample_report_reduce_reduce): Show the items when there's a
2237	prefix.
2238	* src/state-item.h, src/state-item.c (print_state_item):
2239	Add a `prefix` argument.
2240	* src/derivation.h, src/derivation.c (derivation_print)
2241	(derivation_print_leaves): Add a prefix argument.
2242	* src/print.c (print_state): When -Wcex is enabled, show the
2243	conflicts.
2244	* tests/report.at: Adjust.
2245
22462020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2247
2248	cex: indent the diagnostics to highlight the structure
2249	Instead of
2250
2251	    Shift/reduce conflict on token D:
2252	    Example              A a • D
2253	    First derivation     s ::=[ A a a ::=[ b ::=[ c ::=[ • ] ] ] d ::=[ D ] ]
2254	    Example              A a • D
2255	    Second derivation    s ::=[ A a d ::=[ • D ] ]
2256
2257	display
2258
2259	    Shift/reduce conflict on token D:
2260	      Example              A a • D
2261	      First derivation     s ::=[ A a a ::=[ b ::=[ c ::=[ • ] ] ] d ::=[ D ] ]
2262	      Example              A a • D
2263	      Second derivation    s ::=[ A a d ::=[ • D ] ]
2264
2265	* src/counterexample.c (print_counterexample): Indent.
2266	* tests/counterexample.at: Adjust.
2267
22682020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2269
2270	cex: don't report the items
2271	Showing the items (with the state numbers) is really something we
2272	should restrict to the report.
2273
2274	* src/counterexample.c (counterexample_report_shift_reduce)
2275	(counterexample_report_reduce_reduce): Don't show the pointed rules,
2276	we will do that in the report.
2277	* tests/counterexample.at: Adjust.
2278
22792020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2280
2281	cex: make sure traces go to stderr
2282	* src/parse-simulation.h, src/parse-simulation.c (print_parse_state):
2283	here.
2284
22852020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2286
2287	cex: add an argument to the reporting functions to specify the stream
2288	* src/conflicts.c (find_state_item_number, report_state_counterexamples):
2289	Move to...
2290	* src/counterexample.h, src/counterexample.c (find_state_item_number)
2291	(counterexample_report_state): this.
2292	Add support for `out` as an argument.
2293	(counterexample_report_reduce_reduce, counterexample_report_shift_reduce):
2294	Accept an `out` argument, and be static.
2295
22962020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2297
2298	style: more uses of const
2299	* src/print.c, src/state.h, src/state.c: here.
2300
23012020-06-16  Akim Demaille  <akim.demaille@gmail.com>
2302
2303	Merge 'maint'
2304	* upstream/maint:
2305	  maint: post-release administrivia
2306	  version 3.6.4
2307	  glr.cc: don't leak glr.c/glr.cc scaffolding to the user
2308
2309	Some fixes were needed to adjust to recent changes in glr.cc and
2310	glr.c.
2311
2312	* data/skeletons/glr.cc: Stop messing with the user's epilogue to
2313	insert glr.cc code.  We need that code to be inserted _before_ the
2314	user's epilogue, not after.  So define b4_glr_cc_pre_epilogue.
2315	* data/skeletons/glr.c: Use it.
2316
23172020-06-15  Akim Demaille  <akim.demaille@gmail.com>
2318
2319	maint: post-release administrivia
2320	* NEWS: Add header line for next release.
2321	* .prev-version: Record previous version.
2322	* cfg.mk (old_NEWS_hash): Auto-update.
2323
23242020-06-15  Akim Demaille  <akim.demaille@gmail.com>
2325
2326	version 3.6.4
2327	* NEWS: Record release date.
2328
23292020-06-15  Akim Demaille  <akim.demaille@gmail.com>
2330
2331	glr.cc: don't leak glr.c/glr.cc scaffolding to the user
2332	Until we have a decent reimplementation of glr.cc, we have to use
2333	tricks to shoehorn C++ symbols to the C engine of glr.c.  Some of them
2334	are done via #define.  Unfortunately in Bison 3.6 some of these we
2335	done in the header file, which broke valid user code.
2336
2337	Reported by Egor Pugin.
2338	https://lists.gnu.org/r/bug-bison/2020-06/msg00003.html
2339
2340	* data/skeletons/glr.cc: Stop playing tricks with b4_pre_epilogue.
2341	(b4_glr_cc_setup, b4_glr_cc_cleanup): New.
2342	Much cleaner way to instal glr.cc's scaffolding around glr.c.
2343	* data/skeletons/glr.c: Adjust to use them.
2344
23452020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2346
2347	reports: the column width differs from the byte count
2348	From
2349
2350	    "number"          shift, and go to state 1
2351	    "Ñùṃéℝô"  shift, and go to state 2
2352
2353	to
2354
2355	    "number"  shift, and go to state 1
2356	    "Ñùṃéℝô"  shift, and go to state 2
2357
2358	* src/print.c: Use mbswidth, not strlen, to compute visual columns.
2359	* tests/report.at: Adjust.
2360
23612020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2362
2363	reports: don't escape the labels
2364	Currently we use "quotearg" to escape the strings output in Dot.  As a
2365	result, if the user's locale is C for instance, all the non-ASCII are
2366	escaped.  Unfortunately graphviz does not interpret this style of
2367	escaping.
2368
2369	For instance:
2370
2371	    5 -> 2 [style=solid label="\"\303\221\303\271\341\271\203\303\251\342\204\235\303\264\""]
2372
2373	was displayed as a sequence of numbers.  We now output:
2374
2375	    5 -> 2 [style=solid label="\"Ñùṃéℝô\""]
2376
2377	independently of the user's locale.
2378
2379	* src/system.h (obstack_backslash): New.
2380	* src/graphviz.h, src/graphviz.c (escape): Remove, use
2381	obstack_backslash instead.
2382	* src/print-graph.c: Likewise.
2383	* tests/report.at: Adjust.
2384
23852020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2386
2387	regen
2388
23892020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2390
2391	parser: keep string aliases as the user wrote it
2392	Currently our scanner decodes all the escapes in the strings, and we
2393	later reescape the strings when we emit them.
2394
2395	This is troublesome, as we do not respect the user input.  For
2396	instance, when the user writes in UTF-8, we destroy her string when we
2397	write it back.  And this shows everywhere: in the reports we show the
2398	escaped string instead of the actual alias:
2399
2400	    0 $accept: . exp $end
2401	    1 exp: . exp "\342\212\225" exp
2402	    2    | . exp "+" exp
2403	    3    | . exp "+" exp
2404	    4    | . "number"
2405	    5    | . "\303\221\303\271\341\271\203\303\251\342\204\235\303\264"
2406
2407	    "number"                                                    shift, and go to state 1
2408	    "\303\221\303\271\341\271\203\303\251\342\204\235\303\264"  shift, and go to state 2
2409
2410	This commit preserves the user's exact spelling of the string aliases,
2411	instead of interpreting the escapes and then reescaping.  The report
2412	now shows:
2413
2414	    0 $accept: . exp $end
2415	    1 exp: . exp "⊕" exp
2416	    2    | . exp "+" exp
2417	    3    | . exp "+" exp
2418	    4    | . "number"
2419	    5    | . "Ñùṃéℝô"
2420
2421	    "number"          shift, and go to state 1
2422	    "Ñùṃéℝô"  shift, and go to state 2
2423
2424	Likewise, the XML (and therefore HTML) outputs are fixed.
2425
2426	* src/scan-gram.l (STRING, TSTRING): Do not interpret the escapes in
2427	the resulting string.
2428	* src/parse-gram.y (unquote, parser_init, parser_free, unquote_free)
2429	(handle_defines, handle_language, obstack_for_unquote): New.
2430	Use them to unquote where needed.
2431	* tests/regression.at, tests/report.at: Update.
2432
24332020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2434
2435	tests: check reports with conflicts and UTF-8
2436	This is to record the current state of the report, which escapes the
2437	UTF-8 characters (as parse.error="verbose" does), but shouldn't (as
2438	parse.error="detailed" does).
2439
2440	* tests/report.at: here.
2441
24422020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2443
2444	style: factor common bits about string scanning
2445	* src/scan-gram.l: here.
2446
24472020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2448
2449	style: introduce & use STRING_1GROW
2450	* src/flex-scanner.h (STRING_1GROW): New.
2451	* src/scan-gram.l, src/scan-skel.l: Use it.
2452
24532020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2454
2455	style: reduce scopes
2456	* src/scan-gram.l (STRING_GROW_ESCAPE): Move the static_assert about
2457	type sizes here.
2458
24592020-06-13  Akim Demaille  <akim.demaille@gmail.com>
2460
2461	style: prefer 'FOO ()' to 'FOO' for function-like macros
2462	* src/flex-scanner.h (STRING_GROW, STRING_FINISH, STRING_FREE):
2463	Make them function-like macros.
2464	Adjust dependencies.
2465
24662020-06-11  Akim Demaille  <akim.demaille@gmail.com>
2467
2468	regen
2469
24702020-06-10  Akim Demaille  <akim.demaille@gmail.com>
2471
2472	cex: suggest -Wcounterexamples when there are unexpected conflicts
2473	Suggesting -Wcounterexamples when there are conflicts is probably not
2474	what the user wants.  If she knows her conflicts and has set
2475	%expect/%expect-rr appropriately, we shouldn't warn.
2476
2477	The commit also swaps the counterexamples and the report of conflicts,
2478	into, IMHO, a more natural order: from
2479
2480	    Shift/reduce conflict on token B:
2481	    1:    3 a: A .
2482	    1:    8 y: A . B
2483	    Example              A • B C
2484	    First derivation     s ::=[ a ::=[ A • ] x ::=[ B C ] ]
2485	    Example              A • B C
2486	    Second derivation    s ::=[ y ::=[ A • B ] c ::=[ C ] ]
2487
2488	    input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
2489	    input.y:4.4: warning: rule useless in parser due to conflicts [-Wother]
2490
2491	to
2492
2493	    input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
2494	    Shift/reduce conflict on token B:
2495	    1:    3 a: A .
2496	    1:    8 y: A . B
2497	    Example              A • B C
2498	    First derivation     s ::=[ a ::=[ A • ] x ::=[ B C ] ]
2499	    Example              A • B C
2500	    Second derivation    s ::=[ y ::=[ A • B ] c ::=[ C ] ]
2501
2502	    input.y:4.4: warning: rule useless in parser due to conflicts [-Wother]
2503
2504	* src/conflicts.c (rule_conflicts_print): Rename as...
2505	(report_rule_expectation_mismatches): this.
2506	Move the handling of report_counterexamples to...
2507	(conflicts_print): Here.
2508	Display this warning when applicable.
2509
25102020-06-10  Akim Demaille  <akim.demaille@gmail.com>
2511
2512	cex: rename -Wcounterexample as -Wcounterexamples, and support -Wcex
2513	Plural vs. singular is always a problem...
2514
2515	But we already have conflicts-sr and conflicts-rr, so counterexamples
2516	makes more sense than counterexample.  Besides, -Wcounterexample will
2517	still be accepted as an unambiguous prefix of -Wcounterexamples.
2518
2519	Add -Wcex as a convenient alias.
2520
2521	While at it, use only "counterexample", never "counter example".
2522
2523	* src/complain.h, src/complain.c
2524	(Wcounterexample, warning_counterexample): Rename as...
2525	(Wcounterexamples, warning_counterexamples): these.
2526	(argmatch_warning_docs): Rename -Wcounterexample as -Wcounterexamples.
2527	(argmatch_warning_args): Likewise.
2528	Add support for -Wcex.
2529	Adjust dependencies.
2530
25312020-06-09  Akim Demaille  <akim.demaille@gmail.com>
2532
2533	api.header.include: document it, and fix its default value
2534	While defining api.header.include worked as expected, its default
2535	value was incorrectly defined.  As a result, by default, the generated
2536	parsers still duplicated the content of the generated header instead
2537	of including it.
2538
2539	* data/skeletons/yacc.c (api.header.include): Fix its default value.
2540	* tests/output.at: Check it.
2541	* doc/bison.texi (%define Summary): Document api.header.include.
2542	While at it, move the definition of api.namespace at the proper
2543	place.
2544
25452020-06-07  Akim Demaille  <akim.demaille@gmail.com>
2546
2547	cex: color the counterexamples
2548	Use colors to show the counterexamples and the derivations in color,
2549	to highlight their structure.  Align the outputs, and add i18n
2550	support. Reduce width by using a one-space separator instead of
2551	two-space.
2552
2553	From
2554
2555	    Example  A  •  B  C
2556	    First  derivation  s ::=[ a ::=[ A  • ]  x ::=[ B  C ] ]
2557	    Second derivation  s ::=[ y ::=[ A  •  B ]  c ::=[ C ] ]
2558
2559	to
2560
2561	    Example              A • B C
2562	    First derivation     s ::=[ a ::=[ A • ] x ::=[ B C ] ]
2563	    Example              A • B C
2564	    Second derivation    s ::=[ y ::=[ A • B ] c ::=[ C ] ]
2565
2566	with colors.
2567
2568	* data/bison-default.css (cex-dot, cex-0, cex-1, cex-2, cex-3, cex-4)
2569	(cex-5, cex-6, cex-7, cex-step, cex-leaf): New.
2570	* src/derivation.c (derivation_print_styled_impl): New.
2571	(derivation_print, derivation_print_leaves): Use it.
2572	* src/counterexample.c: Reformat the output.
2573	* tests/counterexample.at: Adjust.
2574
25752020-06-07  Akim Demaille  <akim.demaille@gmail.com>
2576
2577	cex: enforce case for tokens/nonterminals
2578	It's unfortunate that the traditions between formal language theory
2579	and Yacc differs, but here, tokens should be upper case, and
2580	nonterminals should be lower case.
2581
2582	* tests/counterexample.at: Comply with this.
2583
25842020-06-07  Akim Demaille  <akim.demaille@gmail.com>
2585
2586	cex: reformat the s/r and r/r reports
2587	In Bison we refer to "shift/reduce" conflicts, not "shift-reduce" (in
2588	Bison 3.6.3 186 occurrences vs 15).  Enforce consistency on this.
2589
2590	Instead of "spending" a second line for each conflict to report the
2591	lookaheads, put that on the same line as the type of conflict.  Also,
2592	prefer "token" to "symbol".  Maybe we should even prefer "lookahead".
2593	While at it, enable internationalization, with plurals where
2594	appropriate.
2595
2596	As a consequence, instead of
2597
2598	    Shift-Reduce Conflict:
2599	    6:    3 b: . %empty
2600	    6:    6 d: c . A
2601	    On Symbol: A
2602
2603	display
2604
2605	    Shift/reduce conflict on token A:
2606	    6:    3 b: . %empty
2607	    6:    6 d: c . A
2608
2609	* NEWS, doc/bison.texi, src/conflicts.c: Spell it "shift/reduce", not
2610	"shift-reduce".
2611	* src/counterexample.c (counterexample_report_shift_reduce)
2612	(counterexample_report_reduce_reduce): Reformat and internationalize
2613	output.
2614	* tests/counterexample.at: Adjust expectations.
2615
26162020-06-07  Akim Demaille  <akim.demaille@gmail.com>
2617
2618	style: fix syntax-check issues
2619	* src/counterexample.c, src/files.c, src/files.h, src/lssi.c,
2620	* src/state-item.c: here.
2621
26222020-06-07  Akim Demaille  <akim.demaille@gmail.com>
2623
2624	all: show the rules in comments before the user actions
2625	For instance, in the case of Bison's own parser:
2626
2627	    -  case 40:
2628	    +  case 40:  /* grammar_declaration: "%code" "identifier" "{...}"  */
2629	         {
2630	           muscle_percent_code_grow ((yyvsp[-1].ID), (yylsp[-1]),
2631	                                     translate_code_braceless ((yyvsp[0].BRACED_CODE), (yylsp[0])),
2632	                                     (yylsp[0]));
2633	           code_scanner_last_string_free ();
2634	         }
2635	         break;
2636
2637	* data/skeletons/c.m4: Modified.
2638	* data/skeletons/d.m4: Modified.
2639	* data/skeletons/java.m4: Modified.
2640	* src/output.c (output_escaped): New.
2641	(quoted_output): Use it, and rename as...
2642	(output_quoted): this.
2643	Adjust dependencies.
2644	(rule_output): New.
2645	(user_actions_output): Use it.
2646	* data/skeletons/c.m4, data/skeletons/d.m4, data/skeletons/java.m4
2647	(b4_case): Add support for $3, an optional comment.
2648
26492020-06-06  Akim Demaille  <akim.demaille@gmail.com>
2650
2651	CI: use GCC10 on ppc too
2652	We were still using GCC9, because GCC10 was failing.
2653
2654	* .travis.yml (PPC64le): Use GCC10.
2655	While at it, use -O2 instead of -O3: it's certainly nicer for the
2656	CPUs, and allows to test different sets of compiler flags (we use -O3
2657	in several other configurations).
2658
26592020-06-06  Akim Demaille  <akim.demaille@gmail.com>
2660
2661	examples: fix missing includes
2662	* examples/c/bistromathic/parse.y: Use abort rather than assert so
2663	that the "unused result" warning is silenced even with -DNDEBUG.
2664
26652020-06-03  Akim Demaille  <akim.demaille@gmail.com>
2666
2667	warnings: fix -Wmissing-prototypes issues
2668	* src/counterexample.c, src/lssi.c, src/parse-simulation.c,
2669	* src/state-item.c:
2670	Here.
2671
26722020-06-03  Akim Demaille  <akim.demaille@gmail.com>
2673
2674	Merge maint into HEAD
2675	* upstream/maint:
2676	  maint: post-release administrivia
2677	  version 3.6.3
2678	  build: check -Wmissing-prototypes
2679	  tests: show logs
2680	  c++: fix printing of state number on streams
2681
26822020-06-03  Akim Demaille  <akim.demaille@gmail.com>
2683
2684	maint: post-release administrivia
2685	* NEWS: Add header line for next release.
2686	* .prev-version: Record previous version.
2687	* cfg.mk (old_NEWS_hash): Auto-update.
2688
26892020-06-03  Akim Demaille  <akim.demaille@gmail.com>
2690
2691	version 3.6.3
2692	* NEWS: Record release date.
2693
26942020-06-01  Akim Demaille  <akim.demaille@gmail.com>
2695
2696	build: check -Wstrict-aliasing
2697	* configure.ac (warn_common): Add -Wstrict-aliasing.
2698
26992020-06-01  Akim Demaille  <akim.demaille@gmail.com>
2700
2701	doc: using asan
2702	* README-hacking.md: here.
2703
27042020-06-01  Akim Demaille  <akim.demaille@gmail.com>
2705
2706	style: fix includes
2707	* src/fixits.c: Follow our usual pattern.
2708	* src/scan-code.l, src/scan-gram.l, src/scan-skel.l: Prefer "" to
2709	include src/ headers.
2710	* README-hacking.md: Document the pattern.
2711
27122020-06-01  Akim Demaille  <akim.demaille@gmail.com>
2713
2714	lists: fix various issues with the use of gnulib's list
2715	First, we should avoid code such as
2716
2717	    gl_list_iterator_t it = gl_list_iterator (deriv->children);
2718	    derivation *child = NULL;
2719	    while (gl_list_iterator_next (&it, (const void **) &child, NULL))
2720	      {
2721	        derivation_print (child, f);
2722
2723	because of -Wstrict-aliasing (whose job is to catch type-punning
2724	issues).  See https://lists.gnu.org/r/bug-bison/2020-05/msg00039.html.
2725
2726	Rather we need
2727
2728	    gl_list_iterator_t it = gl_list_iterator (deriv->children);
2729	    const void **p = NULL;
2730	    while (gl_list_iterator_next (&it, &p, NULL))
2731	      {
2732	        derivation *child = (derivation *) p;
2733	        derivation_print (child, f);
2734
2735	Second, list iterators actually have destructors.  Even though they
2736	are noop in the case of linked-lists, we should use them.
2737
2738	Let's address both issues with typed wrappers (such as
2739	derivation_list_next) that take care of both issues, and besides allow
2740	to scope the iterators within the loop:
2741
2742	    derivation *child;
2743	    for (gl_list_iterator_t it = gl_list_iterator (deriv->children);
2744	         derivation_list_next (&it, &child);
2745	         )
2746	      {
2747	        derivation_print (child, f);
2748
2749	* src/derivation.h, src/derivation.c (derivation_list_next): New.
2750	Use it where appropriate.
2751	* src/counterexample.c (search_state_list_next): New.
2752	Use it where appropriate.
2753	* src/parse-simulation.h, src/parse-simulation.c
2754	* src/state-item.h (state_item_list_next): New.
2755	Use it where appropriate.
2756
27572020-06-01  Akim Demaille  <akim.demaille@gmail.com>
2758
2759	build: check -Wmissing-prototypes
2760	pstate_clear is lacking a prototype.
2761	Reported by Ryan
2762	https://lists.gnu.org/r/bug-bison/2020-05/msg00101.html
2763
2764	Besides, none of the C examples were compiled with the warning flags.
2765
2766	* configure.ac (warn_c): Add -Wmissing-prototypes.
2767	* data/skeletons/yacc.c (pstate_clear): Make it static.
2768	* examples/local.mk (TEST_CFLAGS): New.
2769	* examples/c/bistromathic/local.mk, examples/c/calc/local.mk,
2770	* examples/c/lexcalc/local.mk, examples/c/mfcalc/local.mk,
2771	* examples/c/pushcalc/local.mk, examples/c/reccalc/local.mk,
2772	* examples/c/rpcalc/local.mk:
2773	Use it.
2774
2775	GCC's warn_unused_result is not silenced by a cast to void, so we have
2776	to "use" scanf's result.
2777	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
2778	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
2779
2780	Flex generated code produces too many warnings, including things such
2781	as, with ICC:
2782
2783	    examples/c/lexcalc/scan.c(1088): error #1682: implicit conversion
2784	              of a 64-bit integral type to a smaller integral type (potential portability problem)
2785	    2259                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2786	    2260                ^
2787	    2261
2788	    2262
2789
2790	I am tired of trying to fix Flex's output.  The project does not seem
2791	maintained.  We ought to avoid it.  So, for the time being, don't try
2792	to enable warnings with Flex.
2793
2794	* examples/c/bistromathic/parse.y, examples/c/reccalc/scan.l: Fix
2795	warnings.
2796	* doc/bison.texi: Discard scanf's return value to defeat
2797	-Werror=unused-result.
2798
27992020-05-31  Akim Demaille  <akim.demaille@gmail.com>
2800
2801	gnulib: update
2802
28032020-05-25  Akim Demaille  <akim.demaille@gmail.com>
2804
2805	style: make item_index a truly different type from item_number
2806	See previous commit.
2807
2808	* src/gram.h (item_index): Make it unsigned.
2809	Fix remaiming issues.
2810
28112020-05-25  Vincent Imbimbo  <vmi6@cornell.edu>
2812
2813	style: decouple different uses of item_number
2814	item_number is used for elements of ritem as well as indices into
2815	ritem which is fairly confusing.  Introduce item_index to represent
2816	indices into ritem.
2817
2818	* src/gram.h (item_index): Introduce it for ritem indices.
2819	* src/closure.h, src/closure.c, src/ielr.c, src/lr0.c,
2820	* src/print-graph.c, src/state.h, src/state.h:
2821	Replace uses of item_number with item_index where appropriate.
2822
28232020-05-24  Joshua Watt  <jpewhacker@gmail.com>
2824
2825	bison: add command line option to map file prefixes
2826	Teaches bison about a new command line option, --file-prefix-map OLD=NEW
2827	(based on the -ffile-prefix-map option from GCC) which causes it to
2828	replace and file path of OLD in the text of the output file with NEW,
2829	mainly for header guards and comments. The primary use of this is to
2830	make builds reproducible with different input paths, and in particular
2831	the debugging information produced when the source code is compiled. For
2832	example, a distro may know that the bison source code will be located at
2833	"/usr/src/bison" and thus can generate bison files that are reproducible
2834	with the following command:
2835
2836	    bison --output=/build/bison/parse.c -d --file-prefix-map=/build/bison/=/usr/src/bison/ parse.y
2837
2838	Importantly, this will change the header guards and #line directives
2839	from:
2840
2841	    #ifndef YY_BUILD_BISON_PARSE_H
2842	    #line 100 "/build/bison/parse.h"
2843
2844	to
2845
2846	    #ifndef YY_USR_SRC_BISON_PARSE_H
2847	    #line 100 "/usr/src/bison/parse.h"
2848
2849	which is reproducible.
2850
2851	See https://lists.gnu.org/r/bison-patches/2020-05/msg00016.html
2852
2853	* src/files.h, src/files.c (spec_mapped_header_file)
2854	(mapped_dir_prefix, map_file_name, add_prefix_map): New.
2855	* src/getargs.c (-M, --file-prefix-map): New option.
2856	* src/output.c (prepare): Define b4_mapped_dir_prefix and
2857	b4_spec_header_file.
2858	* src/scan-skel.l (@ofile@): Output the mapped file name.
2859	* data/skeletons/glr.c, data/skeletons/glr.cc,
2860	* data/skeletons/lalr1.cc, data/skeletons/location.cc,
2861	* data/skeletons/yacc.c:
2862	Adjust.
2863	* doc/bison.texi: Document.
2864	* tests/input.at, tests/output.at: Check.
2865
28662020-05-24  Akim Demaille  <akim.demaille@gmail.com>
2867
2868	tests: fix expectations
2869	Should have been part of 1ec93ca2a2b4718b5d94871475520a2688b4c5c8.
2870
2871	* tests/counterexample.at: here.
2872
28732020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2874
2875	cex: clean the display of conflicted symbols
2876	Instead of `On Symbols: {b,c,}`, display `On Symbols: b, c`.
2877
2878	* src/counterexample.c (counterexample_report_reduce_reduce): We don't
2879	need braces.
2880	Use commas as a separator, not a terminator.
2881	* tests/counterexample.at: Adjust.
2882
28832020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2884
2885	tests: show logs
2886	* examples/c/bistromathic/bistromathic.test, examples/test: here.
2887
28882020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2889
2890	c++: fix printing of state number on streams
2891	Avoid this kind of display:
2892
2893	    LAC: checking lookahead identifier: R4 R3 G^B S5
2894
2895	* data/skeletons/lalr1.cc: Convert state_t to int before printing it.
2896
28972020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2898
2899	c++: fix printing of state number on streams
2900	Avoid this kind of display:
2901
2902	    LAC: checking lookahead identifier: R4 R3 G^B S5
2903
2904	* data/skeletons/lalr1.cc: Convert state_t to int before printing it.
2905
29062020-05-23  Vincent Imbimbo  <vmi6@cornell.edu>
2907
2908	cex: fix pruning crash
2909	Fixes a crash on Cim's grammar.
2910	https://lists.gnu.org/r/bison-patches/2020-05/msg00107.html
2911
2912	* src/state-item.c (prune_disabled_paths): Prune forward and backwards
2913	paths in seperate passes.
2914	(prune_forward, prune_backward): New.
2915	(disable_state_item): Change function argument from state_item_number
2916	to state_item.
2917	(state_items_report): Add disabling to graph print-out.
2918	* src/conflicts.c (find_state_item_number,
2919	report_state_counterexamples): Add SI_DISABLED checks.
2920
29212020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2922
2923	regen
2924
29252020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2926
2927	kinds: use the symbol kinds where applicable
2928	Instead of generating switch statements with numbers, let's use the
2929	symbol kinds.  Not only is this more readable, it also makes reading
2930	diff easier, as a change in symbol numbers won't have such a large
2931	effect on the implementation of symbol actions.
2932
2933	* data/skeletons/bison.m4 (_b4_symbol_case): Use the symbol kind
2934	rather than its number.
2935
29362020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2937
2938	kinds: also define the possibly qualified symbol kinds
2939	* data/skeletons/bison.m4 (b4_symbol_kind): Rename as...
2940	(b4_symbol_kind_base): this.
2941	(b4_symbol_kind): New, for fully qualified kind name.
2942	* data/skeletons/lalr1.cc (b4_symbol_kind): New.
2943	Adjust to use b4_symbol_kind where appropriate.
2944	* src/parse-gram.h, src/parse-gram.c: regen.
2945
29462020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2947
2948	m4: simplify useless quotation
2949	* data/skeletons/bison.m4: The result of b4_symbol is "quoted"
2950	already, no need for m4_expand.
2951
29522020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2953
2954	m4: use m4_shift2 etc.
2955	* data/skeletons/bison.m4 (m4_shift4): New.
2956	Use them where applicable.
2957
29582020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2959
2960	tests: show logs
2961	* examples/c/bistromathic/bistromathic.test, examples/test: here.
2962
29632020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2964
2965	style: spell fixes
2966	* Makefile.am (codespell): New.
2967	* doc/bison.texi: Fixes.
2968	Use @option for options.
2969	* src/lssi.c, src/lssi.h, src/parse-simulation.h, src/state-item.c:
2970	Fix spellos.
2971
29722020-05-23  Akim Demaille  <akim.demaille@gmail.com>
2973
2974	style: rename user_token_number as code
2975	This should have been done in 3.6, but I wanted to avoid introducing
2976	conflicts into Vincent's work on counterexamples.  It turns out it's
2977	completely orthogonal.
2978
2979	* data/README.md, data/skeletons/bison.m4, data/skeletons/c++.m4,
2980	* data/skeletons/c.m4, data/skeletons/glr.c, data/skeletons/java.m4,
2981	* data/skeletons/lalr1.d, data/skeletons/lalr1.java,
2982	* data/skeletons/variant.hh, data/skeletons/yacc.c, src/conflicts.c,
2983	* src/derives.c, src/gram.c, src/gram.h, src/output.c,
2984	* src/parse-gram.c, src/parse-gram.y, src/print-xml.c, src/print.c,
2985	* src/reader.c, src/symtab.c, src/symtab.h, tests/input.at,
2986	* tests/types.at:
2987	s/user_token_number/code/g.
2988	Plus minor changes.
2989
29902020-05-22  Akim Demaille  <akim.demaille@gmail.com>
2991
2992	Merge maint into master
2993	* upstream/maint:
2994	  fix generated comments
2995	  traces: provide a means to get short m4 traces
2996	  traces: show the full m4 invocation
2997
29982020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
2999
3000	cex: replace state-item data structures
3001	* src/state-item.h: Add trans, prods, and revs edges to state-item
3002	struct.
3003	(si_trans, si_revs, si_prods_lookup): Remove.
3004	* src/state-item.c, src/lssi.c, src/parse-simulation.c,
3005	* src/counterexample.c: Update state-item API usage accordingly.
3006
30072020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3008
3009	cex: fix bad reference counting
3010	* src/counterexample.c (si_bfs_free): Fix reference_count
3011	decrementing.
3012
30132020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3014
3015	cex: fix miscellaneous leaks
3016	* src/counterexample.c (unifying_counterexample): Always free
3017	stage3result when it exists.
3018	* src/conflicts.c (report_state_counterexamples): free leaked bitset.
3019	* src/state-item.c (prune_disabled_paths): free leaked queue.
3020
30212020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3022
3023	cex: fix counterexample leak
3024	* src/counterexample.c (free_counterexample): New.
3025	Free counterexamples after printing.
3026
30272020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3028
3029	cex: fix lssi leaks
3030	* src/lssi.c (shortest_path_from_start): Free the root of
3031	shortest_path_from_start search.
3032	Free eligible bitset.
3033
30342020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3035
3036	cex: fix parse state leaks
3037	* src/parse_simulation.c: Fix bug in parse_state_free.
3038	Free new_root when simulate_reduction generates zero states.
3039
3040	* src/parse-simulation.c, src/parse-simulation.h
3041	(parse_state_list, parse_state_list_append): New.
3042	* src/parse-simulation.c, src/parse-simulation.h,
3043	* src/counterexample.c: Replace all uses of lists of parse states and
3044	appends to parse_state_lists with the new API.
3045
30462020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3047
3048	cex: derivation reference counting
3049	* src/derivation.h, src/derivation.c: Make derivation struct opaque.
3050	Add derivation_list type for clarity.
3051	(derivation_list_new): New.
3052	(derivation_list_append): New.
3053	(derivation_list_prepend): New.
3054	(derivation_new_leaf): New constructor for derivations with no
3055	children.
3056	* src/counterexample.c, src/parse-simulation.c,
3057	* src/parse-simulation.h: Replace uses of gl_list_t containing
3058	derivations with derivation_list and its API.
3059	Replace calls of dervation_new using null children with
3060	derivation_new_leaf.
3061	* src/parse-simulation.c: replace ps_chunk and its API with typed
3062	versions si_chunk and deriv_chunk.
3063	* src/parse-simlation.h, src/parse-simulation.c: Remove
3064	parse_state_retain_deriv in favor of derivation reference counting.
3065	* src/counterexample.c: Remove search_state_retain_deriv.
3066
30672020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3068
3069	cex: style changes in parse-simulation
3070	* src/parse-simulation.c: Formatting changes.
3071	(parse_state_list_new): New.
3072	Use it.
3073
30742020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3075
3076	cex: style: prefer res for returned value
3077	* src/lssi.c, src/parse-simulation.c: here.
3078
30792020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3080
3081	cex: fix memory leaks when there are conflicts
3082	* src/counterexample.c (production_step, reduction_step): Release
3083	memory of temporary objects.
3084
30852020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3086
3087	cex: be sure to always reclaim memory put in hashes
3088	One call to hash_initialize did not provide a function to free memory.
3089
3090	* src/state-item.c (hash_pair_table_create): New.
3091	Use it.
3092
30932020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3094
3095	cex: properly reclaim hash's allocated memory
3096	* src/state-item.c: Use hash_free where appropriate.
3097
30982020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3099
3100	cex: avoid gratuitous heap allocations
3101	There's no need to go for the heap when using gnulib's hash module.
3102
3103	* src/state-item.c (hash_pair_lookup, hash_pair_remove,
3104	state_sym_lookup): Use the heap Luke.
3105	That removes a leak from hash_pair_lookup.
3106	(init_prods): Use hash_pair_insert instead of duplicating it.
3107
31082020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3109
3110	cex: fix leaks
3111	* src/state-item.c: Various functions were using heap allocated locals
3112	and not freeing them.
3113
31142020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3115
3116	style: use hash_xinsert
3117	* gnulib: Update to get hash_xinsert.
3118	Use it where appropriate.
3119
31202020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3121
3122	cex: style changes in state-item
3123	* src/state-item.h, src/state-item.c (state_item): Make the state
3124	const.
3125	(state_item_set): Make it clearer that it works in the state_items
3126	global array.
3127
31282020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3129
3130	cex: stylistic changes
3131	* src/counterexample.c: Use 'res' as a variable name for returned
3132	value, as elsewhere.
3133	Avoid uninitialized variables, especially pointers.
3134	Avoid assignment where possible.
3135
31362020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3137
3138	cex: avoid uninitialized variables
3139	* src/counterexample.c (item_rule_bounds): Split into...
3140	(item_rule_start, item_rule_end): these.
3141	Adjust dependencies.
3142	* src/conflicts.c (find_state_item_number): New.
3143	Use it to avoid uninitialized variables.
3144
31452020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3146
3147	cex: isolate missing API from gl_list
3148	* src/counterexample.c (list_get_end): New.
3149	Use it.
3150	Reduce scopes.
3151
31522020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3153
3154	cex: tests: be robust to variations in time limit reports
3155	The CI has "failures" such as (253, "Null nonterminals"):
3156
3157	    @@ -21,7 +21,7 @@
3158	     3:    3 b: . %empty
3159	     3:    4 c: . %empty
3160	     On Symbols: {A,}
3161	    -time limit exceeded: 6.000000
3162	    +time limit exceeded: 11.000000
3163	     First  Example c  •  c  A  A  $end
3164	     First  derivation  $accept ::=[ a ::=[ c  d ::=[ a ::=[ b ::=[ • ]  d ::=[ c  A  A ] ] ] ]  $end ]
3165	     Second Example c  •  A  $end
3166
3167	* tests/counterexample.at (AT_BISON_CHECK_CEX): New.
3168	Use it to neutralize differences in timeout values.
3169
31702020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3171
3172	cex: fix stack overflow
3173	* src/parse-simulation.c: Replace reference counting with
3174	parse_state_retain everywhere.
3175	(free_parse_state): Make this function iterative instead of
3176	recursive. Long parse_state chains were causing stack exhaustion.
3177
3178	* tests/counterexample.at: Fix expectations.
3179
31802020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3181
3182	cex: fix crash from zombie result
3183	Fixes the SEGV in test 247 (counterexample.at:195): "S/R after first
3184	token".
3185
3186	* src/counterexample.c: here.
3187	* tests/counterexample.at: Fix expectations.
3188
31892020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3190
3191	cex: fixes, and enable tests
3192	* src/counterexample.c, src/derivation.c:
3193	Do not output diagnostics on stdout, that's the job of stderr, and the
3194	testsuite heavily depend on this.
3195	Do not leave trailing spaces in the output.
3196	* tests/counterexample.at: Use AT_KEYWORDS.
3197	Specify the expected outputs.
3198	* tests/local.mk: Add counterexample.at.
3199
32002020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3201
3202	cex: fix a crash
3203	* src/state-item.c (init_state_items): If the rule has no reductions
3204	at all, don't read at all in its list of reduced rules.
3205
32062020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3207
3208	cex: add tests
3209	* tests/counterexample.at: New.
3210
32112020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3212
3213	cex: bind counterexample generation
3214	* src/complain.h, src/complain.c: Add support for -Wcounterexample.
3215	* src/conflicts.c (report_counterexamples): New.
3216	(rule_conflicts_print): Use it when -Wcounterexample is given.
3217	* src/getargs.h, src/getargs.c: Add support for --trace=cex.
3218	* src/main.c (main): Init and deinit counterexample generation.
3219
32202020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3221
3222	cex: introduce counterexample search
3223	* src/counterexample.h, src/counterexample.c: New.
3224
32252020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3226
3227	cex: introduce the parse simulator
3228	* src/derivation.h, src/derivation.c,
3229	* src/parse-simulation.h, src/parse-simulation.c: New.
3230
32312020-05-22  Vincent Imbimbo  <vmi6@cornell.edu>
3232
3233	cex: add support for state-item pair graph generation
3234	* src/lssi.h, src/lssi.c, src/state-item.h, src/state-item.c: New.
3235
32362020-05-22  Akim Demaille  <akim.demaille@gmail.com>
3237
3238	cex: add gnulib dependencies
3239	* bootstrap.conf (gnulib_modules): Add linked-list.
3240
32412020-05-21  Akim Demaille  <akim.demaille@gmail.com>
3242
3243	fix generated comments
3244	In Bison 3.6.2, the comments with brackets lose their brackets, for
3245	improper m4 quotation.
3246
3247	* data/skeletons/bison.m4 (b4_gsub): New.
3248	* data/skeletons/c-like.m4 (_b4_comment): Use it.
3249	* tests/m4.at: Check b4_gsub.
3250
32512020-05-21  Akim Demaille  <akim.demaille@gmail.com>
3252
3253	traces: provide a means to get short m4 traces
3254	Let --trace=m4-early dump all the logs from the start (as --trace=m4
3255	used to do), and have --trace=m4 now start traces only when actually
3256	working of the user's grammar.
3257
3258	Can make a big difference in the case of small inputs.  E.g.
3259
3260	    $ bison -S tests/testsuite.dir/001/input.m4 tests/testsuite.dir/001/input.y --trace=m4 |& wc
3261	       3952   19446  251068
3262	    $ bison -S tests/testsuite.dir/001/input.m4 tests/testsuite.dir/001/input.y --trace=m4-early |& wc
3263	      19491  131904 1830495
3264
3265	* data/skeletons/traceon.m4: New.
3266	* src/getargs.h, src/getargs.c: Introduce --trace=m4-early.
3267	* src/output.c (output_skeleton): Adjust for --trace=m4 and --trace=m4-early.
3268
32692020-05-21  Akim Demaille  <akim.demaille@gmail.com>
3270
3271	traces: show the full m4 invocation
3272	Unfortunately the effect of -dV is still position independent.
3273
3274	* src/output.c (output_skeleton): here.
3275
32762020-05-20  Thomas Petazzoni  <thomas.petazzoni@bootlin.com>
3277
3278	src: make path to m4 relocatable
3279	Commit a4ede8f85b0c9a254fcb01e5888cee1983095669 ("package: make bison
3280	a relocatable package") made Bison relocatable, but in fact it still
3281	contains one absolute reference: the M4 variable, which points to the
3282	M4 program. Let's fix that by using relocate(), see if an M4 binary is
3283	available at the relocated location, and otherwise fallback to the
3284	original M4 location.
3285
3286	See https://lists.gnu.org/r/bison-patches/2020-05/msg00078.html,
3287	and https://lists.gnu.org/r/bison-patches/2020-05/msg00087.html.
3288
3289	* src/files.h, src/files.c (m4path): New.
3290	* src/output.c: Use it.
3291
32922020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3293
3294	CI: fix PPC recipe
3295
32962020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3297
3298	Merge branch 'maint'
3299	* upstream/maint:
3300	  maint: post-release administrivia
3301	  version 3.6.2
3302	  tests: improve update-test
3303	  CI: add GCC 10 and Clang 10
3304	  fix: do not emit nested comments
3305	  todo: update
3306	  examples: use markdown hyperlinks
3307	  tests: don't use == to compare const char *...
3308	  gnulib: update
3309
33102020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3311
3312	c: more fixes for _Noreturn
3313	The previous fix was insufficient.
3314
3315	    tests/types.at:366: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o test test.cc $LIBS
3316	    ++ ccache clang++-mp-9.0 -Qunused-arguments -ggdb -Wall -Wextra -Wcast-align -Wchar-subscripts -fparse-all-comments -Wdocumentation -Wformat -Wimplicit-fallthrough -Wnull-dereference -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -Wpointer-arith -Wshadow -Wwrite-strings -Wextra-semi -Wold-style-cast -Wundefined-func-template -Wweak-vtables -Wunreachable-code -Wundef -pedantic -Wconversion -Wdeprecated -Wsign-compare -Wsign-conversion -Wtautological-constant-out-of-range-compare -fno-color-diagnostics -Wno-keyword-macro -Werror -std=c++98 -I/Users/akim/src/gnu/bison/tests -isystem /opt/gostai/include -isystem /opt/local/include -L/opt/gostai/lib -L/opt/local/lib -o test test.cc /Users/akim/src/gnu/bison/_build/c9d/lib/libbison.a -lintl -Wl,-framework -Wl,CoreFoundation
3317	    stderr:
3318	    test.cc:955:1: error: _Noreturn functions are a C11-specific feature [-Werror,-Wc11-extensions]
3319	    _Noreturn static void
3320	    ^
3321	    test.cc:963:1: error: _Noreturn functions are a C11-specific feature [-Werror,-Wc11-extensions]
3322	    _Noreturn static void
3323	    ^
3324	    2 errors generated.
3325
3326	* data/skeletons/c.m4 (b4_attribute_define): Do not use _Noreturn at
3327	all in C++, clang or not.
3328
33292020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3330
3331	maint: post-release administrivia
3332	* NEWS: Add header line for next release.
3333	* .prev-version: Record previous version.
3334	* cfg.mk (old_NEWS_hash): Auto-update.
3335
33362020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3337
3338	version 3.6.2
3339	* NEWS: Record release date.
3340
33412020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3342
3343	tests: improve update-test
3344	* build-aux/update-test: When given a directory, use the testsuite.log
3345	which it contains.
3346	Do not accept empty "from"s, as substituting the empty string with
3347	something is rarely a good idea.
3348
33492020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3350
3351	CI: add GCC 10 and Clang 10
3352	* .travis.yml: Here.
3353	* tests/input.at, tests/regression.at: Beware of clang's -Wdocumentation.
3354
33552020-05-17  Akim Demaille  <akim.demaille@gmail.com>
3356
3357	fix: do not emit nested comments
3358	With input such as
3359
3360	    %token<fl> yVL_CLOCK "/*verilator sc_clock*/"
3361
3362	we generate
3363
3364	    yVL_CLOCK = 610,      /* "/*verilator sc_clock*/"  */
3365
3366	which is invalid since the comment will actually be closed on the
3367	first "*/".  Let's turn "*/" into "*\/" to avoid this.  But GCC will
3368	also warn about "/*" inside a comment, so let's "escape" it too.
3369
3370	Reported by Huang Rui.
3371	https://github.com/akimd/bison/issues/38
3372
3373	* data/skeletons/c-like.m4 (_b4_comment): Escape comment delimiters in
3374	comments.
3375	* tests/input.at (Torturing the Scanner): Check thes cases.
3376	* tests/m4.at: New.
3377
33782020-05-16  Akim Demaille  <akim.demaille@gmail.com>
3379
3380	c: restore definition of _Noreturn as [[noreturn]] in C++
3381	c.m4 contains a definition of _Noreturn which is modeled after
3382	gnulib's lib/_Noreturn.h.  The latter was recently
3383	changed (b61bf2f0e8bdc1e522ae8e97d57d5625163b42ea) to not using
3384	[[noreturn]] at all, because the uses of _Noreturn in gnulib are
3385	sometimes incompatible with the rules of [[noreturn]].
3386
3387	As a result glr.cc started to use _Noreturn in C++, which clang
3388	refuses (all the glr.cc tests currently fail with Clang++).
3389
3390	* data/skeletons/c.m4 (b4_attribute_define): Restore the definition of
3391	_Noreturn as [[noreturn]] in modern C++.
3392	The generated code uses _Noreturn in places where [[noreturn]] is
3393	valid.
3394
33952020-05-16  Akim Demaille  <akim.demaille@gmail.com>
3396
3397	examples: don't promote unchecked function calls
3398	* etc/bench.pl.in, examples/c/bistromathic/parse.y,
3399	* examples/c/calc/calc.y, examples/c/pushcalc/calc.y: Check scanf's
3400	return value.
3401	* doc/bison.texi: Likewise, but only for the second example, to avoid
3402	cluttering the very simple case.
3403
34042020-05-16  Akim Demaille  <akim.demaille@gmail.com>
3405
3406	gnulib: update
3407
34082020-05-15  Akim Demaille  <akim.demaille@gmail.com>
3409
3410	todo: update
3411
34122020-05-14  Akim Demaille  <akim.demaille@gmail.com>
3413
3414	examples: use markdown hyperlinks
3415	* examples/c++/README.md, examples/c++/calc++/README.md,
3416	* examples/c/README.md: here.
3417
34182020-05-14  Akim Demaille  <akim.demaille@gmail.com>
3419
3420	tests: don't use == to compare const char *...
3421	Reported by Dagobert Michelsen.
3422	https://lists.gnu.org/r/bug-bison/2020-05/msg00091.html
3423
3424	* tests/c++.at: here.
3425
34262020-05-14  Akim Demaille  <akim.demaille@gmail.com>
3427
3428	gnulib: update
3429
34302020-05-13  Akim Demaille  <akim.demaille@gmail.com>
3431
3432	tests: improve update-test
3433	* build-aux/update-test: When given a directory, use the testsuite.log
3434	which it contains.
3435	Do not accept empty "from"s, as substituting the empty string with
3436	something is rarely a good idea.
3437
34382020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3439
3440	Merge branch maint
3441	* maint:
3442	  news: update
3443	  maint: post-release administrivia
3444	  version 3.6.1
3445	  c++: style: reorder generated code
3446	  c++: provide yy::parser::symbol_type::name
3447	  c++: make parser::symbol_name public
3448	  examples: beware of ~/.inputrc
3449	  build: also provide lzip compressed tarballs
3450	  style: minor fixes
3451	  yacc.c: restore ansi-c compatibility
3452
34532020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3454
3455	news: update
3456
34572020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3458
3459	maint: post-release administrivia
3460	* NEWS: Add header line for next release.
3461	* .prev-version: Record previous version.
3462	* cfg.mk (old_NEWS_hash): Auto-update.
3463
34642020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3465
3466	version 3.6.1
3467	* NEWS: Record release date.
3468
34692020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3470
3471	bench: add support to randomize the order of execution
3472	It's amazing how much the order matters.  To a point that many of
3473	these benches are meaningless.  For instance (some of the benches
3474	where run with `make -C benches/latest rand
3475	BENCHFLAGS=--benchmark_min_time=3`):
3476
3477	    compiler: g++ -std=c++11 -O2
3478	      0. %define nofinal
3479	      1.
3480	    --------------------------------------------------
3481	    Benchmark           Time           CPU Iterations
3482	    --------------------------------------------------
3483	    BM_y0            1543 ns       1541 ns     441660
3484	    BM_y1            1521 ns       1520 ns     456535
3485	    --------------------------------------------------
3486	    BM_y0            1531 ns       1530 ns     440584
3487	    BM_y1            1512 ns       1511 ns     457591
3488	    --------------------------------------------------
3489	    BM_y0            1539 ns       1538 ns    2749330
3490	    BM_y1            1516 ns       1515 ns    2771500
3491	    --------------------------------------------------
3492	    BM_y0            1571 ns       1570 ns    2600782
3493	    BM_y1            1542 ns       1541 ns    2708349
3494	    --------------------------------------------------
3495	    BM_y0            1530 ns       1529 ns    2670363
3496	    BM_y1            1519 ns       1518 ns    2764096
3497
3498	    --------------------------------------------------
3499	    Benchmark           Time           CPU Iterations
3500	    --------------------------------------------------
3501	    BM_y1            1529 ns       1528 ns     451937
3502	    BM_y0            1508 ns       1507 ns     453944
3503	    --------------------------------------------------
3504	    BM_y1            1525 ns       1524 ns    2750684
3505	    BM_y0            1516 ns       1515 ns    2794034
3506	    --------------------------------------------------
3507	    BM_y1            1526 ns       1525 ns    2749620
3508	    BM_y0            1515 ns       1514 ns    2808112
3509	    --------------------------------------------------
3510	    BM_y1            1524 ns       1523 ns    4475844
3511	    BM_y0            1502 ns       1501 ns    4611665
3512
3513	* etc/bench.pl.in: here.
3514
35152020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3516
3517	bench: use a Makefile
3518	This makes it much easier to toy with the benchs.
3519
3520	* etc/bench.pl.in: Generate a Makefile instead of directly compiling
3521	the files.
3522
35232020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3524
3525	examples: use markdown hyperlinks
3526	* examples/c++/README.md, examples/c++/calc++/README.md,
3527	* examples/c/README.md: here.
3528
35292020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3530
3531	don't use stdnoreturn
3532	Reported by Paul Eggert.
3533
3534	* src/getargs.c: We don't need it anyway, since we use _Noreturn.
3535	* data/skeletons/c.m4: While at it, update the definition of _Noreturn
3536	stolen from gnulib.
3537
35382020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3539
3540	c++: style: reorder generated code
3541	The implementation of yy::parser::symbol_name is emitted even before
3542	the implementation of yy::parser::parser.  This makes little sense.
3543
3544	* data/skeletons/lalr1.cc (symbol_name): Move its implementation in
3545	the same place as in the class definition: after "error" and before
3546	"context".
3547
35482020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3549
3550	c++: provide yy::parser::symbol_type::name
3551	* data/skeletons/c++.m4 (yy::parser::basic_symbol::name): New.
3552	* data/skeletons/lalr1.cc (yy_print_): Use it.
3553	* doc/bison.texi: Document.
3554	* tests/c++.at: Check.
3555
35562020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3557
3558	c++: make parser::symbol_name public
3559	Reported by Martin Blais <blais@furius.ca>.
3560	https://lists.gnu.org/r/help-bison/2020-05/msg00005.html
3561
3562	* data/skeletons/lalr1.cc (symbol_name): Make it public.
3563	Add a private hidden hook to enable testing of private parts.
3564	* tests/local.at (AT_DATA_GRAMMAR_PROLOGUE): Help Emacs find the right
3565	language mode.
3566	* tests/c++.at (C++ Variant-based Symbols Unit Tests): Check that we
3567	can read symbol_name.
3568
35692020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3570
3571	examples: beware of ~/.inputrc
3572	* examples/c/bistromathic/bistromathic.test: here.
3573
35742020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3575
3576	build: also provide lzip compressed tarballs
3577	Suggested by Matias Fonzo <selk@dragora.org>.
3578
3579	* cfg.mk: Post announcements to bison-announce.
3580	* configure.ac: Build lzip packages.
3581	* .travis.yml: Build only xz, we don't care about the other formats
3582	here.
3583
35842020-05-10  Akim Demaille  <akim.demaille@gmail.com>
3585
3586	style: minor fixes
3587	* examples/c/README.md: here.
3588
35892020-05-09  Akim Demaille  <akim.demaille@gmail.com>
3590
3591	yacc.c: restore ansi-c compatibility
3592	Reported by neok-m4700.
3593	https://github.com/akimd/bison/issues/37
3594
3595	* data/skeletons/yacc.c: Don't use // comments.
3596
35972020-05-09  Akim Demaille  <akim.demaille@gmail.com>
3598
3599	bench: use *.cc for C++
3600	Using *.c is simpler, but triggers annoying warnings with Clang++.
3601
3602	* etc/bench.pl.in: Please the dictator.
3603
36042020-05-09  Akim Demaille  <akim.demaille@gmail.com>
3605
3606	style: minor fixes
3607	* examples/c/README.md: here.
3608
36092020-05-09  Akim Demaille  <akim.demaille@gmail.com>
3610
3611	gnulib: update
3612
36132020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3614
3615	gnulib: update, and use the attribute module
3616	* gnulib: Update.
3617	* bootstrap.conf: Use attribute.
3618	* src/system.h: Remove macros for attributes.
3619	Adjust dependencies.
3620	* src/scan-gram.l (DEPRECATED): Rename as...
3621	(DEPRECATED_DIRECTIVE): this, to avoid the clash with the DEPRECATED macro.
3622
36232020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3624
3625	build: also provide lzip compressed tarballs
3626	Suggested by Matias Fonzo <selk@dragora.org>.
3627
3628	* cfg.mk: Post announcements to bison-announce.
3629	* configure.ac: Build lzip packages.
3630	* .travis.yml: Build only xz, we don't care about the other formats
3631	here.
3632
36332020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3634
3635	maint: post-release administrivia
3636	* NEWS: Add header line for next release.
3637	* .prev-version: Record previous version.
3638	* cfg.mk (old_NEWS_hash): Auto-update.
3639
36402020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3641
3642	version 3.6
3643	* NEWS: Record release date.
3644
36452020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3646
3647	examples: beware of portability issue on Windows
3648	Reported by Jannick.
3649	https://lists.gnu.org/r/bug-bison/2020-05/msg00040.html
3650	https://lists.gnu.org/r/bug-bison/2020-05/msg00066.html
3651
3652	* examples/test (diff_opts): Use --strip-trailing-cr if supported, to
3653	avoid \n vs. \r\n issues.
3654	* examples/c/bistromathic/bistromathic.test: When on MSYS, don't try
3655	to check autocompletion.
3656
36572020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3658
3659	regen
3660
36612020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3662
3663	doc: fix the generation of the man page
3664	When there is no bison.1 at all, the procedure fails.
3665
3666	* doc/local.mk (bison.1): Be robust to cold starts.
3667
36682020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3669
3670	news: prepare for 3.6
3671
36722020-05-08  Akim Demaille  <akim.demaille@gmail.com>
3673
3674	doc: complete the table of symbols
3675	* doc/bison.texi: Add YYEMPTY, YYEOF and YYUNDEF.
3676
36772020-05-07  Akim Demaille  <akim.demaille@gmail.com>
3678
3679	doc: clarify the glossary item about kinds
3680	* doc/bison.texi (Glossary): here.
3681
36822020-05-06  Akim Demaille  <akim.demaille@gmail.com>
3683
3684	maint: post-release administrivia
3685	* NEWS: Add header line for next release.
3686	* .prev-version: Record previous version.
3687	* cfg.mk (old_NEWS_hash): Auto-update.
3688
36892020-05-06  Akim Demaille  <akim.demaille@gmail.com>
3690
3691	version 3.5.94
3692	* NEWS: Record release date.
3693
36942020-05-06  Akim Demaille  <akim.demaille@gmail.com>
3695
3696	doc: document yypstate_expected_tokens
3697	* doc/bison.texi (Push Parser Interface): Here.
3698
36992020-05-06  Akim Demaille  <akim.demaille@gmail.com>
3700
3701	doc: restructure the push parser documentation
3702	I don't think it's fair to have yypstate_new, yypstate_delete,
3703	yypush_parse and yypull_parse to have their own section, on par with
3704	yyparse and yylex.  Let them be in a single section about push
3705	parsers.  And show new/delete first.
3706
3707	* doc/bison.texi (Push Parser Interface): New.
3708	Fuse the aforementioned sections into it.
3709
37102020-05-06  Akim Demaille  <akim@lrde.epita.fr>
3711
3712	all: fix the interface of yyexpected_tokens
3713	The user gives yyexpected_tokens a limit: the max number of tokens she
3714	wants to hear about.  That's because an error message that reports a
3715	bazillion of possible tokens is useless.
3716
3717	In that case yyexpected_tokens returned 0, so the user would not know
3718	if there are too many expected tokens or none (yes, that's possible).
3719
3720	There are several ways to tell the user in which situation she's in:
3721
3722	- return some E2MANY, a negative value.  Then it makes the pattern
3723
3724	    int argsize = yypcontext_expected_tokens (ctx, arg, ARGS_MAX);
3725	    if (argsize < 0)
3726	      return argsize;
3727
3728	  no longer valid, as for E2MANY (i) the user must generate the error
3729	  message anyway, and (ii) she should not return E2MANY
3730
3731	- return ARGS_MAX + 1.  Then it makes it dangerous for the user, as
3732	  she has to iterate update `min (ARGS_MAX, argsize)`.
3733
3734	Returning 0 is definitely simpler and safer for the user, as it tells
3735	her "this is not an error, just generate your message without a list
3736	of expecting tokens".  So let's still return 0, but set arg[0] to the
3737	empty token when the list is really empty.
3738
3739	* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/lalr1.java
3740	* data/skeletons/yacc.c (yyexpected_tokens): Put the empty symbol
3741	first if there are no possible tokens at all.
3742	* examples/c/bistromathic/parse.y: Demonstrate how to use that.
3743
37442020-05-05  Akim Demaille  <akim.demaille@gmail.com>
3745
3746	examples: fix handling of syntax errors
3747	The shell grammar does not allow empty statements in then/else part of
3748	an if, but examples/test failed to catch the syntax errors from the
3749	script it ran.  So exited with success anyway.
3750
3751	You would expect 'set -e' to suffice, but with bash 3.2 actually it
3752	does not.  As a matter of fact, I could find a way to have this behave
3753	properly:
3754
3755	    $ cat test.sh
3756	    set -e
3757	    cleanup ()
3758	    {
3759	      status=$?
3760	      echo "cleanup: $status"
3761	      exit $status
3762	    }
3763	    trap cleanup 0 1 2 13 15
3764	    . $1
3765	    s=$?
3766	    echo "test.sh: $s"
3767	    exit $s
3768
3769	    $ cat bistro.test
3770	    if true; then
3771	    fi
3772
3773	    $ /bin/sh ./test.sh ./bistro.test
3774	    ./bistro.test: line 2: syntax error near unexpected token `fi'
3775	    cleanup: 0
3776	    $ echo $?
3777	    0
3778
3779	Remove the set -e (or the trap), and tada, it works...  So we have to
3780	deal with the error by hand.
3781
3782	* examples/test ($exit): Replace with...
3783	($status): this.
3784	Preserve the exit status of the test case.
3785	* examples/c/bistromathic/bistromathic.test: Fix syntax error.
3786
37872020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3788
3789	doc: beware of timestamp issues on Haiku
3790	On Haiku, help2man is fired on a freshly extracted tarball.
3791	Reported by Bruno Haible.
3792	https://lists.gnu.org/r/bug-bison/2020-05/msg00055.html
3793
3794	* doc/local.mk (bison.1): Be robust to a missing help2man.
3795
37962020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3797
3798	tests: beware of wchar_t portability issues on AIX
3799	https://lists.gnu.org/r/bug-bison/2020-05/msg00050.html
3800	Reported by Bruno Haible.
3801
3802	* tests/diagnostics.at: here.
3803
38042020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3805
3806	glr.c: beware of portability issues with PTRDIFF_MAX
3807	For instance test 386, "glr.cc api.value.type={double}":
3808
3809	    types.at:366: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o test test.cc $LIBS
3810	    stderr:
3811	    test.cc: In function 'ptrdiff_t yysplitStack(yyGLRStack*, ptrdiff_t)':
3812	    test.cc:490:4: error: 'PTRDIFF_MAX' was not declared in this scope
3813	       (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : YY_CAST (ptrdiff_t, SIZE_MAX))
3814	        ^
3815	    test.cc:1805:37: note: in expansion of macro 'YYSIZEMAX'
3816	           ptrdiff_t half_max_capacity = YYSIZEMAX / 2 / state_size;
3817	                                         ^~~~~~~~~
3818	    test.cc:490:4: note: suggested alternative: '__PTRDIFF_MAX__'
3819	       (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : YY_CAST (ptrdiff_t, SIZE_MAX))
3820	        ^
3821	    test.cc:1805:37: note: in expansion of macro 'YYSIZEMAX'
3822	           ptrdiff_t half_max_capacity = YYSIZEMAX / 2 / state_size;
3823	                                         ^~~~~~~~~
3824
3825	The failing tests are using glr.cc only, which I don't understand, the
3826	problem is rather in glr.c, so I would expect glr.c tests to also fail.
3827
3828	Reported by Bruno Haible.
3829	https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00053.html
3830
3831	* data/skeletons/yacc.c: Move the block that defines
3832	YYPTRDIFF_T/YYPTRDIFF_MAXIMUM, YYSIZE_T/YYSIZE_MAXIMUM, and
3833	YYSIZEOF to...
3834	* data/skeletons/c.m4 (b4_sizes_types_define): Here.
3835	(b4_c99_int_type): Also take care of the #undefinition of short.
3836	* data/skeletons/yacc.c, data/skeletons/glr.c: Use
3837	b4_sizes_types_define.
3838	* data/skeletons/glr.c: Adjust to use YYPTRDIFF_T/YYPTRDIFF_MAXIMUM,
3839	YYSIZE_T/YYSIZE_MAXIMUM.
3840
38412020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3842
3843	todo: update
3844
38452020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3846
3847	examples: beware of strnlen portability issues
3848	One function missing on Solaris 10 Sparc:
3849
3850	     CCLD     examples/c/bistromathic/bistromathic
3851	    Undefined                       first referenced
3852	    symbol                             in file
3853	    strnlen                             examples/c/bistromathic/bistromathic-parse.o
3854	    ld: fatal: symbol referencing errors. No output written to examples/c/bistromathic/bistromathic
3855
3856	Reported by Dagobert Michelsen.
3857	https://lists.gnu.org/r/bug-bison/2020-05/msg00048.html
3858
3859	* examples/c/bistromathic/parse.y (xstrndup): Don't use strnlen.
3860	xstrndup is assembled from gnulib's xstrndup, strndup and strnlen...
3861
38622020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3863
3864	examples: beware of portability issues with sh's trap
3865	On AIX 7.2, when invoking "exit 77", we actually exit with 127.  The
3866	"cleanup" function, called via trap, received an incorrect exit
3867	status, something described in Autoconf's doc.
3868	Reported by Bruno Haible.
3869	https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00029.html
3870	https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00047.html
3871
3872	* examples/test (skip): New.
3873	* examples/c/bistromathic/bistromathic.test,
3874	* examples/c/reccalc/reccalc.test: Use it, to ensure $? is set to 77
3875	when the trap is called.
3876
38772020-05-04  Akim Demaille  <akim.demaille@gmail.com>
3878
3879	tests: beware of portability issues with diff -u
3880	AIX 7.1 supports diff -u, but its output does not match the expected
3881	one.
3882	Reported by Bruno Haible.
3883	https://lists.gnu.org/r/bug-bison/2020-05/msg00049.html
3884
3885	* tests/atlocal.in (DIFF_U_WORKS): New.
3886	* tests/local.at (AT_DIFF_U_CHECK): New.
3887	* tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Use AT_DIFF_U_CHECK.
3888
38892020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3890
3891	maint: post-release administrivia
3892	* NEWS: Add header line for next release.
3893	* .prev-version: Record previous version.
3894	* cfg.mk (old_NEWS_hash): Auto-update.
3895
38962020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3897
3898	version 3.5.93
3899	* NEWS: Record release date.
3900
39012020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3902
3903	news: update for 3.5.93
3904
39052020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3906
3907	gnulib: update
3908
39092020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3910
3911	tests: really skip tricky multichar test on Cygwin
3912	In Autotest, anything outside AT_SETUP/AT_CLEANUP is discarded.
3913
3914	* tests/diagnostics.at (AT_TEST): Accept a skip-if test.
3915	Use it to skip on cygwin.
3916
39172020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3918
3919	bistromathic: beware of portability issues of readline on AIX
3920	Readline may emit escape sequences before the prompt.
3921	Reported by Bruno Haible.
3922	https://lists.gnu.org/r/platform-testers/2020-05/msg00001.html.
3923
3924	* examples/c/bistromathic/bistromathic.test: Trust readline _only_ if
3925	we get what we expect on some reference computation.
3926
39272020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3928
3929	examples: beware of portability issues with cmp
3930	As someone wrote nearly 20 years ago in Autoconf's documentation,
3931	don't use cmp to compare text files, but diff.
3932	https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=abad4f0576a7dc361e5385e19c7681449103cdb1
3933	Reported by Jannick.
3934
3935	* examples/test: Use diff, not cmp.
3936
39372020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3938
3939	build: fix warnings (shown on IRIX)
3940	Appearing on IRIX with gcc -mabi=n32.
3941	Reported by Bruno Haible.
3942	https://lists.gnu.org/r/bug-bison/2020-05/msg00039.html
3943
3944	* examples/c++/variant-11.yy, examples/c/bistromathic/parse.y: Don't
3945	give chars to isdigit, cast them to unsigned char before.
3946	* src/complain.c: Use c_isdigit.
3947	* src/fixits.c (fixits_run): Avoid casts.
3948	* src/lalr.c (goto_print): Use %zu for a size_t.
3949
39502020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3951
3952	c++: be compatible with the pre-3.6 way to get a symbol's kind
3953	Reported by Pramod Kumbhar.
3954	https://lists.gnu.org/r/bug-bison/2020-05/msg00025.html
3955
3956	* data/skeletons/c++.m4: here.
3957
39582020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3959
3960	bistromathic: beware of portability issues with strndup
3961	Reported by Dagobert Michelsen.
3962	https://lists.gnu.org/r/bug-bison/2020-05/msg00026.html
3963
3964	* examples/c/bistromathic/parse.y (xstrndup): New.
3965	Use it.
3966
39672020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3968
3969	flex: fix incorrect use of Automake conditional
3970	AM_CONDITIONAL does _not_ define a shell variable...
3971	Reported privately by Denis Excoffier.
3972
3973	* configure.ac (LEX_CXX_WORKS): Fix its definition.
3974
39752020-05-03  Bruno Haible  <bruno@clisp.org>
3976
3977	package: fix a link error on IRIX
3978	https://lists.gnu.org/r/bug-bison/2020-05/msg00035.html
3979
3980	* src/local.mk (src_bison_LDADD): Mention libbison.a before, not after, the
3981	system libraries.
3982
39832020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3984
3985	bistromathic: beware of portability of readline
3986	Don't try to build bistromathic if we don't have readline.
3987	Reported by Bruno Haible.
3988	https://lists.gnu.org/r/bug-bison/2020-05/msg00028.html
3989
3990	* configure.ac (ENABLE_BISTROMATHIC): New.
3991	* examples/c/bistromathic/local.mk: Use it.
3992	* examples/c/bistromathic/bistromathic.test: Exit 77 for skip.
3993
39942020-05-03  Akim Demaille  <akim.demaille@gmail.com>
3995
3996	tests: beware of portability issues of sh
3997	"foo || bar" does not invoke bar on AIX 7.2 when foo does not exist.
3998	It just dies.
3999	Reported by Bruno Haible.
4000	https://lists.gnu.org/r/bug-bison/2020-05/msg00029.html
4001
4002	* examples/c/reccalc/reccalc.test: Check for seq in a subshell.
4003
40042020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4005
4006	maint: post-release administrivia
4007	* NEWS: Add header line for next release.
4008	* .prev-version: Record previous version.
4009	* cfg.mk (old_NEWS_hash): Auto-update.
4010
40112020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4012
4013	version 3.5.92
4014	* NEWS: Record release date.
4015
40162020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4017
4018	news: update for 3.5.92
4019
40202020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4021
4022	gnulib: update
4023
40242020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4025
4026	java: demonstrate push parsers
4027	* data/skeletons/lalr1.java (Location): Make it a static class.
4028	(Lexer.yylex, Lexer.getLVal, Lexer.getStartPos, Lexer.getEndPos):
4029	These are not needed in push parsers.
4030	* examples/java/calc/Calc.y: Demonstrate push parsers in the Java.
4031	* doc/bison.texi: Push parsers have been supported for a long time,
4032	remove incorrect statements stating the opposite.
4033
40342020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4035
4036	doc: clarify what a location is
4037	Reported by Arthur Schwarz <aschwarz1309@att.net>
4038	https://lists.gnu.org/r/help-bison/2013-12/msg00009.html
4039
4040	* doc/bison.texi (Location Type): here.
4041
40422020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4043
4044	tests: beware of mbswidth portability issues
4045	Shy away from these issues on Cygwin.
4046	Reported Denis Excoffier.
4047	https://lists.gnu.org/r/bug-bison/2020-05/msg00003.html
4048
4049	* tests/diagnostics.at (Tabulations and multibyte characters): Split
4050	in two.
4051
40522020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4053
4054	examples: beware of intl portability issues
4055	Reported by Horst von Brand.
4056	https://lists.gnu.org/r/bug-bison/2020-04/msg00033.html
4057
4058	* examples/c/bistromathic/Makefile: libintl might not be needed, but
4059	libm probably is.
4060	* examples/c/bistromathic/parse.y: Include locale.h.
4061
40622020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4063
4064	examples: beware of portability issues with readline
4065	On OpenBSD 6.5, the prompt is repeated, but not the actual command
4066	line...  Don't try to cope with that.
4067	Reported by Bruno Haible.
4068	https://lists.gnu.org/r/bug-bison/2020-05/msg00015.html
4069
4070	* examples/c/bistromathic/bistromathic.test: Skip when readline behave
4071	this way.
4072
40732020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4074
4075	examples: beware of the portability of flex --header-file
4076	The option --header was introduced in version 2.5.6.
4077	The option --header-file was introduced in version 2.6.4.
4078	Reported by Bruno Haible.
4079	https://lists.gnu.org/r/bug-bison/2020-05/msg00013.html
4080
4081	So use --header, and do bother with versions that don't support it.
4082
4083	* m4/flex.m4: Check whether flex supports --header.
4084	* configure.ac (FLEX_WORKS, FLEX_CXX_WORKS): Set to false if it doesn't.
4085	* * examples/c/reccalc/local.mk, examples/c/reccalc/Makefile:
4086	Use --header rather than --header-file.
4087
40882020-05-03  Akim Demaille  <akim.demaille@gmail.com>
4089
4090	c++: provide backward compatibility on by_type
4091	To write unit tests for their scanners, some users depended on
4092	symbol_type::token():
4093
4094	    Lexer lex("12345");
4095	    symbol_type t = lex.nextToken();
4096	    assert(t.token() == token::INTLIT);
4097	    assert(t.value.as<int>() == 12345);
4098
4099	But symbol_type::token() was removed in Bison 3.5 because it relied on
4100	a conversion table.  So users had to find other patterns, such as
4101
4102	    assert(t.type_get() == by_type(token::INTLIT).type_get());
4103
4104	which relies on several private implementation details.
4105
4106	As part of transitioning from "token type" to "token kind", and making
4107	this a public and documented interface, "by_type" was renamed
4108	"by_kind" and "type_get()" was renamed as "kind()".  The latter had
4109	backward compatibility mechanisms, not the former.
4110
4111	In Bison 3.6 none of this should be used, but rather
4112
4113	    assert(t.kind() == symbol_kind::S_INTLIT);
4114
4115	Reported by Pramod Kumbhar.
4116	https://lists.gnu.org/r/bug-bison/2020-05/msg00012.html
4117
4118	* data/skeletons/c++.m4 (by_type): Make it an alias to by_kind.
4119
41202020-05-02  Akim Demaille  <akim.demaille@gmail.com>
4121
4122	yacc.c: improve formatting of the generated code
4123	* data/skeletons/yacc.c (yy_reduce_print): here.
4124
41252020-05-02  Akim Demaille  <akim.demaille@gmail.com>
4126
4127	doc: java supports push parsers since 3.0 (2013-07-25)
4128	* doc/bison.texi: Clarify this.
4129
41302020-05-02  Akim Demaille  <akim.demaille@gmail.com>
4131
4132	java: fix coding style
4133	I don't plan to fix everything in one go.  But this was in the way of
4134	the next commit.
4135
4136	* data/skeletons/lalr1.java: Avoid space before parens.
4137	* tests/java.at: Adjust.
4138
41392020-05-02  Akim Demaille  <akim.demaille@gmail.com>
4140
4141	style: comment changes
4142	* tests/java.at: here.
4143
41442020-05-02  Akim Demaille  <akim.demaille@gmail.com>
4145
4146	todo: more
4147
41482020-05-02  Akim Demaille  <akim.demaille@gmail.com>
4149
4150	style: more documentation about errs
4151	Suggested by Angelo Borsotti.
4152	https://lists.gnu.org/r/bug-bison/2014-02/msg00003.html
4153
4154	* src/state.h: here.
4155
41562020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4157
4158	doc: document the exit status
4159	Suggested by Alexandre Duret-Lutz.
4160	https://lists.gnu.org/r/bug-bison/2013-09/msg00015.html
4161
4162	* doc/bison.texi (Invocation): Here.
4163
41642020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4165
4166	java: add missing i18n requests
4167	* data/skeletons/lalr1.java (reportSyntaxError): Here.
4168
41692020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4170
4171	java: style: fix coding style of yyerror/reportSyntaxError
4172	* data/skeletons/lalr1.java: here.
4173
41742020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4175
4176	java: avoid useless work
4177	* data/skeletons/lalr1.java (yySymbolPrint): Avoid the computation of
4178	the argument if useless.
4179	While at it, fix Java coding style.
4180
41812020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4182
4183	java: comment changes
4184	* data/skeletons/lalr1.java, examples/java/calc/Calc.y: here.
4185
41862020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4187
4188	news: make it more consistent
4189	* NEWS: Use the same pattern for titles.
4190
41912020-05-01  Akim Demaille  <akim.demaille@gmail.com>
4192
4193	c++: use modern idioms to make classes non-copyable
4194	Reported by Don Macpherson.
4195	https://lists.gnu.org/r/bug-bison/2019-05/msg00015.html
4196	https://github.com/akimd/bison/issues/36
4197
4198	* data/skeletons/lalr1.cc, data/skeletons/stack.hh,
4199	* data/skeletons/variant.hh: Delete the copy-ctor and the copy operator.
4200
42012020-04-30  Akim Demaille  <akim.demaille@gmail.com>
4202
4203	yacc.c: avoid the use of a temporary
4204	* data/skeletons/yacc.c: Use YYLLOC_DEFAULT directly with the final
4205	destination.
4206
42072020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4208
4209	maint: post-release administrivia
4210	* NEWS: Add header line for next release.
4211	* .prev-version: Record previous version.
4212	* cfg.mk (old_NEWS_hash): Auto-update.
4213
42142020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4215
4216	version 3.5.91
4217	* NEWS: Record release date.
4218
42192020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4220
4221	build: fix syntax-check issues
4222	* cfg.mk: We do want to gettextize the examples.
4223	* po/POTFILES.in: Adjust.
4224
42252020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4226
4227	gnulib: update
4228
42292020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4230
4231	doc: document YYEOF, YYUNDEF and YYerror
4232	* doc/bison.texi (Special Tokens): New.
4233	* examples/c/bistromathic/parse.y: Formatting changes.
4234
42352020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4236
4237	package: fix distcheck
4238	Bison emits strings to translate in the generated code, for builtin
4239	tokens.  So they appear only in generated parsers, which are not
4240	shipped, so they are not in the src tree, so we cannot use them in our
4241	POTFILE.
4242
4243	Except src/parse-gram.c, which is in the source tree.  And even in the
4244	git repo.  But to avoid useless diffs in the repo, we do not keep the
4245	src/parse-gram.c _with_ the #lines.  This is done in a dist-hook which
4246	regenerates src/parse-gram.c when we run "make dist".
4247
4248	Unfortunately, then, update-po traverses the whole tree and sees that
4249	the location of the strings to translate in src/parse-gram.c have
4250	changed, so the bison.pot is to be updated.  And that is not possible
4251	in the "make dist" which is run within "make distcheck"
4252	(not the one preparing the dist for distcheck, the one run by
4253	distcheck to check that a distributed tarball can build a tarball)
4254	because then the src tree is read-only.
4255
4256	So let's not put src/parse-gram.c in the POTFILE, and expose these
4257	strings to gettextize by hand.
4258
4259	* src/i18n-strings.c: New.
4260	* po/POTFILES.in: Add it, and remove src/parse-gram.c.
4261
42622020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4263
4264	style: avoid gettextize warnings
4265	* src/scan-gram.l, src/scan-skel.l: Help it see the start and end of
4266	"character literals".
4267
42682020-04-29  Akim Demaille  <akim.demaille@gmail.com>
4269
4270	tests: beware of portability of readline
4271	* examples/test: here.
4272
42732020-04-28  Akim Demaille  <akim.demaille@gmail.com>
4274
4275	yacc.c: install backward compatibility for YYERRCODE
4276	Some people have been using that symbol.  Some even have #defined it
4277	themselves.
4278	https://lists.gnu.org/r/bison-patches/2020-04/msg00138.html
4279
4280	Let's provide backward compatibility, having it point to YYUNDEF, so
4281	that an error message is generated.
4282
4283	* data/skeletons/yacc.c (YYERRCODE): New, at the exact same location
4284	it was defined before.
4285
42862020-04-28  Akim Demaille  <akim.demaille@gmail.com>
4287
4288	style: c++: s/type/kind/ where appropriate
4289	These are internal details.  `type_get ()` is still there to ensure
4290	backward compatibility, `kind ()` being the modern way.
4291
4292	* data/skeletons/c++.m4 (by_type, by_type::type): Rename as...
4293	(by_kind, by_kind::kind_): this.
4294	Adjust dependencies.
4295
42962020-04-28  Akim Demaille  <akim.demaille@gmail.com>
4297
4298	java: clean up the definition of token kinds
4299	From
4300
4301	    public interface Lexer {
4302	      /* Token kinds.  */
4303	      /** Token number, to be returned by the scanner.  */
4304	      static final int YYEOF = 0;
4305	      /** Token number, to be returned by the scanner.  */
4306	      static final int YYERRCODE = 256;
4307	      /** Token number, to be returned by the scanner.  */
4308	      static final int YYUNDEF = 257;
4309	      /** Token number, to be returned by the scanner.  */
4310	      static final int BANG = 258;
4311	    ...
4312	      /** Deprecated, use b4_symbol(0, id) instead.  */
4313	      public static final int EOF = YYEOF;
4314
4315	to
4316
4317	    public interface Lexer {
4318	      /* Token kinds.  */
4319	      /** Token "end of file", to be returned by the scanner.  */
4320	      static final int YYEOF = 0;
4321	      /** Token error, to be returned by the scanner.  */
4322	      static final int YYerror = 256;
4323	      /** Token "invalid token", to be returned by the scanner.  */
4324	      static final int YYUNDEF = 257;
4325	      /** Token "!", to be returned by the scanner.  */
4326	      static final int BANG = 258;
4327	    ...
4328	      /** Deprecated, use YYEOF instead.  */
4329	      public static final int EOF = YYEOF;
4330
4331	* data/skeletons/java.m4 (b4_token_enum): Display the symbol's tag in
4332	comment.
4333	* data/skeletons/lalr1.java: Address overquotation issue.
4334	* examples/java/calc/Calc.y, examples/java/simple/Calc.y: Use YYEOF,
4335	not EOF.
4336
43372020-04-28  Akim Demaille  <akim.demaille@gmail.com>
4338
4339	error: rename the error token from YYERRCODE to YYerror
4340	See https://lists.gnu.org/r/bison-patches/2020-04/msg00162.html.
4341
4342	* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/glr.cc,
4343	* data/skeletons/lalr1.java, doc/bison.texi,
4344	* examples/c/bistromathic/parse.y, src/scan-gram.l, src/symtab.c
4345	(YYERRCODE): Rename as...
4346	(YYerror): this.
4347	Adjust dependencies.
4348
43492020-04-27  Akim Demaille  <akim.demaille@gmail.com>
4350
4351	dogfooding: use YYERRCODE in our scanner
4352	* src/scan-gram.l: Use it.
4353	* tests/input.at: Adjust.
4354
43552020-04-27  Akim Demaille  <akim.demaille@gmail.com>
4356
4357	scanner: avoid spurious errors about empty character literals
4358	On an invalid character literal such as "'\777'" we used to produce
4359	two errors:
4360
4361	    input.y:2.9-12: error: invalid number after \-escape: 777
4362	    input.y:2.8-13: error: empty character literal
4363
4364	Get rid of the second one.
4365
4366	* src/scan-gram.l (STRING_GROW_ESCAPE): New.
4367	* tests/input.at: Adjust.
4368
43692020-04-27  Akim Demaille  <akim.demaille@gmail.com>
4370
4371	scanner: bad character literals are errors
4372	* src/scan-gram.l: These are errors, not warnings.
4373	* tests/input.at: Adjust.
4374
43752020-04-27  Akim Demaille  <akim.demaille@gmail.com>
4376
4377	regen
4378
43792020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4380
4381	todo: update
4382
43832020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4384
4385	all: don't emit an error message when the scanner returns YYERRCODE
4386	I'm quite pleased to see that the tricky case of glr.c was already
4387	prepared by the changes to support syntax_error exceptions.  Better
4388	yet, it is actually syntax_error that becomes a special case of the
4389	general pattern: make yytoken be YYERRCODE.
4390
4391	* data/skeletons/glr.c (YYFAULTYTOK): Remove the now useless (Basil)
4392	Faulty token.
4393	Instead, use the error token.
4394	* data/skeletons/lalr1.d, data/skeletons/lalr1.java: When computing
4395	the action, first check the case of the error token.
4396
4397	* tests/calc.at: Check cases for the error token symbols before and
4398	after it.
4399
44002020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4401
4402	c: don't emit an error message when the scanner returns YYERRCODE
4403	* data/skeletons/yacc.c (yyparse): When the scanner returns YYERRCODE,
4404	go directly to error recovery (yyerrlab1).
4405	However, don't keep the error token as lookahead, that token is too
4406	special.
4407	* data/skeletons/lalr1.cc: Likewise.
4408
4409	* examples/c/bistromathic/parse.y (yylex): Use that feature to report
4410	nicely invalid characters.
4411	* examples/c/bistromathic/bistromathic.test: Check that.
4412	* examples/test: Neutralize gratuitous differences such as rule
4413	position.
4414
4415	* tests/calc.at: Check that case in C only.
4416	The other case seem to be working, but that's an illusion that the
4417	next commit will address (in fact, they can enter endless loops, and
4418	report the error several times anyway).
4419
44202020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4421
4422	examples: bistromathic: demonstrate error recovery
4423	* examples/c/bistromathic/parse.y: here.
4424	* examples/c/bistromathic/bistromathic.test: Check it.
4425	Included a stupid case where the error is actually ignored.
4426
44272020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4428
4429	examples: bistromathic: when quitting, close the current line
4430	When the user ctrl-d the line, we left the cursor not at col 0.
4431	Let's fix that.
4432	This revealed a few short-comings in the testing framework.
4433
4434	* examples/test (run): Also display the diffs.
4435	And support -n.
4436	* examples/c/bistromathic/bistromathic.test
4437	* examples/c/bistromathic/parse.y
4438
44392020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4440
4441	examples: bistromathic: comment changes
4442	* examples/c/bistromathic/parse.y: here.
4443
44442020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4445
4446	doc: hacking tricks
4447	* README-hacking.md: Here.
4448
44492020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4450
4451	c++: make valid to print the empty symbol
4452	* data/skeletons/lalr1.cc (yy_print_): here.
4453
44542020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4455
4456	c++: always define symbol_name
4457	* data/skeletons/lalr1.cc (symbol_name): Always define it, even when
4458	it's actually yytname which is used.
4459
44602020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4461
4462	c++: fix a few style issues
4463	* data/skeletons/lalr1.cc (yystack_print_, yy_reduce_print_): Add
4464	missing const.
4465	(yystack_print_): Rename as...
4466	(yy_stack_print_): this.
4467	* data/skeletons/glr.cc (yy_symbol_value_print_, yy_symbol_print_):
4468	Add missing const.
4469
44702020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4471
4472	all: prefer YYERRCODE to YYERROR
4473	We will not keep YYERRCODE anyway, it causes backward compatibility
4474	issues.  So as a first step, let all the skeletons use that name,
4475	until we have a better one.
4476
4477	* data/skeletons/bison.m4, data/skeletons/glr.c,
4478	* data/skeletons/glr.cc, data/skeletons/lalr1.cc,
4479	* data/skeletons/lalr1.d, data/skeletons/lalr1.java,
4480	* data/skeletons/yacc.c, doc/bison.texi, tests/headers.at,
4481	* tests/input.at:
4482	here.
4483
44842020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4485
4486	style: glr.c: clarify
4487	* data/skeletons/glr.c: Make the code a bit clearer.
4488
44892020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4490
4491	style: prefer b4_has_translations_if
4492	* data/skeletons/glr.c, data/skeletons/yacc.c: here.
4493
44942020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4495
4496	style: glr.c: fix indentation issue
4497	* data/skeletons/glr.c (yyparse): here.
4498
44992020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4500
4501	style: fix a few remaining 'type' instead of 'kind'
4502	* data/skeletons/glr.c, data/skeletons/yacc.c (YY_SYMBOL_PRINT):
4503	Here.
4504
45052020-04-26  Akim Demaille  <akim.demaille@gmail.com>
4506
4507	skeletons: make the warning about implementation details clearer
4508	* data/skeletons/bison.m4 (b4_disclaimer): Here.
4509	* data/skeletons/lalr1.d, data/skeletons/lalr1.java: Use it.
4510
45112020-04-25  Akim Demaille  <akim.demaille@gmail.com>
4512
4513	style: c: fix a few minor issues about indentation of cpp directives
4514	* README-hacking.md: More about cpp.
4515	* data/skeletons/c.m4, data/skeletons/yacc.c: Style changes.
4516
45172020-04-25  Akim Demaille  <akim.demaille@gmail.com>
4518
4519	bench: store in benches/012 rather than in benches/12
4520	* etc/bench.pl.in ($basedir): New.
4521	Format $count with a least three digits.
4522
45232020-04-25  Akim Demaille  <akim.demaille@gmail.com>
4524
4525	bench: minor improvements
4526	* etc/bench.pl.in: Don't force parse.error=detailed
4527	Use a simpler way to display the pseudo %bison directive.
4528	(&bench_with_gbenchmark): Give details about the compiler.
4529
45302020-04-25  Akim Demaille  <akim.demaille@gmail.com>
4531
4532	style: clarify #endif
4533	We could try to avoid the weird "#if 1", but then the indentation of
4534	the inner #if would be wrong.  Let' keep it this way.
4535
4536	* data/skeletons/yacc.c: here.
4537	Also, avoid sticking the comment to the directive.
4538
45392020-04-25  Akim Demaille  <akim.demaille@gmail.com>
4540
4541	style: minor fixes
4542	* data/skeletons/bison.m4, doc/bison.texi: Spell check.
4543	* examples/c/bistromathic/parse.y (N_): Remove, now useless.
4544
45452020-04-24  Akim Demaille  <akim.demaille@gmail.com>
4546
4547	examples: bistromathic: shorten token description
4548	* examples/c/bistromathic/parse.y: "number" is enough.
4549	* doc/bison.texi: Likewise.
4550
45512020-04-24  Akim Demaille  <akim.demaille@gmail.com>
4552
4553	examples: bistromathic: demonstrate internationalization
4554	Currently it was only using stubs.  Let's actually translate the
4555	strings using gettext.
4556
4557	* examples/c/bistromathic/local.mk: Define LOCALEDIR, BISON_LOCALEDIR
4558	and link with libintl.
4559	* examples/c/bistromathic/parse.y: Use them.
4560	Remove useless includes.
4561	Take ENABLE_NLS into account.
4562	(error_format_string): New.
4563	(yyreport_syntax_error): Rewrite to rely on a format string, which is
4564	more appropriate for internationalization.
4565	* examples/c/bistromathic/Makefile: We no longer use Flex.
4566	We need readline and intl.
4567
4568	* doc/bison.texi: Point to bistromathic for a better option for
4569	internationalization.
4570	* po/POTFILES.in: Add bistromathic.
4571
45722020-04-24  Akim Demaille  <akim.demaille@gmail.com>
4573
4574	todo: update for YYERRCODE
4575
45762020-04-24  Akim Demaille  <akim.demaille@gmail.com>
4577
4578	regen
4579
45802020-04-24  Akim Demaille  <akim.demaille@gmail.com>
4581
4582	diagnostics: fix a typo
4583	* src/complain.c: here.
4584
45852020-04-20  Akim Demaille  <akim.demaille@gmail.com>
4586
4587	c, c++: provide a default definition for N_
4588	In C/C++, N_ is a no-op.  Define it if the user didn't.
4589	Suggested by Frank Heckenbach.
4590	https://lists.gnu.org/r/bug-bison/2020-04/msg00010.html
4591
4592	* src/output.c (prepare_symbol_names): Rename has_translations as
4593	has_translations_flag.
4594	* data/skeletons/bison.m4 (b4_has_translations_if): New.
4595	* data/skeletons/java.m4 (b4_trans): Use it.
4596
4597	* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/yacc.c
4598	(N_): Provide a default definition.
4599
46002020-04-19  Akim Demaille  <akim.demaille@gmail.com>
4601
4602	i18n: also look in src/parse-gram.c
4603	Some strings appears in the generated file only, e.g., translation of
4604	"end of file".  So don't forget to go and see there.
4605
46062020-04-19  Akim Demaille  <akim.demaille@gmail.com>
4607
4608	style: fix comments
4609	* data/skeletons/glr.c, data/skeletons/lalr1.cc,
4610	* data/skeletons/yacc.c: here.
4611
46122020-04-19  Akim Demaille  <akim.demaille@gmail.com>
4613
4614	tokens: clean up the translation of special symbols
4615	* src/output.c (prepare_symbol_names): Don't play tricks with the
4616	symbols, it's quite too late.
4617	(has_translations): Move to...
4618	* src/symtab.c: here.
4619	(symbols_pack): Use it to enable translation for special symbols.
4620
46212020-04-19  Akim Demaille  <akim.demaille@gmail.com>
4622
4623	news: fix typo
4624	Reported by Frank Heckenbach.
4625
46262020-04-19  Akim Demaille  <akim.demaille@gmail.com>
4627
4628	tests: beware of portability issues with wc
4629	On macOS, wc -l always prepends the result with a tab, even when fed
4630	by stdin.  But anyway, we should have used `grep -c -v`, which appears
4631	to be portable according to Autoconf's "Limitations of Usual Tools"
4632	section.
4633	Reported by Denis Excoffier.
4634	https://lists.gnu.org/r/bug-bison/2020-04/msg00009.html
4635
4636	* tests/calc.at (_AT_CHECK_CALC): Use grep's -c instead.
4637
46382020-04-18  Akim Demaille  <akim.demaille@gmail.com>
4639
4640	maint: post-release administrivia
4641	* NEWS: Add header line for next release.
4642	* .prev-version: Record previous version.
4643	* cfg.mk (old_NEWS_hash): Auto-update.
4644
46452020-04-18  Akim Demaille  <akim.demaille@gmail.com>
4646
4647	version 3.5.90
4648	* NEWS: Record release date.
4649
46502020-04-18  Akim Demaille  <akim.demaille@gmail.com>
4651
4652	examples: beware of readline on macOS
4653	macOS' version of readline does not repeat stdin on stdout in
4654	non-interactive mode, contrary to the current version of GNU readline.
4655
4656	* examples/test: Add support for strip_prompt.
4657	* examples/c/bistromathic/bistromathic.test (strip_prompt): Set it
4658	when needed.
4659	Early exit when needed.
4660
46612020-04-18  Akim Demaille  <akim.demaille@gmail.com>
4662
4663	c++: give public access to the symbol kind
4664	symbol_type::token () was removed: it returned the token kind of a
4665	symbol.  To do that, one needs to convert from the symbol kind to the
4666	token kind, which requires a table.
4667
4668	This broke some users' unit tests for scanners, see
4669	https://lists.gnu.org/r/bug-bison/2020-01/msg00001.html
4670	https://lists.gnu.org/r/bug-bison/2020-03/msg00020.html
4671	https://lists.gnu.org/r/help-bison/2020-04/msg00005.html
4672
4673	Instead of making this possible again, let's check the symbol's kind
4674	instead.  So give proper access to a symbol's kind.
4675
4676	That feature existed, undocumented, as 'type_get()'.  Let's rename
4677	this as 'kind()'.
4678
4679	* data/skeletons/c++.m4, data/skeletons/glr.cc,
4680	* data/skeletons/lalr1.cc (type_get): Rename as...
4681	(kind): This.
4682	(type_get): Install a backward compatibility alias.
4683	* doc/bison.texi (Complete Symbols): Document symbol_type and
4684	symbol_type::kind.
4685
46862020-04-17  Akim Demaille  <akim.demaille@gmail.com>
4687
4688	doc: token_kind_type in C++
4689	* data/skeletons/c++.m4: Define the old names in terms on the new
4690	ones, instead of the converse.
4691	* doc/bison.texi (C++ Parser Interface): Be more extensive about
4692	token_kind_type.
4693
46942020-04-16  Akim Demaille  <akim.demaille@gmail.com>
4695
4696	doc: updates for 3.6
4697	* doc/bison.texi: More s/token type/token kind/.
4698	* NEWS: Update.
4699
47002020-04-16  Akim Demaille  <akim.demaille@gmail.com>
4701
4702	skeletons: use symbol(-2, kind)
4703	Not all the symbols have a fixed symbol code.  UNDEF's one is fixed:
4704	-2.
4705
4706	* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/lalr1.d,
4707	* data/skeletons/yacc.c: here.
4708
47092020-04-16  Akim Demaille  <akim.demaille@gmail.com>
4710
4711	style: comments changes about error handling
4712	* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/lalr1.d,
4713	* data/skeletons/lalr1.java, data/skeletons/yacc.c: here.
4714	* data/skeletons/lalr1.cc: Reduce scope.
4715
47162020-04-14  Akim Demaille  <akim.demaille@gmail.com>
4717
4718	examples: bistro: don't be lazy with switch
4719	* examples/c/bistromathic/parse.y (yylex): Use the switch to
4720	discriminate all the cases.
4721
47222020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4723
4724	doc: spell check
4725	* doc/bison.texi, NEWS, README-hacking.md: here.
4726	And elsewhere.
4727
47282020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4729
4730	gnulib: update
4731
47322020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4733
4734	doc: more about the coding style
4735	* README-hacking.md: here.
4736	(Troubleshooting): New.
4737
47382020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4739
4740	java: promote YYEOF rather that Lexer.EOF
4741	* doc/bison.texi: here.
4742	* data/skeletons/lalr1.java: Use YYEOF.
4743
47442020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4745
4746	java: fix names
4747	* data/skeletons/lalr1.java (yySymbolPrint): There are no pointers
4748	here, remove the `p` suffix.
4749	Use the appropriate type for locations.
4750
47512020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4752
4753	doc: java: SymbolKind, etc.
4754	Why didn't I think about this before???  symbolName should be a method
4755	of SymbolKind.
4756
4757	* data/skeletons/lalr1.java (YYParser::yysymbolName): Move as...
4758	* data/skeletons/java.m4 (SymbolKind::getName): this.
4759	Make the table a static final table, not a local variable.
4760	Adjust dependencies.
4761	* doc/bison.texi (Java Parser Interface): Document i18n.
4762	(Java Parser Context Interface): Document SymbolKind.
4763	* examples/java/calc/Calc.y, tests/local.at: Adjust.
4764
47652020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4766
4767	style: java: get closer to the Java style
4768	* examples/java/calc/Calc.y, examples/java/simple/Calc.y: here.
4769
47702020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4771
4772	doc: c++: document parser::context
4773	* doc/bison.texi (C++ Parser Context): New.
4774
4775	* data/skeletons/lalr1.cc (parser::yysymbol_name): Rename as...
4776	(parser::symbol_name): this.
4777	(A Complete C++ Example): Promote LAC, now that we have it.
4778	Promote parse.error detailed over verbose.
4779	* examples/c++/calc++/calc++.test, tests/local.at: Adjust.
4780
47812020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4782
4783	doc: promote YYEOF
4784	* NEWS (Deep overhaul of the symbol and token kinds): New.
4785	* doc/bison.texi: Promote YYEOF over "0" in scanners.
4786	(Token Decl): No longer show YYEOF here, it now works by default.
4787	(Token I18n): More details about YYEOF here.
4788	(Calc++): Just use YYEOF.
4789
47902020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4791
4792	d: put YYEMPTY in the TokenKind
4793	* data/skeletons/d.m4, data/skeletons/lalr1.d (b4_token_enums): Rename
4794	YYTokenType as TokenKind.
4795	Define YYEMPTY.
4796	* examples/d/calc.y, tests/calc.at, tests/scanner.at: Adjust.
4797
47982020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4799
4800	regen
4801
48022020-04-13  Akim Demaille  <akim.demaille@gmail.com>
4803
4804	c, c++: also define YYEMPTY in yytoken_kind_t
4805	I have been hesitating a lot before doing it ---after all the user
4806	must not use this kind, so what's the point of showing it in
4807	yytoken_kind_t.  And eventually I chose to play it safe with the
4808	typing system and make it possible to use yytoken_kind_t for all the
4809	tokens, even the "empty token".
4810
4811	* data/skeletons/c.m4: Give an id and a tag to YYEMPTY.
4812	(b4_token_enums): Define YYEMPTY.
4813	* data/skeletons/c++.m4 (b4_token_enums): Define YYEMPTY.
4814	* data/skeletons/glr.c, data/skeletons/glr.cc, data/skeletons/yacc.c:
4815	(YYEMPTY): Remove.
4816	Use b4_symbol(-2, id) instead.
4817
48182020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4819
4820	doc: use "code", not "number", for token (and symbol) kinds
4821	"Number" is too much about arithmethics.  "Code" conveys better the
4822	"enum" nature of token kinds.  And of symbol kinds.
4823
4824	* doc/bison.texi: Here.
4825
48262020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4827
4828	doc: promote yytoken_kind_t, not yytokentype
4829	* data/skeletons/c.m4 (yytoken_kind_t): New.
4830	* data/skeletons/c++.m4, data/skeletons/lalr1.cc (yysymbol_kind_type):
4831	New.
4832	* examples/c/lexcalc/parse.y, examples/c/reccalc/parse.y,
4833	* tests/regression.at:
4834	Use them.
4835	* doc/bison.texi: Replace "enum yytokentype" by "yytoken_kind_t".
4836	(api.token.raw): Explain that it forces "yytoken_kind_t" to coincide
4837	with "yysymbol_kind_t".
4838	(Calling Convention): Mention YYEOF.
4839	(Table of Symbols): Add entries for "yytoken_kind_t" and
4840	"yysymbol_kind_t".
4841	(Glossary): Add entries for "Kind", "Token kind" and "Symbol kind".
4842
48432020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4844
4845	doc: document yypcontext_t, and api.symbol.prefix
4846	* doc/bison.texi (%define Summary): Document api.symbol.prefix.
4847	(Syntax Error Reporting Function): Document yypcontext_t,
4848	yypcontext_location, yypcontext_token, yypcontext_expected_tokens, and
4849	yysymbol_kind_t.
4850
48512020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4852
4853	c: rename yyexpected_tokens as yypcontext_expected_tokens
4854	The user should think of yypcontext fields as accessible only via
4855	yypcontext_* functions.  So let's rename yyexpected_tokens to reflect
4856	that.
4857
4858	Let's _not_ rename yyreport_syntax_error, as the user may define this
4859	function, and is not allowed to access directly the fields of
4860	yypcontext_t: she *must* use the "accessors".  This is comparable to
4861	the case of C++/Java where the user defines
4862	parser::report_syntax_error, not parser::context::report_syntax_error.
4863
4864	* data/skeletons/glr.c, data/skeletons/yacc.c (yyexpected_tokens):
4865	Rename as...
4866	(yypcontext_expected_tokens): this.
4867	Adjust dependencies.
4868
48692020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4870
4871	skeletons: clarify the tag of special tokens
4872	From
4873
4874	    GRAM_EOF = 0,                  /* $end  */
4875	    GRAM_ERRCODE = 1,              /* error  */
4876	    GRAM_UNDEF = 2,                /* $undefined  */
4877
4878	to
4879
4880	    GRAM_EOF = 0,                  /* "end of file"  */
4881	    GRAM_ERRCODE = 1,              /* error  */
4882	    GRAM_UNDEF = 2,                /* "invalid token"  */
4883
4884	* src/output.c (symbol_tag): New.
4885	Use it to pass the token names and the symbol tags to the skeletons.
4886
4887	* tests/input.at: Adjust.
4888
48892020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4890
4891	skeletons: use "invalid token" instead of "$undefined"
4892	* src/output.c (prepare_symbol_names): Also handle undeftoken.
4893	* tests/actions.at, tests/calc.at, tests/regression.at: Adjust.
4894
48952020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4896
4897	skeletons: make the eof token translatable if i18n is enabled
4898	* src/output.c (has_translations): New.
4899	(prepare_symbol_names): Translate endtoken if the user already
4900	translated tokens.
4901
4902	* examples/c/bistromathic/parse.y, src/parse-gram.y: Simplify.
4903
49042020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4905
4906	skeletons: use "end of file" instead of "$end"
4907	The name "$end" is nice in the report, in particular it avoids that
4908	pointed-rules (aka items) be too long.  It also helps keeping them
4909	"standard".
4910
4911	But it is bad in error messages, we should report "end of file" (or
4912	maybe "end of input", this is debatable).  So, unless the user already
4913	defined the alias for the error token herself, make it "end of file".
4914	It should even be translated if the user already translated some
4915	tokens, so that there is now no strong reason to redefine the $end
4916	token.
4917
4918	* src/output.c (prepare_symbol_names): Issue "end of file" instead of
4919	"$end".
4920
4921	* data/skeletons/lalr1.java (yytnamerr_): Remove the renaming hack.
4922
4923	* build-aux/update-test: Accept files with names containing a "+",
4924	such as c++.at.
4925	* tests/actions.at, tests/c++.at, tests/conflicts.at,
4926	* tests/glr-regression.at, tests/regression.at, tests/skeletons.at:
4927	Adjust.
4928
49292020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4930
4931	diagnostics: replace "user token number" by "token code"
4932	Yet, don't change the structure identifier to avoid introducing
4933	conflicts in Vincent Imbimbo's PR (which, amusingly enough, is about
4934	conflicts).
4935
4936	* src/symtab.c: here.
4937	* tests/diagnostics.at, tests/input.at: Adjust.
4938
49392020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4940
4941	c++: remove the yy prefix from some functions
4942	yy::parser features a parse() function, not a yyparse() one.
4943
4944	* data/skeletons/lalr1.cc (yyreport_syntax_error)
4945	(context::yyexpected_tokens): Rename as...
4946	(report_syntax_error, context::expected_tokens): these.
4947
49482020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4949
4950	tokens: properly define the YYEOF token kind
4951	Currently EOF is handled in an adhoc way, with a #define YYEOF 0 in
4952	the implementation file.  As a result, the user has to define her own
4953	EOF token if she wants to use it, which is a pity.
4954
4955	Give the $end token a visible kind name, YYEOF.  Except that in C,
4956	where enums are not scoped, we would have collisions between all the
4957	definitions of YYEOFs in the header files, so in C, make it
4958	<api.PREFIX>EOF.
4959
4960	* data/skeletons/c.m4 (YYEOF): Override its name to avoid collisions.
4961	Unless the user already gave it a different name.
4962	* data/skeletons/glr.c (YYEOF): Remove.
4963	Use ]b4_symbol(0, [id])[ instead.
4964	Add support for "pre_epilogue", for glr.cc.
4965	* data/skeletons/glr.cc: Remove dead code (never emitted #undefs).
4966	* data/skeletons/yacc.c
4967	* src/parse-gram.c
4968	* src/reader.c
4969	* src/symtab.c
4970	* tests/actions.at
4971	* tests/input.at
4972
49732020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4974
4975	tokens: define the "$undefined" token kind
4976	* data/skeletons/bison.m4 (b4_symbol_token_kind): Give a definition to
4977	$undefined.
4978	(b4_token_visible_if): $undefined has an id.
4979	* src/output.c (prepare_symbol_definitions): Stop lying: $undefined
4980	_is_ a token.
4981	* tests/input.at: Adjust.
4982
49832020-04-12  Akim Demaille  <akim.demaille@gmail.com>
4984
4985	tokens: properly define the "error" token kind
4986	There are people out there that do use YYERRCODE (the token kind of
4987	the error token).  See for instance
4988	https://github.com/borbolla-automation/SPC_Machines/blob/3812012bb782bfdfe7b325950a35cd337925fcad/unixODBC-2.3.2/Drivers/nn/yylex.c.
4989
4990	Currently, YYERRCODE is defined by yacc.c in an adhoc way as a #define
4991	in the *.c file only.  It belongs with the other token kinds.
4992
4993	YYERRCODE is not a nice name, it does not fit in our naming scheme.
4994	YYERROR would be more logical, but it collides with the YYERROR macro.
4995	Shall we keep the same name in all the skeletons?  Besides, to avoid
4996	collisions in C, we need to apply the api prefix: YYERRCODE is
4997	actually <PREFIX>ERRCODE.  This is not needed in the other languages.
4998
4999	* data/skeletons/bison.m4 (b4_symbol_token_kind): New.
5000	Map the error token to "YYERRCODE".
5001	* data/skeletons/yacc.c (YYERRCODE): Don't define it, it's handled by...
5002	* src/output.c (prepare_symbol_definitions): this.
5003	* tests/input.at (Redefining the error token): Check it.
5004
50052020-04-12  Akim Demaille  <akim.demaille@gmail.com>
5006
5007	tokens: style: minor fixes
5008	* data/skeletons/bison.m4 (b4_symbol_kind): Dispatch on the UNDEF
5009	token number rather than its name.
5010	* data/skeletons/c++.m4, data/skeletons/c.m4, data/skeletons/java.m4:
5011	Comment changes.
5012
50132020-04-12  Akim Demaille  <akim.demaille@gmail.com>
5014
5015	glr.cc: remove dead code
5016	* data/skeletons/glr.cc: here.
5017
50182020-04-12  Akim Demaille  <akim.demaille@gmail.com>
5019
5020	c++: fix generated headers
5021	A forthcoming commit (tokens: properly define the "error" token kind)
5022	revealed a problem in the C++ generated headers: they are not
5023	self-contained.  With this file:
5024
5025	    %language "c++"
5026	    %define api.value.type variant
5027
5028	    %code {
5029	      static int yylex (yy::parser::semantic_type *lvalp);
5030	    }
5031
5032	    %token <int> X
5033
5034	    %%
5035
5036	    exp:
5037	      X { printf ("x\n"); }
5038	    ;
5039
5040	    %%
5041
5042	    void
5043	    yy::parser::error (const std::string& m)
5044	    {
5045	      std::cerr << m << '\n';
5046	    }
5047
5048	    static
5049	    int yylex (yy::parser::semantic_type *lvalp)
5050	    {
5051	      static int const input[] = {yy::parser::token::X, 0};
5052	      static int toknum = 0;
5053	      return input[toknum++];
5054	    }
5055
5056	    int
5057	    main (int argc, char const* argv[])
5058	    {
5059	      yy::parser p;
5060	      return p.parse ();
5061	    }
5062
5063	the generated header fails to compile cleanly (foo.cc just #includes
5064	the generated header):
5065
5066	    $ clang++-mp-9.0 -c -Wundefined-func-template foo.cc
5067	    In file included from foo.cc:1:
5068	    bar.tab.hh:550:12: warning: instantiation of function 'yy::parser::basic_symbol<yy::parser::by_type>::basic_symbol' required here, but no definition is available
5069	          [-Wundefined-func-template]
5070	        struct symbol_type : basic_symbol<by_type>
5071	               ^
5072	    bar.tab.hh:436:7: note: forward declaration of template entity is here
5073	          basic_symbol (basic_symbol&& that);
5074	          ^
5075	    bar.tab.hh:550:12: note: add an explicit instantiation declaration to suppress this warning if 'yy::parser::basic_symbol<yy::parser::by_type>::basic_symbol' is explicitly instantiated
5076	          in another translation unit
5077	        struct symbol_type : basic_symbol<by_type>
5078	               ^
5079	    1 warning generated.
5080
5081	* data/skeletons/c++.m4 (b4_public_types_define): Move the
5082	implementation of the basic_symbol move-ctor to...
5083	(b4_public_types_define): here, its declaration.
5084	* tests/headers.at (Sane headers): Use a declared token so that the
5085	corresponding token constructor is declared.  Which triggers the
5086	aforementioned issue.
5087
50882020-04-10  Akim Demaille  <akim.demaille@gmail.com>
5089
5090	style: rename YYNOMEM as YYENOMEM
5091	This is clearer.
5092
5093	* data/skeletons/glr.c, data/skeletons/yacc.c (YYNOMEM): Rename as...
5094	(YYENOMEM): here.
5095
50962020-04-10  Akim Demaille  <akim.demaille@gmail.com>
5097
5098	todo: update
5099
51002020-04-10  Akim Demaille  <akim.demaille@gmail.com>
5101
5102	c++: improvements on symbol kinds
5103	Instead of
5104
5105	    /// (Internal) symbol kind.
5106	    enum symbol_kind_type
5107	    {
5108	      YYNTOKENS = 5, ///< Number of tokens.
5109	      YYSYMBOL_YYEMPTY = -2,
5110	      YYSYMBOL_YYEOF = 0,                      // END_OF_FILE
5111	      YYSYMBOL_YYERROR = 1,                    // error
5112	      YYSYMBOL_YYUNDEF = 2,                    // $undefined
5113	      YYSYMBOL_TEXT = 3,                       // TEXT
5114	      YYSYMBOL_NUMBER = 4,                     // NUMBER
5115	      YYSYMBOL_YYACCEPT = 5,                   // $accept
5116	      YYSYMBOL_result = 6,                     // result
5117	      YYSYMBOL_list = 7,                       // list
5118	      YYSYMBOL_item = 8                        // item
5119	    };
5120
5121	generate
5122
5123	    /// Symbol kinds.
5124	    struct symbol_kind
5125	    {
5126	      enum symbol_kind_type
5127	      {
5128	        YYNTOKENS = 5, ///< Number of tokens.
5129	        S_YYEMPTY = -2,
5130	        S_YYEOF = 0,                             // END_OF_FILE
5131	        S_YYERROR = 1,                           // error
5132	        S_YYUNDEF = 2,                           // $undefined
5133	        S_TEXT = 3,                              // TEXT
5134	        S_NUMBER = 4,                            // NUMBER
5135	        S_YYACCEPT = 5,                          // $accept
5136	        S_result = 6,                            // result
5137	        S_list = 7,                              // list
5138	        S_item = 8                               // item
5139	      };
5140	    };
5141
5142	* data/skeletons/c++.m4 (api.symbol.prefix): Define to S_.
5143	Adjust all the uses.
5144	(b4_public_types_declare): Nest the enum inside 'struct symbol_kind'.
5145	* data/skeletons/glr.cc, data/skeletons/lalr1.cc,
5146	* tests/headers.at, tests/local.at: Adjust.
5147
51482020-04-10  Akim Demaille  <akim.demaille@gmail.com>
5149
5150	d: improvements on symbol kinds
5151	    public enum SymbolKind
5152	    {
5153	      S_YYEMPTY = -2,    /* No symbol.  */
5154	      S_YYEOF = 0,       /* $end  */
5155	      S_YYERROR = 1,     /* error  */
5156	      S_YYUNDEF = 2,     /* $undefined  */
5157	      S_EQ = 3,          /* "="  */
5158
5159	* data/skeletons/d.m4 (api.symbol.prefix): Default to S_.
5160	Output the symbol kind definitions with a comment.
5161
51622020-04-10  Akim Demaille  <akim.demaille@gmail.com>
5163
5164	symbols: minor fixes
5165	* data/skeletons/bison.m4 (b4_symbol_kind): Series of _ are useless,
5166	one is enough.
5167	* data/skeletons/c.m4 (b4_token_enum): Fix overquoting.
5168
51692020-04-07  Akim Demaille  <akim.demaille@gmail.com>
5170
5171	skeletons: introduce api.symbol.prefix
5172	* data/skeletons/bison.m4 (b4_symbol_prefix): New.
5173	(b4_symbol_kind): Use it.
5174	* data/skeletons/c++.m4, data/skeletons/c.m4, data/skeletons/d.m4
5175	* data/skeletons/java.m4 (api.symbol.prefix): Provide a default value.
5176
5177	* data/skeletons/glr.c, data/skeletons/glr.cc, data/skeletons/lalr1.cc,
5178	* data/skeletons/lalr1.d, data/skeletons/lalr1.java, data/skeletons/yacc.c:
5179	Adjust: use b4_symbol_prefix instead of YYSYMBOL_.
5180
51812020-04-07  Akim Demaille  <akim.demaille@gmail.com>
5182
5183	java: also emit documenting comments for symbol kinds
5184	* data/skeletons/java.m4 (b4_symbol_enum): here.
5185	And stop defined YYSYMBOL_YYEMPTY, we no longer use it.
5186
51872020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5188
5189	todo: update
5190	* TODO (YYERRCODE): Remove, handled by YYSYMBOL_ERROR.
5191
51922020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5193
5194	skeletons: beware not to use yyarg when it's null
5195	Reported by Adrian Vogelsgesang.
5196
5197	* data/skeletons/glr.c, data/skeletons/lalr1.cc,
5198	* data/skeletons/lalr1.java, data/skeletons/yacc.c: Here.
5199
52002020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5201
5202	java: document new features
5203	* data/skeletons/lalr1.java: More comments.
5204	(Context.EMPTY): Remove.
5205	* doc/bison.texi (Java Parser Context Interface): New.
5206
52072020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5208
5209	java: prefer null to YYSYMBOL_YYEMPTY
5210	That's one nice benefit from using enums.
5211
5212	* data/skeletons/lalr1.java (YYSYMBOL_YYEMPTY): No longer define it.
5213	Use 'null' instead.
5214	* examples/java/calc/Calc.y, tests/local.at: Adjust.
5215
52162020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5217
5218	java: rename Lexer.yyreportSyntaxError as reportSyntaxError
5219	* data/skeletons/lalr1.java: here.
5220	* examples/java/calc/Calc.y, tests/local.at: Adjust.
5221
52222020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5223
5224	java: use getExpectedTokens, not yyexpectedTokens
5225	* data/skeletons/lalr1.java, examples/java/calc/Calc.y, tests/local.at:
5226	here.
5227
52282020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5229
5230	java: style: fix coding style
5231	* data/skeletons/java.m4: Indent by two.
5232	* data/skeletons/lalr1.java (yynnts_): Remove.
5233	(yyfinal_, yyntokens_, yylast_, yyempty_): Rename as...
5234	(YYFINAL_, YYNTOKENS_, YYLAST_, YYEMPTY_): these, they are constants.
5235
52362020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5237
5238	c: make the symbol kind definition nicer to read
5239	From
5240
5241	    enum yysymbol_kind_t
5242	    {
5243	      YYSYMBOL_YYEMPTY = -2,
5244	      YYSYMBOL_YYEOF = 0,
5245	      YYSYMBOL_YYERROR = 1,
5246	      YYSYMBOL_YYUNDEF = 2,
5247
5248	to
5249
5250	    enum yysymbol_kind_t
5251	    {
5252	      YYSYMBOL_YYEMPTY = -2,
5253	      YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
5254	      YYSYMBOL_YYERROR = 1,                    /* error  */
5255	      YYSYMBOL_YYUNDEF = 2,                    /* $undefined  */
5256
5257	* data/skeletons/bison.m4 (b4_last_symbol): New.
5258	(b4_symbol_enum, b4_symbol_enums): Reformat the output.
5259	* data/skeletons/c.m4
5260
52612020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5262
5263	c: make the token kind definition nicer to read
5264	From
5265
5266	    enum gram_tokentype
5267	    {
5268	      GRAM_EOF = 0,
5269	      STRING = 3,
5270	      TSTRING = 4,
5271	      PERCENT_TOKEN = 5,
5272
5273	To
5274
5275	    enum gram_tokentype
5276	    {
5277	      GRAM_EOF = 0,                  /* "end of file"  */
5278	      STRING = 3,                    /* "string"  */
5279	      TSTRING = 4,                   /* "translatable string"  */
5280	      PERCENT_TOKEN = 5,             /* "%token"  */
5281
5282	* data/skeletons/bison.m4 (b4_last_enum_token): New.
5283	* data/skeletons/c.m4 (b4_token_enum, b4_token_enums): Show the
5284	corresponding symbol.
5285
52862020-04-06  Akim Demaille  <akim.demaille@gmail.com>
5287
5288	c: make the generated YYSTYPE nicer to read
5289	From
5290
5291	    union GRAM_STYPE
5292	    {
5293	      /* precedence_declarator  */
5294	      assoc precedence_declarator;
5295	      /* "string"  */
5296	      char* STRING;
5297	      /* "translatable string"  */
5298	      char* TSTRING;
5299	      /* "{...}"  */
5300	      char* BRACED_CODE;
5301	      /* "%?{...}"  */
5302
5303	to
5304
5305	    union GRAM_STYPE
5306	    {
5307	      assoc precedence_declarator;             /* precedence_declarator  */
5308	      char* STRING;                            /* "string"  */
5309	      char* TSTRING;                           /* "translatable string"  */
5310	      char* BRACED_CODE;                       /* "{...}"  */
5311
5312	* data/skeletons/c.m4 (b4_symbol_type_register): Use m4_format to
5313	align the comments.
5314	* src/parse-gram.h: Regen.
5315
53162020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5317
5318	regen
5319
53202020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5321
5322	bison: use consistently "token kind", not "token type"
5323	* src/output.c, src/reader.c, src/scan-gram.l, src/tables.c: here.
5324
53252020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5326
5327	skeletons: use consistently "kind" instead of "type" in the code
5328	* data/skeletons/bison.m4, data/skeletons/c++.m4, data/skeletons/c.m4,
5329	* data/skeletons/glr.cc, data/skeletons/lalr1.cc,
5330	* data/skeletons/lalr1.d, data/skeletons/lalr1.java:
5331	Refer to the "kind" of a symbol, not its "type", where appropriate.
5332
53332020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5334
5335	doc: refer to the token kind rather than the token type
5336	* doc/bison.texi: Replace occurrences of "token type" with "token
5337	kind".
5338	Stop referring to the "macro definitions" of the token kinds, just
5339	name them "definitions".
5340
53412020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5342
5343	m4: we don't need undef_token_number
5344	It's replaced by YYSYMBOL_YYUNDEF.
5345
53462020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5347
5348	m4: rename b4_symbol_sid as b4_symbol_kind
5349	* data/skeletons/bison.m4, data/skeletons/c++.m4, data/skeletons/c.m4,
5350	* data/skeletons/d.m4, data/skeletons/java.m4
5351	(b4_symbol_sid): Rename as...
5352	(b4_symbol_kind): this.
5353	Adjust dependencies.
5354	* data/README.md: Document the kind.
5355
53562020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5357
5358	d, java: rename SymbolType as SymbolKind
5359	See https://lists.gnu.org/r/bison-patches/2020-04/msg00031.html.
5360
5361	* data/skeletons/d.m4, data/skeletons/lalr1.d,
5362	* data/skeletons/java.m4, data/skeletons/lalr1.java
5363	(SymbolType): Rename as...
5364	(SymbolKind): this.
5365	Adjust dependencies.
5366
53672020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5368
5369	c, c++: rename yysymbol_type_t as yysymbol_kind_t
5370	See https://lists.gnu.org/r/bison-patches/2020-04/msg00031.html
5371
5372	* data/skeletons/c.m4, data/skeletons/glr.c, data/skeletons/yacc.c
5373	(yysymbol_type_t): Rename as...
5374	(yysymbol_kind_t): this.
5375	Adjust dependencies.
5376	* data/skeletons/c++.m4, data/skeletons/glr.cc, data/skeletons/lalr1.cc
5377	(symbol_type_type): Rename as...
5378	(symbol_kind_type): this.
5379	Adjust dependencies.
5380
53812020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5382
5383	doc: remove obsolete release instructions
5384	* README-hacking.md: here.
5385
53862020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5387
5388	Merge branch 'maint'
5389	* maint:
5390	  maint: post-release administrivia
5391	  version 3.5.4
5392	  examples: reccalc: really compile cleanly in C99
5393	  news: announce that Bison 3.6 drops YYERROR_VERBOSE
5394	  news: update for 3.5.4
5395	  style: fix spellos
5396	  typo: succesful -> successful
5397	  package: improve the readme
5398	  java: check and fix support for api.token.raw
5399	  java: style: prefer 'int[] foo' to 'int foo[]'
5400	  build: fix syntax-check issues
5401	  tests: recheck: work properly when the test suite was interrupted
5402	  doc: c++: promote api.token.raw
5403	  build: fix compatibility with old compilers
5404	  examples: reccalc: compile cleanly in C99
5405
54062020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5407
5408	maint: post-release administrivia
5409	* NEWS: Add header line for next release.
5410	* .prev-version: Record previous version.
5411	* cfg.mk (old_NEWS_hash): Auto-update.
5412
54132020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5414
5415	version 3.5.4
5416	* NEWS: Record release date.
5417
54182020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5419
5420	news: update the yyreport_syntax_error example
5421	* examples/c/bistromathic/parse.y, tests/local.at
5422	(yyreport_syntax_error): Fix use of YYSYMBOL_YYEMPTY.
5423	* NEWS: Update.
5424
54252020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5426
5427	todo: update
5428
54292020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5430
5431	style: rename yysyntax_error_arguments as yy_syntax_error_arguments
5432	It's a private implementation detail.
5433
5434	* NEWS, data/skeletons/glr.c, data/skeletons/lalr1.cc,
5435	* data/skeletons/yacc.c, doc/bison.texi: here.
5436
54372020-04-05  Akim Demaille  <akim.demaille@gmail.com>
5438
5439	examples: reccalc: really compile cleanly in C99
5440	The previous fix does not suffice, and actually managed to make things
5441	worse by defining yyscan_t twice in parse.y...
5442
5443	Reported by kencu.
5444	https://trac.macports.org/ticket/59927#comment:29
5445
5446	* examples/c/reccalc/parse.y (yyscan_t): Define it with the same
5447	guards as used by Flex.
5448
54492020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5450
5451	c: rename yyparse_context_t as yypcontext_t
5452	The first name is too long.  We already have `yypstate`, so
5453	`yypcontext` is ok.  We are also migrating to using `*_t` for our
5454	types.
5455
5456	* NEWS, data/skeletons/glr.c, data/skeletons/yacc.c, doc/bison.texi,
5457	* examples/c/bistromathic/parse.y, src/parse-gram.y, tests/local.at:
5458	(yyparse_context_t, yyparse_context_location, yyparse_context_token):
5459	Rename as...
5460	(yypcontext_t, yypcontext_location, yypcontext_token): these.
5461
54622020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5463
5464	readme: more about the coding style
5465
54662020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5467
5468	java: fixes in SymbolType
5469	Reported by Paolo Bonzini.
5470	https://github.com/akimd/bison/pull/34#issuecomment-609029634
5471
5472	* data/skeletons/java.m4 (SymbolType): Use 'final' where possible.
5473	(get): Rewrite on top of an array instead of a switch.
5474
54752020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5476
5477	java: use SymbolType
5478	The Java enums are very different from the C model.  As a consequence,
5479	one cannot "build" an enum directly from an integer, we must retrieve
5480	it.  That's the purpose of the SymbolType.get class method.
5481
5482	* data/skeletons/java.m4 (b4_symbol_enum, b4_case_code_symbol)
5483	(b4_declare_symbol_enum): New.
5484	* data/skeletons/lalr1.java: Use SymbolType,
5485	SymbolType.YYSYMBOL_YYEMPTY, etc.
5486	* examples/java/calc/Calc.y, tests/local.at: Adjust.
5487
54882020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5489
5490	examples: java: use explicit token identifiers
5491	* examples/java/calc/Calc.y: Declare all the tokens, so that we are
5492	compatibile with api.token.raw.
5493	* examples/java/calc/Calc.test: Adjust.
5494
54952020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5496
5497	news: announce that Bison 3.6 drops YYERROR_VERBOSE
5498	* NEWS: here.
5499
55002020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5501
5502	news: update for 3.5.4
5503
55042020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5505
5506	style: fix spellos
5507	* src/complain.c, src/print.c, src/print-xml.c, src/symtab.h: here.
5508
55092020-04-04  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
5510
5511	typo: succesful -> successful
5512	* tests/calc.at: Here.
5513
55142020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5515
5516	package: improve the readme
5517	* README: Describe what Bison is.
5518
55192020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5520
5521	java: check and fix support for api.token.raw
5522	* tests/local.at (AT_LANG_MATCH, AT_YYERROR_DECLARE(java))
5523	(AT_YYERROR_DECLARE_EXTERN(java), AT_PARSER_CLASS): New.
5524	(AT_MAIN_DEFINE(java)): Use AT_PARSER_CLASS.
5525	* tests/scanner.at: Add a test for Java.
5526	* data/skeletons/lalr1.java (yytranslate_): Cast the result.
5527
55282020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5529
5530	d: use the SymbolType enum for symbol kinds
5531	* data/skeletons/d.m4 (b4_symbol_enum, b4_declare_symbol_enum): New.
5532	* data/skeletons/lalr1.d: Use them.
5533	Use SymbolType, SymbolType.YYSYMBOL_YYEMPTY etc. where appropriate.
5534	(undef_token_, token_number_type, yy_error_token_): Remove.
5535
55362020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5537
5538	java: style: prefer 'int[] foo' to 'int foo[]'
5539	* data/skeletons/java.m4 (b4_typed_parser_table_define): Here.
5540
55412020-04-04  Akim Demaille  <akim.demaille@gmail.com>
5542
5543	build: fix syntax-check issues
5544	* src/system.h, tests/local.mk: Fix indentation.
5545
55462020-04-02  Akim Demaille  <akim.demaille@gmail.com>
5547
5548	tests: recheck: work properly when the test suite was interrupted
5549	* tests/local.mk (recheck): Look at the per-test logs, not the overall
5550	log, which, when interrupted, contains only information about... the
5551	tests that passed.
5552
55532020-04-02  Akim Demaille  <akim.demaille@gmail.com>
5554
5555	doc: c++: promote api.token.raw
5556	* doc/bison.texi (Calc++ Parser): Here.
5557
55582020-04-02  Akim Demaille  <akim.demaille@gmail.com>
5559
5560	build: fix compatibility with old compilers
5561	GCC 4.2 dies with
5562
5563	    src/InadequacyList.c: In function 'InadequacyList__new_conflict':
5564	    src/InadequacyList.c:37: error: #pragma GCC diagnostic not allowed inside functions
5565	    src/InadequacyList.c:37: error: #pragma GCC diagnostic not allowed inside functions
5566	    src/InadequacyList.c:40: error: #pragma GCC diagnostic not allowed inside functions
5567
5568	Reported by Evan Lavelle.
5569	See https://lists.gnu.org/r/bug-bison/2020-03/msg00021.html
5570	and https://trac.macports.org/ticket/59927.
5571
5572	* src/system.h (GCC_VERSION): New.
5573	Use it to control IGNORE_TYPE_LIMITS_BEGIN and
5574	IGNORE_TYPE_LIMITS_END.
5575
55762020-04-02  Akim Demaille  <akim.demaille@gmail.com>
5577
5578	examples: reccalc: compile cleanly in C99
5579	See https://trac.macports.org/ticket/59927.
5580
5581	* examples/c/reccalc/parse.y: C99 does not allow multiple typedefs.
5582
55832020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5584
5585	c++: replace symbol_number_type with symbol_type_type
5586	* data/skeletons/c++.m4, data/skeletons/glr.cc,
5587	* data/skeletons/lalr1.cc: here.
5588
55892020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5590
5591	c++: also use symbol_type_type
5592	Because of the insane current implementation of glr.cc, things are a
5593	bit nasty.  We will rename symbol_number_type as symbol_type_type
5594	later, to keep this commit small.
5595
5596	* data/skeletons/c++.m4 (b4_declare_symbol_enum): New.
5597	Also define YYNTOKENS to avoid type clashes when yyntokens_ was
5598	actually defined in another enum.
5599	Use it.
5600	(symbol_number_type): Be an alias of symbol_type_type.
5601	Use YYSYMBOL_YYEMPTY and the like.
5602	Use symbol_number_type where appropriate.
5603	(empty_symbol): Remove.
5604	(yytranslate_): Use symbol_number_type, not token_number_type.
5605	* data/skeletons/lalr1.cc: Use symbol_number_type where appropriate.
5606	Adjust to the replacement of empty_symbol by YYSYMBOL_YYEMPTY.
5607	(yy_error_token_, yy_undef_token_, yyeof_, yyntokens_): Remove.
5608	Adjust dependencies.
5609
5610	* data/skeletons/glr.cc: Use symbol_number_type where appropriate.
5611	Forward definitions of YYSYMBOL_YYEMPTY, etc. to glr.c.
5612
5613	* tests/headers.at: Accept YYNTOKENS and other YYSYMBOL_*.
5614	* tests/local.at (AT_YYERROR_DEFINE(c++)): Use symbol_number_type.
5615
56162020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5617
5618	glr.c: remove the yySymbol alias
5619	* data/skeletons/glr.c: Use yysymbol_type_t only.
5620
56212020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5622
5623	regen
5624
56252020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5626
5627	glr.c, yacc.c: propagate yysymbol_type_t
5628	Now that yacc.c and glr.c both know yysymbol_type_t, convert the
5629	common routines.
5630
5631	* data/skeletons/c.m4 (yydestruct, yy_symbol_value_print)
5632	(yy_symbol_print): Use yysymbol_type_t instead of int.
5633	* data/skeletons/glr.c: Use yySymbol where appropriate.
5634	* data/skeletons/yacc.c (YY_ACCESSING_SYMBOL): New wrapper around
5635	yystos.
5636	Use it.
5637	* tests/local.at (yyreport_syntax_error): Use yysymbol_type_t where
5638	appropriate.
5639
56402020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5641
5642	glr.c: use yysymbol_type_t, YYSYMBOL_YYEOF etc.
5643	Apply the same changes as in yacc.c.  Now yySymbol and yysymbol_type_t
5644	are aliases.  We will remove the former later, to avoid cluttering
5645	this commit.
5646
5647	* data/skeletons/glr.c: Use b4_declare_symbol_enum.
5648	Use YYSYMBOL_YYEOF etc. where appropriate.
5649	(YYUNDEFTOK, YYTERROR): Remove.
5650	(YYTRANSLATE, yySymbol, yyexpected_tokens, yysyntax_error_arguments):
5651	Adjust.
5652	(yy_accessing_symbol): New.
5653	Use it where appropriate.
5654
56552020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5656
5657	regen
5658
56592020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5660
5661	yacc.c: fix more errors from make maintainer-check-g++
5662	* data/skeletons/yacc.c (yyexpected_tokens): Use casts where needed.
5663
56642020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5665
5666	regen
5667
56682020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5669
5670	yacc.c: revert to not using yysymbol_type_t in the yytranslate table
5671	This triggers warnings with several compilers.  For instance ICC fills
5672	the logs with pages and pages of
5673
5674	    input.c(477): error: a value of type "int" cannot be used to initialize an entity of type "const yysymbol_type_t={yysymbol_type_t}"
5675	             0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
5676	             ^
5677
5678	    input.c(477): error: a value of type "int" cannot be used to initialize an entity of type "const yysymbol_type_t={yysymbol_type_t}"
5679	             0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
5680	                    ^
5681
5682	And so does G++9 when compiling yacc.c's (C) output
5683
5684	    input.c:545:8: error: invalid conversion from 'int' to 'yysymbol_type_t' [-fpermissive]
5685	      545 |        0,     5,     9,     2,     2,     2,     2,     2,     2,     2,
5686	          |        ^
5687	          |        |
5688	          |        int
5689	    input.c:545:15: error: invalid conversion from 'int' to 'yysymbol_type_t' [-fpermissive]
5690	      545 |        0,     5,     9,     2,     2,     2,     2,     2,     2,     2,
5691	          |               ^
5692	          |               |
5693	          |               int
5694
5695	Clang++ is no exception
5696
5697	    input.c:545:8: error: cannot initialize an array element of type 'const yysymbol_type_t' with an rvalue of type 'int'
5698	           0,     5,     9,     2,     2,     2,     2,     2,     2,     2,
5699	           ^
5700	    input.c:545:15: error: cannot initialize an array element of type 'const yysymbol_type_t' with an rvalue of type 'int'
5701	           0,     5,     9,     2,     2,     2,     2,     2,     2,     2,
5702	                  ^
5703
5704	At some point we could use yysymbol_type_t's enumerators to define
5705	yytranslate.  Meanwhile...
5706
5707	* data/skeletons/yacc.c (yytranslate): Use the original integral type
5708	to define it.
5709	(YYTRANSLATE): Cast the result into yysymbol_type_t.
5710
57112020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5712
5713	regen
5714
57152020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5716
5717	yysymbol_type_t: always assign an enumerator
5718	Currently we define enumerators only for symbols that have an
5719	identifier.  That rules out tokens such as '+', and nonterminals such
5720	as foo-bar and foo.bar.  As a consequence we are taking chances: the
5721	compiler might compile yysymbol_type_t as too small an integral type
5722	for some symbol codes.
5723
5724	* data/skeletons/bison.m4 (b4_symbol_sid): Forge a unique symbol
5725	identifier for symbols that don't have an ID.
5726
57272020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5728
5729	bistromathic: use symbol numbers instead of YYTRANSLATE
5730	* examples/c/bistromathic/parse.y: here.
5731
57322020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5733
5734	regen
5735
57362020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5737
5738	yacc.c: prefer YYSYMBOL_YYERROR to YYSYMBOL_error
5739	* data/skeletons/bison.m4 (b4_symbol_sid): Map "error" to YYSYMBOL_YYERROR.
5740	* data/skeletons/yacc.c: Adjust.
5741
57422020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5743
5744	regen
5745
57462020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5747
5748	yacc.c: also define a symbol number for the empty token
5749	This is not only cleaner, it also protects us from mixing signed
5750	values (YYEMPTY is #defined as -2) with unsigned types (the
5751	yysymbol_type_t enum is typically compiled as a small unsigned).
5752	For instance GCC 9:
5753
5754	    input.c: In function 'yyparse':
5755	    input.c:1107:7: error: conversion to 'unsigned int' from 'int'
5756	                           may change the sign of the result
5757	                           [-Werror=sign-conversion]
5758	     1107 |   yyn += yytoken;
5759	          |       ^~
5760	    input.c:1107:10: error: conversion to 'int' from 'unsigned int'
5761	                            may change the sign of the result
5762	                            [-Werror=sign-conversion]
5763	     1107 |   yyn += yytoken;
5764	          |          ^~~~~~~
5765	    input.c:1108:47: error: comparison of integer expressions of
5766	                            different signedness:
5767	                            'yytype_int8' {aka 'const signed char'} and
5768	                            'yysymbol_type_t' {aka 'enum yysymbol_type_t'}
5769	                            [-Werror=sign-compare]
5770	     1108 |   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5771	          |                                               ^~
5772	    input.c:702:25: error: operand of ?: changes signedness from 'int'
5773	                           to 'unsigned int' due to unsignedness of
5774	                           other operand [-Werror=sign-compare]
5775	      702 | #define YYEMPTY         (-2)
5776	          |                         ^~~~
5777	    input.c:1220:33: note: in expansion of macro 'YYEMPTY'
5778	     1220 |   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5779	          |                                 ^~~~~~~
5780	    input.c:1220:41: error: unsigned conversion from 'int' to
5781	                            'unsigned int' changes value
5782	                            from '-2' to '4294967294'
5783	                            [-Werror=sign-conversion]
5784	     1220 |   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5785	          |                                         ^
5786
5787	Eventually, it might be interesting to move away from -2 (which is the
5788	only possible negative symbol number) and use the next available
5789	number, to save bits.  We could actually even simply use "0" and shift
5790	the rest, which would allow to write "!yytoken" to mean really
5791	"yytoken != YYEMPTY".
5792
5793	* data/skeletons/c.m4 (b4_declare_symbol_enum): Define YYSYMBOL_YYEMPTY.
5794	* data/skeletons/yacc.c: Use it.
5795
5796	* src/parse-gram.y (yyreport_syntax_error): Use YYSYMBOL_YYEMPTY, not
5797	YYEMPTY, when dealing with a symbol.
5798
5799	* tests/regression.at: Adjust.
5800
58012020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5802
5803	yacc.c: use yysymbol_type_t instead of int for yytoken
5804	Now that we have a proper type for internal symbol numbers, let's use
5805	it.  More code needs conversion, e.g., printers and destructors, but
5806	they are shared with glr.c, which is not ready yet for this change.
5807
5808	It will also help us deal with warnings such as (GCC9 on GNU/Linux):
5809
5810	    input.c: In function 'int yyparse()':
5811	    input.c:475:37: error: enumeral and non-enumeral type in conditional expression [-Werror=extra]
5812	      475 |   (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYSYMBOL_YYUNDEF)
5813	          |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5814	    input.c:1024:17: note: in expansion of macro 'YYTRANSLATE'
5815	     1024 |       yytoken = YYTRANSLATE (yychar);
5816	          |                 ^~~~~~~~~~~
5817
5818	* data/skeletons/yacc.c (yytranslate, yysymbol_name)
5819	(yyparse_context_t, yyexpected_tokens, yypstate_expected_tokens)
5820	(yysyntax_error_arguments):
5821	Use yysymbol_type_t instead of int.
5822
58232020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5824
5825	regen
5826
58272020-04-01  Akim Demaille  <akim.demaille@gmail.com>
5828
5829	yacc.c: introduce an enum that defines the symbol's number
5830	There's a number of advantage in exposing the symbol (internal)
5831	numbers:
5832
5833	- custom error messages can use them to decide how to represent a
5834	  given symbol, or a set of symbols.
5835
5836	- we need something similar in uses of yyexpected_tokens.  For
5837	  instance, currently, bistromathic's completion() reads:
5838
5839	    int ntokens = expected_tokens (line, tokens, YYNTOKENS);
5840	    [...]
5841	    for (int i = 0; i < ntokens; ++i)
5842	      if (tokens[i] == YYTRANSLATE (TOK_VAR))
5843	      [...]
5844	      else if (tokens[i] == YYTRANSLATE (TOK_FUN))
5845	      [...]
5846	      else
5847	      [...]
5848
5849	- now that it's a compile-time expression, we can easily build static
5850	  tables, switch, etc.
5851
5852	- some users depended on the ability to get the token number from a
5853	  symbol to write test cases for their scanners.  But Bison 3.5
5854	  removed the table this feature depended upon (a reverse
5855	  yytranslate).  Now they can check against the actual symbol number,
5856	  without having pay (space and time) a conversion.
5857	  See https://lists.gnu.org/r/bug-bison/2020-01/msg00001.html, and
5858	  https://lists.gnu.org/archive/html/bug-bison/2020-03/msg00015.html.
5859
5860	- it helps us clearly separate the internal symbol numbers from the
5861	  external token numbers, whose difference is sometimes blurred in the
5862	  code when values coincide (e.g. "yychar = yytoken = YYEOF").
5863
5864	- it allows us to get rid of ugly macros with inconsistent names such
5865	  as YYUNDEFTOK and YYTERROR, and to group related definitions
5866	  together.
5867
5868	- similarly it provides a clean access to the $accept symbol (which
5869	  proves convenient in a current experimentation of mine with several
5870	  %start symbols).
5871
5872	Let's declare this type as a private type (in the *.c file, not
5873	the *.h one).  So it does not need to be influenced by the api prefix.
5874
5875	* data/skeletons/bison.m4 (b4_symbol_sid): New.
5876	(b4_symbol): Use it.
5877	* data/skeletons/c.m4 (b4_symbol_enum, b4_declare_symbol_enum): New.
5878	* data/skeletons/yacc.c: Use b4_declare_symbol_enum.
5879	(YYUNDEFTOK, YYTERROR): Remove.
5880	Use the corresponding symbol enum instead.
5881
58822020-03-30  Akim Demaille  <akim.demaille@gmail.com>
5883
5884	style: comment changes about token numbers
5885	* data/skeletons/bison.m4, data/skeletons/c.m4: here.
5886
58872020-03-30  Akim Demaille  <akim.demaille@gmail.com>
5888
5889	tests: recheck: work properly when the test suite was interrupted
5890	* tests/local.mk (recheck): Look at the per-test logs, not the overall
5891	log, which, when interrupted, contains only information about... the
5892	tests that passed.
5893
58942020-03-30  Akim Demaille  <akim.demaille@gmail.com>
5895
5896	java: move away from _ for internationalization
5897	The "_" is becoming a keyword in Java, which causes tons of warnings
5898	currently in our test suite.  GNU Gettext is now using "i18n" instead
5899	of "_"
5900	(https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=e89fea36545f27487d9652a13e6a0adbea1117d0).
5901
5902	* data/skeletons/java.m4: Use "i18n", not "_".
5903	* examples/java/calc/Calc.y, tests/calc.at: Adjust.
5904
59052020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5906
5907	regen
5908
59092020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5910
5911	c: use YYNOMEM instead of -2
5912	See 84b1972c96060866b4bd94a33b97711f8f7d0b6c.
5913
5914	* data/skeletons/glr.c, data/skeletons/yacc.c (YYNOMEM): New.
5915	Use it.
5916
59172020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5918
5919	todo: update
5920	* TODO (Token Number): We have to clean this.
5921	(Naming conventions, Symbol numbers): New.
5922	(Bad styling): Addressed in e21ff47f5d0b64da693a47b7dd200a1a44a5bbeb.
5923
59242020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5925
5926	regen
5927
59282020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5929
5930	java: make yysyntaxErrorArguments a private detail
5931	* data/skeletons/lalr1.java (yysyntaxErrorArguments): Move it from the
5932	context, to the parser object.
5933	Generate only for detailed and verbose error messages.
5934	* tests/local.at (AT_YYERROR_DEFINE(java)): Use yyexpectedTokens
5935	instead.
5936
59372020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5938
5939	skeletons: make yysyntax_error_arguments a private detail
5940	We could just "inline yysyntax_error_arguments back" in the routines
5941	it was originally extracted from, but I think the code is nicer to
5942	read this way.
5943
5944	* data/skeletons/glr.c (yysyntax_error_arguments): Generate only for
5945	detailed and verbose error messages.
5946	* data/skeletons/yacc.c: Likewise.
5947	* data/skeletons/lalr1.cc (parser::context::yysyntax_error_arguments):
5948	Move as...
5949	(parser::yysyntax_error_arguments_): this.
5950	And only for detailed and verbose error messages.
5951
59522020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5953
5954	lalr1.cc: avoid using yysyntax_error_arguments
5955	* data/skeletons/lalr1.cc (context::token): New.
5956	* tests/local.at (yyreport_syntax_error): Don't use
5957	yysyntax_error_arguments.
5958
59592020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5960
5961	bison: avoid using yysyntax_error_arguments
5962	* src/parse-gram.y (yyreport_syntax_error): Use yyparse_context_token
5963	and yyexpected_tokens.
5964
59652020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5966
5967	tests: yacc.c: avoid yysyntax_error_arguments
5968	Because glr.c shares the same testing routines, we also need to
5969	convert it.
5970
5971	* data/skeletons/glr.c (yyparse_context_token): New.
5972	* tests/local.at (yyreport_syntax_error): here.
5973
59742020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5975
5976	examples: don't use yysyntax_error_arguments
5977	Suggested by Adrian Vogelsgesang.
5978	https://lists.gnu.org/archive/html/bison-patches/2020-02/msg00069.html
5979
5980	* data/skeletons/lalr1.java (Context.EMPTY, Context.getToken): New.
5981	(Context.yyntokens): Rename as...
5982	(Context.NTOKENS): this.
5983	Because (i) all the Java coding styles recommend upper case for
5984	constants, and (ii) the Java Skeleton exposes Lexer.EOF, not
5985	Lexer.YYEOF.
5986	* data/skeletons/yacc.c (yyparse_context_token): New.
5987	* examples/c/bistromathic/parse.y (yyreport_syntax_error): Don't use
5988	yysyntax_error_arguments.
5989	* examples/java/calc/Calc.y (yyreportSyntaxError): Likewise.
5990
59912020-03-28  Akim Demaille  <akim.demaille@gmail.com>
5992
5993	skeletons: fix incorrect type for translatable tokens
5994	* data/skeletons/glr.c, data/skeletons/lalr1.c, data/skeletons/yacc.c:
5995	Fix confusion between the "translatable" and the "translate" tables.
5996
59972020-03-23  Akim Demaille  <akim.demaille@gmail.com>
5998
5999	yacc.c: use negative numbers for errors in auxiliary functions
6000	yyparse returns 0, 1, 2 since ages (accept, reject, memory exhausted).
6001	Some of our auxiliary functions such as yy_lac and
6002	yyreport_syntax_error also need to return error codes and also use 0,
6003	1, 2.  Because it uses yy_lac, yyexpected_tokens also needs to return
6004	"problem", "memory exhausted", but in case of success, it needs to
6005	return the number of tokens, so it cannot use 1 and 2 as error code.
6006	Currently it uses -1 and -2, which is later converted into 1 and 2 as
6007	yacc.c expects it.
6008
6009	Let's simplify this and use consistently -1 and -2 for auxiliary
6010	functions that are not exposed (or not yet exposed) to the user.  In
6011	particular this will save the user from having to convert
6012	yyexpected_tokens's -2 into yyreport_syntax_error's 2: both return -1
6013	or -2.
6014
6015	* data/skeletons/yacc.c (yy_lac, yyreport_syntax_error)
6016	(yy_lac_stack_realloc): Return -1, -2 for errors instead of 1, 2.
6017	Adjust callers.
6018	* examples/c/bistromathic/parse.y (yyreport_syntax_error): Do take
6019	error codes into account.
6020	Issue a syntax error message even if we ran out of memory.
6021	* src/parse-gram.y, tests/local.at (yyreport_syntax_error): Adjust.
6022
60232020-03-23  Akim Demaille  <akim.demaille@gmail.com>
6024
6025	style: reduce length of private constant
6026	* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/yacc.c
6027	(YYERROR_VERBOSE_ARGS_MAXIMUM): Rename as...
6028	(YYARGS_MAX): this.
6029	* src/parse-gram.y (YYERROR_VERBOSE_ARGS_MAXIMUM): Rename as...
6030	(ARGS_MAX): this.
6031
60322020-03-23  Akim Demaille  <akim.demaille@gmail.com>
6033
6034	doc: c++: promote api.token.raw
6035	* doc/bison.texi (Calc++ Parser): Here.
6036
60372020-03-22  Akim Demaille  <akim.demaille@gmail.com>
6038
6039	bench: calc: no need for super long inputs
6040	* etc/bench.pl.in ($iterations): Restore initial value, -1, meaning
6041	"at least one second".
6042	($calc_input): There is no need to generate 400 lines.
6043
60442020-03-22  Akim Demaille  <akim.demaille@gmail.com>
6045
6046	bench: calc: work on a string instead of a file
6047	The cost of the file layer is large and makes benchmarks too coarse,
6048	as seen for in following example, first with a file, then with a
6049	literal string:
6050
6051	    0. %skeleton "yacc.c" %define parse.lac full
6052	    1. %skeleton "yacc-v1.c" %define nofinal %define parse.lac full
6053	    2. %skeleton "yacc-v2.c" %define nofinal %define parse.lac full
6054	    3. %skeleton "yacc-v3.c" %define nofinal %define parse.lac full
6055	    4. %skeleton "yacc.c"
6056	    5. %skeleton "yacc-v1.c" %define nofinal
6057	    6. %skeleton "yacc-v2.c" %define nofinal
6058	    7. %skeleton "yacc-v3.c" %define nofinal
6059	    --------------------------------------------------
6060	    Benchmark           Time           CPU Iterations
6061	    --------------------------------------------------
6062	    BM_y0           32558 ns      32537 ns      21228
6063	    BM_y1           32400 ns      32369 ns      21233
6064	    BM_y2           33485 ns      33464 ns      20625
6065	    BM_y3           32139 ns      32125 ns      21446
6066	    BM_y4           31343 ns      31329 ns      21747
6067	    BM_y5           31344 ns      31317 ns      22035
6068	    BM_y6           31287 ns      31255 ns      22039
6069	    BM_y7           31387 ns      31373 ns      22178
6070	    --------------------------------------------------
6071	    Benchmark           Time           CPU Iterations
6072	    --------------------------------------------------
6073	    BM_y0           10642 ns      10634 ns      63601
6074	    BM_y1           10657 ns      10654 ns      63625
6075	    BM_y2           10441 ns      10432 ns      65957
6076	    BM_y3           10558 ns      10554 ns      64546
6077	    BM_y4            9521 ns       9516 ns      72011
6078	    BM_y5            9179 ns       9157 ns      75028
6079	    BM_y6            9360 ns       9356 ns      73770
6080	    BM_y7            9365 ns       9359 ns      72609
6081
6082	Of course, at the same time it is less realistic: most users read
6083	files rather that strings, so it might lead to us to pay attention to
6084	costs most people don't see.
6085
6086	* etc/bench.pl.in (&calc_input): Output into a file given as argument.
6087	Output in C syntax.
6088	(&generate_grammar_calc): Use it.
6089	Simplify the grammar: remove operators we don't care about.
6090	Rewrite the scanner to work on a char* instead of a FILE*.
6091
60922020-03-22  Akim Demaille  <akim.demaille@gmail.com>
6093
6094	bench: add a "latest" symlink
6095	* etc/bench.pl.in: here.
6096
60972020-03-22  Akim Demaille  <akim.demaille@gmail.com>
6098
6099	bench: use the same prefix in both bench methods
6100	* etc/bench.pl.in (&bench_with_timethese): Also use y$i, as in
6101	&bench_with_gbenchmark.
6102	(&generate_grammar_calc): Don't add a prefix, let the callers do it.
6103
61042020-03-22  Akim Demaille  <akim.demaille@gmail.com>
6105
6106	bench: use a C++-11 compiler
6107	See https://github.com/google/benchmark#a-faster-keeprunning-loop.
6108
6109	* etc/bench.pl.in ($cxx): Be C++11.
6110	(&bench_with_gbenchmark): Adjust.
6111
61122020-03-22  Akim Demaille  <akim.demaille@gmail.com>
6113
6114	bench: create a README file with benches
6115	* etc/bench.pl.in (&bench_with_gbenchmark): Here.
6116
61172020-03-21  Akim Demaille  <akim.demaille@gmail.com>
6118
6119	bench: calc: add support for google benchmark
6120	* etc/bench.pl.in (&compiler): New, extracted from...
6121	(&compile): here.
6122	Don't link when using gbm.
6123	(&calc_input): Don't make massive input for micro
6124	benchmarks.
6125	(&generate_grammar_calc): When using gbm, use api.prefix to avoid name
6126	collisions.
6127	Be ready to issue BENCHMARKS instead of a main.
6128	(&bench): Rename as...
6129	(&bench_with_timethese): this.
6130	(&bench_with_gbenchmark): New.
6131	(&bench): New.
6132	Dispatch on these two.
6133
61342020-03-21  Akim Demaille  <akim.demaille@gmail.com>
6135
6136	bench: better error messages on invalid input
6137	* etc/bench.pl.in: here.
6138
61392020-03-21  Akim Demaille  <akim.demaille@gmail.com>
6140
6141	bench: simplify the calc grammar
6142	* etc/bench.pl.in (generate_grammar_calc): We don't need global_result
6143	etc.
6144
61452020-03-21  Akim Demaille  <akim.demaille@gmail.com>
6146
6147	bench: die clearly on incorrect --grammar arguments
6148	* etc/bench.pl.in (getopt): here.
6149
61502020-03-17  Akim Demaille  <akim.demaille@gmail.com>
6151
6152	regen
6153
61542020-03-17  Akim Demaille  <akim.demaille@gmail.com>
6155
6156	yacc.c: style: prefer switch to if
6157	* data/skeletons/yacc.c: Prefer switch to decode yy_lac's return value.
6158
61592020-03-17  Akim Demaille  <akim.demaille@gmail.com>
6160
6161	yacc.c: yypstate_expected_tokens
6162	In push parsers, when asking for the list of expected tokens at some
6163	point, it makes no sense to build a yyparse_context_t: the yypstate
6164	alone suffices (the only difference being the lookahead).  Instead of
6165	forcing the user to build a useless shell around yypstate, let's offer
6166	yypstate_expected_tokens.
6167
6168	See https://lists.gnu.org/r/bison-patches/2020-03/msg00025.html.
6169
6170	* data/skeletons/yacc.c (yypstate): Declare earlier, so that we can
6171	use it for...
6172	(yypstate_expected_tokens): this new function, when in push parsers.
6173	Adjust dependencies.
6174	* examples/c/bistromathic/parse.y: Simplify: use
6175	yypstate_expected_tokens.
6176	Style fixes.
6177	Reduce scopes (reported by Joel E. Denny).
6178
61792020-03-09  Akim Demaille  <akim.demaille@gmail.com>
6180
6181	examples: bistromathic: simplify
6182	* examples/c/bistromathic/parse.y (expected_tokens): Remove useless "break".
6183
61842020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6185
6186	merge branch 'maint'
6187	* upstream/maint:
6188	  maint: post-release administrivia
6189	  version 3.5.3
6190	  news: update for 3.5.3
6191	  yacc.c: make sure we properly propagated the user's number for error
6192	  diagnostics: don't crash because of repeated definitions of error
6193	  style: initialize some struct members
6194	  diagnostics: beware of zero-width characters
6195	  diagnostics: be sure to close the styling when lines are too short
6196	  muscles: fix incorrect decoding of $
6197	  code: be robust to reference with invalid tags
6198	  build: fix typo
6199	  doc: update recommandation for libtextstyle
6200	  style: comment changes
6201	  examples: use consistently the GFDL header for readmes
6202	  style: remove useless declarations
6203	  typo: succesful -> successful
6204	  README: point to tests/bison, and document --trace
6205	  gnulib: update
6206	  maint: post-release administrivia
6207
62082020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6209
6210	maint: post-release administrivia
6211	* NEWS: Add header line for next release.
6212	* .prev-version: Record previous version.
6213	* cfg.mk (old_NEWS_hash): Auto-update.
6214
62152020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6216
6217	version 3.5.3
6218	* NEWS: Record release date.
6219
62202020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6221
6222	news: update for 3.5.3
6223
62242020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6225
6226	yacc.c: make sure we properly propagated the user's number for error
6227	* data/skeletons/yacc.c (YYERRCODE): Be truthful.
6228	* tests/input.at (Redefining the error token): Check that.
6229
62302020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6231
6232	diagnostics: don't crash because of repeated definitions of error
6233	According to https://www.unix.com/man-page/POSIX/1posix/yacc/, the
6234	user is allowed to specify her user number for the error token:
6235
6236	    The token error shall be reserved for error handling. The name
6237	    error can be used in grammar rules. It indicates places where the
6238	    parser can recover from a syntax error. The default value of error
6239	    shall be 256. Its value can be changed using a %token
6240	    declaration. The lexical analyzer should not return the value of
6241	    error.
6242
6243	I think this feature is useless, the user should not have to deal with
6244	that.  The intend is probably to give the user a means to use 256 if
6245	she wants to, but provided "error" cleared the path first by being
6246	assigned another number.  In the case of Bison, 256 is assigned to
6247	"error" at the end if the user did not use it for a token of hers.  So
6248	this feature is useless.
6249
6250	Yet it is valid, and if the user assigns twice a token number to
6251	"error", then the second time we want to complain about it and want to
6252	show the original definition.  At this point, we try to display the
6253	built-in definition of "error", whose location is NULL, and we crash.
6254
6255	Rather, the location of the first user definition of "error" should
6256	become its defining location.
6257
6258	Reported byg Ahcheong Lee.
6259	https://lists.gnu.org/r/bug-bison/2020-03/msg00007.html
6260
6261	* src/symtab.c (symbol_class_set): If this is a declaration and the
6262	symbol was not declared yet, keep this as defining location.
6263	* tests/input.at (Redefining the error token): New.
6264
62652020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6266
6267	style: initialize some struct members
6268	* src/symtab.c (sym_content_new): Initialize all the location members.
6269	Not needed by the code, but disturbing values when using a debugger.
6270
62712020-03-08  Akim Demaille  <akim.demaille@gmail.com>
6272
6273	diagnostics: beware of zero-width characters
6274	Currenly we rely on (visual) width of the characters to decide where
6275	to open and close the styling of the quoted lines.  This breaks when
6276	we deal with zero-width characters: we cannot just rely on (visual)
6277	columns, we need to know whether we are before, inside, or after the
6278	highlighted portion.
6279
6280	* src/location.c (location_caret): col_end: no longer add 1, "regular"
6281	characters have a width of 1, only 0-width characters have 0-width.
6282	opened: replace with 'state', a three-valued enum.
6283	Don't reopen the style if we already did.
6284	* tests/diagnostics.at (Zero-width characters): New.
6285
62862020-03-07  Akim Demaille  <akim.demaille@gmail.com>
6287
6288	diagnostics: be sure to close the styling when lines are too short
6289	     bar.y:4.12-17: <error>error:</error> redefining user token number of foo
6290	    -    4 | %token foo <error>123
6291	    +    4 | %token foo <error>123</error>
6292	           |            <error>^~~~~~</error>
6293
6294	* src/location.c (location_caret): Be sure to close.
6295	* tests/diagnostics.at (Line is too short, and then you die): New.
6296
62972020-03-07  Akim Demaille  <akim.demaille@gmail.com>
6298
6299	muscles: fix incorrect decoding of $
6300	Bug introduced in 458171e6df5a0110a35ee45ad8b2e9f6fb426f1d.
6301	https://lists.gnu.org/archive/html/bison-patches/2013-11/msg00009.html
6302
6303	Reported by Ahcheong Lee.
6304	https://lists.gnu.org/r/bug-bison/2020-03/msg00010.html
6305
6306	* src/muscle-tab.c (COMMON_DECODE): "$" is coded as "$][", not "$[][".
6307	* tests/input.at ("%define" enum variables): Check that case.
6308
63092020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6310
6311	code: be robust to reference with invalid tags
6312	Because we want to support $<a->b>$, we must accept -> in type tags,
6313	and reject $<->$, as it is unfinished.
6314	Reported by Ahcheong Lee.
6315
6316	* src/scan-code.l (yylex): Make sure "tag" does not end with -, since
6317	-> does not close the tag.
6318	* tests/input.at (Stray $ or @): Check this.
6319
63202020-03-06  Akimn Demaille  <akim.demaille@gmail.com>
6321
6322	build: fix typo
6323	* build-aux/cross-options.pl: here.
6324
63252020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6326
6327	doc: update recommandation for libtextstyle
6328	* README: here.
6329
63302020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6331
6332	style: comment changes
6333	* src/symtab.h, src/lr0.c: here.
6334
63352020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6336
6337	examples: use consistently the GFDL header for readmes
6338	* examples/c++/README.md, examples/c++/calc++/README.md,
6339	* examples/c/calc/README.md, examples/c/lexcalc/README.md,
6340	* examples/c/reccalc/README.md:
6341	Prefer the GFDL banner to the GPL one.
6342
63432020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6344
6345	style: remove useless declarations
6346	* src/reader.h: Don't duplicate what parse-gram.h already exposes.
6347	* src/lr0.h: Remove useless include.
6348
63492020-03-06  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
6350
6351	typo: succesful -> successful
6352	* data/skeletons/lalr1.cc: here
6353	* etc/bench.pl.in: here
6354	* src/location.c: and here.
6355
63562020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6357
6358	README: point to tests/bison, and document --trace
6359	Reported by Victor Morales Cayuela.
6360
6361	* README, README-hacking.md: here.
6362
63632020-03-06  Akim Demaille  <akim.demaille@gmail.com>
6364
6365	gnulib: update
6366
63672020-03-05  Akim Demaille  <akim.demaille@gmail.com>
6368
6369	README: point to tests/bison, and document --trace
6370	Reported by Victor Morales Cayuela.
6371
6372	* README, README-hacking.md: here.
6373
63742020-03-05  Akim Demaille  <akim.demaille@gmail.com>
6375
6376	yacc.c: simplify yyparse_context_t member names
6377	* data/skeletons/yacc.c (yyparse_context_t): Rename yyes_p and
6378	yyes_capacity_p as...
6379	(yyes, yyes_capacity): These.
6380
63812020-03-05  Akim Demaille  <akim.demaille@gmail.com>
6382
6383	yacc.c: yyerror_range does not need to be preserved accross calls
6384	* data/skeletons/yacc.c (b4_parse_state_variable_macros): Don't define
6385	yyerror_range.
6386	(yyparse): Add yyerror_range as local variable.
6387
63882020-03-05  Akim Demaille  <akim.demaille@gmail.com>
6389
6390	yacc.c: push: undefine the pstate macros for the epilogue
6391	* data/skeletons/yacc.c (b4_macro_define, b4_macro_undef)
6392	(b4_pstate_macro_define, b4_parse_state_variable_macros):
6393	New.
6394	Use them.
6395	* examples/c/bistromathic/parse.y: Remove now useless undefs.
6396
63972020-03-05  Akim Demaille  <akim.demaille@gmail.com>
6398
6399	yacc.c: push: initialize the pstate variables in pstate_new
6400	Currently pstate_new does not set up its variables, this task is left
6401	to yypush_parse.  This was probably to share more code with usual pull
6402	parsers, where these (local) variables are indeed initialized by
6403	yyparse.
6404
6405	But as a consequence yyexpected_tokens crashes at the very beginning
6406	of the parse, since, for instance, the stacks are not even set up.
6407	See https://lists.gnu.org/r/bison-patches/2020-03/msg00001.html.
6408
6409	The fix could have very simple, but the documentation actually makes
6410	it very clear that we can reuse a pstate for several parses:
6411
6412	    After yypush_parse returns a status other than YYPUSH_MORE, the
6413	    parser instance yyps may be reused for a new parse.
6414
6415	so we need to restore the parser to its pristine state so that (i) it
6416	is ready to run the next parse, (ii) it properly supports
6417	yyexpected_tokens for the next run.
6418
6419	* data/skeletons/yacc.c (b4_initialize_parser_state_variables): New,
6420	extracted from the top of yyparse/yypush_parse.
6421	(yypstate_clear): New.
6422	(yypstate_new): Use it when push parsers are enabled.
6423	Define after the yyps macros so that we can use the same code as the
6424	regular pull parsers.
6425	(yyparse): Use it when push parsers are _not_ enabled.
6426
6427	* examples/c/bistromathic/bistromathic.test: Check the completion on
6428	the beginning of the line.
6429
64302020-03-04  Akim Demaille  <akim.demaille@gmail.com>
6431
6432	style: formatting changes
6433	* data/skeletons/yacc.c, tests/torture.at: here.
6434
64352020-03-04  Akim Demaille  <akim.demaille@gmail.com>
6436
6437	bistromathic: properly compute the lcp, as expected by readline
6438	Currently completion on "at" proposes only "atan", but does not
6439	actually complete "at" into "atan".
6440
6441	* examples/c/bistromathic/parse.y (completion): Install the lcp in
6442	matches[0].
6443	* examples/c/bistromathic/bistromathic.test: Check that case.
6444
64452020-03-04  Akim Demaille  <akim.demaille@gmail.com>
6446
6447	bistromathic: don't require spaces after operators for completion
6448	Currently "(1+<TAB>" does not work as expected, because "+" is not a
6449	word breaking character.
6450
6451	* examples/c/bistromathic/parse.y (init_readline): Specify our word
6452	breaking characters.
6453	* examples/c/bistromathic/bistromathic.test: Avoid trailing spaces.
6454
64552020-03-02  Akim Demaille  <akim.demaille@gmail.com>
6456
6457	bistromathic: check completion
6458	* examples/c/bistromathic/bistromathic.test: here.
6459	* examples/c/bistromathic/parse.y (expected_tokens): Fix a memory
6460	leak.
6461
64622020-03-02  Akim Demaille  <akim.demaille@gmail.com>
6463
6464	m4: remove b4_function_define and b4_function_declare
6465	* data/skeletons/c.m4: here.
6466
64672020-03-02  Akim Demaille  <akim.demaille@gmail.com>
6468
6469	m4: decommission b4_function_declare
6470	* data/skeletons/glr.c, data/skeletons/glr.cc, data/skeletons/yacc.c:
6471	Stop using b4_function_declare.
6472
64732020-03-02  Akim Demaille  <akim.demaille@gmail.com>
6474
6475	m4: decommission function generating macro
6476	These macros have been extremely useful when we had to support K&R C,
6477	which we dropped long ago.  Now, they merely make the code uselessly
6478	hard to read.
6479
6480	* data/skeletons/c.m4, data/skeletons/glr.c, data/skeletons/glr.cc,
6481	* data/skeletons/yacc.c:
6482	Stop using b4_function_define.
6483
64842020-03-01  Akim Demaille  <akim.demaille@gmail.com>
6485
6486	examples: bistromathic: demonstrate the use of yyexpected_tokens
6487	Let's use GNU readline and its TAB autocompletion to demonstrate the
6488	use of yyexpected_tokens.
6489
6490	This shows a number of weaknesses in our current approach:
6491
6492	- some macros (yyssp, etc.) from push parsers "leak" in user code, we
6493	  need to undefine them
6494
6495	- the context needed by yyexpected_tokens does not need the token,
6496	  yypstate actually suffices
6497
6498	- yypstate is not properly setup when first allocated, which results
6499	  in a crash of yyexpected_tokens if fired before a first token was
6500	  read.  We should move initialization from yypush_parse into
6501	  yypstate_new.
6502
6503	* examples/c/bistromathic/parse.y (yylex): Take input as a string, not
6504	a file.
6505	(EXIT): New token.
6506	(input): Adjust to work only on a line.
6507	(line): Remove.
6508	(symbol_count, process_line, expected_tokens, completion)
6509	(init_readline): New.
6510	* examples/c/bistromathic/bistromathic.test: Adjust expectations.
6511
65122020-03-01  Akim Demaille  <akim.demaille@gmail.com>
6513
6514	examples: use consistently the GFDL header for readmes
6515	* examples/c++/README.md, examples/c++/calc++/README.md,
6516	* examples/c/calc/README.md, examples/c/lexcalc/README.md,
6517	* examples/c/pushcalc/README.md, examples/c/reccalc/README.md:
6518	Prefer the GFDL banner to the GPL one.
6519
65202020-03-01  Akim Demaille  <akim.demaille@gmail.com>
6521
6522	gnulib: use readline
6523
65242020-02-29  Akim Demaille  <akim.demaille@gmail.com>
6525
6526	examples: bistromathic: don't use Flex
6527	This example will soon use GNU readline, so its scanner should be easy
6528	to use (concurrently) on strings, not streams.  This is not a place
6529	where Flex shines, and anyway, these are examples of Bison, not Flex.
6530	There's already lexcalc and reccalc that demonstrate the use of Flex.
6531
6532	* examples/c/bistromathic/scan.l: Remove.
6533	* examples/c/bistromathic/parse.y (yylex): New.
6534	Adjust dependencies.
6535
65362020-02-29  Akim Demaille  <akim.demaille@gmail.com>
6537
6538	examples: bistromathic: strengthen tests
6539	* examples/c/bistromathic/bistromathic.test: here.
6540	* examples/test: Be clearer on failing tests.
6541
65422020-02-29  Akim Demaille  <akim.demaille@gmail.com>
6543
6544	examples: lexcalc: demonstrate location tracking
6545	The bistromathic example should not use Flex, it makes it too complex.
6546	But it was the only example to show location tracking with Flex.
6547
6548	* examples/c/lexcalc/lexcalc.test, examples/c/lexcalc/parse.y,
6549	* examples/c/lexcalc/scan.l: Demonstrate location tracking as is done
6550	in bistromathic.
6551
65522020-02-27  Akim Demaille  <akim.demaille@gmail.com>
6553
6554	c++: don't copy the lookahead
6555	The current implementation of parser::context keeps a copy of the
6556	lookahead.  This is troublesome since we support move-only types.
6557	Besides, while GCC is happy with the current implementation, Clang
6558	complains that the ctor it needs to build the copy of the lookahead is
6559	not yet available.
6560
6561	    461. calc.at:1120: testing Calculator C++ %defines %locations parse.error=verbose %name-prefix "calc" %verbose  ...
6562	    calc.at:1120: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret -Wno-deprecated -o calc.cc calc.y
6563	    calc.at:1120: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o calc calc.cc calc-lex.cc calc-main.cc $LIBS
6564	    stderr:
6565	    In file included from calc-lex.cc:7:
6566	    calc.hh:351:12: error: instantiation of function 'calc::parser::basic_symbol<calc::parser::by_type>::basic_symbol' required here, but no definition is available [-Werror,-Wundefined-func-template]
6567	        struct symbol_type : basic_symbol<by_type>
6568	               ^
6569	    calc.hh:273:7: note: forward declaration of template entity is here
6570	          basic_symbol (const basic_symbol& that);
6571	          ^
6572	    calc.hh:351:12: note: add an explicit instantiation declaration to suppress this warning if 'calc::parser::basic_symbol<calc::parser::by_type>::basic_symbol' is explicitly instantiated in another translation unit
6573	        struct symbol_type : basic_symbol<by_type>
6574	               ^
6575	    1 error generated.
6576	    In file included from calc-main.cc:7:
6577	    calc.hh:351:12: error: instantiation of function 'calc::parser::basic_symbol<calc::parser::by_type>::basic_symbol' required here, but no definition is available [-Werror,-Wundefined-func-template]
6578	        struct symbol_type : basic_symbol<by_type>
6579	               ^
6580	    calc.hh:273:7: note: forward declaration of template entity is here
6581	          basic_symbol (const basic_symbol& that);
6582	          ^
6583	    calc.hh:351:12: note: add an explicit instantiation declaration to suppress this warning if 'calc::parser::basic_symbol<calc::parser::by_type>::basic_symbol' is explicitly instantiated in another translation unit
6584	        struct symbol_type : basic_symbol<by_type>
6585	               ^
6586	    1 error generated.
6587	    stdout:
6588	    calc.at:1120: exit code was 1, expected 0
6589	    461. calc.at:1120: 461. Calculator C++ %defines %locations parse.error=verbose %name-prefix "calc" %verbose  (calc.at:1120): FAILED (calc.at:1120)
6590
6591	* data/skeletons/lalr1.cc (context::yyla_): Make it a const-ref.
6592	Move the implementation out of the declaration.
6593
65942020-02-27  Akim Demaille  <akim.demaille@gmail.com>
6595
6596	c++: minor fixes
6597	Address compiler warnings such as
6598
6599	    warning: declaration of 'yyla' shadows a member of 'yy::parser::context' [-Wshadow]
6600
6601	* data/skeletons/lalr1.cc (context): Don't use the same names for
6602	variables and members.
6603	Use foo_ for private members, as in parser.
6604	Also, use the + trick in array accesses to please ICC and provide it
6605	with an int.
6606
66072020-02-27  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
6608
6609	c++: add support for parse.error=custom
6610	* data/skeletons/lalr1.cc: added support here
6611	* tests/calc.at: added test cases
6612	* tests/local.at: added yyreport_syntax_error implementation
6613	   for C++ test cases
6614
66152020-02-27  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
6616
6617	c++: add parser::context for syntax error handling
6618	* data/skeletons/lalr1.cc: here
6619
66202020-02-27  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
6621
6622	c++: add support for parse.error=detailed
6623	* data/skeletons/lalr1.cc: added support here
6624	* tests/calc.at: added a test case
6625
66262020-02-27  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
6627
6628	skeletons: prefer b4_parse_error_{case,bmatch} over manual solution
6629	Prefer b4_parse_error_case over the adhoc solution
6630	`m4_case + b4_percent_define_get`. Same for b4_parse_error_bmatch.
6631
6632	* data/skeletons/glr.c: here
6633	* data/skeletons/yacc.c: here
6634
66352020-02-27  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
6636
6637	typo: succesful -> successful
6638	* data/skeletons/lalr1.cc: here
6639	* etc/bench.pl.in: here
6640	* src/location.c: here
6641	* tests/calc.at: and here
6642
66432020-02-24  Akim Demaille  <akim.demaille@gmail.com>
6644
6645	bench.pl: clean up the dust
6646	* etc/bench.pl.in: Adjust to the current use of %define's values.
6647	Don't use %error-verbose.
6648	Prefer Bison to CPP (e.g., api.value.type).
6649	Avoid returning characters directly, so that %define api.token.raw works.
6650
66512020-02-23  Akim Demaille  <akim.demaille@gmail.com>
6652
6653	style: comment changes
6654	* src/symtab.h, src/lr0.c: here.
6655
66562020-02-23  Akim Demaille  <akim.demaille@gmail.com>
6657
6658	style: avoid using 'this' as an identifier
6659	LLDB insists on parsing 'this' as a C++ keyword, even when debugging a
6660	C program.
6661
6662	* src/symtab.c: Please the dictator.
6663
66642020-02-23  Akim Demaille  <akim.demaille@gmail.com>
6665
6666	style: remove useless declarations
6667	* src/reader.h: Don't duplicate what parse-gram.h already exposes.
6668	* src/lr0.h: Remove useless include.
6669
66702020-02-19  Akim Demaille  <akim.demaille@gmail.com>
6671
6672	examples: fix c/calc
6673	* examples/c/calc/calc.y: Remove experiment traces.
6674
66752020-02-19  Akim Demaille  <akim.demaille@gmail.com>
6676
6677	todo: update
6678
66792020-02-15  Akim Demaille  <akim.demaille@gmail.com>
6680
6681	doc: update recommandation for libtextstyle
6682	* README: here.
6683
66842020-02-15  Akimn Demaille  <akim.demaille@gmail.com>
6685
6686	build: fix typo
6687	* build-aux/cross-options.pl: here.
6688
66892020-02-15  Akim Demaille  <akim.demaille@gmail.com>
6690
6691	doc: simplify the cross references
6692	* doc/bison.texi: here.
6693
66942020-02-15  Akim Demaille  <akim.demaille@gmail.com>
6695
6696	doc: document token internationalization
6697	* doc/bison.texi (Parser Internationalization): Move most of its
6698	content into...
6699	(Enabling I18n): this new node.
6700	(Token I18n): New.
6701	(Token Decl): Refer to token internationalization.
6702	(Error Reporting Function): Promote parse.error detailed.
6703
67042020-02-15  Akim Demaille  <akim.demaille@gmail.com>
6705
6706	regen
6707
67082020-02-15  Victor Morales Cayuela  <victor.morales_cayuela@nokia-sbell.com>
6709
6710	diagnostics: modernize the display of submessages
6711	Since Bison 2.7, output was indented four spaces for explanatory
6712	statements.  For example:
6713
6714	    input.y:2.7-13: error: %type redeclaration for exp
6715	    input.y:1.7-11:     previous declaration
6716
6717	Since the introduction of caret-diagnostics, it became less clear.
6718	Remove the indentation and display submessages as in GCC:
6719
6720	    input.y:2.7-13: error: %type redeclaration for exp
6721	        2 | %type <float> exp
6722	          |       ^~~~~~~
6723	    input.y:1.7-11: note: previous declaration
6724	        1 | %type <int> exp
6725	          |       ^~~~~
6726
6727	* src/complain.h (SUB_INDENT): Remove.
6728	(warnings): Add "note" to the enum.
6729	* src/complain.h, src/complain.c (complain_indent): Replace by...
6730	(subcomplain): this.
6731	Adjust all dependencies.
6732	* tests/actions.at, tests/diagnostics.at, tests/glr-regression.at,
6733	* tests/input.at, tests/named-refs.at, tests/regression.at:
6734	Adjust expectations.
6735
67362020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6737
6738	doc: simplify uses of references
6739	This reverts "doc: work around problems with PDF generation", commit
6740	d810aa3d8f76b1a4d7d402072f45a0662152ffd4.  Upstream issue is fixed.
6741	https://lists.gnu.org/r/bug-texinfo/2020-02/msg00006.html
6742
6743	* gnulib: Update.
6744	* doc/bison.texi: Simplify.
6745
67462020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6747
6748	java: provide a Context ctor
6749	This is really a private auxiliary inner class, so it should not
6750	matter.  But it's better style.
6751
6752	* data/skeletons/lalr1.java: here.
6753
67542020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6755
6756	Merge tag 'v3.5.2'
6757	bison 3.5.2
6758
6759	* tag 'v3.5.2':
6760	  version 3.5.2
6761	  news: 3.5.2
6762	  gnulib: update
6763	  doc: update Doxygen template
6764	  java: avoid trailing white spaces
6765	  m4: fix b4_token_format
6766	  doc: clearly state that %yacc only makes sense with yacc.c
6767	  doc: spell check
6768	  examples: be more robust to spaces in paths
6769	  larlr1.cc: Reject unsupported values for parse.lac
6770
67712020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6772
6773	maint: post-release administrivia
6774	* NEWS: Add header line for next release.
6775	* .prev-version: Record previous version.
6776	* cfg.mk (old_NEWS_hash): Auto-update.
6777
67782020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6779
6780	version 3.5.2
6781	* NEWS: Record release date.
6782
67832020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6784
6785	news: 3.5.2
6786	* NEWS: Update.
6787
67882020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6789
6790	gnulib: update
6791
67922020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6793
6794	doc: update Doxygen template
6795	* Doxyfile.in: Run doxygen -u on it.
6796
67972020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6798
6799	java: avoid trailing white spaces
6800	* data/skeletons/java.m4 (b4_maybe_throws): Issue a space before when needed.
6801	* data/skeletons/lalr1.java: Avoid trailing spaces.
6802
68032020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6804
6805	m4: fix b4_token_format
6806	We used to emit:
6807
6808	    /** Token number,to be returned by the scanner.  */
6809	    static final int NUM = 258;
6810	    /** Token number,to be returned by the scanner.  */
6811	    static final int NEG = 259;
6812
6813	with no space after the comma.  Fix that.
6814
6815	* data/skeletons/bison.m4 (b4_token_format): Quote where appropriate.
6816
68172020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6818
6819	doc: clearly state that %yacc only makes sense with yacc.c
6820	* doc/bison.texi: here.
6821
68222020-02-13  Akim Demaille  <akim.demaille@gmail.com>
6823
6824	doc: spell check
6825	* doc/bison.texi: here.
6826
68272020-02-12  Akim Demaille  <akim.demaille@gmail.com>
6828
6829	examples: bistromathic: demonstrate named references
6830	* examples/c/bistromathic/parse.y: here.
6831
68322020-02-12  Akim Demaille  <akim.demaille@gmail.com>
6833
6834	c++: simplify
6835	* data/skeletons/stack.hh (ssize): Remove, same as size.
6836
68372020-02-12  Akim Demaille  <akim.demaille@gmail.com>
6838
6839	tests: check calls to yyerror from the user actions
6840	This revealed a number of things I had not realized:
6841
6842	- the Java location tracking was aliasing the same pair of positions
6843	  for all the symbols (see previous commit).
6844
6845	- in impure parsers, it's quite easy to use incorrect locations for
6846	  diagnostics, since yyerror uses yylloc, which is the location of the
6847	  lookahead, not that of the current lhs.  So we need something like
6848
6849	    {
6850	      YYLTYPE old_yylloc = yylloc;
6851	      yylloc = @$;
6852	      yyerror (]AT_PARAM_IF([result, count, nerrs, ])[buf);
6853	      yylloc = old_yylloc;
6854	    }
6855
6856	  Maybe we should do that little yylloc dance in the skeleton instead
6857	  of leaving it to the user?  It might be costly...  But that's only
6858	  for users of the impure parsers, which are asking for trouble
6859	  anyway.
6860
6861	- in glr.cc invoking yyerror is somewhat cumbersome: the C++ interface
6862	  is not available as we are in yyparse (which in C), and yyerror is
6863	  used by glr.cc itself to bind it to the user's parser::error.  If we
6864	  call yyerror, we need:
6865
6866	    yyerror (]AT_LOCATION_IF([[&@$, ]])[yyparser, ]AT_PARAM_IF([result, count, nerrs, ])[msg);
6867
6868	  However calling yy::parser::error is easier, once we know that the
6869	  current parser object is available as 'yyparser'.  Which also saves
6870	  us from having to pass the parse-params ourselves:
6871
6872	    yyparser.error (]AT_LOCATION_IF([[@$, ]])[msg);
6873
6874	* tests/calc.at: Invoke yyerror by hand, instead of using fprintf etc.
6875	Adjust expectations.
6876
68772020-02-11  Akim Demaille  <akim.demaille@gmail.com>
6878
6879	java: beware not to alias the locations of the various symbols
6880	* examples/java/calc/Calc.y, tests/calc.at, tests/local.at
6881	(getStartPos, getEndPos): Always return a new object.
6882	* doc/bison.texi: Clarify this.
6883
68842020-02-11  Akim Demaille  <akim.demaille@gmail.com>
6885
6886	java: check that parse.error custom|detailed work with push parsers
6887	* tests/calc.at: here.
6888
68892020-02-11  Akim Demaille  <akim.demaille@gmail.com>
6890
6891	java: don't expose the Context's members
6892	* data/skeletons/lalr1.java (Context): Make data members private.
6893	(Context.getLocation): New.
6894	* examples/java/calc/Calc.y, tests/java.at, tests/local.at: Adjust.
6895
68962020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6897
6898	build: pacify syntax-check
6899	* src/complain.c: Fix indentation.
6900	* cfg.mk: Using strcmp is ok in the tests.
6901	Test cases and examples don't need Bison's PO support.
6902
69032020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6904
6905	regen
6906
69072020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6908
6909	gnulib: update
6910
69112020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6912
6913	build: prefer %D% and %C% to hard coded values
6914	* doc/local.mk: here.
6915
69162020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6917
6918	parse.error: document and diagnose the incompatibility with %token-table
6919	* doc/bison.texi (Tokens from Literals): Move to code using
6920	%token-table to...
6921	(Decl Summary: %token-table): here.
6922	* data/skeletons/bison.m4: Implement mutual exclusion.
6923	* tests/input.at: Check it.
6924	* doc/local.mk: Be robust to the removal of doc/.
6925
69262020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6927
6928	doc: spell check
6929	* doc/bison.texi: here.
6930
69312020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6932
6933	doc: formatting changes
6934	* doc/bison.texi: here.
6935
69362020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6937
6938	doc: work around problems with PDF generation
6939	With texinfo.tex 2019-09-24.13, node names with + are not properly
6940	handled.
6941	https://lists.gnu.org/r/bug-texinfo/2020-02/msg00004.html
6942
6943	* doc/bison.texi: Always use the three-argument form for references to
6944	node with a + in the name.
6945
69462020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6947
6948	java: revert "style: avoid useless initializers"
6949	This reverts commit ebab1ffca8a728158051481795ae798231cfd93d.
6950	This commit removed "useless" initializers, going from
6951
6952	    /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
6953	       STATE-NUM.  */
6954	    private static final byte yypact_[] = yypact_init ();
6955	    private static final byte[] yypact_init ()
6956	    {
6957	      return new byte[]
6958	      {
6959	        25,    -7,    -8,    37,    -8,    40,    -8,    20,    -8,    61,
6960	        -8,    -8,     3,     9,    51,    -8,    -8,    -2,    -2,    -2,
6961	        -2,    -2,    -2,    -8,    -8,    -8,     1,    66,    66,     3,
6962	         3,     3
6963	      };
6964	    }
6965
6966	to
6967
6968	    /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
6969	       STATE-NUM.  */
6970	    private static final byte[] yypact_ =
6971	    {
6972	        25,    -7,    -8,    37,    -8,    40,    -8,    20,    -8,    61,
6973	        -8,    -8,     3,     9,    51,    -8,    -8,    -2,    -2,    -2,
6974	        -2,    -2,    -2,    -8,    -8,    -8,     1,    66,    66,     3,
6975	         3,     3
6976	    };
6977
6978	But it turns out that this was on purpose, to work around the 64KB
6979	limitation in JVM methods.  It was introduced on the 2008-11-10 by
6980	Di-an Jan in 09ccae9b18a7c09ebf7bb8df2a18c8c4a6def248: "Work around
6981	Java's ``code too large'' problem for parser tables".  See
6982	https://lists.gnu.org/r/help-bison/2008-11/msg00004.html.  A real
6983	test, where we would hit the JVM limitation, would be nice.
6984
6985	To avoid further regressions, add comments.
6986
69872020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6988
6989	skeletons: avoid b4_error_verbose_if, which is confusing
6990	parse.error has more than two possible values.
6991
6992	* data/skeletons/bison.m4 (b4_error_verbose_if, b4_error_verbose_flag):
6993	Remove.
6994	(b4_parse_error_case, b4_parse_error_bmatch): New.
6995	Adjust dependencies.
6996
69972020-02-10  Akim Demaille  <akim.demaille@gmail.com>
6998
6999	skeletons: decorelate %token-table from verbose error messages
7000	Reported by Adrian Vogelsgesang.
7001
7002	* data/skeletons/bison.m4: Here.
7003	* data/skeletons/lalr1.cc: Adjust.
7004
70052020-02-10  Akim Demaille  <akim.demaille@gmail.com>
7006
7007	doc: formatting changes
7008	* doc/bison.texi: here.
7009
70102020-02-09  Akim Demaille  <akim.demaille@gmail.com>
7011
7012	doc: clearly state that %yacc only makes sense with yacc.c
7013	* doc/bison.texi: here.
7014	* tests/calc.at: Stop testing %yacc with non yacc.c skeletons.
7015
70162020-02-09  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
7017
7018	style: stylistic cleanups in the C skeletons
7019	* data/skeletons/glr.c, data/skeletons/yacc.c:
7020	Avoid duplicated declaration of yysymbol_name.
7021
70222020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7023
7024	java: provide Context with a more OO interface
7025	* data/skeletons/lalr1.java (yyexpectedTokens)
7026	(yysyntaxErrorArguments): Make them methods of Context.
7027	(Context.yysymbolName): New.
7028	* tests/local.at: Adjust.
7029
70302020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7031
7032	java: add support for parse.error custom
7033	* data/skeletons/lalr1.java: Add support for custom parse errors.
7034	(yyntokens_): Make it public.  Under...
7035	(yyntokens): this name.
7036	(Context): Capture the location too.
7037	* examples/c/bistromathic/parse.y,
7038	* examples/c/bistromathic/bistromathic.test:
7039	Improve error message.
7040	* examples/java/calc/Calc.test, examples/java/calc/Calc.y: Use custom
7041	error messages.
7042	* tests/calc.at, tests/local.at: Check custom error messages.
7043
70442020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7045
7046	java: let the Context give access to yyntokens
7047	* data/skeletons/lalr1.java (Context.yytokens): New.
7048
70492020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7050
7051	java: make the syntax error format string translatable
7052	The error format should be translated, but contrary to the case of
7053	C/C++, we cannot just depend on macros to adapt on the
7054	presence/absence of '_'.  Let's consider that the message format is to
7055	be translated iff there are some internationalized tokens.
7056
7057	* src/output.c (prepare_symbol_names): Define b4_has_translations.
7058	* data/skeletons/java.m4 (b4_trans): New.
7059	* data/skeletons/lalr1.java: Use it to emit translatable or not the
7060	format string.
7061
70622020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7063
7064	java: introduce yyexpectedTokens
7065	And allow syntax error messages for 'detailed' and 'verbose' to be
7066	translated.
7067
7068	* data/skeletons/lalr1.java (Context, yyexpectedTokens)
7069	(yysyntaxErrorArguments): New.
7070	(yysyntax_error): Use it.
7071
70722020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7073
7074	java: add support for parse.error=detailed
7075	In Java there is no need for N_ and yytranslate_.  So instead of
7076	hard-coding the use of N_ in the table of the symbol names, rely on
7077	b4_symbol_translate.
7078
7079	* src/output.c (prepare_symbol_names): Use b4_symbol_translate instead
7080	of N_.
7081	* data/skeletons/c.m4 (b4_symbol_translate): New.
7082	* data/skeletons/lalr1.java (yysymbolName): New.
7083	Use it.
7084	* examples/java/calc/Calc.y: Use parse.error=detailed.
7085	* tests/calc.at: Check parse.error=detailed.
7086
70872020-02-08  Akim Demaille  <akim.demaille@gmail.com>
7088
7089	m4: fix b4_token_format
7090	We used to emit:
7091
7092	    /** Token number,to be returned by the scanner.  */
7093	    static final int NUM = 258;
7094	    /** Token number,to be returned by the scanner.  */
7095	    static final int NEG = 259;
7096
7097	with no space after the comma.  Fix that.
7098
7099	* data/skeletons/bison.m4 (b4_token_format): Quote where appropriate.
7100
71012020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7102
7103	java: tests: remove now redundant tests
7104	* tests/javapush.at: here.
7105
71062020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7107
7108	java: tests: check push parsers like the others
7109	Currently in javapush.at.
7110
7111	* tests/calc.at: Here.
7112
71132020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7114
7115	java: tests: remove now redundant tests
7116	* tests/java.at: Calculator tests are now in calc.at.
7117
71182020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7119
7120	java: tests: check location tracking in the calculator
7121	Unfortunately in the Java skeleton the user cannot override the way
7122	locations are displayed, and locations don't know the structure of the
7123	positions.  So they cannot implement the tricks used in the C/C++
7124	skeletons to display "1.1" instead of "1.1-1.2".
7125
7126	* tests/local.at (Java): Add support for column tracking in the
7127	locations, as we did in examples/java/calc.
7128	* tests/calc.at: Use AT_CALC_YYLEX.
7129
71302020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7131
7132	java: tests: prepare the replacement of calculator tests
7133	Soon calculator tests for Java will move from java.at to calc.at.
7134	Which implies improving the Java testing infrastructure in
7135	local.at (for instance really tracking columns in positions, not just
7136	token number).  Detach java.at from local.at.
7137
7138	* tests/java.at (AT_JAVA_POSITION_DEFINE_OLD): New.
7139	Use it.
7140
71412020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7142
7143	java: style: avoid useless initializers
7144	Instead of
7145
7146	      /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
7147	       STATE-NUM.  */
7148	      private static final byte yypact_[] = yypact_init ();
7149	      private static final byte[] yypact_init ()
7150	      {
7151	        return new byte[]
7152	        {
7153	          25,    -7,    -8,    37,    -8,    40,    -8,    20,    -8,    61,
7154	          -8,    -8,     3,     9,    51,    -8,    -8,    -2,    -2,    -2,
7155	          -2,    -2,    -2,    -8,    -8,    -8,     1,    66,    66,     3,
7156	           3,     3
7157	        };
7158	      }
7159
7160	generate
7161
7162	    /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
7163	       STATE-NUM.  */
7164	      private static final byte[] yypact_ =
7165	      {
7166	          25,    -7,    -8,    37,    -8,    40,    -8,    20,    -8,    61,
7167	          -8,    -8,     3,     9,    51,    -8,    -8,    -2,    -2,    -2,
7168	          -2,    -2,    -2,    -8,    -8,    -8,     1,    66,    66,     3,
7169	           3,     3
7170	      };
7171
7172	I have no idea what motivated the previous approach.
7173
7174	* data/skeletons/java.m4 (b4_typed_parser_table_define): Here.
7175
71762020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7177
7178	java: style: prefer putting the square brackets on the type
7179	* examples/java/calc/Calc.y, examples/java/simple/Calc.y,
7180	* tests/calc.at, tests/local.at: here.
7181
71822020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7183
7184	java: examples: fix the tracking of locations
7185	* examples/java/calc/Calc.y: The StreamTokenizer cannot "peek" for the
7186	next character, it reads it, and keeps it for the next call.  So the
7187	current location is one passed the end of the current token.  To avoid
7188	this, keep the previous position, and use it to end the current token.
7189	* examples/java/calc/Calc.test: Adjust.
7190
71912020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7192
7193	java: examples: prefer switch to chains of else-if
7194	* examples/java/calc/Calc.y, examples/java/simple/Calc.y: here.
7195	* examples/java/simple/Calc.y: Use the tokenizer's handling of blanks.
7196
71972020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7198
7199	java: examples: split in two
7200	* examples/java: Split in...
7201	* examples/java/simple, examples/java/calc: these.
7202
72032020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7204
7205	traces: don't print the stack before the gotos
7206	The C, C++ and D skeletons used to show the stack right after popping
7207	the stack during the reduction.  Now that the stack is printed after
7208	reaching a new state, that has become useless:
7209
7210	    Entering state 1
7211	    Stack now 0 1
7212	    Reducing stack by rule 5 (line 83):
7213	       $1 = token "number" (1)
7214	    -> $$ = nterm exp (1)
7215	    Stack now 0
7216	    Entering state 8
7217	    Stack now 0 8
7218
7219	Remove the "Stack now 0" line.
7220
7221	* data/skeletons/lalr1.cc, data/skeletons/lalr1.d,
7222	* data/skeletons/lalr1.java, data/skeletons/yacc.c:
7223	Here.
7224
72252020-02-05  Akim Demaille  <akim.demaille@gmail.com>
7226
7227	traces: show the stack after reading a token
7228	Currently, if we have long rules and series of shift, we stack states
7229	without showing stack.  Let's be more incremental, and do how the Java
7230	skeleton does.
7231
7232	* data/skeletons/lalr1.cc, data/skeletons/lalr1.d,
7233	* data/skeletons/yacc.c:
7234	Here.
7235	Adjust test cases.
7236	* tests/torture.at (AT_DATA_STACK_TORTURE): Disable stack traces: this
7237	test produces a very large stack, and showing the stack each time we
7238	shift a token goes quadatric.
7239
72402020-02-04  Akim Demaille  <akim.demaille@gmail.com>
7241
7242	traces: write the "Reading a token" alone on its line
7243	The Java skeleton displays
7244
7245	    Reading a token:
7246	    Next token is token "number" (1)
7247
7248	while the other display
7249
7250	    Reading a token: Next token is token "number" (1)
7251
7252	When generating logs in the scanner, the first part is separated from
7253	the second, and the end of the scanner logs have the second part
7254	pasted in.  So let's propagate the Java way, but with the colon.
7255
7256	* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/lalr1.d,
7257	* data/skeletons/lalr1.java, data/skeletons/yacc.c: Do it.
7258	Adjust test cases and doc.
7259
72602020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7261
7262	java: use the same calc tests as the other skeletons
7263	* tests/local.at (AT_LANG_MATCH): New.
7264	(AT_YYERROR_DECLARE(java), AT_YYERROR_DECLARE_EXTERN(java)): New.
7265	* tests/calc.at: The grammar file for Java is quite different for the
7266	others, and continuing to assemble it from pieces makes the grammar
7267	file hard to understand.  Let's also dispatch on the language to
7268	assemble it, and isolate Java from the others.
7269	Most of this comes from java.at.
7270
72712020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7272
7273	java: add access to the number of errors
7274	* data/skeletons/lalr1.java (yynewrrs, getNumberOfErrors): New.
7275	Formatting changes.
7276
72772020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7278
7279	java: formatting changes
7280	* data/skeletons/java.m4, data/skeletons/lalr1.java: here.
7281
72822020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7283
7284	java: avoid trailing white spaces
7285	* data/skeletons/java.m4 (b4_maybe_throws): Issue a space before when needed.
7286	* data/skeletons/lalr1.java: Avoid trailing spaces.
7287
72882020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7289
7290	java: example: properly track the locations
7291	This example, so far, was tracking the current token number, not the
7292	current column number.  This is not nice for an example...
7293
7294	* examples/java/Calc.y (PositionReader): New.
7295	Use it.
7296	* examples/java/Calc.test: Check the output.
7297
72982020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7299
7300	java: example: improve
7301	* examples/java/Calc.y: Propagate the exit status.
7302	Support -p.
7303
73042020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7305
7306	java: example: rely on autoboxing
7307	AFAICT, autoboxing/unboxing was added in Java 5 (September 30, 2004).
7308	I think we can afford to use it.  It should help us merge some Java
7309	tests with the main ones.
7310
7311	However, beware that != does not unbox: it compares the object
7312	addresses.
7313
7314	* examples/java/Calc.y, tests/java.at: Simplify.
7315	* examples/java/Calc.test, tests/java.at: Improve tests.
7316
73172020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7318
7319	tests: comment changes
7320	* tests/calc.at: Shorten titles and reduce redundancy.
7321
73222020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7323
7324	skeletons: add support for %code epilogue
7325	When building the test cases, emitting code in the epilogue is very
7326	constraining.  Let's make it simpler thanks to %code epilogue.
7327
7328	However, I don't want to document this: it is bad style to use it (we
7329	should avoid having too many ways to write the same thing,
7330	TI!MTOWTDI), just put your code in the true epilogue section.
7331
7332	* data/skeletons/glr.c, data/skeletons/lalr1.d, data/skeletons/lalr1.java,
7333	* data/skeletons/yacc.c: Implement support for %code epilogue.
7334	Remove useless comments.
7335	* tests/calc.at, tests/java.at: Simplify.
7336
73372020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7338
7339	examples: bistromathic: fix location tracking
7340	* examples/c/bistromathic/scan.l (LOCATION_STEP): New.
7341	Use to properly ignore blanks.
7342	* examples/c/bistromathic/bistromathic.test: Check that case.
7343
73442020-02-02  Akim Demaille  <akim.demaille@gmail.com>
7345
7346	doc: document new features of parse.error
7347	* doc/bison.texi (Error Reporting): Rename as...
7348	(Error Reporting Function): this.
7349	Adjust dependencies.
7350	Make it a subsection of this...
7351	(Error Reporting): new section.
7352	(Syntax Error Reporting Function): New.
7353	(parse.error): Update description.
7354
73552020-01-29  Akim Demaille  <akim.demaille@gmail.com>
7356
7357	glr.c: add support for parse.error=custom
7358	* data/skeletons/glr.c (yyreportSyntaxError): Call the user's
7359	yyreport_syntax_error in custom mode.
7360	* tests/calc.at: Check it.
7361
73622020-01-29  Akim Demaille  <akim.demaille@gmail.com>
7363
7364	glr.c: add support for parse.error=detailed
7365	* data/skeletons/glr.c (yystrlen, yysymbol_name): New.
7366	Implement parse.error detailed.
7367	* tests/calc.at: Check it.
7368
73692020-01-29  Akim Demaille  <akim.demaille@gmail.com>
7370
7371	glr.c: introduce yyexpected_tokens and yysyntax_error_arguments
7372	Modeled after what was done in yacc.c, yet somewhat different since
7373	yyGLRStack play the role of the full yyparse_context_t.  It will
7374	probably be defined as a alias, to make interfaces compatible.
7375
7376	LAC is not supported here.  And is somewhat tricky.
7377
7378	* data/skeletons/glr.c (yyexpected_tokens, yysyntax_error_arguments): New.
7379
73802020-01-29  Akim Demaille  <akim.demaille@gmail.com>
7381
7382	glr.c: move code around
7383	* data/skeletons/glr.c: Move the handling of error messages after the
7384	definition of types.  Especially after yyGLRStack, which we will need
7385	in forthcoming patches.
7386	Simplify: yyGLRStack is defined at this point.
7387
73882020-01-29  Akim Demaille  <akim.demaille@gmail.com>
7389
7390	glr.c: rename yyStateNum as yy_state_t
7391	* data/skeletons/glr.c: here.
7392	For consistency with yacc.c.
7393
73942020-01-29  Akim Demaille  <akim.demaille@gmail.com>
7395
7396	yacc.c: fix misleading indentation
7397	* data/skeletons/yacc.c: here.
7398
73992020-01-27  Akim Demaille  <akim.demaille@gmail.com>
7400
7401	doc: simplify uses of @ref
7402	The PDF output is more consistent: some nodes were not pointed to with
7403	their title.  The HTML output becomes "see section Foo" instead of
7404	"see Foo", but this should be addressed in the next Texinfo release.
7405	Info output is simplified, as it uses only the node name and not its
7406	title.  But it's considered easier to read this way.
7407	See https://lists.gnu.org/r/help-texinfo/2020-01/msg00031.html.
7408
7409	* doc/bison.texi: Set @xrefautomaticsectiontitle on.
7410	Simplify all uses of ref.
7411
74122020-01-27  Akim Demaille  <akim.demaille@gmail.com>
7413
7414	examples: be more robust to spaces in paths
7415	Reported by Nikki Valen.
7416	https://lists.gnu.org/r/bug-bison/2020-01/msg00032.html
7417
7418	* examples/test ($prog): Remove, replaced by...
7419	(prog): This new function, which pays attention to quoting shell
7420	variables.
7421
74222020-01-27  Akim Demaille  <akim.demaille@gmail.com>
7423
7424	doc: don't pretend trigonometry is part of arithmetics
7425	* doc/bison.texi (arith_funs): Rename as...
7426	(funs): this.
7427
74282020-01-27  Akim Demaille  <akim.demaille@gmail.com>
7429
7430	doc: update Doxygen template
7431	* Doxyfile.in: Run doxygen -u on it.
7432
74332020-01-27  Akim Demaille  <akim.demaille@gmail.com>
7434
7435	examples: add a complete example with all the bells and whistles
7436	* examples/c/bistromathic/Makefile,
7437	* examples/c/bistromathic/README.md,
7438	* examples/c/bistromathic/bistromathic.test,
7439	* examples/c/bistromathic/local.mk,
7440	* examples/c/bistromathic/parse.y,
7441	* examples/c/bistromathic/scan.l:
7442	New.
7443
7444	* Makefile.am (AM_YFLAGS_WITH_LINES): Add -Wdangling-alias.
7445	* examples/test: Make failure errors easier to read.
7446
74472020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7448
7449	examples: add an example of a push parser
7450	Add an example to demonstrate the use of push parser.  I'm pleasantly
7451	surprised: parse.error=detailed works like a charm with push parsers.
7452
7453	* examples/c/local.mk, examples/c/pushcalc/Makefile
7454	* examples/c/pushcalc/README.md, examples/c/pushcalc/calc.test,
7455	* examples/c/pushcalc/calc.y, examples/c/pushcalc/local.mk:
7456	New.
7457
74582020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7459
7460	examples: more tests
7461	* examples/c/mfcalc/mfcalc.test: here.
7462
74632020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7464
7465	examples: clean up
7466	* examples/c/calc/calc.y: Restore to its original state, with
7467	parse.error=detailed instead of parse.error=custom (this example
7468	should be simple).
7469	* examples/c/calc/calc.test: Check syntax errors.
7470	* examples/c/lexcalc/parse.y: Add comments.
7471
74722020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7473
7474	tests: check custom error messages and push parsers
7475	* tests/local.at (AT_LAC_IF): New.
7476	* tests/calc.at: And also check the suppot for LAC.
7477
74782020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7479
7480	style: formatting changes
7481	* data/skeletons/lalr1.java: here.
7482
74832020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7484
7485	todo: update
7486
74872020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7488
7489	bison: pretend to 3.6 already
7490	* src/parse-gram.y: here.
7491
74922020-01-26  Akim Demaille  <akim.demaille@gmail.com>
7493
7494	git: update ignores
7495	* lib/.gitignore: here.
7496
74972020-01-23  Akim Demaille  <akim.demaille@gmail.com>
7498
7499	regen
7500
75012020-01-23  Akim Demaille  <akim.demaille@gmail.com>
7502
7503	diagnostics: modernize bison's syntax errors
7504	We used to display the unexpected token first:
7505
7506	    $ bison foo.y
7507	    foo.y:1.8-13: error: syntax error, unexpected %token, expecting character literal or identifier or <tag>
7508	        1 | %token %token
7509	          |        ^~~~~~
7510
7511	GCC uses a different format:
7512
7513	    $ gcc-mp-9 foo.c
7514	    foo.c:1:5: error: expected identifier or '(' before ')' token
7515	        1 | int()()()
7516	          |     ^
7517
7518	and so does Clang:
7519
7520	    $ clang-mp-9.0 foo.c
7521	    foo.c:1:5: error: expected identifier or '('
7522	    int()()()
7523	        ^
7524	    1 error generated.
7525
7526	They display the unexpected token last (or not at all).  Also, they
7527	don't waste width with "syntax error".  Let's try that.  It gives, for
7528	the same example as above:
7529
7530	    $ bison foo.y
7531	    foo.y:1.8-13: error: expected character literal or identifier or <tag> before %token
7532	        1 | %token %token
7533	          |        ^~~~~~
7534
7535	* src/complain.h, src/complain.c (syntax_error): New.
7536	* src/parse-gram.y (yyreport_syntax_error): Use it.
7537
75382020-01-23  Akim Demaille  <akim.demaille@gmail.com>
7539
7540	regen
7541
75422020-01-23  Akim Demaille  <akim.demaille@gmail.com>
7543
7544	diagnostics: report syntax errors in color
7545	* src/parse-gram.y (parse.error): Set to 'custom'.
7546	(yyreport_syntax_error): New.
7547	* data/bison-default.css (.expected, .unexpected): New.
7548	* tests/diagnostics.at: Adjust.
7549
75502020-01-23  Akim Demaille  <akim.demaille@gmail.com>
7551
7552	regen
7553
75542020-01-23  Akim Demaille  <akim.demaille@gmail.com>
7555
7556	diagnostics: translate bison's own tokens
7557	As a test case, support translations in Bison itself.
7558
7559	* src/parse-gram.y: Mark the translatable tokens.
7560	While at it, use clearer names.
7561	* tests/input.at: Adjust expectations.
7562
75632020-01-22  Akim Demaille  <akim.demaille@gmail.com>
7564
7565	diagnostics: handle -fno-caret in the called functions
7566	Don't force callers of location_caret to have to deal with flags that
7567	disable it.
7568
7569	* src/location.h, src/location.c (location_caret)
7570	(location_caret_suggestion): Early return if disabled.
7571	* src/complain.c: Simplify.
7572
75732020-01-22  Akim Demaille  <akim.demaille@gmail.com>
7574
7575	yacc.c: fixes
7576	* data/skeletons/yacc.c: Avoid warnings about unused functions.
7577	Fix typo.
7578
75792020-01-21  Akim Demaille  <akim.demaille@gmail.com>
7580
7581	examples: be more robust to spaces in paths
7582	Reported by Nikki Valen.
7583	https://lists.gnu.org/r/bug-bison/2020-01/msg00032.html
7584
7585	* examples/test ($prog): Remove, replaced by...
7586	(prog): This new function, which pays attention to quoting shell
7587	variables.
7588
75892020-01-21  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
7590
7591	larlr1.cc: Reject unsupported values for parse.lac
7592	Just as the yacc.c skeleton, the lalr1.cc skeleton should reject
7593	invalid values for parse.lac.
7594
7595	* data/skeletons/lalr1.cc: check validity of parse.lac
7596	* tests/input.at: new test cases
7597
75982020-01-21  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
7599
7600	larlr1.cc: Reject unsupported values for parse.lac
7601	Just as the yacc.c skeleton, the lalr1.cc skeleton should reject
7602	invalid values for parse.lac.
7603
7604	* data/skeletons/lalr1.cc: check validity of parse.lac
7605	* tests/input.at: new test cases
7606
76072020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7608
7609	parsers: issue tname with i18n markup
7610	Some users would like to avoid having to "parse" the *.y file to find
7611	the strings to translate.  Let's issue the translatable tokens with N_
7612	to allow "parsing" the generated parsers instead.
7613
7614	See
7615	https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00015.html
7616
7617	* src/output.c (prepare_symbol_names): Issue symbol_names with N_()
7618	markup.
7619
76202020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7621
7622	tests: check token internationalization
7623	* tests/calc.at: Check it.
7624
76252020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7626
7627	regen
7628
76292020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7630
7631	parsers: support translatable token aliases
7632	In addition to
7633
7634	    %token NUM "number"
7635
7636	accept
7637
7638	    %token NUM _("number")
7639
7640	in which case the token will be translated in error messages.
7641	Do not use _() in the output if there are no translatable tokens.
7642
7643	* src/symtab.h, src/symtab.c (symbol): Add a 'translatable' member.
7644	* src/parse-gram.y (TSTRING): New token.
7645	(string_as_id.opt): Replace with...
7646	(alias): this.
7647	Use it.
7648	* src/scan-gram.l (SC_ESCAPED_TSTRING): New start conditions, to match
7649	TSTRINGs.
7650	* src/output.c (prepare_symbols): Define b4_translatable if there are
7651	translatable strings.
7652
7653	* data/skeletons/glr.c, data/skeletons/lalr1.cc,
7654	* data/skeletons/yacc.c (yytnamerr): Receive b4_translatable, and use it.
7655
76562020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7657
7658	tests: check that detailed error messages preserve UTF-8 characters
7659	* tests/regression.at: here.
7660
76612020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7662
7663	yacc.c: escape trigraphs in detailed parse.error
7664	* src/output.c (escape_trigraphs, xescape_trigraphs): New.
7665	(prepare_symbol_names): Use it.
7666	* tests/regression.at: Check the handling of trigraphs with
7667	parse.error = detailed.
7668
76692020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7670
7671	regen
7672
76732020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7674
7675	bison: use detailed error messages
7676	* #: .
7677
76782020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7679
7680	regen
7681
76822020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7683
7684	yacc.c: tests: check detailed error messages
7685	* tests/local.at (AT_ERROR_DETAILED_IF): New.
7686	(AT_ERROR_SIMPLE_IF): Adjust.
7687	* tests/calc.at: Check parse.error=detailed.
7688
76892020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7690
7691	yacc.c: add support for parse.error detailed
7692	"detailed" error messages are almost like "verbose", except that we
7693	don't double escape them, they don't get inner quotes, we don't use
7694	yytnamerr, and we hide the table.
7695
7696	"custom" is exposed with the "detailed" tokens, not the "verbose"
7697	ones: they are not double-quoted.
7698
7699	Because there's a risk that some people use yytname even without
7700	"verbose", let's keep yytname (instead of yys_name) in "simple"
7701	parse.error.
7702
7703	* src/output.c (prepare_symbol_names): Be ready to output symbol names
7704	unquoted.
7705	(prepare_symbol_names): Output both the old tname table, and the new
7706	symbol_names one.
7707	* data/skeletons/bison.m4: Accept 'detailed'.
7708	* data/skeletons/yacc.c: When parse.error is 'detailed', don't emit
7709	yytname and yytnamerr, just yysymbol_name with the table inside.
7710	* tests/calc.at: Adjust.
7711
77122020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7713
7714	c: use yysymbol_name in traces
7715	Only parse.error verbose and simple will get the original yytname: the
7716	other options will rely on a different table.  So let's move on top of
7717	the yysymbol_name function.
7718
7719	* data/skeletons/c.m4 (yy_symbol_print): Use yysymbol_name.
7720	* data/skeletons/glr.c (yytokenName): Rename as...
7721	(yysymbol_name): this.
7722	The change of naming scheme is unfortunate, but it's definitely glr.c
7723	which is "wrong".
7724
77252020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7726
7727	glr.c: move some functions after the definition of types
7728	Currently yy_symbol_print is defined before yytokenName, although it
7729	should use it instead of read yytname directly.  Move blocks around to
7730	avoid this.
7731
7732	* data/skeletons/glr.c (yy_symbol_print): Move its definition after
7733	that of yytokenName.
7734
77352020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7736
7737	Merge branch 'maint'
7738	* maint:
7739	  maint: post-release administrivia
7740	  version 3.5.1
7741	  news: update
7742	  CI: use ICC again
7743	  warnings: pacify ICC in lalr1.cc
7744	  test: report.at: avoid tiny new failure
7745	  git: update ignores
7746
77472020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7748
7749	maint: post-release administrivia
7750	* NEWS: Add header line for next release.
7751	* .prev-version: Record previous version.
7752	* cfg.mk (old_NEWS_hash): Auto-update.
7753
77542020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7755
7756	version 3.5.1
7757	* NEWS: Record release date.
7758
77592020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7760
7761	news: update
7762
77632020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7764
7765	CI: use ICC again
7766	See https://github.com/nemequ/icc-travis/issues/15.
7767	Thanks to Jeff Hammond and Evan Nemerson for their help.
7768
7769	* configure.ac (warn_common): Disable dubious warnings.
7770	* .travis.yml: Use ICC again.
7771
77722020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7773
7774	warnings: pacify ICC in lalr1.cc
7775	See 139d0655947c87f90af08718618feaaca0e558d7.
7776
7777	* data/skeletons/yacc.c: If I might be a char, write a[+I] instead of
7778	a[I], so that ICC does not complain.
7779
77802020-01-19  Jim Meyering  <meyering@fb.com>
7781
7782	test: report.at: avoid tiny new failure
7783	Be robust to newer versions of Autoconf where the package URL defaults
7784	to https instead of http.
7785
7786	* configure.ac (AC_INIT): Use https.
7787	* tests/report.at: Adjust expected output s/http/https/
7788	to match updated URL.
7789
77902020-01-19  Akim Demaille  <akim.demaille@gmail.com>
7791
7792	git: update ignores
7793
77942020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7795
7796	regen
7797
77982020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7799
7800	yacc.c: portability to G++ 4.8
7801	Currently we get warnings with GCC 4.8 when running the
7802	maintainer-check-g++ tests:
7803
7804	    143. skeletons.at:85: testing Installed skeleton file names ...
7805	    ../../tests/skeletons.at:120: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y
7806	    ../../tests/skeletons.at:121: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o input-cmd-line input-cmd-line.c $LIBS
7807	    stderr:
7808	    input-cmd-line.c: In function 'int yysyntax_error(long int*, char**, const yyparse_context_t*)':
7809	    input-cmd-line.c:977:52: error: conversion to 'int' from 'long int' may alter its value [-Werror=conversion]
7810	                                       YYSIZEOF (yyarg) / YYSIZEOF (*yyarg));
7811	                                                        ^
7812	    cc1plus: all warnings being treated as errors
7813	    stdout:
7814	    ../../tests/skeletons.at:121: exit code was 1, expected 0
7815
7816	and
7817
7818	    429. calc.at:823: testing Calculator parse.error=custom %locations api.prefix={calc}  ...
7819	    ../../tests/calc.at:823: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret -Wno-deprecated -o calc.c calc.y
7820	    ../../tests/calc.at:823: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o calc calc.c $LIBS
7821	    stderr:
7822	    calc.y: In function 'int yyreport_syntax_error(const yyparse_context_t*)':
7823	    calc.y:157:58: error: conversion to 'int' from 'long unsigned int' may alter its value [-Werror=conversion]
7824	       int n = yysyntax_error_arguments (ctx, arg, sizeof arg / sizeof *arg);
7825	                                                              ^
7826	    cc1plus: all warnings being treated as errors
7827	    stdout:
7828	    ../../tests/calc.at:823: exit code was 1, expected 0
7829
7830	We could use a cast to avoid the warning, but it becomes too
7831	cluttered.  We can also use YYPTRDIFF_T, but that forces the user to
7832	use YYPTRDIFF_T too, although this is an array of tokens, which is
7833	limited by YYNTOKENS, an int.  So let's completely avoid this warning.
7834
7835	* data/skeletons/yacc.c, tests/local.at (yyreport_syntax_error): Avoid
7836	relying on sizeof to compute the array capacity.
7837
78382020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7839
7840	yacc.c: pass the parse-params to yyreport_syntax_error
7841	Enhance the calculator tests: show that passing arguments to yyerror
7842	works.
7843
7844	* tests/calc.at: Add a new parse-param, nerrs, which counts the number
7845	of syntax errors in a run.
7846	* tests/local.at: Adjust to handle the new 'nerrs' argument, when
7847	present.
7848
7849	The custom error reporting function show sees the user's additional
7850	arguments.  Let's experiment with passing them as arguments to
7851	yyreport_syntax_error, but maybe storing them in the context would be
7852	a bettter alternative.
7853
7854	* data/skeletons/yacc.c (yyreport_syntax_error): Handle the
7855	parse-params.
7856	* tests/calc.at, tests/local.at: Adjust.
7857
78582020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7859
7860	tests: a clearer test for parse-params
7861	Currently the parse-params are tested in calc.at by checking that the
7862	global variable and the parse-params have the same value.  But it does
7863	not check that value, that could remain being 0 just as well.
7864
7865	* tests/calc.at: Don't define the params when they are not used.
7866	Check the final value of result and count.
7867	Also, do count the number of line of logs.
7868
78692020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7870
7871	yacc.c: check custom error messages with parse-params
7872	* tests/calc.at: Check with prefix and parse-params.
7873
78742020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7875
7876	yacc.c: let custom error messages see the location
7877	* data/skeletons/yacc.c (yyparse_context_t): Add yylloc when
7878	applicable.
7879	(yyparse_context_location): New.
7880	* tests/local.at (AT_YYERROR_DEFINE(c)): Handle the location.
7881	* tests/calc.at: Check it.
7882
78832020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7884
7885	yacc.c: isolate yyexpected_tokens
7886	Provide users with a means to query for the currently allowed tokens.
7887	Could be used for autocompletion for instance.
7888
7889	* data/skeletons/yacc.c (yyexpected_tokens): New, extracted from
7890	yysyntax_error_arguments.
7891	* examples/c/calc/calc.y (PRINT_EXPECTED_TOKENS): New.
7892	Use it.
7893
78942020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7895
7896	tests: compute verbose error messages from the custom ones
7897	We use a different format to check parse.error custom.  Compute the
7898	"verbose" one from it instead of forcing the test author to provide
7899	the various formats of expected error messages.
7900
7901	* tests/calc.at (_AT_CHECK_CALC_ERROR): Handle this transformation
7902	when needed.
7903	Simplify callers.
7904
79052020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7906
7907	yacc.c: check custom error messages
7908	* tests/local.at (AT_ERROR_CUSTOM_IF, AT_ERROR_VERBOSE_IF)
7909	(AT_ERROR_SIMPLE_IF): New.
7910	(AT_YYERROR_DEFINE(c)): Generate yyreport_syntax_error.
7911	* tests/calc.at (_AT_CHECK_CALC_ERROR): Accept custom error messages
7912	as additional test case.
7913	Use it.
7914	Add a new test case for %define parse.error custom.
7915
79162020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7917
7918	yacc.c: add custom error message generation
7919	When parse.error is custom, let users define a yyreport_syntax_error
7920	function, and use it.
7921
7922	* data/skeletons/bison.m4 (b4_error_verbose_if): Accept 'custom'.
7923	* data/skeletons/yacc.c: Implement it.
7924	* examples/c/calc/calc.y: Experiment with it.
7925
79262020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7927
7928	yacc.c: style: avoid macros
7929	* data/skeletons/yacc.c (YYSYNTAX_ERROR): Remove, the call is now
7930	sufficiently small so that we can afford to duplicate it.
7931
79322020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7933
7934	yacc.c: store token numbers, not token strings
7935	That allows users to cover more cases, such as easily filtering some
7936	arguments they don't want to expose.  But they now have to call
7937	yysymbol_name explicitly.
7938
7939	* data/skeletons/yacc.c (yysyntax_error_arguments, yysyntax_error):
7940	Deal with symbol numbers instead of symbol names.
7941
79422020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7943
7944	yacc.c: extract yyerror_message_arguments
7945	Isolate a function that returns the list of expected and unexpected
7946	tokens.  It will be exposed to users willing to customize their error
7947	messages.
7948
7949	* data/skeletons/yacc.c (yyparse_context_t): New.
7950	(yyerror_message_arguments): New, extracted from yysyntax_error.
7951
79522020-01-17  Akim Demaille  <akim.demaille@gmail.com>
7953
7954	regen
7955
79562020-01-15  Akim Demaille  <akim.demaille@gmail.com>
7957
7958	tests: make AT_PARSE_PARAMS usable at the end of arguments
7959	When not empty, AT_PARSE_PARAMS was guaranteed to end with a comma.
7960	Remove the trailing comma, so that we can use AT_PARSE_PARAMS at the
7961	end of the arguments, not only at the beginning.
7962
7963	* tests/local.at: here.
7964	Unfortunately, m4_append relies on the macro not being defined whereas
7965	we would have preferred it to check for emptiness.  So use
7966	m4_define/m4_undefine instead of m4_pushdef/m4_popdef.
7967
79682020-01-15  Akim Demaille  <akim.demaille@gmail.com>
7969
7970	tests: fix AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS pairs
7971	* tests/glr-regression.at, tests/java.at, tests/javapush.at:
7972	Close properly what is opened.
7973	Do not nest.
7974
79752020-01-15  Akim Demaille  <akim.demaille@gmail.com>
7976
7977	d, java: use traces more alike that of C
7978	Same order, same places, same content.
7979
7980	* data/skeletons/lalr1.d, data/skeletons/lalr1.java: here.
7981
79822020-01-15  Akim Demaille  <akim.demaille@gmail.com>
7983
7984	c++: report the stack at the same places as in C
7985	Let's have C be the reference, and match it elsewhere.  Maybe C is too
7986	verbose and some adjustments are needed, but then that would be done
7987	in another batch of patches.
7988
7989	* data/skeletons/lalr1.cc: Print the stack once we popped after
7990	YYERROR, and before emptying the stack at the end of parsing.
7991
79922020-01-15  Akim Demaille  <akim.demaille@gmail.com>
7993
7994	c++: display the stack in the same order as in C
7995	Currently the C and C++ parse traces differ in the order in which the
7996	stack is displayed: bottom up in C, top down in C++.  Let's stick to
7997	the C order.
7998
7999	* data/skeletons/stack.hh (stack::iterator, stack::const_iterator)
8000	(begin, end): Be forward, not backward.
8001
80022020-01-15  Akim Demaille  <akim.demaille@gmail.com>
8003
8004	style: avoid redundancy in the tests
8005	* tests/local.at (m4_rpatsubst): New.
8006	Use it to handle %parse-params.
8007	* tests/calc.at: Use %parse-params with several arguments.
8008
80092020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8010
8011	yacc.c: comment changes
8012	In particular, import Adrian Vogelsgesang's comments about LAC from
8013	lalr1.cc.
8014
8015	* data/skeletons/yacc.c: here.
8016
80172020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8018
8019	yacc.c: style: double-quote the argument of b4_percent_define_get
8020	* data/skeletons/yacc.c: Here, for consistency.
8021
80222020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8023
8024	yacc.c: introduce yysymbol_name
8025	Provide the users with a public API to get the name of the tokens.  A
8026	thin wrapper around yytname.
8027
8028	* data/skeletons/yacc.c (yysymbol_name): New.
8029	Use it.
8030
80312020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8032
8033	CI: check on PPC64le, ARM64 and s390x
8034	I was hoping it would help us catch warnings when char is
8035	unsigned (see 78bb152a63f711af65364881c434af4c198e1ee0), but it does
8036	not seem to help.  It's a pity that the compiler is the same all over
8037	the place, I would have preferred testing others.
8038
8039	* .travis.yml: here.
8040
80412020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8042
8043	todo: update
8044
80452020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8046
8047	Merge branch 'maint' into HEAD
8048	* maint:
8049	  gnulib: update
8050	  lalr1.cc: avoid static_cast
8051	  glr.c: add missing cast
8052	  regen
8053	  package: bump copyrights to 2020
8054	  gitignore: update
8055
80562020-01-11  Akim Demaille  <akim.demaille@gmail.com>
8057
8058	gnulib: update
8059
80602020-01-10  Akim Demaille  <akim.demaille@gmail.com>
8061
8062	lalr1.cc: avoid static_cast
8063	Reported by donmac703.
8064	Fixes https://github.com/akimd/bison/issues/20.
8065
8066	* data/skeletons/lalr1.cc: here.
8067
80682020-01-10  Akim Demaille  <akim.demaille@gmail.com>
8069
8070	glr.c: add missing cast
8071	Reported by psjo.
8072	Fixes https://github.com/akimd/bison/issues/19.
8073
8074	* data/skeletons/glr.c (yyprocessOneStack): Here.
8075
80762020-01-10  Akim Demaille  <akim.demaille@gmail.com>
8077
8078	regen
8079
80802020-01-10  Akim Demaille  <akim.demaille@gmail.com>
8081
8082	package: bump copyrights to 2020
8083	Run 'make update-copyright'.
8084
80852020-01-10  Akim Demaille  <akim.demaille@gmail.com>
8086
8087	gitignore: update
8088
80892020-01-10  Akim Demaille  <akim.demaille@gmail.com>
8090
8091	regen
8092
80932020-01-09  Akim Demaille  <akim.demaille@gmail.com>
8094
8095	yacc.c: simplify use of YYDPRINTF
8096	* data/skeletons/yacc.c (YYDPRINTF): Expand to no-op (instead of
8097	nothing) when disabled.
8098	Simplify callers.
8099
81002020-01-05  Akim Demaille  <akim.demaille@gmail.com>
8101
8102	package: bump copyrights to 2020
8103	Run 'make update-copyright'.
8104
81052020-01-05  Akim Demaille  <akim.demaille@gmail.com>
8106
8107	gitignore: update
8108
81092020-01-04  Akim Demaille  <akim.demaille@gmail.com>
8110
8111	doc: YYERROR_VERBOSE is no longer supported
8112	* doc/bison.texi (Table of Symbols): Remove last reference to it.
8113	* NEWS: Be clear about that.
8114
81152020-01-04  Akim Demaille  <akim.demaille@gmail.com>
8116
8117	glr.c: no longer support YYERROR_VERBOSE
8118	* data/skeletons/glr.c: Rather, dispatch directly on parse.error's
8119	value.
8120
81212020-01-04  Akim Demaille  <akim.demaille@gmail.com>
8122
8123	yacc.c: no longer support YYERROR_VERBOSE
8124	Supporting YYERROR_VERBOSE via cpp is a nuisance: m4 is in charge of
8125	handling alternatives.  When adding more options for %define
8126	parse.error, supporting both CPP and M4 is too complex.  Anyway,
8127	YYERROR_VERBOSE was deprecated long ago.
8128
8129	* data/skeletons/yacc.c: Use m4 only to handle verbose/simple error
8130	messages.
8131
81322020-01-03  Akim Demaille  <akim.demaille@gmail.com>
8133
8134	yacc.c: avoid negations
8135	* data/skeletons/yacc.c (yyerrlab): here.
8136
81372019-12-31  Akim Demaille  <akim.demaille@gmail.com>
8138
8139	glr.c: clarify yyreportSyntaxError
8140	See the previous commit.
8141
8142	* data/skeletons/glr.c (yyreportSyntaxError): First compute the
8143	arguments of the error message, _then_ th error message size.
8144
81452019-12-31  Akim Demaille  <akim.demaille@gmail.com>
8146
8147	yacc: restructure and fix yysyntax_error
8148	I would like to offer new ways to build the error message.  As a first
8149	step, let's simplify yysyntax_error whose first loop does two things
8150	at the same time: (i) collect the tokens to be reported in the error
8151	message, and (ii) accumulate their sizes and possibly return
8152	"overflow".  Let's pull (ii) in a second step.
8153
8154	Then test 525 (regression.at:1193: parse.error=verbose overflow)
8155	failed.  This test checks that we correctly report "memory overflow"
8156	when the error message is too large.  However the test is mistaken: it
8157	is triggered in a place where there are five (large) expected tokens,
8158	so anyway we would not display them, so there is no (memory) overflow
8159	here!  Transform this test to (i) check that indeed there is no
8160	overflow, and (ii) create syntax_error3 which does check the intended
8161	behavior, but with four expected tokens.
8162
8163	* data/skeletons/yacc.c (yysyntax_error): First compute the list of
8164	arguments, then compute yysize.
8165	* tests/regression.at (parse.error=verbose overflow): Enhance and fix.
8166
81672019-12-31  Akim Demaille  <akim.demaille@gmail.com>
8168
8169	tests: also check -Wchar-subscripts
8170	GCC's -Wchar-subscripts may report issues on platforms where char is
8171	unsigned.  Unfortunately the current CI does not reproduce the
8172	problem.  But that would allow contributors to report issues if the
8173	warning appears somewhere.
8174
8175	See 139d0655947c87f90af08718618feaaca0e558d7.
8176	Problem reported by Andy Fiddaman in:
8177	https://lists.gnu.org/r/bug-bison/2019-12/msg00021.html
8178
8179	* configure.ac (warn_common): Add -Wchar-subscripts.
8180
81812019-12-30  Akim Demaille  <akim.demaille@gmail.com>
8182
8183	CI: do not specify the language
8184	When we give travis the langugage, it overrides our envvars.  Instead
8185	of the MATRIX_EVAL trick, just stop specifying the language.
8186
81872019-12-30  Akim Demaille  <akim.demaille@gmail.com>
8188
8189	CI: remove ICC support, we can no longer use it
8190	https://github.com/nemequ/icc-travis/issues/15
8191
81922019-12-29  Akim Demaille  <akim.demaille@gmail.com>
8193
8194	doc: clean up the description of YYDEBUG
8195	* doc/bison.texi: Make it clearer that %define parse.trace is the
8196	preferred options.
8197	Fix a typo about api.prefix.
8198
81992019-12-29  Akim Demaille  <akim.demaille@gmail.com>
8200
8201	glr.cc: avoid compiler warnings
8202	    381. types.at:366: testing glr.cc api.value.type={double} ...
8203	    test.cc:207:57: error: "__clang_major__" is not defined, evaluates to 0 [-Werror=undef]
8204	      207 | #if defined __APPLE__ && YY_CPLUSPLUS < 201103L && 4 <= __clang_major__
8205	          |                                                         ^~~~~~~~~~~~~~~
8206
8207	* data/skeletons/glr.cc: Check __clang_major__ before using it.
8208
82092019-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8210
8211	warnings: pacify ‘gcc -Wchar-subscripts’ in yacc.c
8212	Problem reported by Andy Fiddaman in:
8213	https://lists.gnu.org/r/bug-bison/2019-12/msg00021.html
8214	* data/skeletons/yacc.c (yy_reduce_print, yy_lac, yysyntax_error)
8215	(yyreturn): If I might be a char, write a[+I] instead of a[I],
8216	so that ‘gcc -Wchar-subscripts’ does not complain.
8217
82182019-12-14  Akim Demaille  <akim.demaille@gmail.com>
8219
8220	doc: formatting changes
8221	* doc/bison.texi: No output changes.
8222
82232019-12-14  Akim Demaille  <akim.demaille@gmail.com>
8224
8225	tests: don't fail if seq is no available
8226	As is the case on Solaris.
8227	Reported by Dennis Clarke.
8228	https://lists.gnu.org/archive/html/bug-bison/2019-12/msg00011.html
8229
8230	* examples/c/reccalc/reccalc.test: Skip if there is no seq.
8231
82322019-12-11  Akim Demaille  <akim.demaille@gmail.com>
8233
8234	maint: post-release administrivia
8235	* NEWS: Add header line for next release.
8236	* .prev-version: Record previous version.
8237	* cfg.mk (old_NEWS_hash): Auto-update.
8238
82392019-12-11  Akim Demaille  <akim.demaille@gmail.com>
8240
8241	version 3.5
8242	* NEWS: Record release date.
8243
82442019-12-10  Akim Demaille  <akim.demaille@gmail.com>
8245
8246	news: prepare for 3.5
8247
82482019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8249
8250	glr.cc: disable warnings from Clang on macOS
8251	    $ cat test.cc
8252	    #include <stddef.h>
8253	    #include <stdint.h>
8254
8255	    ptrdiff_t half_max_capacity = PTRDIFF_MAX;
8256	    $ clang++-mp-9.0 -pedantic -std=c++98 /tmp/test.cc -c
8257	    /tmp/test.cc:4:31: warning: 'long long' is a C++11 extension [-Wc++11-long-long]
8258	    ptrdiff_t half_max_capacity = PTRDIFF_MAX;
8259	                                  ^
8260	    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdint.h:149:23:
8261	            note: expanded from macro 'PTRDIFF_MAX'
8262	    #define PTRDIFF_MAX       INT64_MAX
8263	                              ^
8264	    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdint.h:75:26:
8265	            note: expanded from macro 'INT64_MAX'
8266	    #define INT64_MAX        9223372036854775807LL
8267	                             ^
8268	    1 warning generated.
8269
8270	* data/skeletons/glr.cc: here.
8271
82722019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8273
8274	api.token.raw: fix it in C++
8275	Another breakage revealed by vcsn.
8276
8277	* data/skeletons/c++.m4 (yytranslate_): Do not hard code "yy" and
8278	"parser", both can be changed by the user.
8279	Actually, since we are in the parser itself, there's really no need to
8280	qualify the type.
8281
82822019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8283
8284	c++: fix comments for %code blocks
8285	In a project of mine, vcsn, this commit fixes the following comments.
8286
8287	    --- /tmp/parse.hh	2019-12-08 15:51:24.792934703 +0100
8288	    +++ lib/vcsn/rat/parse.hh	2019-12-08 16:00:59.137107503 +0100
8289	    @@ -43,7 +43,7 @@
8290
8291	     #ifndef YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_PARSE_HH_INCLUDED
8292	     # define YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_PARSE_HH_INCLUDED
8293	    -// //                    "%code requires" blocks.
8294	    +// "%code requires" blocks.
8295	     #line 20 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy"
8296
8297	       #include <iostream>
8298	    @@ -1851,7 +1851,7 @@
8299
8300	    -// //                    "%code provides" blocks.
8301	    +// "%code provides" blocks.
8302	     #line 60 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy"
8303
8304	       #define YY_DECL_(Class) \
8305
8306	* data/skeletons/bison.m4 (b4_percent_code_get): Pass an expanded
8307	string to b4_comment.
8308
83092019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8310
8311	parser: pretend we are Bison 3.5
8312	* src/parse-gram.y: Accept we're Bison 3.5.
8313
83142019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8315
8316	c++: fix spello
8317	* data/skeletons/lalr1.cc: here.
8318
83192019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8320
8321	todo: update
8322	* TODO: Schedule some features for 3.6.
8323	Remove obsolete stuff.
8324
83252019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8326
8327	maint: post-release administrivia
8328	* NEWS: Add header line for next release.
8329	* .prev-version: Record previous version.
8330	* cfg.mk (old_NEWS_hash): Auto-update.
8331
83322019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8333
8334	version 3.4.92
8335	* NEWS: Record release date.
8336
83372019-12-08  Akim Demaille  <akim.demaille@gmail.com>
8338
8339	news: fixes
8340	Reported by Paul Eggert.
8341	https://lists.gnu.org/archive/html/bison-patches/2019-12/msg00014.html
8342
8343	* NEWS: here.
8344
83452019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8346
8347	doc: minor changes
8348	* README-hacking.md: here.
8349
83502019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8351
8352	gnulib: update
8353
83542019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8355
8356	doc: clearly deprecate YYPRINT
8357	* doc/bison.texi (Prologue): Stop using YYPRINT as an example.
8358	(The YYPRINT Macro): Clearly show this macro is deprecated.
8359
83602019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8361
8362	doc: formatting changes
8363	* doc/bison.texi: here.
8364	No change in content.
8365
83662019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8367
8368	news: update
8369
83702019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8371
8372	d: obey parse.error
8373	* data/skeletons/lalr1.d (yysyntax_error): Let the dispatch be
8374	bison-time, not runtime.
8375
83762019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8377
8378	c++: also prefer YY_ASSERT to YYASSERT
8379	Like the other skeletons.
8380
8381	* data/skeletons/variant.hh: here.
8382
83832019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8384
8385	glr.c: obey the parse.assert %define variable
8386	* data/skeletons/glr.c (YYASSERT): Rename as...
8387	(YY_ASSERT): this, for consistency with yacc.c, and also to emphasize
8388	the fact that this is not for the end user (YY_ prefix).
8389	* tests/glr-regression.at: Define parse.assert.
8390
83912019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8392
8393	c++: beware of short ranges for state numbers
8394	Now that we use small integral types, possibly unsigned (e.g.,
8395	unsigned char), to store state numbers, using -1 to denote an empty
8396	state (i.e., a state that stores no semantical value) is very
8397	dangerous: it will be confused with state 255, which might be
8398	non-empty.
8399
8400	Rather than allocating a larger range of state numbers to keep the
8401	empty-state apart, let's use the number of a state known to store no
8402	value.  The initial state, numbered 0, seems to fit perfectly the job.
8403
8404	Reported by Frank Heckenbach.
8405	https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00016.html
8406
8407	* data/skeletons/lalr1.cc (empty_state): Be 0.
8408
84092019-12-07  Akim Demaille  <akim.demaille@gmail.com>
8410
8411	api.token.raw: check it against api.token.constructor
8412	* tests/scanner.at: here.
8413
84142019-12-06  Akim Demaille  <akim.demaille@gmail.com>
8415
8416	regen
8417
84182019-12-06  Akim Demaille  <akim.demaille@gmail.com>
8419
8420	warnings: enable -Wuseless-cast, and eliminate warnings
8421	Prompted by Frank Heckenbach.
8422	https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00016.html.
8423
8424	* configure.ac (warn_cxx): Add -Wuseless-cast.
8425	* data/skeletons/c.m4 (b4_attribute_define): Define
8426	YY_IGNORE_USELESS_CAST_BEGIN and YY_IGNORE_USELESS_CAST_END.
8427	* data/skeletons/glr.c (YY_FPRINTF): New, replaces YYFPRINTF, wrapped
8428	with YY_IGNORE_USELESS_CAST_BEGIN and YY_IGNORE_USELESS_CAST_END.
8429	(YY_DPRINTF): Likewise.
8430	* tests/actions.at: Remove useless cast.
8431	* tests/headers.at: Adjust.
8432
84332019-12-02  Akim Demaille  <akim.demaille@gmail.com>
8434
8435	diagnostics: style changes
8436	* src/complain.h, src/complain.c: Comment changes.
8437	* src/scan-skel.l: Reduce scopes.
8438	* data/skeletons/bison.m4: Factor diagnostic functions.
8439
84402019-12-02  Akim Demaille  <akim.demaille@gmail.com>
8441
8442	glr.c: style changes
8443	* data/skeletons/glr.c (yysplitStack): Reduce scopes.
8444	* tests/atlocal.in: Formatting changes.
8445
84462019-12-01  Akim Demaille  <akim.demaille@gmail.com>
8447
8448	c++: get rid of symbol_type::token ()
8449	It is not used.  And its implementation was wrong when api.token.raw
8450	was defined, as it was still mapping to the external token numbers,
8451	instead of the internal ones.  Besides it was provided only when
8452	api.token.constructor is defined, yet always declared.
8453
8454	* data/skeletons/c++.m4 (by_type::token): Remove, useless.
8455
84562019-12-01  Akim Demaille  <akim.demaille@gmail.com>
8457
8458	c++: remove useless cast about user_token_number_max_
8459	Reported by Frank Heckenbach.
8460	https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00016.html
8461
8462	The cast is needed when yytranslate_'s argument type is token_type,
8463	i.e., when api.token.constructor is defined.
8464
8465	    373. types.at:138: testing lalr1.cc api.value.type=variant api.token.constructor ...
8466	    ======== Testing with C++ standard flags: ''
8467	    ../../tests/types.at:138: bison --color=no -fno-caret  -o test.cc test.y
8468	    ../../tests/types.at:138: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o test test.cc $LIBS
8469	    stderr:
8470	    test.cc:966:16: error: result of comparison of constant 257 with
8471	                    expression of type 'yy::parser::token_type'
8472	                   (aka 'yy::parser::token::yytokentype') is always true
8473	                   [-Werror,-Wtautological-constant-out-of-range-compare]
8474	        else if (t <= user_token_number_max_)
8475	                 ~ ^  ~~~~~~~~~~~~~~~~~~~~~~
8476	    1 error generated.
8477
8478	It is because it is expected that when api.token.constructor is
8479	defined, only symbol constructors will be used, that yytranslate_ then
8480	takes a token_type.  But it is wrong: we still allow literal
8481	characters in this case, as demonstrated by test 373 for instance.
8482
8483	    %define api.value.type variant
8484	    %define api.token.constructor
8485	    %token <std::pair<int, int>> '1' '2';
8486	    [...]
8487	    static yy::parser::symbol_type yylex ()
8488	    {
8489	      static char const input[] = "12";
8490	      int res = input[toknum++];
8491	      typedef yy::parser::symbol_type symbol;
8492	      if (res)
8493	        return symbol (res, std::make_pair (res - '0', res - '0' + 1));
8494	      else
8495	        return symbol (res);
8496	    }
8497
8498	So let yytranslate_ always take an int, which makes the cast truly
8499	useless.
8500
8501	* data/skeletons/c++.m4, data/skeletons/lalr1.cc (yytranslate_): here.
8502
85032019-12-01  Akim Demaille  <akim.demaille@gmail.com>
8504
8505	c++: clean a few issues wrt special tokens
8506	The C++ implementation of LAC did not skip the $undefined token,
8507	probably because it was not exposed.  Expose it, and use clearer
8508	names.
8509
8510	* data/skeletons/c++.m4: Don't define undef_token_ in yytranslate_,
8511	but...
8512	* data/skeletons/lalr1.cc (yy_undef_token_): here.
8513	Use a more precise type to define yy_undef_token_ and yy_error_token_.
8514	Unfortunately we move from a compile-time value defined via an enum to
8515	a static const member.  Eventually we should make it constexpr.
8516	Make LAC implementation more alike yacc.c's one.
8517
85182019-12-01  Akim Demaille  <akim.demaille@gmail.com>
8519
8520	d, java: improve yytranslate and neighbors
8521	* data/skeletons/lalr1.d, data/skeletons/lalr1.java: Don't expose
8522	yyuser_token_number_max_ and yyundef_token_.  Do as in C++: scope them
8523	into yytranslate_, and only when api.token.raw is not defined.
8524	(yyterror_): Rename as...
8525	(yy_error_token_): this.
8526	* data/skeletons/lalr1.d (token_number_type): New.
8527	Use it.
8528	Can't be done in the Java backend, as Java does not have type aliases.
8529
85302019-12-01  Akim Demaille  <akim.demaille@gmail.com>
8531
8532	d, java: get rid of a useless table
8533	* data/skeletons/lalr1.d, data/skeletons/lalr1.java (yytoken_number_):
8534	Remove, useless.
8535	Was used in ancient C skeletons to support YYPRINT, long obsoleted by
8536	%printer.
8537
85382019-11-30  Akim Demaille  <akim.demaille@gmail.com>
8539
8540	c++, d, java: remove yyerrcode
8541	It is not used at all.  We will remove it also from yacc.c, but
8542	later (see TODO).
8543
8544	* data/skeletons/lalr1.cc, data/skeletons/lalr1.d,
8545	* data/skeletons/lalr1.java (yyerrcode_):
8546	Remove.
8547
85482019-11-30  Akim Demaille  <akim.demaille@gmail.com>
8549
8550	c++: improve typing
8551	* data/skeletons/lalr1.cc (yysyntax_error_): symbol_type::type_get
8552	returns a symbol_number_type (which is indeed an int).
8553
85542019-11-30  Akim Demaille  <akim.demaille@gmail.com>
8555
8556	c++: remove useless cast about yyeof_
8557	Reported by Frank Heckenbach.
8558	https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00016.html
8559
8560	* data/skeletons/c++.m4 (b4_yytranslate_define): Don't use yyeof_ as
8561	if it had two different types.
8562	It is used once against the input argument, which is the value
8563	returned by yylex, which is an "external token number", typically an
8564	int.  It is also used as output type, an "internal symbol number".
8565	It turns out that in both cases we mean "0", but let's keep yyeof_
8566	only for the case "internal symbol number", i.e., _after_ conversion
8567	by yytranslate.
8568	This frees us from one cast.
8569
85702019-11-30  Akim Demaille  <akim.demaille@gmail.com>
8571
8572	glr: style change
8573	* data/skeletons/glr.c (YYDPRINTF): Expand into an empty statement,
8574	instead of nothing.
8575	Simplify callers.
8576
85772019-11-30  Akim Demaille  <akim.demaille@gmail.com>
8578
8579	glr: remove useless casts
8580	Reported by GCC's -Wuseless-cast.
8581
8582	* data/skeletons/glr.c: Don't cast to yybool, it's useless.
8583
85842019-11-29  Akim Demaille  <akim.demaille@gmail.com>
8585
8586	yacc.c, glr.c: fix crash when reporting errors in consistent states
8587	The current code for yysyntax_error for %define parse.error verbose is
8588	fishy (given that YYEMPTY is -2, invalid argument for yytname[]):
8589
8590	    static int
8591	    yysyntax_error ([...])
8592	    {
8593	      YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
8594	    [...]
8595	      if (yytoken != YYEMPTY)
8596
8597	A nearby comment reports
8598
8599	    The only way there can be no lookahead present (in yychar) is if
8600	    this state is a consistent state with a default action.  Thus,
8601	    detecting the absence of a lookahead is sufficient to determine
8602	    that there is no unexpected or expected token to report.  In that
8603	    case, just report a simple "syntax error".
8604
8605	So it _is_ possible to call yysyntax_error with yytoken == YYEMPTY,
8606	albeit quite difficult when meaning to, so virtually impossible by
8607	accident (after all, there was never a bug report about this).
8608
8609	I failed to produce a test case, but Joel E. Denny provided me with
8610	one (added to the test suite below).  The yacc.c skeleton fails on
8611	this, and once fixed dies on a second problem.  The glr.c skeleton was
8612	also dying, but immediately of this second problem.
8613
8614	Indeed we were not allocating space for the error message's final \0.
8615	This was hidden by the fact that we only had error messages with at
8616	least an unexpected token displayed, so with at least one "%s" in the
8617	format string, whose size (2) was included (incorrectly) in the final
8618	size of the message (where the %s have been replaced by the actual
8619	content).
8620
8621	* data/skeletons/glr.c, data/skeletons/yacc.c (yysyntax_error):
8622	Do not invoke yytnamerr on YYEMPTY.
8623	Clarify the computation of the length of the _final_ error message,
8624	with the NUL terminator but without the '%s's.
8625	* tests/conflicts.at (Syntax error in consistent error state):
8626	New, contributed by Joel E. Denny.
8627
86282019-11-26  Akim Demaille  <akim.demaille@gmail.com>
8629
8630	tests: avoid creating files whose name collide with standard headers
8631	Having a file named "exception" is risky: the compiler might use that
8632	file in #include.
8633	Reported by 马俊 <majun123@whu.edu.cn>.
8634
8635	* tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): Generate
8636	'exceptions', not 'exception'.
8637
86382019-11-22  Akim Demaille  <akim.demaille@gmail.com>
8639
8640	doc: more details about the test suite
8641	* README-hacking.md: here.
8642
86432019-11-20  Akim Demaille  <akim.demaille@gmail.com>
8644
8645	maint: post-release administrivia
8646	* NEWS: Add header line for next release.
8647	* .prev-version: Record previous version.
8648	* cfg.mk (old_NEWS_hash): Auto-update.
8649
86502019-11-20  Akim Demaille  <akim.demaille@gmail.com>
8651
8652	version 3.4.91
8653	* NEWS: Record release date.
8654
86552019-11-20  Akim Demaille  <akim.demaille@gmail.com>
8656
8657	style: pacify syntax-check
8658	* cfg.mk: No need to translate *.md files.
8659	* data/skeletons/glr.c, data/skeletons/yacc.c: Fix space issues.
8660
86612019-11-19  Akim Demaille  <akim.demaille@gmail.com>
8662
8663	gnulib: update
8664
86652019-11-18  Akim Demaille  <akim.demaille@gmail.com>
8666
8667	doc: don't promote dangling aliases
8668	String literals as tokens serve two distinct purposes: freeing from
8669	having to implement the keyword matching in the scanner, and improving
8670	error messages.  Most of the time both can be achieved at the same
8671	time, but on occasions, it does not work so well.
8672
8673	We promote their use for error messages.  We will also still support
8674	the former case, but it is _not_ the recommended approach.
8675
8676	* doc/bison.texi (Tokens from Literals): Clearly state that we don't
8677	recommend looking up the token types in the list of token names.
8678
86792019-11-17  Akim Demaille  <akim.demaille@gmail.com>
8680
8681	diagnostics: complain about undeclared string tokens
8682	String literals, which allow for better error messages, are (too)
8683	liberally accepted by Bison, which might result in silent errors.  For
8684	instance
8685
8686	    %type <exVal> cond "condition"
8687
8688	does not define “condition” as a string alias to 'cond' (nonterminal
8689	symbols do not have string aliases).  It is rather equivalent to
8690
8691	    %nterm <exVal> cond
8692	    %token <exVal> "condition"
8693
8694	i.e., it gives the type 'exVal' to the "condition" token, which was
8695	clearly not the intention.
8696
8697	Introduce -Wdangling-alias to catch this.
8698
8699	* src/complain.h, src/complain.c: Add support for -Wdangling-alias.
8700	(argmatch_warning_args): Sort.
8701	* src/symtab.c (symbol_check_defined): Complain about dangling
8702	aliases.
8703	* doc/bison.texi: Document it.
8704	* tests/input.at (Dangling aliases): New test.
8705
87062019-11-17  Akim Demaille  <akim.demaille@gmail.com>
8707
8708	diagnostics: yacc reserves %type to nonterminals
8709	On
8710
8711	    %token TOKEN1
8712	    %type  <ival> TOKEN1 TOKEN2 't'
8713	    %token TOKEN2
8714	    %%
8715	    expr:
8716
8717	bison -Wyacc gives
8718
8719	    input.y:2.15-20: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
8720	        2 | %type  <ival> TOKEN1 TOKEN2 't'
8721	          |               ^~~~~~
8722	    input.y:2.29-31: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
8723	        2 | %type  <ival> TOKEN1 TOKEN2 't'
8724	          |                             ^~~
8725	    input.y:2.22-27: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
8726	        2 | %type  <ival> TOKEN1 TOKEN2 't'
8727	          |                      ^~~~~~
8728
8729	The messages appear to be out of order, but they are emitted when the
8730	error is found.
8731
8732	* src/symtab.h (symbol_class): Add pct_type_sym, used to denote
8733	symbols appearing in %type.
8734	* src/symtab.c (complain_pct_type_on_token): New.
8735	(symbol_class_set): Check that %type is not applied to tokens.
8736	(symbol_check_defined): pct_type_sym also means undefined.
8737	* src/parse-gram.y (symbol_decl.1): Set the class to pct_type_sym.
8738	* src/reader.c (grammar_current_rule_begin): pct_type_sym also means
8739	undefined.
8740	* tests/input.at (Yacc's %type): New.
8741
87422019-11-16  Akim Demaille  <akim.demaille@gmail.com>
8743
8744	doc: promote %nterm over %type
8745	As an extension to POSIX Yacc, Bison's %type accepts tokens.
8746	Unfortunately with string literals as implicit tokens, this is
8747	misleading, and led some users to write
8748
8749	    %type <exVal> cond "condition"
8750
8751	believing that "condition" would be associated to the 'cond'
8752	nonterminal (see https://github.com/apache/httpd/pull/72).
8753
8754	* doc/bison.texi: Promote %nterm rather than %type to declare the type
8755	of nonterminals.
8756
87572019-11-16  Akim Demaille  <akim.demaille@gmail.com>
8758
8759	doc: formatting changes
8760	* doc/bison.texi: No visible changes.
8761
87622019-11-16  Akim Demaille  <akim.demaille@gmail.com>
8763
8764	doc: work around warnings when Flex C output is compiled in C++
8765	* doc/bison.texi (calc++/scanner.ll): here.
8766	While at it, clarify clang vs. warnings.
8767
87682019-11-16  Akim Demaille  <akim.demaille@gmail.com>
8769
8770	tests: be robust to old Perl versions on Cygwin
8771	Reported by Denis Excoffier.
8772	https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00008.html.
8773
8774	* tests/output.at: Be sure to remove back up files.
8775
87762019-11-16  Akim Demaille  <akim.demaille@gmail.com>
8777
8778	regen
8779
87802019-11-12  kaneko y  <spiketeika@gmail.com>
8781
8782	gram.c: Fix condition of aver
8783	* src/gram.c (grammar_dump): Fix condition of aver.
8784	What we want to check is that rhs is followed by its rule.
8785
87862019-11-11  Akim Demaille  <akim.demaille@gmail.com>
8787
8788	doc: clarify build instructions
8789	* README: A few fixes.
8790	Explain how to install color support.
8791	* README-hacking: Rename as...
8792	* README-hacking.md: this, and convert to Markdown.
8793	Improve typography.
8794	Improve explanations about update-test.
8795
87962019-11-11  Akim Demaille  <akim.demaille@gmail.com>
8797
8798	gnulib: update
8799
88002019-11-11  Yuichiro Kaneko  <spiketeika@gmail.com>
8801
8802	gram.c: also print terminals in grammar_dump
8803	* src/gram.c (grammar_dump): Print terminals likewise non terminals.
8804	* tests/sets.at (Reduced Grammar): Update test case to catch up the
8805	change and add a test case where prec and assoc are used.
8806
88072019-11-10  Akim Demaille  <akim.demaille@gmail.com>
8808
8809	doc: work around Texinfo 6.7 bug
8810	When @code is used in a @deftype... definition, it issues quotes.
8811	Remove them.
8812	See https://lists.gnu.org/archive/html/help-texinfo/2019-11/msg00004.html.
8813
8814	* doc/local.mk: here.
8815
88162019-11-09  Akim Demaille  <akim.demaille@gmail.com>
8817
8818	doc: formatting changes
8819	* doc/bison.texi: Wrap lines.
8820	No semantical difference.
8821
88222019-11-09  Akim Demaille  <akim.demaille@gmail.com>
8823
8824	doc: use upper case for tokens
8825	* doc/bison.texi: here.
8826
88272019-11-07  Akim Demaille  <akim.demaille@gmail.com>
8828
8829	doc: type-face fixes
8830	* doc/bison.texi: Use @code for types in function definitions.
8831
88322019-11-06  Akim Demaille  <akim.demaille@gmail.com>
8833
8834	c++: expose the type used to store line and column numbers
8835	* data/skeletons/location.cc (position::counter_type)
8836	(location::counter_type): New.
8837	Use them.
8838	* doc/bison.texi (C++ position, C++ location): Adjust.
8839
88402019-11-03  Akim Demaille  <akim.demaille@gmail.com>
8841
8842	tests: fix comment and adjust to locale names on GNU/Linux
8843	Reported by Denis Excoffier.
8844
8845	* tests/diagnostics.at: here.
8846
88472019-11-03  Akim Demaille  <akim.demaille@gmail.com>
8848
8849	tests: really check complaints from m4
8850	* tests/diagnostics.at (Locations from M4, Tabulations and multibyte
8851	characters from M4): These tests are actually checking a message
8852	coming from C, not from M4.  Replace with...
8853	(Complaints from M4): This.
8854
88552019-11-03  Akim Demaille  <akim.demaille@gmail.com>
8856
8857	tests: simplify prologue
8858	* tests/testsuite.h: We no longer load gnulib in the tests.
8859
88602019-11-03  Akim Demaille  <akim.demaille@gmail.com>
8861
8862	diagnostics: add missing translation
8863	* src/muscle-tab.c (muscle_percent_define_check_kind): Here.
8864
88652019-11-02  Akim Demaille  <akim.demaille@gmail.com>
8866
8867	c++: fix old cast warnings
8868	We still have a few old C casts in lalr1.cc, let's get rid of them.
8869	Reported by Frank Heckenbach.
8870
8871	Actually, let's monitor all our casts using easy to grep macros.
8872	Let's use these macros to use the C++ standard casts when we are in
8873	C++.
8874
8875	* data/skeletons/c.m4 (b4_cast_define): New.
8876	* data/skeletons/glr.c, data/skeletons/glr.cc,
8877	* data/skeletons/lalr1.cc, data/skeletons/stack.hh,
8878	* data/skeletons/yacc.c:
8879	Use it and/or its casts.
8880
8881	* tests/actions.at, tests/cxx-type.at,
8882	* tests/glr-regression.at, tests/headers.at, tests/torture.at,
8883	* tests/types.at:
8884	Use YY_CAST instead of C casts.
8885
8886	* configure.ac (warn_cxx): Add -Wold-style-cast.
8887	* doc/bison.texi: Disable it.
8888
88892019-11-01  Akim Demaille  <akim.demaille@gmail.com>
8890
8891	tests: be robust to tput errors
8892	Reported by Denis Excoffier.
8893
8894	* tests/bison.in: here.
8895
88962019-11-01  Akim Demaille  <akim.demaille@gmail.com>
8897
8898	git: update ignores
8899	I don't understand what happened in
8900	10acc148bb90fac8a52a5d35f2bd18bd824c1639.
8901
89022019-10-29  Akim Demaille  <akim.demaille@gmail.com>
8903
8904	maint: post-release administrivia
8905	* NEWS: Add header line for next release.
8906	* .prev-version: Record previous version.
8907	* cfg.mk (old_NEWS_hash): Auto-update.
8908
89092019-10-29  Akim Demaille  <akim.demaille@gmail.com>
8910
8911	version 3.4.90
8912	* NEWS: Record release date.
8913
89142019-10-29  Akim Demaille  <akim.demaille@gmail.com>
8915
8916	C++: finish propagating the unsigned->signed conversion in locations
8917	* data/skeletons/location.cc: Remove the u (for unsigned) suffix from
8918	the initial line and column.
8919	* NEWS: AFAICT, only C++ backends have their location types changed.
8920
89212019-10-29  Akim Demaille  <akim.demaille@gmail.com>
8922
8923	style: fix cpp indentation
8924	Reported by syntax-check.
8925
8926	* src/system.h: here.
8927
89282019-10-29  Akim Demaille  <akim.demaille@gmail.com>
8929
8930	style: glr.c: comment changes
8931	* data/skeletons/glr.c: here.
8932
89332019-10-26  Akim Demaille  <akim.demaille@gmail.com>
8934
8935	CI: pass -O1 to GCC8 with sanitizers
8936	This build never finishes in the 50min credit given by Travis.  See if
8937	with optimizations it works better.
8938
8939	* .travis.yml: here.
8940
89412019-10-26  Akim Demaille  <akim.demaille@gmail.com>
8942
8943	reader: reduce the "scope" of global variables
8944	We have too many global variables, adding structure would help.  For a
8945	start, let's hide some of the variables closer to their usage.
8946
8947	* src/getargs.c, src/files.h (current_file): Move to...
8948	* src/scan-gram.c: here.
8949	* src/scan-gram.h (gram_in, gram__flex_debug): Remove, make them
8950	private to the scanner.
8951	* src/reader.h, src/reader.c (reader): Take a grammar file as argument.
8952	Move the handling of scanner variables to...
8953	* src/scan-gram.l (gram_scanner_open, gram_scanner_close): here.
8954	(gram_scanner_initialize): Remove, replaced by gram_scanner_open.
8955	* src/main.c: Adjust.
8956
89572019-10-26  Akim Demaille  <akim.demaille@gmail.com>
8958
8959	regen
8960
89612019-10-26  Akim Demaille  <akim.demaille@gmail.com>
8962
8963	parser: use grammar_file instead of current_file
8964	* src/parse-gram (%initial-action): here.
8965	(handle_skeleton): Don't depend on the current file name to look for
8966	"local" skeletons (subject to changes coming from "#lines"): depend
8967	only on the initial file name, the one given on the command line.
8968
89692019-10-26  Akim Demaille  <akim.demaille@gmail.com>
8970
8971	diagnostics: use grammar_file instead of current_file
8972	Currently there are two globals denoting the input file: grammar_file
8973	is the one from the command line, and current_file which might change
8974	because of #line.  Use only the former.
8975
8976	* src/complain.c (error_message): here.
8977	* tests/diagnostics.at: Adjust.
8978
89792019-10-25  Akim Demaille  <akim.demaille@gmail.com>
8980
8981	reader: let symtab deal with the symbols
8982	* src/reader.c (reader): Move the setting up of the builtin symbols to...
8983	* src/symtab.c (symbols_new): here.
8984
89852019-10-25  Akim Demaille  <akim.demaille@gmail.com>
8986
8987	style: remove incorrect comment
8988	Reported by Paul Eggert.
8989
8990	* src/system.h: here.
8991
89922019-10-24  Akim Demaille  <akim.demaille@gmail.com>
8993
8994	lalr1.cc: fix previous commit: printing of state numbers
8995	* data/skeletons/lalr1.cc: Printing a char prints... a char.
8996	Print ints instead.
8997
89982019-10-24  Akim Demaille  <akim.demaille@gmail.com>
8999
9000	lalr1.cc: use computed state types
9001	This skeleton uses a single stack of state structures, so it is less
9002	likely to benefit from a stack size reduction than yacc.c (which uses
9003	several stacks: state number, value and location).  But it will reduce
9004	the size of the LAC stack.
9005
9006	This skeleton was already using int for state numbers, so, contrary to
9007	yacc.c, this brings nothing for large automata.
9008
9009	Overall, it is still nicer to make the skeletons alike.
9010
9011	* data/skeletons/lalr1.cc (state_type): Here.
9012
90132019-10-24  kaneko y  <spiketeika@gmail.com>
9014
9015	README: Fix a typo
9016	* README: Fix a typo. Git command name is submodule.
9017
90182019-10-24  Akim Demaille  <akim.demaille@gmail.com>
9019
9020	examples: fix missing dependencies
9021	Reported by Thomas Petazzoni.
9022	https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00000.html
9023
9024	* examples/c/reccalc/local.mk: Complete dependencies, including for
9025	earlier versions of Automake (for sake of our CI, on top of Ubuntu
9026	Xenial/Bionic, which feature only Automake 1.15).
9027	(%D%/scan.c %D%/scan.h): Upgrade to the full version provided in
9028	Automake's documentation.
9029
90302019-10-24  Akim Demaille  <akim.demaille@gmail.com>
9031
9032	diagnostics: simplify location handling
9033	Locations start at line 1.  Don't accept line 0.
9034
9035	* src/location.c (location_print): Don't print locations with line 0.
9036	(location_caret): Simplify.
9037
90382019-10-24  Akim Demaille  <akim.demaille@gmail.com>
9039
9040	build: reenable -Wtype-limits
9041	See https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html
9042	to https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00073.html.
9043
9044	Paul Eggert's changes in gnulib do fix the issue for modern GCCs (7,
9045	8, 9) on macOS.  Unfortunately these warnings are back on the
9046	CI (GNU/Linux) with GCC 4.6, 4.7, (not 4.8) and 4.9.
9047
9048	Disable the warning locally.
9049
9050	* configure.ac (warn_common, warn_tests): Remove -Wtype-limits.
9051	* src/system.h (IGNORE_TYPE_LIMITS_BEGIN, IGNORE_TYPE_LIMITS_END): New.
9052	* src/InadequacyList.c, src/parse-gram.c, src/parse-gram.y,
9053	* src/symtab.c: Use it.
9054
90552019-10-24  Akim Demaille  <akim.demaille@gmail.com>
9056
9057	build: remove dmalloc support
9058	Today sanitizers are a better alternative.
9059
9060	* m4/dmalloc.m4: Remove.
9061	* configure.ac, src/system.h: Adjust.
9062
90632019-10-23  Akim Demaille  <akim.demaille@gmail.com>
9064
9065	gitignore: update
9066
90672019-10-23  Paul Eggert  <eggert@cs.ucla.edu>
9068
9069	build: update gnulib submodule to latest
9070
90712019-10-23  Yuichiro Kaneko  <spiketeika@gmail.com>
9072
9073	style: update comment in reader.c
9074	rrhs and rlhs were removed by b2ed6e5826e772162719db595446b2c58e4ac5d6.
9075
9076	* src/reader.c (packgram): Update comment.
9077
90782019-10-22  kaneko y  <spiketeika@gmail.com>
9079
9080	yacc.c: fix a typo
9081	* data/skeletons/yacc.c (yysetstate): fix comment.
9082
90832019-10-22  Akim Demaille  <akim.demaille@gmail.com>
9084
9085	style: pacify syntax-check
9086	* doc/.gitignore, src/complain.c, src/getargs.c,
9087	* src/output.c: here.
9088
90892019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9090
9091	main: also free memory on errors
9092	* src/derives.c (derives_free): Beware of NULL.
9093	* src/main.c (main): Let the 'finish' label include memory release.
9094
90952019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9096
9097	gnulib: update
9098	To get bitset_free accept NULL.  See
9099	https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00054.html
9100
91012019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9102
9103	style: reduce scope in derives
9104	* src/derives.c: here.
9105	And prefer prefix to postfix increment.
9106
91072019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9108
9109	build: disable -Wtautological-constant-out-of-range-compare
9110	Also see e31f92495ce14a5d924b148c8ea1470003cc47c1 and
9111	https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html
9112
9113	* configure.ac (warn_common): Disable
9114	-Wtautological-constant-out-of-range-compare.
9115	(warn_tests): Restore it.
9116
91172019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9118
9119	CI: formatting changes
9120	* .travis.yml: Use the single line form of lists, when reduced to a
9121	singletons.
9122
91232019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9124
9125	CI: rename jobs
9126	* .travis.yml (compile, test): Rename as...
9127	(dist, check): these, which are more traditional for GNU projects.
9128
91292019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9130
9131	doc: update README
9132	* README: Be clearer that README-hacking _must_ be read.
9133	Convert to Markdown.
9134
91352019-10-21  Akim Demaille  <akim.demaille@gmail.com>
9136
9137	bootstrap: relieve developpers from Gettext version mismatch issues
9138	* .travis.yml (compile): Move the workaround from here...
9139	* bootstrap.conf (bootstrap_epilogue): to there.
9140
91412019-10-20  Akim Demaille  <akim.demaille@gmail.com>
9142
9143	tests: beware of GCC9 warnings in push mode
9144	This is really weird: GCC points to the LHS of the assignment...
9145
9146	    260. headers.at:184: testing Sane headers: api.pure api.push-pull=both ...
9147	    tests/headers.at:184: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret -d -o input.c input.y
9148	    tests/headers.at:184: $CC $CFLAGS $CPPFLAGS  -c -o input.o input.c
9149	    stderr:
9150	    input.c: In function 'yyparse':
9151	    input.c:1276:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
9152	     1276 |         yylval = *yypushed_val;
9153	          |         ~~~~~~~^~~~~~~~~~~~~~~
9154	    input.c: In function 'yypull_parse':
9155	    input.c:1276:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
9156	     1276 |         yylval = *yypushed_val;
9157	          |         ~~~~~~~^~~~~~~~~~~~~~~
9158	    cc1: all warnings being treated as errors
9159	    stdout:
9160	    tests/headers.at:184: exit code was 1, expected 0
9161
9162	See also d87c8ac79ab844d6a7a4f5103dcf7a842d18b611
9163	and 9645a2b20ee7cbfa8bb4ac2237f87d598afe349c.
9164
9165	* tests/headers.at (Several parsers, Several parsers): Disable these
9166	warnings when in push parser.
9167
91682019-10-20  Akim Demaille  <akim.demaille@gmail.com>
9169
9170	CI: try GCC9 and Clang9
9171	The logs show:
9172
9173	    Disallowing sources: llvm-toolchain-bionic-8, ubuntu-toolchain-r-test
9174	    To add unlisted APT sources, follow instructions in
9175	    https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon
9176
9177	* .travis.yml: Remove a few apt sources which are ignored in
9178	Bionic (e.g., see
9179	https://github.com/travis-ci/apt-source-safelist/issues/410).
9180	Where needed, use sources/sourceline instead.
9181	Also, don't use -DNDEBUG with older builds.
9182
91832019-10-20  Akim Demaille  <akim.demaille@gmail.com>
9184
9185	parser: clarify version checking
9186	* src/parse-gram.y: Use the same conventions for gnulib as elsewhere:
9187	<header.h>.
9188	(str_to_version): New.
9189	(handle_require): Use it.
9190	Prefer < to >.
9191
91922019-10-20  Akim Demaille  <akim.demaille@gmail.com>
9193
9194	build: disable -Wtype-limits, except in the test suite
9195	The current implementation of lib/intprops.h results in "unsigned < 0"
9196	comparisons, which triggers warnings.  See
9197
9198	https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html
9199
9200	* configure.ac (warn_common): Disable -Wtype-limits.
9201	(warn_tests): Restore it.
9202
92032019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9204
9205	c++: port to Sun C++ 5.12
9206	The documentation for Oracle Solaris Studio 12.3 (Sun C++ 5.12
9207	2011/11/16) says it supports C++03.  This compiler rejects the
9208	location.cc use of std::max for some reason; I don’t know why
9209	since I don’t use C++ as a rule.  The simplest workaround is to
9210	open-code ‘max’.
9211	* data/skeletons/location.cc (add_):
9212	Do max by hand rather than relying on std::max.
9213	Don’t include <algorithm.h>; no longer needed.
9214
92152019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9216
9217	regen
9218
92192019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9220
9221	tests: port to Solaris 10 grep
9222	* tests/scanner.at (Token numbers: $1): Use $EGREP, not grep -E.
9223
92242019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9225
9226	tests: port to Solaris 10 sed
9227	As documented in the Autoconf manual, Solaris 10 sed rejects
9228	script labels contianing more than 7 characters.  POSIX requires
9229	support for at least 8 characters, but we might as well be portable
9230	to Solaris 10 which is still supported.
9231	* tests/local.at (AT_SETS_CHECK): Use only the first 7 characters
9232	in sed labels.
9233
92342019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9235
9236	bison: check for int overflow in token numbers
9237	* src/symtab.c: Include intprops.h
9238	(symbol_user_token_number_set): Don’t allow user_token_number ==
9239	INT_MAX because too much other code adds 1 to the user token number.
9240	(symbols_token_translations_init): Complain on integer overflow
9241	instead of indulging in undefined behavior.
9242
92432019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9244
9245	bison: check for int overflow when scanning
9246	* src/scan-gram.l: Include errno.h, for errno.
9247	(scan_integer, handle_syncline): Check for integer overflow.
9248	* tests/input.at (too-large.y): Adjust to match new diagnostics.
9249
92502019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9251
9252	bison: check version numbers more carefully
9253	* src/parse-gram.y: Include intprops.h.
9254	(handle_require): Don’t indulge in undefined behavior if the major
9255	or minor number is out of range.  Instead, check that the
9256	resulting value is nonnegative, fits in int, and that the minor
9257	number is less than 100.  Also, check that a number was parsed.
9258
92592019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9260
9261	c: port YY_ATTRIBUTE_UNUSED to Sun C 5.12
9262	Sun C 5.12 defines __SUNPRO_C to 0x5120 but diagnoses
9263	‘__attribute__ ((__unused__))’.  Change the ifdefs to use
9264	the same method as Gnulib in this area.
9265	* data/skeletons/c.m4 (YY_ATTRIBUTE): Remove, since
9266	not all attributes were added in the same compiler version.
9267	(YY_ATTRIBUTE_PURE, YY_ATTRIBUTE_UNUSED):
9268	Use specific GCC version for each attribute.
9269	Pay no attention to __SUNPRO_C.
9270	* tests/headers.at (Several parsers): Tighten tests accordingly.
9271
92722019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9273
9274	c: improve port of stdint.h usage to pre-C99
9275	Oracle Solaris Studio 12.3 (Sun C 5.12 2011/11/16) by default does
9276	not conform to C99; it defines __STDC_VERSION__ to be 199409L, so
9277	the Bison code does not include <stdint.h> (not required by C89
9278	amendment 1) even though this compiler does have <stdint.h>.  On
9279	this platform <limits.h> defines INT_LEAST8_MAX (POSIX allows
9280	this) so the skeleton got confused and thought that <stdint.h> had
9281	been included even though it wasn’t.
9282	* data/skeletons/c.m4 (b4_c99_int_type_define) [!__PTRDIFF_MAX__]:
9283	Always include <limits.h>.
9284	(YY_STDINT_H): Define when <stdint.h> was included.
9285	All uses of expressions like ‘defined INT_LEAST8_MAX’ changed to
9286	‘defined YY_STDINT_H’, since Sun C 5.12 <limits.h> defines macros
9287	like INT_LEAST8_MAX but does not declare types like int_least8_t.
9288
92892019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9290
9291	gnulib:update
9292
92932019-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9294
9295	autoconf:update
9296
92972019-10-15  Akim Demaille  <akim.demaille@gmail.com>
9298
9299	TODO: more updates
9300
93012019-10-15  Akim Demaille  <akim.demaille@gmail.com>
9302
9303	TODO: update
9304
93052019-10-15  Akim Demaille  <akim.demaille@gmail.com>
9306
9307	yacc: rename types for states
9308	* data/skeletons/yacc.c (yy_state_num): Rename as...
9309	(yy_state_t): this.
9310	(yy_state_fast_t): New.
9311	Use it.
9312
93132019-10-15  Akim Demaille  <akim.demaille@gmail.com>
9314
9315	glr: style changes
9316	* data/skeletons/glr.c (yytnamerr): here.
9317	(yyprocessOneStack): Initialize variables.
9318
93192019-10-15  Akim Demaille  <akim.demaille@gmail.com>
9320
9321	yacc: style changes
9322	* data/skeletons/yacc.c: Move call to lac discard to clarify the
9323	shifting of the token.
9324	Like in lalr1.cc.
9325
93262019-10-15  Akim Demaille  <akim.demaille@gmail.com>
9327
9328	tests: avoid $(...)
9329	Reported by Paul Eggert.
9330
9331	* tests/local.at (AT_DATA_NO_FINAL_EOL): here.
9332
93332019-10-14  Akim Demaille  <akim.demaille@gmail.com>
9334
9335	tests: use a portable 'truncate' implementation
9336	Suggested by Paul Eggert.
9337	https://lists.gnu.org/archive/html/bison-patches/2019-10/msg00044.html
9338
9339	* tests/local.at (AT_DATA_NO_FINAL_EOL): Use dd instead of perl.
9340
93412019-10-13  Akim Demaille  <akim.demaille@gmail.com>
9342
9343	tests: factor the generation of files without the final eol
9344	AFAICT Autotest 2.69 still does not support AT_DATA without the final
9345	eol.
9346
9347	* tests/local.at (AT_DATA_NO_FINAL_EOL): New.
9348	* tests/input.at: Use it.
9349
93502019-10-13  Akim Demaille  <akim.demaille@gmail.com>
9351
9352	tests: refactor the handling of Perl
9353	Let's make a difference between places where Perl is required for the
9354	test (AT_PERL_REQUIRE), and the places where it's used to run the
9355	test, but it's not not to run the test (AT_PERL_CHECK).
9356
9357	* tests/local.at (AT_REQUIRE): New.
9358	(AT_PERL_CHECK, AT_PERL_REQUIRE): New.
9359	Use them where appropriate.
9360
9361	* tests/local.mk ($(TESTSUITE)): Beware not to start the line with
9362	'-pi' if Perl is empty, as Make understands this as "it's ok to fail".
9363	Which it is not.
9364
93652019-10-12  Akim Demaille  <akim.demaille@gmail.com>
9366
9367	d: comment changes
9368	* data/skeletons/lalr1.d: Here.
9369
93702019-10-12  Akim Demaille  <akim.demaille@gmail.com>
9371
9372	i18n: don't push too hard for '…'
9373	Suggested by Paul Eggert.
9374
9375	* src/location.c (ellipsis): Clarify comment for translators.
9376
93772019-10-11  Akim Demaille  <akim.demaille@gmail.com>
9378
9379	regen
9380
93812019-10-11  Akim Demaille  <akim.demaille@gmail.com>
9382
9383	glr: display line numbers in traces
9384	Suggested by Lars Maier.
9385
9386	* data/skeletons/glr.c: Also display rule locations when rules are
9387	deferred, and rejected.
9388
93892019-10-11  Akim Demaille  <akim.demaille@gmail.com>
9390
9391	tests: be really robust to Perl missing
9392	My previous tests (with ./configure PERL=false) have been fooled by
9393	configure, that managed to find perl anyway.  This time, I ran this on
9394	a Fedora in Docker, without Perl.
9395
9396	* tests/calc.at, tests/diagnostics.at, tests/headers.at,
9397	* tests/input.at, tests/local.at, tests/named-refs.at,
9398	* tests/output.at, tests/regression.at, tests/skeletons.at,
9399	* tests/synclines.at, tests/torture.at: Don't require Perl.
9400
94012019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9402
9403	configure: perl is not required
9404	But it's used in various places, including in some tests.
9405
9406	* configure.ac: here.
9407
94082019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9409
9410	news: update
9411
94122019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9413
9414	diagnostics: prefer "…" to "..." if the locale supports it
9415	* src/location.c (ellipsis, ellipsize): New.
9416	Use them.
9417
94182019-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9419
9420	c: improve patch for UCHAR_MAX etc. problem
9421	* data/skeletons/c.m4 (b4_c99_int_type_define): Reorder to put the
9422	signed types first, since they’re simpler and this keeps similar
9423	code closer.  For signed types, don’t bother checking whether the
9424	type promotes to int since the type must be signed anyway.  For
9425	unsigned types, protect a test like ‘UCHAR_MAX <= INT_MAX’ with
9426	‘!defined __UINT_LEAST8_MAX__’, as otherwise the logic is wrong
9427	for oddball platforms; and once we do that, there should no need
9428	for ‘defined INT_MAX’ so remove that.
9429
94302019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9431
9432	tests: do not depend on config.h
9433	Currently we face test suite failures in different environments,
9434	because of a conflict between the definitions of isnan by gnulib, and
9435	by the C++ library:
9436
9437	    262. headers.at:186: testing Sane headers: %locations %debug c++ ...
9438	    ./headers.at:186: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret -d -o input.cc input.y
9439	    ./headers.at:186: $CXX $CXXFLAGS $CPPFLAGS  -c -o input.o input.cc
9440	    stderr:
9441	    In file included from /usr/include/c++/4.8.2/cmath:44:0,
9442	                     from /usr/include/c++/4.8.2/random:38,
9443	                     from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
9444	                     from /usr/include/c++/4.8.2/algorithm:62,
9445	                     from location.hh:41,
9446	                     from input.hh:90,
9447	                     from input.cc:50:
9448	    /u/cs/fac/eggert/src/gnu/bison/lib/math.h: In function 'bool isnan(double)':
9449	    /u/cs/fac/eggert/src/gnu/bison/lib/math.h:2849:1: error: new declaration 'bool isnan(double)'
9450	     _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool)
9451	     ^
9452	    In file included from /usr/include/features.h:375:0,
9453	                     from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
9454	                     from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
9455	                     from /usr/include/c++/4.8.2/cstdlib:41,
9456	                     from input.hh:48,
9457	                     from input.cc:50:
9458	    /usr/include/bits/mathcalls.h:235:1: error: ambiguates old declaration 'int isnan(double)'
9459	     __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
9460	     ^
9461
9462	There might be something to do in gnulib about this, but I believe
9463	that gnulib should not be used in the test suite in the first place.
9464
9465	The test suite should work with other compilers than the one used to
9466	compile the package.  For a start, Bison sources are more
9467	demanding (C99) than the generated parsers.  Last time I tried, tcc
9468	for example, was not able to compile Bison, yet our generated parsers
9469	should compile cleanly with it.
9470
9471	Besides the problem at hand is with the C++ compiler, with is not the
9472	one used to set up gnulib at configuration-time (config.h is mainly
9473	built from probing the C compiler).
9474
9475	We should really not depend on gnulib in tests.
9476
9477	This was introduced in 2001 to check whether including
9478	stdlib.h/string.h is safe thanks to STDC_HEADERS
9479	(2ce1014469742b5c6618daf8506b69e38787c7d5).  Today, we assume at least
9480	a C90 compiler, it should be safe enough.
9481
9482	* tests/local.at, tests/testsuite.h: Do not include config.h.
9483	* tests/atlocal.in (conftest.cc): Likewise.
9484	(CPPFLAGS): Do not expose lib/, as because of this we might picked up
9485	gnulib replacement headers for system headers.
9486
9487	* tests/input.at: Use int instead of ptrdiff_t, for easier portability
9488	(some machine on the CI did not find ptrdiff_t).
9489	* tests/c++.at: Add missing include for getchar.
9490
94912019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9492
9493	doc: spell check
9494	* doc/bison.texi: Remove the index about yyoutput, it is no longer
9495	documented.
9496	Spell check.
9497
94982019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9499
9500	tests: style changes
9501	* tests/actions.at: Prefer printf to fprintf.
9502	Prefer yyo to yyoutput in %printer.
9503
95042019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9505
9506	tests: formatting changes
9507	* tests/actions.at, tests/local.at: here.
9508
95092019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9510
9511	tests: add missing includes
9512	* tests/actions.at, tests/c++.at, tests/headers.at,
9513	* tests/regression.at: here.
9514
95152019-10-10  Akim Demaille  <akim.demaille@gmail.com>
9516
9517	c: don't assume that UCHAR_MAX, etc. are defined
9518	A number of portability issues with GCC 4.6 .. 4.9 (inclusive):
9519
9520	    input.c:184:7: error: "UCHAR_MAX" is not defined [-Werror=undef]
9521	     #elif UCHAR_MAX <= INT_MAX
9522	           ^
9523	    input.c:184:20: error: "INT_MAX" is not defined [-Werror=undef]
9524	     #elif UCHAR_MAX <= INT_MAX
9525	                        ^
9526	    input.c:202:7: error: "USHRT_MAX" is not defined [-Werror=undef]
9527	     #elif USHRT_MAX <= INT_MAX
9528	           ^
9529	    input.c:202:20: error: "INT_MAX" is not defined [-Werror=undef]
9530	     #elif USHRT_MAX <= INT_MAX
9531	                        ^
9532
9533	* data/skeletons/c.m4 (b4_c99_int_type_define): Don't assume they are
9534	defined.
9535
95362019-10-09  Akim Demaille  <akim.demaille@gmail.com>
9537
9538	configure: don't require Flex
9539	Flex should not be required to build Bison or run the test suite (of
9540	course it is needed for maintaining Bison).  Yet the Automake
9541	conditional FLEX_WORKS does not work.
9542
9543	* m4/flex.m4 (_AC_PROG_LEX_YYTEXT_DECL): Since this is called
9544	conditionally, don't define LEX_IS_FLEX here, but rather...
9545	(AC_PROG_LEX): here.
9546	* configure.ac: Be more cautious about possibly undefined variables.
9547
95482019-10-07  Paul Eggert  <eggert@cs.ucla.edu>
9549
9550	Move the integer-type selection into c.m4
9551	That way, glr.c can use it too.
9552	* data/skeletons/c.m4 (b4_int_type):
9553	Do not special-case ‘char’; it’s not worth the trouble,
9554	as clang complains about char subscripts.
9555	(b4_c99_int_type, b4_c99_int_type_define): New macros,
9556	taken from yacc.c.
9557	* data/skeletons/glr.c: Use b4_int_type_define.
9558	* data/skeletons/yacc.c (b4_int_type): Remove, since there’s
9559	no longer any need to redefine it.
9560	Use b4_c99_int_type_define rather than its body.
9561
95622019-10-07  Paul Eggert  <eggert@cs.ucla.edu>
9563
9564	Use “least” types for integers in Yacc tables
9565	This changes the Yacc skeleton to use “least” integer types to
9566	keep tables smaller on some platforms, which should lessen cache
9567	pressure.  Since Bison uses the Yacc skeleton, it follows suit.
9568	* data/skeletons/yacc.c: Include limits.h and stdint.h if this
9569	seems to be needed.
9570	(yytype_uint8, yytype_int8, yytype_uint16, yytype_int16):
9571	If available, use GCC predefined macros __INT_MAX__ etc. to select
9572	a “least” type, as this avoids namespace hassles.  Otherwise, if
9573	available fall back on selecting a “least” type via the C99 macros
9574	INT_MAX, INT_LEAST8_MAX, etc.  Otherwise, fall further back on one of
9575	the builtin C99 types signed char, short, and int.  Make sure that
9576	any selected type promotes to int.  Ignore any macros YYTYPE_INT16,
9577	YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8 defined by the user.
9578	(ptrdiff_t, PTRDIFF_MAX): Simplify in the light of the above.
9579	(yytype_uint8, yytype_uint16): Do not assume that unsigned char
9580	and unsigned short promote to int, as this isn’t true on some
9581	platforms (e.g., TI TMS320C55x).
9582	* src/parse-gram.y (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16)
9583	(YYTYPE_UINT8): Remove, as these are no longer effective.
9584
95852019-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9586
9587	Port better to C++ platforms
9588	* data/skeletons/yacc.c (YYPTRDIFF_T, YYPTRDIFF_MAXIMUM):
9589	Default to long, not int.
9590	(yy_lac_stack_realloc, yy_lac, yytnamerr, yyparse):
9591	Avoid casts to YYPTRDIFF_T that were masking the problem.
9592
95932019-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9594
9595	Work around GCC 4.8 false alarms without casts
9596	* data/skeletons/yacc.c (yyparse):
9597	Initialize yyes_capacity with a signed expression.
9598	* tests/local.at (AT_YYLEX_DEFINE(c)):
9599	Use enum to avoid cast.
9600
96012019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9602
9603	regen
9604
96052019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9606
9607	tests: make recheck
9608	* tests/local.mk (recheck): New.
9609
96102019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9611
9612	diagnostics: also show suggested %empty
9613	* src/reader.c (grammar_rule_check_and_complete): Suggest to add %empty.
9614	* tests/actions.at, tests/diagnostics.at: Adjust expectations.
9615
96162019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9617
9618	diagnostics: sort symbols per location
9619	Because the checking of the grammar is made by phases after the whole
9620	grammar was read, we sometimes have diagnostics that look weird.  In
9621	some case, within one type of checking, the entities are not checked
9622	in the order in which they appear in the file.  For instance, checking
9623	symbols is done on the list of symbols sorted by tag:
9624
9625	    foo.y:1.20-22: warning: symbol BAR is used, but is not defined as a token and has no rules [-Wother]
9626	        1 | %destructor {} QUX BAR
9627	          |                    ^~~
9628	    foo.y:1.16-18: warning: symbol QUX is used, but is not defined as a token and has no rules [-Wother]
9629	        1 | %destructor {} QUX BAR
9630	          |                ^~~
9631
9632	Let's sort them by location instead:
9633
9634	    foo.y:1.16-18: warning: symbol 'QUX' is used, but is not defined as a token and has no rules [-Wother]
9635	        1 | %destructor {} QUX BAR
9636	          |                ^~~
9637	    foo.y:1.20-22: warning: symbol 'BAR' is used, but is not defined as a token and has no rules [-Wother]
9638	        1 | %destructor {} QUX BAR
9639	          |                    ^~~
9640
9641	* src/location.h (location_cmp): Be robust to empty file names.
9642	* src/symtab.c (symbol_cmp): Sort by location.
9643	* tests/input.at: Adjust expectations.
9644
96452019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9646
9647	diagnostics: suggest fixes for undeclared symbols
9648	From
9649
9650	    input.y:1.17-19: warning: symbol baz is used, but is not defined as a token and has no rules [-Wother]
9651	         1 | %printer {} foo baz
9652	           |                 ^~~
9653
9654	to
9655
9656	    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]
9657	        1 | %printer {} foo baz
9658	          |                 ^~~
9659	          |                 bar
9660
9661	* bootstrap.conf: We need fstrcmp.
9662	* src/symtab.c (symbol_from_uniqstr_fuzzy): New.
9663	(complain_symbol_undeclared): Use it.
9664	* tests/diagnostics.at (Suggestions): New.
9665	* data/bison-default.css (insertion): Rename as...
9666	(fixit-insert): this, as this is what GCC uses.
9667
96682019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9669
9670	style: isolate complain_symbol_undeclared
9671	* src/symtab.c (complain_symbol_undeclared): New.
9672	Use it.
9673	Use quote on the guilty symbol (like GCC does, and we also do
9674	elsewhere).
9675	* tests/input.at: Adjust.
9676
96772019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9678
9679	style: simplify the handling of symbol and semantic_type tables
9680	Both are stored in a hash, and back in the days, we used to iterate
9681	over these tables using hash_do_for_each.  However, the order of
9682	traversal was not deterministic, which was a nuisance for
9683	deterministic output (and therefore also a problem for tests).  So at
9684	some point (83b60c97ee1f98bb1f15ffa38acdc4cc765515f5) we generated a
9685	sorted list of these symbols, and symbols_do actually iterated on that
9686	list.  But we kept the constraints of using hash_do_for_each, which
9687	requires a lot of ceremonial code, and makes it hard/unnatural to
9688	preserve data between iterations (see the next commit).
9689
9690	Alas, this is C, not C++.
9691
9692	Let's remove this abstraction, and directly iterate on the sorted
9693	tables.
9694
9695	* src/symtab.c (symbols_do): Remove.
9696	Adjust callers to use a simple for-loop instead.
9697	(table_sort): New.
9698	(symbols_check_defined): Use it.
9699	(symbol_check_defined_processor, symbol_pack_processor)
9700	(semantic_type_check_defined_processor, symbol_translation_processor):
9701	Remove.
9702	Simplify the corresponding functions (that no longer need to return a
9703	bool).
9704
97052019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9706
9707	diagnostics: display suggested update after the caret-info
9708	This commit adds the suggestion in green, on the line below the
9709	caret-and-tildes.
9710
9711	    foo.y:1.1-14: warning: deprecated directive: '%error-verbose', use '%define parse.error verbose' [-Wdeprecated]
9712	        1 | %error-verbose
9713	          | ^~~~~~~~~~~~~~
9714	          | %define parse.error verbose
9715
9716	The current approach, with location_caret_suggestion, is fragile:
9717	there's a protocol of calls to the complain functions which is strict.
9718	We should rather have a richer structure describing the diagnostics,
9719	including with submessages such as the suggestions, passed in the end
9720	to the routines in charge of formatting and printing them.
9721
9722	* src/location.h, src/location.c (location_caret_suggestion): New.
9723	* src/complain.c (deprecated_directive): Use it.
9724	* tests/diagnostics.at, tests/input.at: Adjust expectations.
9725
97262019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9727
9728	diagnostics: isolate caret_set_column
9729	* src/location.c (caret_info): Add width and skip members.
9730	(caret_set_column): New.
9731	Use it.
9732
97332019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9734
9735	diagnostics: isolate caret_set_file
9736	* src/location.c (caret_set_file): New.
9737	Store the current line's length in caret_info.line_len.
9738	Pay attention to fseek's return value.
9739	Extracted from...
9740	(location_caret): here.
9741
97422019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9743
9744	tests: use tput to get the number of columns
9745	* tests/bison.in: here.
9746
97472019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9748
9749	TODO: update
9750	I no longer agree with that item, there are indeed two things to
9751	report: lack of definition, and being useless.  We could have either
9752	one without the other, they are not directly related.
9753
97542019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9755
9756	yacc.c: work around warnings from G++ 4.8
9757	input.c: In function 'int yyparse()':
9758	input.c: error: conversion to 'long int' from 'long unsigned int'
9759	                may change the sign of the result [-Werror=sign-conversion]
9760	   yyes_capacity = sizeof yyesa / sizeof *yyes;
9761	                                ^
9762	cc1plus: all warnings being treated as errors
9763
9764	* data/skeletons/yacc.c: here.
9765
97662019-10-06  Akim Demaille  <akim.demaille@gmail.com>
9767
9768	yacc.c: work around warnings from Clang++ 3.3 and 3.4
9769	When we run the test suite with these C++ compilers to compile C code,
9770	we get:
9771
9772	    239. synclines.at:440: testing syncline escapes: yacc.c ...
9773	    ../../tests/synclines.at:440: $CC $CFLAGS $CPPFLAGS \"\\\"\".c -o \"\\\"\" ||
9774	              exit 77
9775	    stderr:
9776	    stdout:
9777	    ../../tests/synclines.at:440: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret  -o \"\\\"\".c \"\\\"\".y
9778	    ../../tests/synclines.at:440: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o \"\\\"\" \"\\\"\".c $LIBS
9779	    stderr:
9780	    "\"".c:1102:41: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
9781	          YYPTRDIFF_T yysize = yyssp - yyss + 1;
9782	                      ~~~~~~   ~~~~~~~~~~~~~^~~
9783	    1 error generated.
9784
9785	    193. conflicts.at:545: testing parse.error=verbose and consistent errors: lr.type=canonical-lr parse.lac=full ...
9786	    input.c:737:75: error: implicit conversion loses integer precision: 'long' to 'int'
9787	                           [-Werror,-Wshorten-64-to-32]
9788	      YYPTRDIFF_T yysize_old = *yytop == yytop_empty ? 0 : *yytop - *yybottom + 1;
9789	                  ~~~~~~~~~~                               ~~~~~~~~~~~~~~~~~~~^~~
9790	    input.c:901:48: error: implicit conversion loses integer precision: 'long' to 'int'
9791	                           [-Werror,-Wshorten-64-to-32]
9792	                YYPTRDIFF_T yysize = yyesp - *yyes + 1;
9793	                            ~~~~~~   ~~~~~~~~~~~~~~^~~
9794
9795	* data/skeletons/yacc.c: Add more casts.
9796
97972019-10-05  Akim Demaille  <akim.demaille@gmail.com>
9798
9799	tests: avoid a GCC 4.8 warning
9800	GCC 4.8 reports:
9801
9802	    input.y:57:33: error: conversion to 'int' from 'long unsigned int'
9803	                          may alter its value [-Werror=conversion]
9804	       int input_elts = sizeof input / sizeof input[0];
9805	                                     ^
9806
9807	* tests/local.at (AT_YYLEX_DEFINE(c)): Add a cast (sorry, Paul!).
9808
98092019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9810
9811	* data/skeletons/glr.c (yysplitStack): Pacify Clang 8.
9812
98132019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9814
9815	Avoid quiet conversion of pointer to bool
9816	* src/location.c (caret_set_file):
9817	* src/scan-code.l (contains_dot_or_dash):
9818	Do not quietly convert pointer to bool, as Oracle Developer Studio
9819	12.6 complains and it is arguably confusing style anyway.
9820
98212019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9822
9823	Port ARGMATCH_DEFINE_GROUP calls to C99
9824	* src/complain.c, src/getargs.c: Omit ‘;’ after call
9825	to ARGMATCH_DEFINE_GROUP, as C99 does not allow ‘;’ there.
9826
98272019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9828
9829	Port lexcalc scan.l to Solaris 10
9830	* examples/c/lexcalc/scan.l: Include errno.h.
9831
98322019-10-05  Akim Demaille  <akim.demaille@gmail.com>
9833
9834	yacc.c: use casts instead of pragmas when losing integer width
9835	For instance with Clang 4, 8, etc.:
9836
9837	    input.c:1166:12: error: implicit conversion loses integer precision: 'int' to 'yy_state_num' (aka 'signed char') [-Werror,-Wconversion]
9838	      *yyssp = yystate;
9839	             ~ ^~~~~~~
9840
9841	And GCC 8:
9842
9843	    input.c:1166:12: error: implicit conversion loses integer precision: 'int' to 'yy_state_num' (aka 'signed char') [-Werror,-Wimplicit-int-conversion]
9844	      *yyssp = yystate;
9845	             ~ ^~~~~~~
9846
9847	* data/skeletons/yacc.c (YY_CONVERT_INT_BEGIN): Remove.
9848	Adjust callers.
9849
98502019-10-04  Akim Demaille  <akim.demaille@gmail.com>
9851
9852	yacc.c: fix warnings about undefined macros
9853	For instance with GCC 4.9 and --enable-gcc-warnings:
9854
9855	    25. input.at:1201: testing Torturing the Scanner ...
9856	    ../../tests/input.at:1344: $CC $CFLAGS $CPPFLAGS  -c -o input.o input.c
9857	    stderr:
9858	    input.c:239:18: error: "__STDC_VERSION__" is not defined [-Werror=undef]
9859	     # elif 199901 <= __STDC_VERSION__
9860	                      ^
9861	    input.c:256:18: error: "__STDC_VERSION__" is not defined [-Werror=undef]
9862	     # elif 199901 <= __STDC_VERSION__
9863	                      ^
9864
9865	* data/skeletons/yacc.c: Check that __STDC_VERSION__ is defined before
9866	using it.
9867
98682019-10-04  Akim Demaille  <akim.demaille@gmail.com>
9869
9870	tests: check more state numbers
9871	* tests/torture.at (State number type): Also check 128, 129 and
9872	32768.
9873
98742019-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9875
9876	* doc/bison.texi (Table of Symbols): Mention memory exhaustion.
9877
98782019-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9879
9880	Simplify mfcalc error handling
9881	* doc/bison.texi (Mfcalc Symbol Table, Mfcalc Lexer):
9882	Don’t abort on memory allocation failure or integer overflow.
9883	Instead, comment that these things aren’t checked for.
9884
98852019-10-03  Akim Demaille  <akim.demaille@gmail.com>
9886
9887	c++: fix comments suggesting to use %require
9888	* data/skeletons/location.cc, data/skeletons/stack.hh: Here.
9889
98902019-10-03  Akim Demaille  <akim.demaille@gmail.com>
9891
9892	lalr1.cc: simplify uses of size_t
9893	* data/skeletons/stack.hh (stack::index_type): New type.
9894	(stack::size, stack::operator[]): Be about an index_type rather than a
9895	size_type and an int.
9896
98972019-10-03  Akim Demaille  <akim.demaille@gmail.com>
9898
9899	c++: fixes for old compilers
9900	On the CI with GCC 6:
9901
9902	    examples/c++/calc++/parser.cc:845:5: error: 'ptrdiff_t' was not declared in this scope
9903	         ptrdiff_t yycount = 0;
9904	         ^~~~~~~~~
9905	    examples/c++/calc++/parser.cc:845:5: note: suggested alternatives:
9906	    /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:202:28: note:   'std::ptrdiff_t'
9907	       typedef __PTRDIFF_TYPE__ ptrdiff_t;
9908	                                ^~~~~~~~~
9909
9910	* data/skeletons/lalr1.cc: Qualify ptrdiff_t and size_t with std::.
9911
99122019-10-03  Akim Demaille  <akim.demaille@gmail.com>
9913
9914	tests: be robust to -DNDEBUG
9915	input.y: In function 'yylex':
9916	input.y:67:7: error: unused variable 'input_elts' [-Werror=unused-variable]
9917	   int input_elts = sizeof input / sizeof input[0];
9918	       ^~~~~~~~~~
9919	cc1: all warnings being treated as errors
9920
9921	* tests/input.at, tests/local.at: Avoid that.
9922
99232019-10-03  Akim Demaille  <akim.demaille@gmail.com>
9924
9925	CI: remove the symlink before creating it
9926	Currently we fail if we rerun a job that succeeded to push the
9927	tarball.
9928
99292019-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9930
9931	Adjust ‘Big horizontal’ test case
9932	* tests/torture.at (Big horizontal): Adjust to recent changes with
9933	integers.  If there are states 0..256, Bison now uses a signed
9934	rather than an unsigned 16-bit integer.
9935
99362019-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9937
9938	regen
9939
99402019-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9941
9942	Prefer signed to unsigned integers
9943	This patch contains more fixes to prefer signed to unsigned
9944	integer types, as modern tools like 'gcc -fsanitize=undefined'
9945	can check for signed integer overflow but not unsigned overflow.
9946	* NEWS: Document the API change.
9947	* boostrap.conf (gnulib_modules): Add intprops.
9948	* data/skeletons/glr.c: Include stddef.h and stdint.h,
9949	since this skeleton can assume C99 or later.
9950	(YYSIZEMAX): Now signed, and the minimum of SIZE_MAX and PTRDIFF_MAX.
9951	(yybool) [!__cplusplus]: Now signed (which is how bool behaves).
9952	(YYTRANSLATE): Avoid use of unsigned, and make the macro
9953	safe even for values greater than UINT_MAX.
9954	(yytnamerr, struct yyGLRState, struct yyGLRStateSet, struct yyGLRStack)
9955	(yyaddDeferredAction, yyinitStateSet, yyinitGLRStack)
9956	(yyexpandGLRStack, yymarkStackDeleted, yyremoveDeletes)
9957	(yyglrShift, yyglrShiftDefer, yy_reduce_print, yydoAction)
9958	(yyglrReduce, yysplitStack, yyreportTree, yycompressStack)
9959	(yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError)
9960	(yyparse, yy_yypstack, yypstack, yypdumpstack):
9961	* tests/input.at (Torturing the Scanner):
9962	Prefer ptrdiff_t to size_t.
9963	* data/skeletons/c++.m4 (b4_yytranslate_define):
9964	* src/AnnotationList.c (AnnotationList__computePredecessorAnnotations):
9965	* src/AnnotationList.h (AnnotationIndex):
9966	* src/InadequacyList.h (InadequacyListNodeCount):
9967	* src/closure.c (closure_new):
9968	* src/complain.c (error_message, complains, complain_indent)
9969	(complain_args, duplicate_directive, duplicate_rule_directive):
9970	* src/gram.c (nritems, ritem_print, grammar_dump):
9971	* src/ielr.c (ielr_compute_ritem_sees_lookahead_set)
9972	(ielr_item_has_lookahead, ielr_compute_annotation_lists)
9973	(ielr_compute_lookaheads):
9974	* src/location.c (columns, boundary_print, location_print):
9975	* src/muscle-tab.c (muscle_percent_define_insert)
9976	(muscle_percent_define_check_values):
9977	* src/output.c (prepare_rules, prepare_actions):
9978	* src/parse-gram.y (id, handle_require):
9979	* src/reader.c (record_merge_function_type, packgram):
9980	* src/reduce.c (nuseless_productions, nuseless_nonterminals)
9981	(inaccessable_symbols):
9982	* src/relation.c (relation_print):
9983	* src/scan-code.l (variant, variant_table_size, variant_count)
9984	(variant_add, get_at_spec, show_sub_message, show_sub_messages)
9985	(parse_ref):
9986	* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>)
9987	(scan_integer, convert_ucn_to_byte, handle_syncline):
9988	* src/scan-skel.l (at_complain):
9989	* src/symtab.c (complain_symbol_redeclared)
9990	(complain_semantic_type_redeclared, complain_class_redeclared)
9991	(symbol_class_set, complain_user_token_number_redeclared):
9992	* src/tables.c (conflict_tos, conflrow, conflict_table)
9993	(conflict_list, save_row, pack_vector):
9994	* tests/local.at (AT_YYLEX_DEFINE(c)):
9995	Prefer signed to unsigned integer.
9996	* data/skeletons/lalr1.cc (yy_lac_check_):
9997	* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9998	* tests/local.at (AT_YYLEX_DEFINE(c)):
9999	Omit now-unnecessary casts.
10000	* data/skeletons/location.cc (b4_location_define):
10001	* doc/bison.texi (Mfcalc Lexer, C++ position, C++ location):
10002	Prefer int to unsigned for line and column numbers.
10003	Change example to abort explicitly on memory exhaustion,
10004	and fix an off-by-one bug that led to undefined behavior.
10005	* data/skeletons/stack.hh (stack::operator[]):
10006	Also allow ptrdiff_t indexes.
10007	(stack::pop, slice::slice, slice::operator[]):
10008	Index arg is now ptrdiff_t, not int.
10009	(stack::ssize): New method.
10010	(slice::range_): Now ptrdiff_t, not int.
10011	* data/skeletons/yacc.c (b4_state_num_type): Remove.
10012	All uses replaced by b4_int_type.
10013	(YY_CONVERT_INT_BEGIN, YY_CONVERT_INT_END): New macros.
10014	(yylac, yyparse): Use them around conversions that -Wconversion
10015	would give false alarms about. 	Omit unnecessary casts.
10016	(yy_stack_print): Use int rather than unsigned, and omit
10017	a cast that doesn’t seem to be needed here any more.
10018	* examples/c++/variant.yy (yylex):
10019	* examples/c++/variant-11.yy (yylex):
10020	Omit no-longer-needed conversions to unsigned.
10021	* src/InadequacyList.c (InadequacyList__new_conflict):
10022	Don’t assume *node_count is unsigned.
10023	* src/output.c (muscle_insert_unsigned_table):
10024	Remove; no longer used.
10025
100262019-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10027
10028	Prefer signed types for indexes in skeletons
10029	* NEWS: Mention this.
10030	* data/skeletons/c.m4 (b4_int_type):
10031	Prefer char if it will do, and prefer signed types to unsigned if
10032	either will do.
10033	* data/skeletons/glr.c (yy_reduce_print): No need to
10034	convert rule line to unsigned long.
10035	(yyrecoverSyntaxError): Put action into an int to
10036	avoid GCC warning of using a char subscript.
10037	* data/skeletons/lalr1.cc (yy_lac_check_, yysyntax_error_):
10038	Prefer ptrdiff_t to size_t.
10039	* data/skeletons/yacc.c (b4_int_type):
10040	Prefer signed types to unsigned if either will do.
10041	* data/skeletons/yacc.c (b4_declare_parser_state_variables):
10042	(YYSTACK_RELOCATE, YYCOPY, yy_lac_stack_realloc, yy_lac)
10043	(yytnamerr, yysyntax_error, yyparse): Prefer ptrdiff_t to size_t.
10044	(YYPTRDIFF_T, YYPTRDIFF_MAXIMUM): New macros.
10045	(YYSIZE_T): Fix "! defined YYSIZE_T" typo.
10046	(YYSIZE_MAXIMUM): Take the minimum of PTRDIFF_MAX and SIZE_MAX.
10047	(YYSIZEOF): New macro.
10048	(YYSTACK_GAP_MAXIMUM, YYSTACK_BYTES, YYSTACK_RELOCATE)
10049	(yy_lac_stack_realloc, yyparse): Use it.
10050	(YYCOPY, yy_lac_stack_realloc): Cast to YYSIZE_T to pacify GCC.
10051	(yy_reduce_print): Use int instead of unsigned long when int
10052	will do.
10053	(yy_lac_stack_realloc): Prefer long to unsigned long when
10054	either will do.
10055	* tests/regression.at: Adjust to these changes.
10056
100572019-09-30  Akim Demaille  <akim.demaille@gmail.com>
10058
10059	yacc: use the most appropriate integral type for state numbers
10060	Currently we properly use the "best" integral type for tables,
10061	including those storing state numbers.  However the variables for
10062	state numbers used in yyparse (and its dependencies such as
10063	yy_stack_print) still use int16_t invariably.  As a consequence, very
10064	large models overflow these variables.
10065
10066	Let's use the "best" type for these variables too.  It turns out that
10067	we can still use 16 bits for twice larger automata: stick to unsigned
10068	types.
10069
10070	However using 'unsigned' when 16 bits are not enough is troublesome
10071	and generates tons of warnings about signedness issues.  Instead,
10072	let's use 'int'.
10073
10074	Reported by Tom Kramer.
10075	https://lists.gnu.org/archive/html/bug-bison/2019-09/msg00018.html
10076
10077	* data/skeletons/yacc.c (b4_state_num_type): New.
10078	(yy_state_num): Be computed from YYNSTATES.
10079	* tests/linear: New.
10080	* tests/torture.at (State number type): New.
10081	Use it.
10082
100832019-09-30  Akim Demaille  <akim.demaille@gmail.com>
10084
10085	yacc: introduce a type for states
10086	* data/skeletons/yacc.c (yy_state_num): New.
10087	Use it for arrays of states.
10088
100892019-09-30  Akim Demaille  <akim.demaille@gmail.com>
10090
10091	style: prefer symbolic values rather than litterals
10092	Instead of
10093
10094	    #define YYPACT_NINF -130
10095	    #define yypact_value_is_default(Yystate) \
10096	      (!!((Yystate) == (-130)))
10097
10098	generate
10099
10100	    #define YYPACT_NINF (-130)
10101	    #define yypact_value_is_default(Yyn) \
10102	      ((Yyn) == YYPACT_NINF)
10103
10104	* data/skeletons/c.m4 (b4_table_value_equals): Add support for $4.
10105	* data/skeletons/glr.c, data/skeletons/yacc.c: Use it.
10106	Also, use shorter macro argument names, the name of the macro is clear
10107	enough.
10108
101092019-09-30  Akim Demaille  <akim.demaille@gmail.com>
10110
10111	style: change misleading macro argument name
10112	* data/skeletons/glr.c, data/skeletons/yacc.c
10113	(yypact_value_is_default): It does not take a rule number as argument.
10114
101152019-09-28  Akim Demaille  <akim.demaille@gmail.com>
10116
10117	Merge remote-tracking branch 'upstream/maint'
10118	* upstream/maint:
10119	  c++: add copy ctors for compatibility with the IAR compiler
10120	  CI: show git status
10121	  CI: disable ICC
10122	  tests: pass -jN from Make to the test suite
10123	  quotearg: avoid leaks
10124	  maint: post-release administrivia
10125
101262019-09-27  Akim Demaille  <akim.demaille@gmail.com>
10127
10128	c++: add copy ctors for compatibility with the IAR compiler
10129	Reported by Andreas Damm.
10130	https://savannah.gnu.org/support/?110032
10131
10132	* data/skeletons/lalr1.cc (stack_symbol_type::operator=): New
10133	overload, const, to please the IAR C++ compiler (version ca 2013).
10134
101352019-09-23  Akim Demaille  <akim.demaille@gmail.com>
10136
10137	CI: show git status
10138
101392019-09-23  Akim Demaille  <akim.demaille@gmail.com>
10140
10141	CI: disable ICC
10142	It seems that Intel changed something in their license management.
10143	https://github.com/nemequ/icc-travis/issues/15
10144
101452019-09-23  Akim Demaille  <akim.demaille@gmail.com>
10146
10147	tests: pass -jN from Make to the test suite
10148	I am sooooo tired of typing "make -j5 TESTSUITEFLAGS=-j5"...
10149	Should have done this years ago.
10150
10151	* cfg.mk (TESTSUITEFLAGS): here.
10152
101532019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10154
10155	quotearg: avoid leaks
10156	Reported by Tomasz Kłoczko.
10157	https://lists.gnu.org/archive/html/bug-bison/2019-09/msg00008.html
10158
10159	* src/main.c (main): Free quotearg's memory later.
10160
101612019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10162
10163	diagnostics: get the screen width from the terminal
10164	* bootstrap.conf: We need winsz-ioctl and winsz-termios.
10165	* src/location.c (columns): Use winsize to get the number of
10166	columns.
10167	Code taken from the GNU Coreutils.
10168	* src/location.h, src/location.c (caret_init): New.
10169	* src/complain.c (complain_init): Call it.
10170	* tests/bison.in: Export COLUMNS so that users of tests/bison can
10171	enjoy proper line truncation.
10172
101732019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10174
10175	diagnostics: don't print ellipsis on the caret line
10176	From
10177
10178	    9 | ...TUVWXYZ  ABCDEFGHIJKLMNOPQRSTUVWXYZ  ABCDEFGHIJKL
10179	      | ...         ^~~~~~~~~~~~~~~~~~~~~~~~~~
10180
10181	to
10182
10183	    9 | ...TUVWXYZ  ABCDEFGHIJKLMNOPQRSTUVWXYZ  ABCDEFGHI...
10184	      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
10185
10186	* src/location.c (location_caret): here.
10187	* tests/diagnostics.at: Adjust expectations.
10188
101892019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10190
10191	diagnostics: also show truncation at the end of line with "..."
10192	From
10193
10194	    9 | ...TUVWXYZ  ABCDEFGHIJKLMNOPQRSTUVWXYZ  ABCDEFGHIJKL
10195	      | ...         ^~~~~~~~~~~~~~~~~~~~~~~~~~
10196
10197	to
10198
10199	    9 | ...TUVWXYZ  ABCDEFGHIJKLMNOPQRSTUVWXYZ  ABCDEFGHI...
10200	      | ...         ^~~~~~~~~~~~~~~~~~~~~~~~~~
10201
10202	* src/location.c (location_caret): here.
10203	* tests/diagnostics.at: Adjust expectations.
10204
102052019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10206
10207	diagnostics: check that quoted lines are truncated
10208	* tests/diagnostics.at (Screen width: 60 columns, Screen width: 80
10209	columns, Screen width: 200 columns): New tests.
10210
102112019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10212
10213	diagnostics: truncate quoted sources to fit the screen
10214	* src/location.c (min_int, columns): New.
10215	(location_caret): Compute the line width.  Based on it, compute how
10216	many columns must be skipped before the quoted location and truncated
10217	after, to fit the sceen width.
10218	* tests/local.at (AT_QUELL_VALGRIND): Transform into...
10219	(AT_SET_ENV_IF, AT_SET_ENV): these.
10220	Define COLUMNS to protect the test suite from the user's environment.
10221
102222019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10223
10224	diagnostics: learn how to count column number with multibyte chars
10225	So far diagnostics were cheating: in addition to the 'column' field of
10226	locations (based on actual screen width per multibyte characters and
10227	on tabulation expansion), the scanner sets the 'byte' field.
10228	Diagnostics used this byte count to decide where to insert (color)
10229	style.
10230
10231	We want to be able to truncate the quoted lines when there are too
10232	wide to fit the screen.  This requires that the diagnostics learn how
10233	to count columns, the byte-in-boundary trick no longer works.
10234
10235	Bytes are still used for fix-its.
10236
10237	* bootstrap.conf: We need mbfile for mbf_getc.
10238	* src/location.c (caret_info): We need an mbfile.
10239	(caret_set_file): Initialize it.
10240	(caret_getc): Convert to mbfile.
10241	(location_caret): Instead of relying on the byte position to decide
10242	where to insert the color style, count the current column using
10243	boundary_compute.
10244
102452019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10246
10247	diagnostics: style: rename member for clariy
10248	* src/location.c (caret_info): Now that we no longer have a 'file'
10249	member (see previous commit), rename 'source' as 'file'.
10250
102512019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10252
10253	diagnostics: style: use a boundary to track the caret_info
10254	* src/location.c (caret_info): Replace file and line with pos, a
10255	boundary.  This will allow us to use features of the boundary type,
10256	such as boundary_compute.
10257
102582019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10259
10260	diagnostics: extract boundary_compute from location_compute
10261	The handling of the contributions of the tabulations in the columns is
10262	burried inside location_compute.  We will soon be willing to use the
10263	boundary part of the computation (to compute the current column number
10264	each time we read a multibyte char).
10265
10266	* src/location.c (boundary_compute): New, extracted from...
10267	(location_compute): here.
10268
102692019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10270
10271	diagnostics: style: add caret_set_file
10272	To make the following commits easier to read.
10273
10274	* src/location.c (caret_set_file): New.
10275
102762019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10277
10278	diagnostics: style: minor changes
10279	* src/location.c (location_caret): Factor two branches of an if.
10280
102812019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10282
10283	CI: show git status
10284
102852019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10286
10287	git: update ignores
10288
102892019-09-22  Akim Demaille  <akim.demaille@gmail.com>
10290
10291	git: update ignores
10292
102932019-09-21  Akim Demaille  <akim.demaille@gmail.com>
10294
10295	quotearg: avoid leaks
10296	Reported by Tomasz Kłoczko.
10297	https://lists.gnu.org/archive/html/bug-bison/2019-09/msg00008.html
10298
10299	* src/main.c (main): Free quotearg's memory later.
10300
103012019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10302
10303	tests: pass -jN from Make to the test suite
10304	I am sooooo tired of typing "make -j5 TESTSUITEFLAGS=-j5"...
10305	Should have done this years ago.
10306
10307	* cfg.mk (TESTSUITEFLAGS): here.
10308
103092019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10310
10311	java: handle eof in yytranslate
10312	* data/skeletons/lalr1.java (yytranslate_): Handle eof here, as is done
10313	in lalr1.cc.
10314	* tests/javapush.at: Adjust.
10315
103162019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10317
10318	d: handle eof in yytranslate
10319	This changes the traces from
10320
10321	    Reading a token:
10322	    Now at end of input.
10323
10324	to
10325
10326	    Reading a token:
10327	    Next token is token $end (7FFEE56E6474)
10328
10329	which is ok.  Actually it is even better, as it gives the location
10330	when locations are enabled, and is clearer when rules explicitly use
10331	the EOF token.
10332
10333	* data/skeletons/lalr1.d (yytranslate_): Handle eof here, as is done
10334	in lalr1.cc.
10335
103362019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10337
10338	regen
10339
103402019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10341
10342	parser: use api.token.raw
10343	* src/parse-gram.y: Here.
10344
103452019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10346
10347	api.token.raw: document it
10348	* doc/bison.texi: here.
10349
103502019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10351
10352	api.token.raw: cannot be used with character literals
10353	* src/parse-gram.y (CHAR): api.token.raw and character literals are
10354	mutually exclusive.
10355	* tests/input.at (Character literals and api.token.raw): New.
10356
103572019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10358
10359	api.token.raw: apply to the other skeletons
10360	* data/skeletons/c++.m4, data/skeletons/glr.c,
10361	* data/skeletons/lalr1.c, data/skeletons/lalr1.java:
10362	Add support for api.token.raw.
10363
10364	* tests/scanner.at: Check them.
10365
103662019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10367
10368	api.token.raw: check it
10369	* tests/local.at (AT_TOKEN_RAW_IF): New.
10370	* tests/local.mk: New.
10371	Use it.
10372
103732019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10374
10375	api.token.raw: implement
10376	Bison used to feature %raw, documented as follows:
10377
10378	    @item %raw
10379	    The output file @file{@var{name}.h} normally defines the tokens with
10380	    Yacc-compatible token numbers.  If this option is specified, the
10381	    internal Bison numbers are used instead.  (Yacc-compatible numbers start
10382	    at 257 except for single character tokens; Bison assigns token numbers
10383	    sequentially for all tokens starting at 3.)
10384
10385	Unfortunately, as far as I can tell, it never worked: token numbers
10386	are indeed changed in the generated tables (from external token number
10387	to internal), yet the code was still applying the mapping from
10388	external token numbers to internal token numbers.
10389
10390	This commit reintroduces the feature as it was expected to be.
10391
10392	* data/skeletons/bison.m4 (b4_token_format): When api.token.raw is
10393	enabled, use the internal token number.
10394	* data/skeletons/yacc.c (yytranslate): Don't emit if api.token.raw is
10395	enabled.
10396	(YYTRANSLATE): Adjust.
10397
103982019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10399
10400	style: tidy yacc.c
10401	* data/skeletons/yacc.c: Include 'c.m4' first.
10402	Then sort the handling of %define variables.
10403	* tests/input.at: Adjust.
10404
104052019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10406
10407	CI: disable ICC
10408	It seems that Intel changed something in their license management.
10409	https://github.com/nemequ/icc-travis/issues/15
10410
104112019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10412
10413	diagnostics: fix use of complain_indent
10414	* src/symtab.c (symbol_class_set): Here.
10415	* tests/diagnostics.at, tests/input.at, tests/regression.at: Adjust
10416	expectations.
10417
104182019-09-14  Akim Demaille  <akim.demaille@gmail.com>
10419
10420	input: stop treating lone CRs as end-of-lines
10421	We used to treat lone CRs (\r, aka ^M) as regular NLs (\n), probably
10422	to please Classic MacOS.  As of today, it makes more sense to treat \r
10423	like a plain white space character.
10424
10425	https://lists.gnu.org/archive/html/bison-patches/2019-09/msg00027.html
10426
10427	* src/scan-gram.l (no_cr_read): Remove.  Instead, use...
10428	(eol): this new abbreviation denoting end-of-line.
10429	* src/location.c (caret_getc): New.
10430	(location_caret): Use it.
10431	* tests/diagnostics.at (Carriage return): Adjust expectations.
10432	(CR NL): New.
10433
104342019-09-12  Akim Demaille  <akim.demaille@gmail.com>
10435
10436	Merge tag 'v3.4.2' into HEAD
10437	bison 3.4.2
10438
10439	* tag 'v3.4.2': (24 commits)
10440	  version 3.4.2
10441	  CI: always uninstall icc
10442	  news: more bug fixes thanks to Marc Schönefeld
10443	  diagnostics: beware of unexpected EOF when quoting the source file
10444	  gnulib: update
10445	  build: fix distcheck
10446	  tests: add noexcept to please GCC 9
10447	  news: update
10448	  fix: don't die when EOF token is defined twice
10449	  tests: check token redeclaration
10450	  yacc.c: beware of GCC's -Wmaybe-uninitialized
10451	  glr.c: initialize vector of bools
10452	  gnulib: update
10453	  check for memory exhaustion
10454	  diagnostics: avoid global variables
10455	  diagnostics: fix invalid error message indentation
10456	  git: ignore files generated in gnulib-po
10457	  c++: avoid duplicate definition of YYUSE
10458	  gnulib: update
10459	  CI: more compilers
10460	  ...
10461
104622019-09-12  Akim Demaille  <akim.demaille@gmail.com>
10463
10464	maint: post-release administrivia
10465	* NEWS: Add header line for next release.
10466	* .prev-version: Record previous version.
10467	* cfg.mk (old_NEWS_hash): Auto-update.
10468
104692019-09-12  Akim Demaille  <akim.demaille@gmail.com>
10470
10471	version 3.4.2
10472	* NEWS: Record release date.
10473
104742019-09-12  Akim Demaille  <akim.demaille@gmail.com>
10475
10476	CI: always uninstall icc
10477
104782019-09-12  Akim Demaille  <akim.demaille@gmail.com>
10479
10480	news: more bug fixes thanks to Marc Schönefeld
10481
104822019-09-12  Akim Demaille  <akim.demaille@gmail.com>
10483
10484	diagnostics: beware of unexpected EOF when quoting the source file
10485	When the input file contains lone CRs (aka, ^M, \r), the locations see
10486	a new line.  Diagnostics look only at \n as end-of-line, so sometimes
10487	there is an offset in diagnostics.  Worse yet: sometimes we loop
10488	endlessly waiting for \n to come from a continuous stream of EOF.
10489
10490	Fix that:
10491	- check for EOF
10492	- beware not to call end_use_class if begin_use_class was not
10493	  called (which would abort).  This could happen if the actual
10494	  line is shorter that the expected one.
10495
10496	Prompted by a (private) report from Marc Schönefeld.
10497
10498	* src/location.c (location_caret): here.
10499	* tests/diagnostics.at (Carriage return): New.
10500
105012019-09-11  Akim Demaille  <akim.demaille@gmail.com>
10502
10503	gnulib: update
10504	Contains the creation of the xhash module.
10505	https://lists.gnu.org/archive/html/bug-gnulib/2019-09/msg00046.html
10506
10507	* src/muscle-tab.c, src/state.c, src/symtab.c, src/uniqstr.c:
10508	Use hash_xinitialize.
10509
105102019-09-11  Akim Demaille  <akim.demaille@gmail.com>
10511
10512	build: fix distcheck
10513	* configure.ac (gl_LIBOBJS): Adjust so that the generated files are
10514	indeed the expected ones.
10515
105162019-09-10  Akim Demaille  <akim.demaille@gmail.com>
10517
10518	diagnostics: beware of unexpected EOF when quoting the source file
10519	When the input file contains lone CRs (aka, ^M, \r), the locations see
10520	a new line.  Diagnostics look only at \n as end-of-line, so sometimes
10521	there is an offset in diagnostics.  Worse yet: sometimes we loop
10522	endlessly waiting for \n to come from a continuous stream of EOF.
10523
10524	Fix that:
10525	- check for EOF
10526	- beware not to call end_use_class if begin_use_class was not
10527	  called (which would abort).  This could happen if the actual
10528	  line is shorter that the expected one.
10529
10530	Prompted by a (private) report from Marc Schönefeld.
10531
10532	* src/location.c (location_caret): here.
10533	* tests/diagnostics.at (Carriage return): New.
10534
105352019-09-10  Akim Demaille  <akim.demaille@gmail.com>
10536
10537	gnulib: update
10538	Contains the creation of the xhash module.
10539	https://lists.gnu.org/archive/html/bug-gnulib/2019-09/msg00046.html
10540
10541	* src/muscle-tab.c, src/state.c, src/symtab.c, src/uniqstr.c:
10542	Use hash_xinitialize.
10543
105442019-09-10  Akim Demaille  <akim.demaille@gmail.com>
10545
10546	build: fix distcheck
10547	* configure.ac (gl_LIBOBJS): Adjust so that the generated files are
10548	indeed the expected ones.
10549
105502019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10551
10552	tests: add noexcept to please GCC 9
10553	    bison/tests/c++.at:552: bison --color=no -fno-caret  -o list.cc list.y
10554	    bison/tests/c++.at:552: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o list list.cc $LIBS
10555	    stderr:
10556	    gcc9/c++/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = string; _Args = {string}; _Tp = string]':
10557	    gcc9/c++/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = string; _Args = {string}; _Tp = string; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<string>]'
10558	    gcc9/c++/bits/stl_uninitialized.h:888:67:   required from 'void std::__relocate_object_a(_Tp*, _Up*, _Allocator&) [with _Tp = string; _Up = string; _Allocator = std::allocator<string>]'
10559	    gcc9/c++/bits/stl_uninitialized.h:920:47:   required from '_ForwardIterator std::__relocate_a_1(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = string*; _ForwardIterator = string*; _Allocator = std::allocator<string>]'
10560	    gcc9/c++/bits/stl_uninitialized.h:942:37:   required from '_ForwardIterator std::__relocate_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = string*; _ForwardIterator = string*; _Allocator = std::allocator<string>]'
10561	    gcc9/c++/bits/stl_vector.h:430:35:   required from 'static constexpr bool std::vector<_Tp, _Alloc>::_S_nothrow_relocate(std::true_type) [with _Tp = string; _Alloc = std::allocator<string>; std::true_type = std::integral_constant<bool, true>]'
10562	    gcc9/c++/bits/stl_vector.h:446:28:   required from 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const string&}; _Tp = string; _Alloc = std::allocator<string>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<string*, std::vector<string> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = string*]'
10563	    gcc9/c++/bits/stl_vector.h:1195:4:   required from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = string; _Alloc = std::allocator<string>; std::vector<_Tp, _Alloc>::value_type = string]'
10564	    list.y:126:110:   required from here
10565	    gcc9/c++/bits/vector.tcc:459:44:   in 'constexpr' expansion of 'std::vector<string>::_S_use_relocate()'
10566	    list.y:41:7: error: but 'string::string(string&&)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
10567	       41 |       string (string&& s)
10568	          |       ^~~~~~
10569
10570	* tests/c++.at (Variants): Add noexcept where appropriate.
10571
105722019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10573
10574	tests: add noexcept to please GCC 9
10575	    bison/tests/c++.at:552: bison --color=no -fno-caret  -o list.cc list.y
10576	    bison/tests/c++.at:552: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o list list.cc $LIBS
10577	    stderr:
10578	    gcc9/c++/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = string; _Args = {string}; _Tp = string]':
10579	    gcc9/c++/bits/alloc_traits.h:482:2:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = string; _Args = {string}; _Tp = string; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<string>]'
10580	    gcc9/c++/bits/stl_uninitialized.h:888:67:   required from 'void std::__relocate_object_a(_Tp*, _Up*, _Allocator&) [with _Tp = string; _Up = string; _Allocator = std::allocator<string>]'
10581	    gcc9/c++/bits/stl_uninitialized.h:920:47:   required from '_ForwardIterator std::__relocate_a_1(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = string*; _ForwardIterator = string*; _Allocator = std::allocator<string>]'
10582	    gcc9/c++/bits/stl_uninitialized.h:942:37:   required from '_ForwardIterator std::__relocate_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = string*; _ForwardIterator = string*; _Allocator = std::allocator<string>]'
10583	    gcc9/c++/bits/stl_vector.h:430:35:   required from 'static constexpr bool std::vector<_Tp, _Alloc>::_S_nothrow_relocate(std::true_type) [with _Tp = string; _Alloc = std::allocator<string>; std::true_type = std::integral_constant<bool, true>]'
10584	    gcc9/c++/bits/stl_vector.h:446:28:   required from 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const string&}; _Tp = string; _Alloc = std::allocator<string>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<string*, std::vector<string> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = string*]'
10585	    gcc9/c++/bits/stl_vector.h:1195:4:   required from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = string; _Alloc = std::allocator<string>; std::vector<_Tp, _Alloc>::value_type = string]'
10586	    list.y:126:110:   required from here
10587	    gcc9/c++/bits/vector.tcc:459:44:   in 'constexpr' expansion of 'std::vector<string>::_S_use_relocate()'
10588	    list.y:41:7: error: but 'string::string(string&&)' does not throw; perhaps it should be declared 'noexcept' [-Werror=noexcept]
10589	       41 |       string (string&& s)
10590	          |       ^~~~~~
10591
10592	* tests/c++.at (Variants): Add noexcept where appropriate.
10593
105942019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10595
10596	news: update
10597
105982019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10599
10600	fix: don't die when EOF token is defined twice
10601	With
10602
10603	    %token EOF 0 EOF 0
10604
10605	we get
10606
10607	    input.y:3.14-16: warning: symbol EOF redeclared [-Wother]
10608	        3 | %token EOF 0 EOF 0
10609	          |              ^~~
10610	    input.y:3.8-10: previous declaration
10611	        3 | %token EOF 0 EOF 0
10612	          |        ^~~
10613	    Assertion failed: (nsyms == ntokens + nvars), function check_and_convert_grammar,
10614	        file /Users/akim/src/gnu/bison/src/reader.c, line 839.
10615
10616	Reported by Marc Schönefeld.
10617
10618	* src/symtab.c (symbol_user_token_number_set): Register only the
10619	first definition of the end of input token.
10620	* tests/input.at (Symbol redeclared): Check that case.
10621
106222019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10623
10624	tests: check token redeclaration
10625	* src/symtab.c (symbol_class_set): Report previous definitions when
10626	redeclared.
10627	* tests/input.at (Symbol redeclared): New.
10628
106292019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10630
10631	yacc.c: beware of GCC's -Wmaybe-uninitialized
10632	Test 400 (calc.at:773: testing Calculator api.push-pull=both
10633	api.pure=full parse.error=verbose %debug %locations %defines
10634	api.prefix={calc} %verbose %yacc) fails on the CI with GCC 8 on
10635	Bionic:
10636
10637	    400. calc.at:773: testing Calculator api.push-pull=both api.pure=full parse.error=verbose %debug %locations %defines api.prefix={calc} %verbose %yacc  ...
10638	    ../../tests/calc.at:773: bison --color=no -fno-caret -Wno-deprecated -o calc.c calc.y
10639	    ../../tests/calc.at:773: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o calc calc.c calc-lex.c calc-main.c $LIBS
10640	    stderr:
10641	    calc.y: In function 'int calcpush_parse(calcpstate*, int, const CALCSTYPE*, CALCLTYPE*)':
10642	    calc.y:26:20: error: 'yylval.CALCSTYPE::ival' may be used uninitialized in this function [-Werror=maybe-uninitialized]
10643	     %printer { fprintf (yyo, "%d", $$); } <ival>;
10644	                        ^
10645	    calc.c:1272:9: note: 'yylval.CALCSTYPE::ival' was declared here
10646	     YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
10647	             ^~~~~~
10648	    cc1plus: all warnings being treated as errors
10649	    stdout:
10650	    ../../tests/calc.at:773: exit code was 1, expected 0
10651	    400. calc.at:773: 400. Calculator api.push-pull=both api.pure=full parse.error=verbose %debug %locations %defines api.prefix={calc} %verbose %yacc  (calc.at:773): FAILED (calc.at:773)
10652
10653	* data/skeletons/c.m4 (yy_symbol_value_print): Disable the warning
10654	locally.
10655
106562019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10657
10658	glr.c: initialize vector of bools
10659	The CI, with CC='gcc-7 -fsanitize=undefined,address
10660	-fno-omit-frame-pointer', reports:
10661
10662	    calc.cc:1652:50: runtime error: load of value 190, which is not a valid value for type 'bool'
10663	    ../../tests/calc.at:867: cat stderr
10664	    --- expout	2019-09-05 20:30:37.887257545 +0000
10665	    +++ /home/travis/build/bison-3.4.1.72-79a1-dirty/_build/tests/testsuite.dir/at-groups/438/stdout	2019-09-05 20:30:37.887257545 +0000
10666	    @@ -1 +1,2 @@
10667	     syntax error
10668	    +calc.cc:1652:50: runtime error: load of value 190, which is not a valid value for type 'bool'
10669	    438. calc.at:867: 438. Calculator glr.cc  (calc.at:867): FAILED (calc.at:867)
10670
10671	The problem is that yylookaheadNeeds is not initialized in
10672	yyinitStateSet, and when it is copied, the value is not 0 or 1.
10673
10674	* data/skeletons/glr.c (yylookaheadNeeds): Initialize yylookaheadNeeds.
10675
106762019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10677
10678	gnulib: update
10679	Contains a fix for
10680	https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html.
10681	See
10682	https://lists.gnu.org/archive/html/bug-gnulib/2019-09/msg00005.html.
10683	Reported by 江 祖铭 (Zu-Ming Jiang).
10684
106852019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10686
10687	check for memory exhaustion
10688	hash_initialize returns NULL when out of memory.  Check for it, and
10689	die cleanly instead of crashing.
10690
10691	Reported by 江 祖铭 (Zu-Ming Jiang).
10692	https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00015.html
10693
10694	* src/muscle-tab.c, src/state.c, src/symtab.c, src/uniqstr.c:
10695	Check the value returned by hash_initialize.
10696
106972019-09-08  László Várady  <laszlo.varady93@gmail.com>
10698
10699	diagnostics: avoid global variables
10700	* src/complain.c (indent_ptr): Remove.
10701	(error_message, complains): Take indent as an argument.
10702	Adjust callers.
10703
107042019-09-08  László Várady  <laszlo.varady93@gmail.com>
10705
10706	diagnostics: fix invalid error message indentation
10707	https://lists.gnu.org/archive/html/bison-patches/2019-08/msg00007.html
10708
10709	When Bison is started with a flag that suppresses warning messages, the
10710	error_message() function can produce a few gigabytes of indentation
10711	because of a dangling pointer.
10712
10713	* src/complain.c (error_message): Don't reset indent_ptr here, but...
10714	(complain_indent): here.
10715	* tests/diagnostics.at (Indentation with message suppression): Check
10716	this case.
10717
107182019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10719
10720	git: ignore files generated in gnulib-po
10721	Because of them, the CI generates "-dirty" tarballs.
10722
107232019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10724
10725	c++: avoid duplicate definition of YYUSE
10726	Reported by Frank Heckenbach.
10727	https://lists.gnu.org/archive/html/bug-bison/2019-06/msg00009.html
10728
10729	* data/skeletons/lalr1.cc (b4_shared_declarations): Remove the
10730	duplicate definition of YYUSE, the other one coming from
10731	b4_attribute_define.
10732
107332019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10734
10735	gnulib: update
10736	This update brings file from Gettext 0.20, which is not available on
10737	the CI yet.
10738
10739	.travis.yml: Adjust.
10740	Use Bionic now that it's available.
10741
107422019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10743
10744	CI: more compilers
10745	* .travis.yml: Bionic is now available, with GCC8.
10746	GCC7 sanitizers work, but they are too longer: cover only part 1.
10747	Redefine part 1 and part 2 so that part 1 is really the core of the
10748	tests: not playing with POSIX and C++ compiler for C code.
10749
107502019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10751
10752	CI: fail fast
10753
107542019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10755
10756	CI: propagate sftp failures
10757	* .travis.yml (stage: "compile"): here.
10758
107592019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10760
10761	CI: avoid useless git costs
10762	Travis answered favorably to my suggestion to provide a means to
10763	disable git clone on some jobs (issue 7542).  See
10764	https://docs.travis-ci.com/user/customizing-the-build/#disabling-git-clone.
10765
10766	* .travis.yml: Disable git globally, enable it for i. the compile job,
10767	and ii. the test job on ICC which needs the install-icc.sh script.
10768
107692019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10770
10771	CI: factor
10772	* .travis.yml (Clang 7 libc++ and ASAN part 2): Reuse bits from "Clang
10773	7 libc++ and ASAN part 1".
10774
107752019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10776
10777	regen
10778
107792019-09-08  Akim Demaille  <akim.demaille@gmail.com>
10780
10781	gnulib: update
10782	Contains a fix for
10783	https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html.
10784	See
10785	https://lists.gnu.org/archive/html/bug-gnulib/2019-09/msg00005.html.
10786	Reported by 江 祖铭 (Zu-Ming Jiang).
10787
107882019-09-07  Akim Demaille  <akim.demaille@gmail.com>
10789
10790	fix: don't die when EOF token is defined twice
10791	With
10792
10793	    %token EOF 0 EOF 0
10794
10795	we get
10796
10797	    input.y:3.14-16: warning: symbol EOF redeclared [-Wother]
10798	        3 | %token EOF 0 EOF 0
10799	          |              ^~~
10800	    input.y:3.8-10: previous declaration
10801	        3 | %token EOF 0 EOF 0
10802	          |        ^~~
10803	    Assertion failed: (nsyms == ntokens + nvars), function check_and_convert_grammar,
10804	        file /Users/akim/src/gnu/bison/src/reader.c, line 839.
10805
10806	Reported by Marc Schönefeld.
10807
10808	* src/symtab.c (symbol_user_token_number_set): Register only the
10809	first definition of the end of input token.
10810	* tests/input.at (Symbol redeclared): Check that case.
10811
108122019-09-07  Akim Demaille  <akim.demaille@gmail.com>
10813
10814	tests: check token redeclaration
10815	* src/symtab.c (symbol_class_set): Report previous definitions when
10816	redeclared.
10817	* tests/input.at (Symbol redeclared): New.
10818
108192019-09-06  Akim Demaille  <akim.demaille@gmail.com>
10820
10821	glr.c: initialize vector of bools
10822	The CI, with CC='gcc-7 -fsanitize=undefined,address
10823	-fno-omit-frame-pointer', reports:
10824
10825	    calc.cc:1652:50: runtime error: load of value 190, which is not a valid value for type 'bool'
10826	    ../../tests/calc.at:867: cat stderr
10827	    --- expout	2019-09-05 20:30:37.887257545 +0000
10828	    +++ /home/travis/build/bison-3.4.1.72-79a1-dirty/_build/tests/testsuite.dir/at-groups/438/stdout	2019-09-05 20:30:37.887257545 +0000
10829	    @@ -1 +1,2 @@
10830	     syntax error
10831	    +calc.cc:1652:50: runtime error: load of value 190, which is not a valid value for type 'bool'
10832	    438. calc.at:867: 438. Calculator glr.cc  (calc.at:867): FAILED (calc.at:867)
10833
10834	The problem is that yylookaheadNeeds is not initialized in
10835	yyinitStateSet, and when it is copied, the value is not 0 or 1.
10836
10837	* data/skeletons/glr.c (yylookaheadNeeds): Initialize yylookaheadNeeds.
10838
108392019-09-06  Akim Demaille  <akim.demaille@gmail.com>
10840
10841	yacc.c: beware of GCC's -Wmaybe-uninitialized
10842	Test 400 (calc.at:773: testing Calculator api.push-pull=both
10843	api.pure=full parse.error=verbose %debug %locations %defines
10844	api.prefix={calc} %verbose %yacc) fails on the CI with GCC 8 on
10845	Bionic:
10846
10847	    400. calc.at:773: testing Calculator api.push-pull=both api.pure=full parse.error=verbose %debug %locations %defines api.prefix={calc} %verbose %yacc  ...
10848	    ../../tests/calc.at:773: bison --color=no -fno-caret -Wno-deprecated -o calc.c calc.y
10849	    ../../tests/calc.at:773: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o calc calc.c calc-lex.c calc-main.c $LIBS
10850	    stderr:
10851	    calc.y: In function 'int calcpush_parse(calcpstate*, int, const CALCSTYPE*, CALCLTYPE*)':
10852	    calc.y:26:20: error: 'yylval.CALCSTYPE::ival' may be used uninitialized in this function [-Werror=maybe-uninitialized]
10853	     %printer { fprintf (yyo, "%d", $$); } <ival>;
10854	                        ^
10855	    calc.c:1272:9: note: 'yylval.CALCSTYPE::ival' was declared here
10856	     YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
10857	             ^~~~~~
10858	    cc1plus: all warnings being treated as errors
10859	    stdout:
10860	    ../../tests/calc.at:773: exit code was 1, expected 0
10861	    400. calc.at:773: 400. Calculator api.push-pull=both api.pure=full parse.error=verbose %debug %locations %defines api.prefix={calc} %verbose %yacc  (calc.at:773): FAILED (calc.at:773)
10862
10863	* data/skeletons/c.m4 (yy_symbol_value_print): Disable the warning
10864	locally.
10865
108662019-09-06  Akim Demaille  <akim.demaille@gmail.com>
10867
10868	lalr1.cc: fix LAC support
10869	* data/skeletons/lalr1.cc (ctor): Initialize yy_lac_established_.
10870	This is quite painful to write, and ugly to read.
10871
108722019-09-06  Akim Demaille  <akim.demaille@gmail.com>
10873
10874	style: fix comment
10875	* tests/atlocal.in: here.
10876
108772019-09-06  Akim Demaille  <akim.demaille@gmail.com>
10878
10879	CI: more compilers
10880	* .travis.yml: Bionic is now available, with GCC8.
10881	GCC7 sanitizers work, but they are too longer: cover only part 1.
10882	Redefine part 1 and part 2 so that part 1 is really the core of the
10883	tests: not playing with POSIX and C++ compiler for C code.
10884
108852019-09-06  Akim Demaille  <akim.demaille@gmail.com>
10886
10887	CI: fail fast
10888
108892019-09-04  Akim Demaille  <akim.demaille@gmail.com>
10890
10891	gnulib: update
10892	This update brings file from Gettext 0.20, which is not available on
10893	the CI yet.
10894
10895	.travis.yml: Adjust.
10896	Use Bionic now that it's available.
10897
108982019-09-01  Akim Demaille  <akim.demaille@gmail.com>
10899
10900	check for memory exhaustion
10901	hash_initialize returns NULL when out of memory.  Check for it, and
10902	die cleanly instead of crashing.
10903
10904	Reported by 江 祖铭 (Zu-Ming Jiang).
10905	https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00015.html
10906
10907	* src/muscle-tab.c, src/state.c, src/symtab.c, src/uniqstr.c:
10908	Check the value returned by hash_initialize.
10909
109102019-08-30  Akim Demaille  <akim.demaille@gmail.com>
10911
10912	news: LAC for C++
10913
109142019-08-29  Akim Demaille  <akim.demaille@gmail.com>
10915
10916	d: remove useless imports
10917	* examples/d/calc.y, tests/calc.at: here.
10918
109192019-08-18  László Várady  <laszlo.varady93@gmail.com>
10920
10921	diagnostics: avoid global variables
10922	* src/complain.c (indent_ptr): Remove.
10923	(error_message, complains): Take indent as an argument.
10924	Adjust callers.
10925
109262019-08-18  László Várady  <laszlo.varady93@gmail.com>
10927
10928	diagnostics: fix invalid error message indentation
10929	https://lists.gnu.org/archive/html/bison-patches/2019-08/msg00007.html
10930
10931	When Bison is started with a flag that suppresses warning messages, the
10932	error_message() function can produce a few gigabytes of indentation
10933	because of a dangling pointer.
10934
10935	* src/complain.c (error_message): Don't reset indent_ptr here, but...
10936	(complain_indent): here.
10937	* tests/diagnostics.at (Indentation with message suppression): Check
10938	this case.
10939
109402019-08-18  Akim Demaille  <akim.demaille@gmail.com>
10941
10942	c++: use resize to shrink a vector
10943	Suggested by Adrian Vogelsgesang.
10944	https://lists.gnu.org/archive/html/bison-patches/2019-08/msg00009.html
10945
10946	* data/skeletons/lalr1.cc (yy_lac_check_): here.
10947
109482019-08-09  Akim Demaille  <akim.demaille@gmail.com>
10949
10950	lalr1.cc: check LAC support
10951	* tests/conflicts.at, tests/input.at, tests/regression.at: here.
10952
109532019-08-09  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
10954
10955	lalr1.cc: add LAC support
10956	Implement lookahead correction (LAC) for the C++ skeleton.  LAC is a
10957	mechanism to make sure that we report the correct list of expected
10958	tokens if a syntax error occurs.  So far, LAC was only supported for
10959	the C skeleton "yacc.c".
10960
10961	* data/skeletons/lalr1.cc: Add LAC support.
10962	* doc/bison.texi: Update.
10963
109642019-08-09  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
10965
10966	style: readability improvements to yacc.c
10967	* data/skeletons/yacc.c (yysyntax_error): Change the nesting of `m4`
10968	conditions slightly to make it more readable.
10969	The generated C code stays unchanged.
10970
109712019-08-09  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
10972
10973	lalr1.cc: reduce "scope"
10974	* data/skeletons/lalr1.cc (yy_lr_goto_state_): Make it static.
10975
109762019-08-09  Adrian Vogelsgesang  <avogelsgesang@tableau.com>
10977
10978	lalr1.cc: fix indentation of table declarations in the header
10979	* data/skeletons/lalr1.cc: Fix indentation of table declarations in
10980	the generated header.
10981
109822019-08-09  Akim Demaille  <akim.demaille@gmail.com>
10983
10984	tests: prepare LAC tests for more languages
10985	* tests/regression.at: Use %expect to avoid warnings.
10986	Set the keywords to facilitate running specific tests.
10987	Use macros such as AT_YYLEX_DECLARE to facilitate tests for other
10988	languages.
10989	Likewise for AT_FULL_COMPILE.
10990
109912019-08-09  Akim Demaille  <akim.demaille@gmail.com>
10992
10993	git: ignore files generated in gnulib-po
10994	Because of them, the CI generates "-dirty" tarballs.
10995
109962019-07-26  Akim Demaille  <akim.demaille@gmail.com>
10997
10998	diagnostics: use the modern argmatch interface
10999	* src/complain.h (warnings): Remove Werror.
11000	Adjust dependencies.
11001	Sort.
11002	Remove useless comments (see the doc in argmatch group).
11003	* src/complain.c (warnings_args, warnings_types): Remove.
11004	(warning_argmatch): Use argmatch_warning_value.
11005	(warnings_print_categories): Use argmatch_warning_argument.
11006
110072019-07-19  Akim Demaille  <akim.demaille@gmail.com>
11008
11009	doc: avoid spurious empty lines in the option table
11010	In Texinfo. empty lines in multitable rows generate empty lines in the
11011	output.  Avoid them altogether.
11012
11013	With help from Gavin Smith.
11014	https://lists.gnu.org/archive/html/bug-texinfo/2019-07/msg00000.html
11015
11016	* build-aux/cross-options.pl: Separate rows with empty lines.
11017	So, to be more readable, generate a single line for each row.
11018	Use Perl format to this end.
11019
110202019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11021
11022	--fixed-output-files: detach from --yacc
11023	See the previous commit.  This option should be removed, -o suffices.
11024
11025	* src/getargs.c (FIXED_OUTPUT_FILES): New.
11026	Add support for it.
11027	(getargs): Define loc, and use it.
11028	This is safer when we need to pass a pointer to a location.
11029
110302019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11031
11032	%fixed-output-files: detach from %yacc
11033	The name fixed-output-files is pretty clear: generate y.tab.c, as Yacc
11034	does.  So let's detach this from %yacc which does more: it requires
11035	POSIX Yacc behavior.
11036
11037	This directive is obsolete since December 29th 2001
11038	8c9a50bee13474c1491df8f79f075f5214dda0d1.  It does not show in the
11039	doc.  I don't want to spend more time on improving its diagnostics, it
11040	could be removed just as well as far as I'm concerned.
11041
11042	* src/scan-gram.l, src/parse-gram.y (%fixed-output-files): Detach from
11043	%yacc.
11044
110452019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11046
11047	style: clarify control flow
11048	* src/getargs.c (language_argmatch): Initialize msg.
11049	Check it instead of relying on a return.
11050
110512019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11052
11053	remove MS-DOS support
11054	DJGPP support was dropped in Bison 3.3
11055	(c239e53bab8e87b30889ac446d3b513da9951a35).
11056
11057	AS_FILE_NAME was introduced in
11058	ae4048011562c250d2f3c96687422d99a38745ce.
11059
11060	* src/getargs.c (AS_FILE_NAME): Remove.
11061
110622019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11063
11064	style: declare options in the same order as in --help
11065	* src/getargs.c (long_options): here.
11066
110672019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11068
11069	regen
11070
110712019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11072
11073	gnulib: update
11074	Contains a fix for argmatch to get proper man pages.
11075	See https://lists.gnu.org/archive/html/bug-gnulib/2019-07/msg00038.html
11076
110772019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11078
11079	style: comment change
11080	* src/getargs.c: here.
11081
110822019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11083
11084	doc: remove the --report=look-aheads alias
11085	Years ago we moved from 'look-ahead' to 'lookahead', and that alias
11086	was kept for backward compatibility.  But now that we use argmatch to
11087	generate the documentation, that value clutters the doc.
11088
11089	* src/getargs.c (argmatch_report_args): Remove the
11090	--report=look-aheads alias.
11091
110922019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11093
11094	doc: fix inaccuracies wrt --define and --force-define
11095	The doc says that -Dfoo=bar is the same as %define foo "bar".  It is
11096	not: the quotes are not added (and it makes a difference).
11097
11098	* doc/bison.texi (Tuning the Parser): Fix the definition of -D/-F
11099	* src/getargs.c (usage): Likewise.
11100
111012019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11102
11103	doc: put diagnostics related options together
11104	* doc/bison.texi (Diagnostics): New section.
11105	Move --warning, --color and --style there.
11106	* src/getargs.c (usage): Likewise.
11107
111082019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11109
11110	doc: move -y's documentation into "Tuning the Parser"
11111	Let's clarify --help: use clearer "section" names, as in the doc.
11112	Move --yacc to where it belongs.
11113
11114	* src/getargs.c (usage): Rename "Parser" as "Tuning the Parser", as in
11115	the doc.
11116	Rename "Output" as "Output Files"
11117	Move --yacc to "Tuning the Parser".
11118	* doc/bison.texi: Likewise.
11119
111202019-07-07  Akim Demaille  <akim.demaille@gmail.com>
11121
11122	doc: document colorized diagnostics
11123	* src/getargs.c (argmatch_color_group): New.
11124	(usage): Document --color and --style.
11125	* doc/bison.texi (Bison Options): Split into three subsections.
11126	Document --color and --style.
11127
111282019-07-03  Akim Demaille  <akim.demaille@gmail.com>
11129
11130	gnulib: use new features of the argmatch module
11131	It can now generate the usage message.
11132
11133	* src/complain.h (feature_fixit_parsable): Rename as...
11134	(feature_fixit): this, for column economy.
11135	Adjust dependencies.
11136	(warning_usage): New.
11137	Use it.
11138	* src/complain.h, src/complain.c, src/getargs.h, src/getargs.c:
11139	Use ARGMATCH_DEFINE_GROUP instead of the older interface.
11140
111412019-07-02  Akim Demaille  <akim.demaille@gmail.com>
11142
11143	preserve the indentation in the ouput
11144	Preserve the actions' initial indentation.  For instance, on
11145
11146	    | %define api.value.type {int}
11147	    | %%
11148	    | exp: exp '/' exp { if ($3)
11149	    |                     $$ = $1 + $3;
11150	    |                   else
11151	    |                     $$ = 0; }
11152
11153	we used to generate
11154
11155	    |     { if (yyvsp[0])
11156	    |                     yyval = yyvsp[-2] + yyvsp[0];
11157	    |                   else
11158	    |                    yyval = 0; }
11159
11160	now we produce
11161
11162	    |                  { if (yyvsp[0])
11163	    |                     yyval = yyvsp[-2] + yyvsp[0];
11164	    |                   else
11165	    |                     yyval = 0; }
11166
11167	See https://lists.gnu.org/archive/html/bison-patches/2019-06/msg00012.html.
11168
11169	* data/skeletons/bison.m4 (b4_symbol_action): Output the code in
11170	column 0, leave indentation matters to the C code.
11171	* src/output.c (user_actions_output): Preserve the incoming
11172	indentation in the output.
11173	(prepare_symbol_definitions): Likewise for %printer/%destructor.
11174	* tests/synclines.at (Output columns): New.
11175
111762019-07-01  Akim Demaille  <akim.demaille@gmail.com>
11177
11178	style: prefer passing locations by pointer
11179	The code is inconsistent: sometimes we pass by value, sometimes by
11180	reference.  Let's stick to the last, more conventional for large
11181	values in C.
11182
11183	* src/scan-code.l: Pass locations by reference.
11184
111852019-06-30  Akim Demaille  <akim.demaille@gmail.com>
11186
11187	c++: avoid duplicate definition of YYUSE
11188	Reported by Frank Heckenbach.
11189	https://lists.gnu.org/archive/html/bug-bison/2019-06/msg00009.html
11190
11191	* data/skeletons/lalr1.cc (b4_shared_declarations): Remove the
11192	duplicate definition of YYUSE, the other one coming from
11193	b4_attribute_define.
11194
111952019-06-27  Akim Demaille  <akim.demaille@gmail.com>
11196
11197	style: comment changes
11198	* examples/c/lexcalc/local.mk, examples/c/reccalc/local.mk:
11199	Here.
11200
112012019-06-23  Akim Demaille  <akim.demaille@gmail.com>
11202
11203	tests: restructure for clarity
11204	* tests/calc.at (AT_CALC_MAIN, AT_CALC_LEX): Rewrite on top of
11205	AT_LANG_DISPATCH.
11206
112072019-06-23  Akim Demaille  <akim.demaille@gmail.com>
11208
11209	d: track locations
11210	* configure.ac (DCFLAGS): Pass -g.
11211	* data/skeletons/d.m4 (b4_locations_if): Remove, let bison.m4's one do
11212	its job.
11213	* data/skeletons/lalr1.d (position): Leave filename empty by default.
11214	(position::toString): Don't print empty file names.
11215	(location::this): New ctor.
11216	(location::toString): Match the implementations of C/C++.
11217	(yy_semantic_null): Leave undefined, the previous implementation does
11218	not compile.
11219	* tests/calc.at: Improve the implementation for D.
11220	Enable more checks, in particular using locations.
11221	* tests/local.at (AT_YYERROR_DEFINE(d)): Fix its implementation.
11222
112232019-06-23  Akim Demaille  <akim.demaille@gmail.com>
11224
11225	d: style changes
11226	* data/skeletons/lalr1.d: Use a more traditional quotation scheme.
11227	Formatting changes.
11228
112292019-06-23  Akim Demaille  <akim.demaille@gmail.com>
11230
11231	d: put internal details inside the parser
11232	Avoid name clashes, etc.
11233
11234	* data/skeletons/lalr1.d (YYStackElement, YYStack): Move inside the
11235	parser.
11236
112372019-06-22  Akim Demaille  <akim.demaille@gmail.com>
11238
11239	gnulib: update
11240
112412019-06-22  Akim Demaille  <akim.demaille@gmail.com>
11242
11243	remove "experimental" warnings
11244	Sadly enough, AFAIK, there were never answers to the "More user
11245	feedback will help to stabilize it" sentences.  Remove them.
11246
11247	* src/getargs.c: IELR, canonical LR and XML output are here to stay,
11248	and they are no more experimental than some other features.
11249	* doc/bison.texi: Likewise.
11250	Also remove "experimental" warning for Java, LAC, LR tuning options,
11251	and named references.
11252
112532019-06-22  Akim Demaille  <akim.demaille@gmail.com>
11254
11255	CI: propagate sftp failures
11256	* .travis.yml (stage: "compile"): here.
11257
112582019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11259
11260	d: honor %define parse.trace
11261	* data/skeletons/lalr1.d: Don't generate debug code if parse.trace is
11262	not enabled.
11263
112642019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11265
11266	d: style changes
11267	* data/skeletons/lalr1.d: here.
11268
112692019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11270
11271	d: prefer delegation to duplication
11272	* data/skeletons/lalr1.d: Delegate the construction of the scanner.
11273
112742019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11275
11276	d: enable #line output
11277	* data/skeletons/d.m4 (b4_sync_start): New.
11278
112792019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11280
11281	d: style changes
11282	* data/skeletons/lalr1.d: here.
11283	* examples/d/calc.y: Remove incorrect support for decimal numbers.
11284	Formatting changes.
11285
112862019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11287
11288	style: reduce scopes in glr.c
11289	* data/skeletons/glr.c: here.
11290
112912019-06-20  Akim Demaille  <akim.demaille@gmail.com>
11292
11293	java: honor %define parse.trace
11294	* data/skeletons/lalr1.java: Don't generate debug code if parse.trace
11295	is not enabled.
11296
112972019-06-19  Akim Demaille  <akim.demaille@gmail.com>
11298
11299	java: fix support for api.prefix
11300	* data/skeletons/java.m4: here.
11301	* tests/java.at: Check it.
11302
113032019-06-19  Akim Demaille  <akim.demaille@gmail.com>
11304
11305	java: style changes
11306	* data/skeletons/lalr1.java: Use more conventional function names for
11307	Java.
11308	Prefer < and <= to => and >.
11309	Use the same approach for m4 quotation as in the other skeletons.
11310	Fix indentation issues.
11311
11312	* tests/calc.at, tests/java.at, tests/javapush.at: Fix quotation style.
11313	(main): Use 'args', not 'argv', the former seems more conventional and
11314	is used elsewhere in Bison.
11315	Prefer character literals to integers to denote characters.
11316	* examples/java/Calc.y: Likewise.
11317
113182019-06-15  Akim Demaille  <akim.demaille@gmail.com>
11319
11320	CI: avoid useless git costs
11321	Travis answered favorably to my suggestion to provide a means to
11322	disable git clone on some jobs (issue 7542).  See
11323	https://docs.travis-ci.com/user/customizing-the-build/#disabling-git-clone.
11324
11325	* .travis.yml: Disable git globally, enable it for i. the compile job,
11326	and ii. the test job on ICC which needs the install-icc.sh script.
11327
113282019-06-12  Akim Demaille  <akim.demaille@gmail.com>
11329
11330	style: simplify strings to translate
11331	* src/conflicts.c (log_resolution): Don't translate indentation.
11332
113332019-06-12  Akim Demaille  <akim.demaille@gmail.com>
11334
11335	style: reduce scopes, propagate const
11336	* src/conflicts.c (conflicts_output): here.
11337
113382019-06-12  Akim Demaille  <akim.demaille@gmail.com>
11339
11340	style: use clearer types
11341	* src/conflicts.c (conflicts): Array of Booleans.
11342
113432019-06-11  Akim Demaille  <akim.demaille@gmail.com>
11344
11345	tests: prefer %empty
11346	* tests/regression.at: here.
11347
113482019-06-09  Akim Demaille  <akim.demaille@gmail.com>
11349
11350	CI: factor
11351	* .travis.yml (Clang 7 libc++ and ASAN part 2): Reuse bits from "Clang
11352	7 libc++ and ASAN part 1".
11353
113542019-06-09  Akim Demaille  <akim.demaille@gmail.com>
11355
11356	lr0: more debug traces
11357	* src/lr0.c (kernel_check): New.
11358	(new_itemsets, save_reductions): Add traces.
11359
113602019-06-09  Akim Demaille  <akim.demaille@gmail.com>
11361
11362	traces: add some colors
11363	This is an experiment.  Maybe more styles will be used (in which case
11364	a short-hand function will be useful), maybe it will be just reverted.
11365	* data/bison-default.css (.traces0): New.
11366	* src/lalr.c (lalr): Use it.
11367
113682019-06-09  Akim Demaille  <akim.demaille@gmail.com>
11369
11370	tests: make sure the default action properly works in C++
11371	See e3fdc370495ffdedadd6ac621e32e34a0e1a9de0: in C++ we generate
11372	explicitly the code for the default action instead of simply copying
11373	blindly the semantic value buffer.  This is important when copying
11374	raw memory is not enough, as exemplified by move-only types.
11375
11376	This is currently tested by examples/c++/variant.yy and variant-11.yy.
11377	But it is safer to also have a test in the main test suite.
11378
11379	* tests/local.at (AT_REQUIRE_CXX_STD): Fix.
11380	(AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Define/undefine
11381	AT_BISON_OPTIONS.
11382	* tests/c++.at (Default action): New.
11383
113842019-06-09  Akim Demaille  <akim.demaille@gmail.com>
11385
11386	tests: main: support -s and -p
11387	* tests/local.at (AT_MAIN_DEFINE(c), AT_MAIN_DEFINE(c++)): here.
11388
113892019-06-04  Akim Demaille  <akim.demaille@gmail.com>
11390
11391	tests: remove useless support of '.' in integers
11392	* tests/calc.at: here.
11393	* doc/bison.texi: Avoid uninitialized variables.
11394
113952019-05-29  Akim Demaille  <akim.demaille@gmail.com>
11396
11397	tests: refactor checks on sets
11398	It will be convenient to check sets elsewhere.
11399
11400	* tests/sets.at (AT_EXTRACT_SETS): Transform into...
11401	* tests/local.at (AT_SETS_CHECK): this.
11402	* tests/sets.at: Adjust.
11403
114042019-05-29  Akim Demaille  <akim.demaille@gmail.com>
11405
11406	update-test: some file names have dashes in them
11407	* build-aux/update-test (log): Rename as...
11408	(trace): this, to avoid clashes with the log variable.
11409	(getargs): Clarify the type of the arguments.
11410
114112019-05-26  Akim Demaille  <akim.demaille@gmail.com>
11412
11413	tests: take SHELL into account
11414	Reported by Dennis Clarke.
11415	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00053.html
11416
11417	* examples/local.mk, tests/local.mk: here.
11418
114192019-05-26  Akim Demaille  <akim.demaille@gmail.com>
11420
11421	gnulib: update to get gnulib translations
11422	This update contains a fix needed for gnulib-po to work properly.
11423	https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00146.html
11424
114252019-05-25  Akim Demaille  <akim.demaille@gmail.com>
11426
11427	doc: clarify the purpose of symbol_type constructors
11428	Reported by Frank Heckenbach.
11429	http://lists.gnu.org/archive/html/bug-bison/2019-02/msg00006.html
11430
11431	* doc/bison.texi (Complete Symbols): Here.
11432
114332019-05-22  Akim Demaille  <akim.demaille@gmail.com>
11434
11435	thanks: fix an address
11436
114372019-05-22  Akim Demaille  <akim.demaille@gmail.com>
11438
11439	maint: post-release administrivia
11440	* NEWS: Add header line for next release.
11441	* .prev-version: Record previous version.
11442	* cfg.mk (old_NEWS_hash): Auto-update.
11443
114442019-05-22  Akim Demaille  <akim.demaille@gmail.com>
11445
11446	version 3.4.1
11447	* NEWS: Record release date.
11448
114492019-05-22  Akim Demaille  <akim.demaille@gmail.com>
11450
11451	NEWS: update
11452
114532019-05-20  Akim Demaille  <akim.demaille@gmail.com>
11454
11455	CI: remove useless apt-get update
11456	The apt addons already ran it for us, it is not needed.
11457
11458	* .travis.yml: here.
11459
114602019-05-20  Akim Demaille  <akim.demaille@gmail.com>
11461
11462	c++: beware of to_string portability issues
11463	Reported by Bruno Haible.
11464	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00033.html
11465
11466	* m4/bison-cxx-std.m4 (_BISON_CXXSTD_11_snippet): Check it.
11467
114682019-05-20  Akim Demaille  <akim.demaille@gmail.com>
11469
11470	doc: avoid Texinfo portability issues
11471	Reported by Bruno Haible.
11472	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00024.html
11473	Fixed by Karl Berry.
11474	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00034.html
11475
11476	* doc/bison.texi: Don't specify the langage, rely on the default.
11477	Avoid blank pages.
11478
114792019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11480
11481	examples: don't run those that require f?lex when it's not available
11482	Reported by Bruno Haible.
11483	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00026.html
11484
11485	* configure.ac (FLEX_WORKS): New.
11486	* examples/c/lexcalc/local.mk, examples/c/reccalc/local.mk: Use it.
11487
114882019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11489
11490	diagnostics: don't crash when libtextstyle is installed
11491	Reported by neok m4700.
11492	https://lists.gnu.org/archive/html/bison-patches/2019-05/msg00025.html
11493	https://github.com/akimd/bison/pull/11
11494
11495	* src/complain.c (complain_init_color): style_file_prepare _needs_ a
11496	string as second argument.
11497
114982019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11499
11500	CI: avoid useless git costs
11501	The final gain is small: 2h2min instead 2h9min.  But that is still an
11502	improvement.
11503
11504	* .travis.yml (git.depth): Make the clone very shallow.
11505	(git.submodules): Don't clone gnulib in test jobs.
11506	(jobs.include.compile.script): Do it here.
11507
115082019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11509
11510	fix: copyable instead of copiable
11511	Reported by Frank Heckenbach.
11512	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00020.html
11513
11514	* data/skeletons/lalr1.cc, doc/bison.texi: here.
11515
115162019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11517
11518	maint: post-release administrivia
11519	* NEWS: Add header line for next release.
11520	* .prev-version: Record previous version.
11521	* cfg.mk (old_NEWS_hash): Auto-update.
11522
115232019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11524
11525	version 3.4
11526	* NEWS: Record release date.
11527
115282019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11529
11530	fix: use copiable, not copyable
11531	Reported by Hans Åberg.
11532	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00017.html
11533
11534	* data/skeletons/lalr1.cc, doc/bison.texi: here.
11535
115362019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11537
11538	NEWS: update for 3.4
11539
115402019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11541
11542	tests: adjust to GCC9 diagnostics with a margin
11543	* tests/synclines.at (_AT_SYNCLINES_COMPILE): Remove the margin.
11544
115452019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11546
11547	regen
11548
115492019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11550
11551	diagnostics: %pure-parser is obsolete
11552	Reported by Uxio Prego.
11553	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00029.html
11554
11555	* src/scan-gram.l, src/parse-gram.y (PERCENT_PURE_PARSER)
11556	(handle_pure_parser): New.
11557	Issue a deprecation/update notice for %pure-parser.
11558	* doc/bison.texi (Java Bison Interface): Don't mention %pure-parser.
11559	* tests/actions.at, tests/input.at: Adjust.
11560
115612019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11562
11563	diagnostics: clean up convention for colored diagnostics
11564	* data/diagnostics.css: Rename as...
11565	* data/bison-default.css: this.
11566	Add the GPL header.
11567	This is the convention followed by Bruno Haible in gettext.
11568	Adjust dependencies.
11569	* src/complain.c (complain_init_color): Use BISON_STYLE instead of
11570	BISON_DIAGNOSTICS_STYLE.
11571
115722019-05-19  Akim Demaille  <akim.demaille@gmail.com>
11573
11574	CI: use a pipeline: first build the tarball, then check it
11575	Build the tarball in one job, check it in many.
11576	Unfortunately no real gain in overall duration.
11577	With help from Clément Démoulins.
11578
11579	* .travis.yml: here.
11580	Remove all the tricks that were used to be able to boostrap on old
11581	distros.
11582	(before_install): Merge into 'script', because before_install applies
11583	to all the jobs, and we don't want to run it for the 'compile' job.
11584
115852019-05-18  Akim Demaille  <akim.demaille@gmail.com>
11586
11587	examples: fix srcdir/builddir issues
11588	* examples/d/local.mk, examples/java/local.mk: here.
11589
115902019-05-18  Akim Demaille  <akim.demaille@gmail.com>
11591
11592	gnulib: update
11593	In preparation for Bison 3.4, revert to the version before this
11594	commit:
11595
11596	    commit 03752516b21091cf3c4beea7e8b9bcad462d50ed
11597	    Author: John Darrington <john@darrington.wattle.id.au>
11598	    Date:   Sun May 12 00:42:36 2019 +0200
11599
11600	    version-etc: Ease translation.
11601
11602	    * lib/version-etc.c (version_etc_arn, emit_bug_reporting_address):
11603	    Move URLs and formatting newlines out of translatable string.
11604
11605	because it changes the messages for --version, translated in
11606	gnulib.po.  These changes are not yet available on the translation
11607	project, so we would have a regression in the set of translated
11608	strings.
11609
116102019-05-13  Akim Demaille  <akim.demaille@gmail.com>
11611
11612	build: do not use $< in plain rules
11613	It works only in implicit rules (or with GNU Make, but not with
11614	Solaris Make).
11615
11616	Reported by Bruno Haible.
11617	http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00009.html
11618	Diagnosed thanks to Kiyoshi Kanazawa.
11619
11620	* examples/c/reccalc/local.mk, examples/d/local.mk,
11621	* examples/java/local.mk: Don't use $< in non implicit rules.
11622
116232019-05-12  Akim Demaille  <akim.demaille@gmail.com>
11624
11625	maint: post-release administrivia
11626	* NEWS: Add header line for next release.
11627	* .prev-version: Record previous version.
11628	* cfg.mk (old_NEWS_hash): Auto-update.
11629
116302019-05-12  Akim Demaille  <akim.demaille@gmail.com>
11631
11632	version 3.3.91
11633	* NEWS: Record release date.
11634
116352019-05-12  Akim Demaille  <akim.demaille@gmail.com>
11636
11637	NEWS: update
11638
116392019-05-12  Akim Demaille  <akim.demaille@gmail.com>
11640
11641	gnulib: update
11642
116432019-05-11  Akim Demaille  <akim.demaille@gmail.com>
11644
11645	style: remove incorrect comment
11646	* src/getargs.c: here.
11647	It's documented in getargs.h anyway.
11648
116492019-05-09  Akim Demaille  <akim.demaille@gmail.com>
11650
11651	doc: use colors for diagnostics in TeX too
11652	Thanks to Gavin Smith and Patrice Dumas.
11653	http://lists.gnu.org/archive/html/help-texinfo/2019-04/msg00015.html
11654
11655	* doc/bison.texi (@colorWarning, @colorError, @colorNotice)
11656	(@colorOff): Define for TeX and HTML.
11657	(@dwarning, @derror, @dnotice): Use them.
11658
116592019-05-08  Akim Demaille  <akim.demaille@gmail.com>
11660
11661	gnulib: update to fix location tracking in UTF-8 on Solaris
11662	This update contains Bruno Haible's fix for the location tracking
11663	issue reported by Kiyoshi Kanazawa.
11664
11665	https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00020.html
11666	https://lists.gnu.org/archive/html/bug-bison/2019-04/msg00020.html
11667
116682019-05-08  Akim Demaille  <akim.demaille@gmail.com>
11669
11670	diagnostics: rename --style=debug as --color=debug
11671	It is more consistent with --color=html, --color=test, etc.
11672
11673	* src/getargs.h, src/getargs.c (style_debug): Rename as...
11674	(color_debug): this.
11675	(getargs_colors): Rename --style=debug as --color=debug.
11676	Adjust dependencies.
11677
116782019-05-08  Akim Demaille  <akim.demaille@gmail.com>
11679
11680	diagnostics: support --color=html
11681	Based on a message from Bruno Haible.
11682	https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fe18e92743b7226791a5f28d7c786941a1bf8cc9
11683
11684	This does not generate proper HTML: special characters are not escaped
11685	for instance.  This is a hidden feature meant for Bison developers,
11686	not end users.
11687
11688	* src/complain.c (complain_init_color): Support --color=html.
11689
116902019-05-08  Akim Demaille  <akim.demaille@gmail.com>
11691
11692	tests: use %empty instead of comments
11693	* tests/c++.at, tests/glr-regression.at: here.
11694
116952019-05-08  Akim Demaille  <akim.demaille@gmail.com>
11696
11697	fixits: sort them before applying them
11698	An experimental commit introduced a fix-it hint that changes comments
11699	such as "/* empty */" into %empty.  But in some case, because
11700	diagnostics are not necessarily emitted in order, the fixits also come
11701	in disorder, which must never happen, as the fixes are installed in
11702	one pass.
11703
11704	* src/fixits.c (fixits_register): Insert them in order.
11705
117062019-05-04  Akim Demaille  <akim.demaille@gmail.com>
11707
11708	style: use warning_is_enabled instead of duplicating it
11709	* src/complain.c (deprecated_directive): Here.
11710
117112019-05-03  Akim Demaille  <akim.demaille@gmail.com>
11712
11713	fixits: be sure to preserve the action when adding %empty
11714	Currently we remove the rhs to install %empty instead.
11715
11716	* src/reader.c (grammar_rule_check_and_complete): Insert the missing
11717	%empty in front of the rhs, not in replacement thereof.
11718	* tests/actions.at (Add missing %empty): Check that.
11719
117202019-05-03  Akim Demaille  <akim.demaille@gmail.com>
11721
11722	tests: don't duplicate the portability prologue
11723	* tests/actions.at, tests/input.at: Don't repeat the prologue, skip it.
11724	* tests/diagnostics.at, tests/local.at: Comment changes.
11725
117262019-05-03  Akim Demaille  <akim.demaille@gmail.com>
11727
11728	style: use consistently *_loc for locations
11729	Some members are called foo_location, others are foo_loc.  Stick to
11730	the latter.
11731
11732	* src/gram.h, src/location.h, src/location.c, src/output.c,
11733	* src/parse-gram.y, src/reader.h, src/reader.c, src/reduce.c,
11734	* src/scan-gram.l, src/symlist.h, src/symlist.c, src/symtab.h,
11735	* src/symtab.c:
11736	Use _loc consistently, not _location.
11737
117382019-05-03  Akim Demaille  <akim.demaille@gmail.com>
11739
11740	style: clarify the use of symbol_lists' locations
11741	symbol_list features a 'location' and a 'sym_loc' member.  The former
11742	is expected to be set only for symbol_lists that denote a symbol (not
11743	a type name), and the latter should only denote the location of the
11744	symbol/type name.  Yet both are set, and the name "location" is too
11745	unprecise.
11746
11747	* src/symlist.h, src/symlist.c (symbol_list::location): Rename as
11748	rhs_loc for clarity.  Move it to the "section" of data valid only
11749	for rules.
11750	* src/reader.c, src/scan-code.l: Adjust.
11751
117522019-05-03  Akim Demaille  <akim.demaille@gmail.com>
11753
11754	maint: update gnulib-po/.gitignore
11755
117562019-04-29  Akim Demaille  <akim.demaille@gmail.com>
11757
11758	tests: don't require a D compiler
11759	Reported by Kiyoshi Kanazawa.
11760	http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00018.html
11761
11762	* tests/atlocal.in (BISON_DC_WORKS): New.
11763	* tests/local.at (AT_COMPILE_D): Use it.
11764
117652019-04-29  Akim Demaille  <akim.demaille@gmail.com>
11766
11767	doc: use svg instead of png
11768	* doc/bison.texi, doc/local.mk: here.
11769
117702019-04-29  Akim Demaille  <akim.demaille@gmail.com>
11771
11772	doc: use colors
11773	* doc/bison.texi (dwarning, derror, dnotice): New.
11774	Use them in the diagnostics.
11775	* doc/local.mk (AM_MAKEINFOFLAGS): Pass customization variables.
11776
117772019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11778
11779	maint: post-release administrivia
11780	* NEWS: Add header line for next release.
11781	* .prev-version: Record previous version.
11782	* cfg.mk (old_NEWS_hash): Auto-update.
11783
117842019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11785
11786	version 3.3.90
11787	* NEWS: Record release date.
11788
117892019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11790
11791	package: add missing CLEANFILES
11792	* examples: here.
11793
117942019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11795
11796	build: don't generate the graph reports
11797	Revert "build: also generate the graph
11798	reports" (4ec413da32760defe1bf382c048d1d2f67e0b58a).  The problem is
11799	Automake's ylwrap which does not rename y.dot with the appropriate
11800	name.  We should completely stop using Automake's support for Yacc,
11801	which is not something I will do right now.  So step back.
11802
11803	* Makefile.am (AM_YFLAGS_WITH_LINES): Don't pass --graph.
11804
118052019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11806
11807	package: don't regen the parser during dist if unneeded
11808	* Makefile.am (gen-synclines): New.
11809
118102019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11811
11812	package: don't ship the sources generated from the parser
11813	Because some of our examples use
11814
11815	    %C%_reccalc_SOURCES = %D%/parse.y
11816
11817	Automake ships parse.y and parse.c, and possibly parse.h when it
11818	"understands" that there is one.  This is not what we want: ship only
11819	parser.y.  Yet we still want to use Automake to compile the sources
11820	from parser.y.  The easiest seems to use
11821
11822	    nodist_%C%_reccalc_SOURCES = %D%/parse.y
11823
11824	together with
11825
11826	    dist_reccalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
11827
11828	which guarantees that parse.y is indeed shipped.
11829
11830	* examples/c/calc/local.mk, examples/c/lexcalc/local.mk,
11831	* examples/c/reccalc/local.mk: Always use nodist_*SOURCES for parsers,
11832	let the dist_*_DATA rules do their job.
11833
118342019-04-28  Akim Demaille  <akim.demaille@gmail.com>
11835
11836	package: various fixes for syntax-check
11837	* cfg.mk: Disable checks where needed (e.g., we do want to check the
11838	behavior with tabs).
11839	(sc_at_parser_check): Remove.  Unfortunately since
11840	a11c144609255bc6e42c2aff83548e91cbd05425 we no longer use the './'
11841	prefix to run programs in the current directory.  That was so that we
11842	could run Java programs like the other, although they are no run with
11843	the `./` prefix (see 967a59d2c08a33f24708450561e2f8010b604523).
11844	As a consequence this sc check no longer makes sense.
11845	However, since now AT_PARSER_CHECK passes the `./` prefix itself, this
11846	sc-check was superfluous.
11847	* examples/c/reccalc/scan.l: Use memcpy, not strncpy.
11848	* src/ielr.c, src/reader.c: Obfuscate "lr(0)" so that the sc-check for
11849	"space before paren" does not fire.
11850	* tests/diagnostics.at: Avoid space-tab, use tab-tab.
11851
118522019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11853
11854	doc: clarify -fsyntax-error
11855	* NEWS, doc/bison.texi: here.
11856
118572019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11858
11859	regen
11860
118612019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11862
11863	traces: use colors for the semantic values
11864	This makes reading the trace slightly easier.  It would be very nice
11865	to highlight the "big steps", especially reductions.  But this is a
11866	private experiment: do not use it.
11867
11868	* data/diagnostics.css (value): New.
11869	* src/parse-gram.y: Use no delimiters and no c quotation for strings
11870	to facilitate debugging.
11871	(tron, troff, TRACE): New.
11872	Not very elegant, but until there is support for printf-formats in
11873	libtextstyle, it shall be enough.
11874
118752019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11876
11877	diagnostics: give m4 precise locations
11878	Currently we pass only the columns based on the screen-width, which is
11879	important for the carets.  But we don't pass the bytes-based columns,
11880	which is important for the colors.  Pass both.
11881
11882	* src/muscle-tab.c (muscle_boundary_grow): Also pass the byte-based column.
11883	* src/location.c (location_caret): Clarify.
11884	(boundary_set_from_string): Adjust to the new format.
11885	* tests/diagnostics.at (Tabulations and multibyte characters from M4): New.
11886
118872019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11888
11889	diagnostics: fix locations coming from M4
11890	Locations issued from M4 need the byte-based column for the
11891	diagnostics to work properly.  Currently they were unassigned, which
11892	typically resulted in partially non-colored diagnostics.
11893
11894	* src/location.c (boundary_set_from_string): Fix the parsed location.
11895	* src/muscle-tab.c (muscle_percent_define_default): Set the byte values.
11896	* tests/diagnostics.at (Locations from M4): New.
11897
118982019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11899
11900	diagnostics: show locations in full when debugging
11901	This is meant for developers, not end users, that's why I attached it
11902	to --trace.
11903
11904	* src/getargs.h, src/getargs.c (trace_locations): New.
11905	* src/location.c (location_print): Use it.
11906
119072019-04-27  Akim Demaille  <akim.demaille@gmail.com>
11908
11909	diagnostics: use flush, not fflush
11910	* src/complain.c: here.
11911
119122019-04-25  Akim Demaille  <akim.demaille@gmail.com>
11913
11914	build: use gettext-h
11915	We were using the gnulib's gettext module with tricks in
11916	bootstrap.conf to avoid useless files.  Instead, use gnulib's
11917	gettext-h module.
11918
11919	* .travis.yml: Force Gettext 0.18.3 on Trusty.
11920	* bootstrap.conf: Use gettext-h instead of gettext.
11921	(excluded_files): Remove.
11922	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.
11923
119242019-04-25  Akim Demaille  <akim.demaille@gmail.com>
11925
11926	NEWS: update
11927
119282019-04-25  Akim Demaille  <akim.demaille@gmail.com>
11929
11930	api.location.type: support it in C
11931	Reported by Balázs Scheidler.
11932
11933	* data/skeletons/c.m4 (b4_location_type_define): Use api.location.type
11934	if defined.
11935	* doc/bison.texi: Document it.
11936	* tests/local.at (AT_C_IF, AT_LANG_CASE): New.
11937	Support Span in C.
11938	* tests/calc.at (Span): Convert it to be usable in C and C++.
11939	Check api.location.type with yacc.c and glr.c.
11940
119412019-04-24  Akim Demaille  <akim.demaille@gmail.com>
11942
11943	updates: insert/remove %empty
11944	* src/reader.c (grammar_rule_check_and_complete): Generate fixits for
11945	adding/removing %empty.
11946	* tests/actions.at, tests/diagnostics.at, tests/existing.at: Adjust.
11947
119482019-04-24  Akim Demaille  <akim.demaille@gmail.com>
11949
11950	regen
11951
119522019-04-24  Akim Demaille  <akim.demaille@gmail.com>
11953
11954	diagnostics: better rule locations
11955	The "identifier and colon" of a rule is implemented as a single token,
11956	but whose location is only that of the identifier (so that messages
11957	about the lhs of a rule are accurate).  When reducing empty rules, the
11958	default location is the single point location on the end of the
11959	previous symbol.  As a consequence, when Bison parses a grammar, the
11960	location of the right-hand side of an empty rule is based on the
11961	lhs, *independently of the position of the colon*.  And the colon can
11962	be way farther, separated by comments, white spaces, including empty
11963	lines.
11964
11965	As a result, some messages look really bad.  For instance:
11966
11967	    $ cat foo.y
11968	    %%
11969	    foo     : /* empty */
11970	    bar
11971	    : /* empty */
11972
11973	gives
11974
11975	    $ bison -Wall foo.y
11976	    foo.y:2.4: warning: empty rule without %empty [-Wempty-rule]
11977	        2 | foo     : /* empty */
11978	          |    ^
11979	    foo.y:3.4: warning: empty rule without %empty [-Wempty-rule]
11980	        3 | bar
11981	          |    ^
11982
11983	The carets are not at the right column, not even the right line.
11984
11985	This commit passes the colon "again" after the "id colon" token, which
11986	gives more accurate locations for these messages:
11987
11988	    $ bison -Wall foo.y
11989	    foo.y:2.10: warning: empty rule without %empty [-Wempty-rule]
11990	        2 | foo     : /* empty */
11991	          |          ^
11992	    foo.y:4.2: warning: empty rule without %empty [-Wempty-rule]
11993	        4 | : /* empty */
11994	          |  ^
11995
11996	* src/scan-gram.l (SC_AFTER_IDENTIFIER): Rollback the colon, so that
11997	we scan it again afterwards.
11998	(INITIAL): Scan colons.
11999	* src/parse-gram.y (COLON): New.
12000	(rules): Parse the colon after the rule's id_colon (and possible
12001	named reference).
12002	* tests/actions.at, tests/conflicts.at, tests/diagnostics.at,
12003	* tests/existing.at: Adjust.
12004
120052019-04-24  Akim Demaille  <akim.demaille@gmail.com>
12006
12007	fixits: track byte-columns, not character-columns
12008	Because the fix-its were ready the character-based columns, but were
12009	applied on byte-based columns, the result with multibyte characters or
12010	tabs could be "interesting".  For instance
12011
12012	    %fixed-output_files
12013	            %fixed_output-files
12014	    %fixed-output-files
12015	    %define api.prefix {foo}
12016	    %no-default-prec
12017
12018	would give
12019
12020	         %fixed-%fixed-output-files  %fixed_output-files
12021	    %fixed-orefix= "foo"
12022	    o_default-prec
12023
12024	* src/fixits.c (fixit_print, fixits_run): Work on byte-base columns.
12025	* tests/input.at: Check it.
12026
120272019-04-24  Akim Demaille  <akim.demaille@gmail.com>
12028
12029	diagnostics: expose a means to know whether a warning is enabled
12030	* src/complain.h, src/complain.c (warning_is_enabled): New.
12031
120322019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12033
12034	gnulib: let it use its own PO domain
12035	See
12036	https://www.gnu.org/software/gnulib/manual/html_node/Localization.html.
12037
12038	* bootstrap.conf: Create gnulib-po.
12039	* Makefile.am, configure.ac: Use it.
12040	* po/POTFILES.in: Remove files now in gnulib.
12041	* src/main.c: Open the bison-gnulib domain.
12042
120432019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12044
12045	diagnostics: don't try to quote special files
12046	Based on a report by Todd Freed.
12047	http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00000.html
12048	See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90034
12049
12050	* src/location.c (caret_info): Also track the file name.
12051	(location_caret): Don't quote special files.
12052
120532019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12054
12055	diagnostics: document the change of format
12056	* doc/bison.texiL Adjust output.
12057	Also, Graphviz has no uppercsae V.
12058	* NEWS: Explain the format change.
12059
120602019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12061
12062	diagnostics: copy GCC9's format
12063	Currently, when we quote the source file, we indent it with one space,
12064	and preserve tabulations, so there is a discrepancy and the visual
12065	rendering is bad.  One way out is to indent with a tab instead of a
12066	space, but then this space can be used for more information.  This is
12067	what GCC9 does.  Let's play copy cats.
12068
12069	See
12070	https://lists.gnu.org/archive/html/bison-patches/2019-04/msg00025.html
12071	https://developers.redhat.com/blog/2019/03/08/usability-improvements-in-gcc-9/
12072	https://gcc.gnu.org/onlinedocs/gccint/Guidelines-for-Diagnostics.html#Guidelines-for-Diagnostics
12073
12074	* src/location.c (location_caret): Prefix quoted lines with the line
12075	number and a pipe, fitting 8 columns.
12076
12077	* tests/actions.at, tests/c++.at, tests/conflicts.at,
12078	* tests/diagnostics.at, tests/input.at, tests/java.at,
12079	* tests/named-refs.at, tests/reduce.at, tests/regression.at,
12080	* tests/sets.at: Adjust expectations.
12081	Partly by "./build-aux/update-test tests/testsuite.dir/*/testsuite.log"
12082	repeatedly, and partly by hand.
12083
120842019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12085
12086	diagnostics: fix the handling of multibyte characters
12087	This is a pity: efforts were invested in computing correctly the
12088	number of screen columns consumed by multibyte characters, but the
12089	routines that do that were fed by single-byte inputs...
12090
12091	As a consequence Bison never displayed correctly locations when there
12092	are multibyte characters.
12093
12094	* src/scan-gram.l (mbchar): New.
12095	Use it instead of . in the catch-all clause.
12096	* tests/diagnostics.at (Tabulations): Enhance into...
12097	(Tabulations and multibyte characters): this.
12098
120992019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12100
12101	diagnostics: check the handling of tabulations
12102	* tests/diagnostics.at (Tabulations): here.
12103
121042019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12105
12106	diagnostics: fix styling issues
12107	Single point locations (equal boundaries) are troublesome, and we were
12108	incorrectly ending the style in their case.  Which results in an abort
12109	in libtextstyle.
12110
12111	There is also a confusion between columns as displayed on the
12112	screen (which take into account multibyte characters and tabulations),
12113	and the number of bytes.  Counting the screen-column
12114	incrementally (character by character) is uneasy (because of multibyte
12115	characters), and I don't want to maintain a buffer of the current line
12116	when displaying the diagnostic.  So I believe the simplest solution is
12117	to track the byte number in addition to the screen column.
12118
12119	* src/location.h, src/location.c (boundary): Add the byte-column.
12120	Adjust dependencies.
12121	* src/getargs.c, src/scan-gram.l: Adjust.
12122	* tests/diagnostics.at: Check zero-width locations.
12123
121242019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12125
12126	diagnostics: check the styling
12127	Enable checking of styles even when libtextstyle is not installed.
12128
12129	* src/getargs.h, src/getargs.c (style_debug): New.
12130	(getargs_colors): Set it when --style=debug.
12131	* src/complain.c (begin_use_class, end_use_class): Use it.
12132	* tests/diagnostics.at: New.
12133
121342019-04-23  Akim Demaille  <akim.demaille@gmail.com>
12135
12136	TODO: update
12137	Let's prepare 3.4 with more or less what we have.  Schedule some
12138	features for 3.5 and 3.6.  Remove obsolete stuff.
12139
121402019-04-19  Akim Demaille  <akim.demaille@gmail.com>
12141
12142	doc: sort the warning categories
12143	* doc/bison.texi, src/getargs.c: here.
12144
121452019-04-19  Akim Demaille  <akim.demaille@gmail.com>
12146
12147	style: formatting changes
12148	* tests/actions.at, tests/calc.at, tests/input.at: here.
12149
121502019-04-19  Akim Demaille  <akim.demaille@gmail.com>
12151
12152	graphviz: move constant computation out of a loop
12153	* src/graphviz.c (output_red): here.
12154
121552019-04-18  Akim Demaille  <akim.demaille@gmail.com>
12156
12157	diagnostics: fix memory leak in libtextstyle
12158	* src/complain.h, src/complain.c (complain_free): New.
12159	* src/main.c: Use it.
12160
121612019-04-17  Akim Demaille  <akim.demaille@gmail.com>
12162
12163	tests: remove useless feature
12164	* tests/calc.at (read_signed_integer): Rename as...
12165	(read_integer): this.
12166	We never read signs here.
12167
121682019-04-14  Akim Demaille  <akim.demaille@gmail.com>
12169
12170	traces: make closure() less verbose
12171	* src/getargs.h, src/getargs.c (trace_closure): New.
12172	* src/closure.c (closure): Use it.
12173
121742019-04-14  Akim Demaille  <akim.demaille@gmail.com>
12175
12176	build: also generate the graph reports
12177	* Makefile.am (AM_YFLAGS_WITH_LINES): here.
12178
121792019-04-12  Akim Demaille  <akim.demaille@gmail.com>
12180
12181	yacc.c: minor style change
12182	* data/skeletons/yacc.c: To improve consistency with other similar
12183	pieces of code.
12184
121852019-04-12  Akim Demaille  <akim.demaille@gmail.com>
12186
12187	style: scope reduction in lalr.c
12188	* src/lalr.c (initialize_goto_follows): here.
12189
121902019-04-12  Akim Demaille  <akim.demaille@gmail.com>
12191
12192	style: comment changes
12193	* src/closure.h, src/closure.c, src/lalr.c: here.
12194
121952019-04-12  Akim Demaille  <akim.demaille@gmail.com>
12196
12197	traces: improve logs
12198	* src/lalr.c: Move logs to a better place to understand the chronology
12199	of events.
12200	* src/symlist.c (symbol_list_syms_print): Don't dump core on type
12201	elements.
12202
122032019-04-07  Akim Demaille  <akim.demaille@gmail.com>
12204
12205	doc: minor fixes
12206	* doc/bison.texi: Use consistently $ and @kbd in shell examples.
12207	Prefer sticking to English words: output and file instead of outfile
12208	and infile.
12209
122102019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12211
12212	regen
12213
122142019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12215
12216	bison: use no-lines
12217	The 'regen' commit in Bison's history are a nuisance.  They are
12218	especially big because of the #lines.  Let's generate our parse
12219	without these lines in the repository, but generate them in the
12220	tarball.
12221
12222	* Makefile.am (AM_YFLAGS_WITH_LINES): New.
12223	(AM_YFLAGS): Use it.
12224	(dist-hook): Regenerate the parser with #lines.
12225
122262019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12227
12228	no-lines: avoid leaving an empty line instead of the syncline
12229	Currently, with --no-lines, instead of "#line file line\n", we emit
12230	"\n".  Let's emit nothing.
12231
12232	* data/skeletons/bison.m4 (b4_syncline): Emit at end-of-line when enabled.
12233	* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/glr.cc,
12234	* data/skeletons/lalr1.cc, src/output.c: Use dnl after b4_syncline to
12235	avoid spurious empty lines.
12236
12237	* tests/synclines.at (Sync Lines): Make sure that --no-lines is like
12238	grep -v #line.
12239	* tests/calc.at: Make sure that a rich grammar file behaves properly
12240	with %no-lines.
12241
122422019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12243
12244	java: use full locations for diagnostics about destructors
12245	Currently we use the syncline to report errors about a symbol's
12246	destructor/printer.  This is not accurate (only file and line), and
12247	this is incorrect: the file name is double quotes (a recent change,
12248	needed to make sure we escape properly double quotes in it).  And
12249	worst of all: with --no-line, b4_syncline expands to nothing.
12250
12251	Rather, push the locations into the backend, and use them.
12252
12253	* src/muscle-tab.h, src/muscle-tab.c (muscle_location_grow): Make it
12254	public.
12255	* src/output.c (prepare_symbol_definitions): Use it to pubish the
12256	location of the printer and destructor.
12257	* data/skeletons/lalr1.java: Use complain_at instead of complain.
12258	* tests/java.at (Java invalid directives): Adjust expectations.
12259	* data/skeletons/bison.m4 (b4_symbol_action_location): Remove.
12260	We should not use b4_syncline this way.
12261
122622019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12263
12264	java: prefer errors to fatal errors
12265	Fatal errors are inconvenient, and should be reserved to cases where
12266	we cannot continue.  Here, it could even be warnings actually: these
12267	directives will simply be ignored.
12268
12269	* data/skeletons/lalr1.java: Prefer error (b4_complain) to fatal
12270	errors (b4_fatal).
12271	* tests/java.at (Java invalid directives): New.
12272
122732019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12274
12275	tests: formatting changes
12276	* tests/javapush.at: here.
12277
122782019-04-03  Akim Demaille  <akim.demaille@gmail.com>
12279
12280	lalr: offer more flexibility in debugging routines
12281	* src/state.h, src/state.c (state_transitions_print): New, extracted
12282	from...
12283	(state_transitions_set): here.
12284
122852019-03-31  Akim Demaille  <akim.demaille@gmail.com>
12286
12287	lalr: don't overbook memory
12288	I never understood why we book ngotos+1 slots for relations between
12289	gotos: there are at most ngotos images, not ngotos+1 (and "includes"
12290	does have cases where a goto is in relation with itself, so it's not
12291	ngotos-1).
12292
12293	Maybe bbf37f2534a8e5a6b4e28047f0a10903e6dc73f9 explains the +1: a bug
12294	left us register a goto several times on occasion, and the +1 might
12295	have been a means to avoid this problem in most cases.  Now that this
12296	bug is addressed, we should no longer overbook memory, if only for the
12297	clarity of the code ("why ngotos+1 instead of ngotos?").
12298
12299	* src/lalr.c: A goto has at most ngotos images, not ngotos+1.
12300	While at it, avoid useless repeated call to map_goto introduced in
12301	bbf37f2534a8e5a6b4e28047f0a10903e6dc73f9.
12302
123032019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12304
12305	lalr: show lookback for debug
12306	* src/lalr.c (lookback_print): New.
12307	(build_relations): Use it.
12308	Also show edges.
12309
123102019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12311
12312	diagnostics: don't crash when declaring the error token as an nterm
12313	Reported by wcventure.
12314	http://lists.gnu.org/archive/html/bug-bison/2019-03/msg00008.html
12315
12316	* src/symtab.c (complain_class_redeclared): Don't print empty
12317	locations.
12318	There can only be empty locations for predefined symbols.  And the
12319	only symbol that is lexically available is the error token.  So this
12320	appears to be the only possible way to have an error involving an
12321	empty location.
12322	* tests/input.at (Symbol class redefinition): Check it.
12323
123242019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12325
12326	lalr: fix segmentation violation
12327	The "includes" relation [DeRemer 1982] is between gotos, so of course,
12328	for a given goto, there cannot be more that ngotos (number of gotos)
12329	images.  But we manipulate the set of images of a goto as a list,
12330	without checking that an image was not already introduced.  So we can
12331	"register" way more images than ngotos, leading to a crash (heap
12332	buffer overflow).
12333
12334	Reported by wcventure.
12335	http://lists.gnu.org/archive/html/bug-bison/2019-03/msg00007.html
12336
12337	For the records, this bug is present in the first committed version of
12338	Bison.
12339
12340	* src/lalr.c (build_relations): Don't insert the same goto several
12341	times.
12342	* tests/sets.at (Build Relations): New.
12343
123442019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12345
12346	state: more debug traces
12347	* src/state.c (state_transitions_set): Show the transitions.
12348
123492019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12350
12351	style: rename variables for consistency
12352	* src/lalr.c: Use trans for transitions, and reds for reductions, as
12353	elsewhere in the code.
12354	* src/state.h: Comment changes.
12355
123562019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12357
12358	gram: fix and improve log message
12359	It seems that not many people read these logs: the error was
12360	introduced in 2001 (3067fbef531832df1e43bbd28787655808361eed),
12361
12362	* src/gram.c (grammar_dump): Fix the headers of the table: remove
12363	duplicate display of "Ritem Range".
12364	While at it, remove duplicate display of the rule number (and remove
12365	an incorrect comment about it: these numbers _are_ equal).
12366	* tests/sets.at (Reduced Grammar): Use useless rule, nterm and token
12367	in the example.
12368
123692019-03-30  Akim Demaille  <akim.demaille@gmail.com>
12370
12371	tests: add a tool for mass updates
12372	When we update some output format, too many adjustements must be made
12373	by hand.  This script updates most tests based on the actual output
12374	made during the tests.
12375
12376	* build-aux/update-test: New.
12377
123782019-03-25  Akim Demaille  <akim.demaille@gmail.com>
12379
12380	style: remove now useless _GL_UNUSED
12381	* src/getargs.c (getargs_colors): Here.
12382	Useless since 4d34b06fb3a38eb050439084476a6b3e292c5680.
12383
123842019-03-24  Theophile Ranquet  <ranquet@lrde.epita.fr>
12385
12386	tables: use bitsets for a performance boost
12387	Suggested by Yuri at
12388	<http://lists.gnu.org/archive/html/bison-patches/2012-01/msg00000.html>.
12389
12390	The improvement is marginal for most grammars, but notable for large
12391	grammars (e.g., PosgreSQL's postgre.y), and very large for the
12392	sample.y grammar submitted by Yuri in
12393	http://lists.gnu.org/archive/html/bison-patches/2012-01/msg00012.html.
12394	Measured with --trace=time -fsyntax-only.
12395
12396	parser action tables    postgre.y     sample.y
12397	Before                 0,129 (44%)  37,095 (99%)
12398	After                  0,117 (42%)   5,046 (93%)
12399
12400	* src/tables.c (pos): Replace this set of integer coded as an unsorted
12401	array or integers with...
12402	(pos_set): this bitset.
12403
124042019-03-24  Akim Demaille  <akim.demaille@gmail.com>
12405
12406	yacc.c: don't suggest api.header.include when --defines is not used
12407	See 4e19ab9fcd28c9361ff08f46e5e353effb0a0520: the suggestion to
12408	include the header file should not be emitted when the header is not
12409	generated.
12410
12411	* data/skeletons/yacc.c: Here.
12412
124132019-03-24  Akim Demaille  <akim.demaille@gmail.com>
12414
12415	reader: clarify variable names
12416	* src/reader.c (grammar_rule_check_and_complete): When 'p' and 'lhs'
12417	are aliases, prefer the latter, for clarity and consistency.
12418	(grammar_current_rule_begin): Avoid 'p', current_rule suffices.
12419	* src/gram.h, src/gram.c: Comment changes.
12420
12421	ptdr#	calc.tab.c
12422
124232019-03-24  Akim Demaille  <akim.demaille@gmail.com>
12424
12425	diagnostics: style changes
12426	* src/location.c (location_caret): Clarify a bit.
12427
124282019-03-24  Akim Demaille  <akim.demaille@gmail.com>
12429
12430	diagnostics: use gnulib's libtextstyle-optional
12431	Bruno Haible just added a default implementation of libtextstyle's
12432	interface when the library is not available.
12433	https://lists.gnu.org/archive/html/bison-patches/2019-03/msg00025.html
12434
12435	* gnulib: Update.
12436	* bootstrap.conf: Replace libtextstyle with libtextstyle-optional.
12437	* src/complain.c, src/getargs.c: Remove now useless cpp guards.
12438
124392019-03-23  Akim Demaille  <akim.demaille@gmail.com>
12440
12441	diagnostics: fix handling of style in limit cases
12442	* src/location.c (location_caret): Beware of the cases where the start
12443	and end columns are the same, or when the location is multilines.
12444
124452019-03-23  Akim Demaille  <akim.demaille@gmail.com>
12446
12447	warnings: don't use _Noreturn with G++ 4.7 in C++98 mode
12448	The timevar and bitset modules now use the c99 module which causes
12449	$CXX to now include -std=gnu++11 when possible.  Unfortunately, G++
12450	4.7 does not implement [[noreturn]] in C++11 mode, so our tests of
12451	glr.cc (which uses _Noreturn) fail with
12452
12453	    input.cc:954:1: error: expected unqualified-id before '[' token
12454
12455	right before [[noreturn]].  4.8 works fine.
12456
12457	* data/skeletons/c.m4 (b4_attribute_define): Do not use [[noreturn]]
12458	with GCC 4.7.
12459
124602019-03-17  Akim Demaille  <akim.demaille@gmail.com>
12461
12462	d: tests: use more a natural approach for the scanner
12463	See f8408562f8439654261418406296e4108d2a995f.
12464
12465	* tests/calc.at: Stop imitating the C API.
12466	Prepare more tests to run in the future.
12467	%verbose works as expected (what a surprise, it's unrelated to the
12468	skeleton...).
12469
124702019-03-17  Akim Demaille  <akim.demaille@gmail.com>
12471
12472	regen
12473
124742019-03-17  Akim Demaille  <akim.demaille@gmail.com>
12475
12476	style: rename spec_defines_file as spec_header_file
12477	The variable spec_defines_file denotes the name of the generated
12478	header.  Its name is derived from --defines/%defines, whose name in
12479	turn is derived from the fact that the header, in Yacc, contained the
12480
12481	Not only does the header now contain a lot more than just the token
12482	definitions, but we no longer even generate macros, but an enum...
12483
12484	Let's modernize our vocabulary.
12485
12486	* src/files.h, src/files.c (spec_defines_file): Rename as...
12487	(spec_header_file): this.
12488
124892019-03-17  Akim Demaille  <akim.demaille@gmail.com>
12490
12491	yacc.c: provide a means to include the header in the implementation
12492	Currently when --defines is used, we generate a header, and paste an
12493	exact copy of it into the generated parser implementation file.  Let's
12494	provide a means to #include it instead.
12495
12496	We don't do it by default because of the Autotools' ylwrap.  This
12497	program wraps invocations of yacc (that uses a fixed output name:
12498	y.tab.c, y.tab.h, y.output) to support a more modern naming
12499	scheme (dir/foo.y -> dir/foo.tab.c, dir/foo.tab.h, etc.).  It does
12500	that by renaming the generated files, and then by running sed to
12501	propagate these renamings inside the files themselves.
12502
12503	Unfortunately Automake's Makefiles uses Bison as if it were Yacc (with
12504	--yacc or with -o y.tab.c) and invoke bison via ylwrap.  As a
12505	consequence, as far as Bison is concerned, the output files are
12506	y.tab.c and y.tab.h, so it emits '#include "y.tab.h"'.  So far, so
12507	good.  But now ylwrap processes this '#include "y.tab.h"' into
12508	'#include "dir/foo.tab.h"', which is not guaranteed to always work.
12509
12510	So, let's do the Right Thing when the output file is not y.tab.c, in
12511	which case the user should %define api.header.include.  Binding this
12512	behavior to --yacc is tempting, but we recently told people to stop
12513	using --yacc (as it also enables the Yacc warnings), but rather to use
12514	-o y.tab.c.
12515
12516	Yacc.c is the only skeleton concerned: all the others do include their
12517	header.
12518
12519	* data/skeletons/yacc.c (b4_header_include_if): New.
12520	(api.header.include): Provide a default value when the output is not
12521	y.tab.c.
12522	* src/parse-gram.y (api.header.include): Define.
12523
125242019-03-17  Akim Demaille  <akim.demaille@gmail.com>
12525
12526	d: don't link against LIBS
12527	* tests/local.at (AT_COMPILE_D): Don't pass LIBS, dmd does not like
12528	being given -lintl.
12529
125302019-03-17  Akim Demaille  <akim.demaille@gmail.com>
12531
12532	address warnings from GCC's UB sanitizer
12533	Running with CC='gcc-mp-8 -fsanitize=undefined' revealed Undefined
12534	Behaviors.
12535	https://lists.gnu.org/archive/html/bison-patches/2019-03/msg00008.html
12536
12537	* src/state.c (errs_new): Don't call memcpy with NULL as source.
12538	* src/location.c (add_column_width): Don't assume that the column
12539	argument is nonnegative: the scanner sometimes "backtracks" (e.g., see
12540	ROLLBACK_CURRENT_TOKEN and DEPRECATED) in which case we can have
12541	negative column numbers (temporarily).
12542	Found in test 3 (Invalid inputs).
12543
125442019-03-16  Akim Demaille  <akim.demaille@gmail.com>
12545
12546	diagnostics: use libtextstyle for colored output
12547	Bruno Haible released libtextstyle, a library for colored output based
12548	on CSS.  Let's use it to generate colored diagnostics, provided
12549	libtextstyle is available.
12550
12551	See
12552	https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00176.html
12553	https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00073.html
12554	https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00084.html
12555	https://lists.gnu.org/archive/html/bison-patches/2019-03/msg00007.html
12556
12557	* bootstrap.conf (gnulib_modules): Use libtextstyle when possible.
12558	* data/diagnostics.css: New.
12559	* src/complain.c (begin_use_class, end_use_class, flush)
12560	(severity_style, complain_init_color): New.
12561	Use them.
12562	* src/getargs.c (getargs_colors): New.
12563	(getargs): Use it.
12564	Skip --color and --style.
12565	* src/location.h, src/location.c (location_print): Use a style.
12566
12567	* tests/bison.in: Force --color=yes when stderr is a tty.
12568	* tests/local.at: Disable colors during the test suite.
12569	* tests/input.at: Adjust expectations to the extra options passed on
12570	the command line.
12571
125722019-03-16  Akim Demaille  <akim.demaille@gmail.com>
12573
12574	style: clean up complain.c
12575	* src/complain.c (severity_prefix): New.
12576	(error_message): Take the severity as argument, instead of the prefix.
12577
125782019-03-16  Akim Demaille  <akim.demaille@gmail.com>
12579
12580	yacc.c: emit the header before the implementation file
12581	* data/skeletons/yacc.c: here.
12582	This is more logical for the time stamps, but it's also required by
12583	following patches: the shared declarations are also in charge of
12584	handling api.value.type=union.  So far, they are run in the
12585	implementation file in both cases (with or without header).  But if we
12586	run them only in the header, then the implementation file is emited
12587	with incorrect support for api.value.type=union.
12588	Arguably we should not have such dependencies.  This is because we
12589	have side-effects in our backend (redefining the symbols' type and
12590	type_tag).  In the future we should find a better solution for this,
12591	without sacrificing the independence of the backend from bison
12592	itself (i.e., I don't think we should handle api.value.type=union in
12593	bison, leave it to m4).
12594
125952019-03-16  Akim Demaille  <akim.demaille@gmail.com>
12596
12597	simplify the generated #line
12598	Currently we generate things like:
12599
12600	    #line 683 "src/parse-gram.y" /* yacc.c:316  */
12601
12602	The first part is of course very important: compilers point the users
12603	to their grammar file rather than into the generated parser.  The
12604	second part points to the place in the skeletons that generated this
12605	piece of code.
12606
12607	This dependency on the Bison skeletons generates lots of useless 'git
12608	diff'.  This location is useless for the regular user (who does not
12609	care about the skeletons) and is actually not useful for Bison
12610	developpers too (I never used this to locate the code in skeletons
12611	that generated output).  So disable it completely.  If someone thinks
12612	this was actually useful, a %define variable should be provided to
12613	control the level of verbosity of '#line', in replacement of
12614	--no-lines.
12615
12616	So now, generate:
12617
12618	    #line 683 "src/parse-gram.y"
12619
12620	* data/skeletons/bison.m4 (b4_sync_end): Emit nothing.
12621
126222019-03-13  Akim Demaille  <akim.demaille@gmail.com>
12623
12624	gnulib: update
12625
126262019-03-13  Akim Demaille  <akim.demaille@gmail.com>
12627
12628	tests: remove duplicates
12629	* tests/regression.at (Invalid inputs, Invalid inputs with {}):
12630	Remove, there are exact copies of them in input.at.
12631
126322019-03-02  Akim Demaille  <akim.demaille@gmail.com>
12633
12634	d: simplify the API to build the scanner of the example
12635	* examples/d/calc.y (calcLexer): Add an overload for File.
12636	Use it.
12637
126382019-03-01  H. S. Teoh  <hsteoh@quickfur.ath.cx>
12639
12640	d: modernize the scanner of the example
12641	https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00121.html
12642
12643	* examples/d/calc.y (CalcLexer): Stop shoehorning C's API into D: use
12644	a range based approach in the scanner, rather than some imitation of
12645	getc/ungetc.
12646	(main): Adjust.
12647
126482019-03-01  Akim Demaille  <akim.demaille@gmail.com>
12649
12650	d: tests: use fewer global variables
12651	* tests/calc.at: Move 'input' into the scanner.
12652
126532019-02-28  Akim Demaille  <akim.demaille@gmail.com>
12654
12655	lalr: clarify the count of lookaheads
12656	* src/lalr.c (state_lookahead_tokens_count): Remove wierd `+=` that is
12657	actually an `=`.
12658
126592019-02-28  Akim Demaille  <akim.demaille@gmail.com>
12660
12661	lalr: clarify the API
12662	* src/state.h, src/state.c (state_reduction_find): Clarify.
12663	Die on errors.
12664	* src/lalr.c (goto_list_new): New.
12665	Use it.
12666
126672019-02-28  Akim Demaille  <akim.demaille@gmail.com>
12668
12669	lalr: improve traces
12670	* src/lalr.c (follows_print): Just print the symbol tag.
12671	Take and print a title.
12672	Indent the output.
12673	Use it to print the various steps of the computation.
12674	(lookahead_tokens_print): Fix a lie: the number displayed is not the
12675	number of tokens.
12676	Don't display states that don't even have reductions.
12677
126782019-02-27  Akim Demaille  <akim.demaille@gmail.com>
12679
12680	lalr: print the 'reads' relation
12681	* src/relation.h, src/relation.c (relation_print): Accept and use a
12682	title.
12683	Don't print empty rows.
12684	Indent the output.
12685	Adjust dependencies.
12686	* src/lalr.c (initialize_goto_follows): Print 'reads' in traces.
12687
126882019-02-27  Akim Demaille  <akim.demaille@gmail.com>
12689
12690	style: comment changes
12691	* src/lr0.c: here.
12692
126932019-02-26  Akim Demaille  <akim.demaille@gmail.com>
12694
12695	dlang: initial changes to run the calc tests on it
12696	* configure.ac (DCFLAGS): Define.
12697	* tests/atlocal.in: Receive it.
12698	* data/skeletons/d.m4 (api.parser.class): Remove spurious YY.
12699	* data/skeletons/lalr1.d (yylex): Return an int instead of a
12700	YYTokenType, so that we can use characters as tokens.
12701	* examples/d/calc.y: Adjust.
12702	* tests/local.at: Initial support for D.
12703	(AT_D_IF, AT_DATA_GRAMMAR(D), AT_YYERROR_DECLARE(d))
12704	(AT_YYERROR_DECLARE_EXTERN(d), AT_YYERROR_DEFINE(d))
12705	(AT_MAIN_DEFINE(d), AT_COMPILE_D, AT_LANG_COMPILE(d), AT_LANG_EXT(d)):
12706	New.
12707	* tests/calc.at: Initial support for D.
12708	* tests/headers.at
12709
127102019-02-26  Akim Demaille  <akim.demaille@gmail.com>
12711
12712	d: improve the example
12713	* examples/d/calc.y: Exit with failure on errors.
12714	Remove useless operators (=, !) meant for the test suite.
12715	Add unary + for symmetry.
12716	* examples/d/calc.test: Adjust expectations.
12717
127182019-02-26  Akim Demaille  <akim.demaille@gmail.com>
12719
12720	tests: style changes
12721	* tests/local.at AT_YYERROR_DEFINE(java): Use more consistent names.
12722
127232019-02-25  Akim Demaille  <akim.demaille@gmail.com>
12724
12725	style: eliminate useless indirection
12726	* src/relation.h, src/relation.c (relation_digraph): Don't take the
12727	biteetv as a pointer, it is already a pointer (as it's an array).
12728
127292019-02-25  Akim Demaille  <akim.demaille@gmail.com>
12730
12731	style: rename function for clarity
12732	Commit db34f7988941444bdc5f2b6adcf7fb83648f9a18 renames the variable F
12733	as goto_follows, but forgot to rename this function.
12734
12735	* src/lalr.c (initialize_F): Rename as...
12736	(initialize_goto_follows): this.
12737
127382019-02-25  Akim Demaille  <akim.demaille@gmail.com>
12739
12740	lalr: more debug traces
12741	I need to be able to read includes and goto_follows.
12742
12743	* src/relation.h, src/relation.c (relation_print): Provide a means to
12744	pretty-print the nodes of the relation.
12745	* src/lalr.c (goto_print, follows_print): New.
12746	(set_goto_map): Use goto_print.
12747	(build_relations): Show INCLUDES.
12748	(compute_FOLLOWS): Rename as...
12749	(compute_follows): this.
12750	Show FOLLOWS.
12751
127522019-02-24  Akim Demaille  <akim.demaille@gmail.com>
12753
12754	style: minor changes
12755	* examples/c/calc/calc.y, src/lalr.c: Reduce scope.
12756	* src/gram.c: Prefer < to >.
12757
127582019-02-24  Akim Demaille  <akim.demaille@gmail.com>
12759
12760	style: clarify the computation of the lookback edges
12761	* src/lalr.c (build_relations): Reduce the scopes.
12762	Instead of keeping rp alive in two different loops, clarify the second
12763	one by having an index on the path we traverse (i.e., use that index
12764	to compute the source state _and_ the symbol that labels the
12765	transition).
12766	This allows to turn an obscure 'while'-loop in a clearer (IMHO)
12767	'for'-loop.  We also consume more variables (by introducing p instead
12768	of making more side effects on length), but we're in 2019, I don't
12769	think this matters.  What does matter is that (IMHO again), this is
12770	now clearer.
12771	Also, use clearer names.
12772
127732019-02-24  Akim Demaille  <akim.demaille@gmail.com>
12774
12775	style: scope reduction in tables.c
12776	* src/tables.c: here.
12777	* src/lalr.c: Prefer < to >.
12778
127792019-02-24  Akim Demaille  <akim.demaille@gmail.com>
12780
12781	d: formatting changes
12782	* data/skeletons/d.m4, data/skeletons/lalr1.d: Avoid trailing spaces.
12783
127842019-02-23  Akim Demaille  <akim.demaille@gmail.com>
12785
12786	examples: remove stray examples
12787	* examples/c/reentrant-calc: Remove.
12788	I did not mean to include this example, it was replaced by
12789	examples/c/reccalc.
12790
127912019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12792
12793	tests: factor the execution of Java parsers
12794	* tests/local.at (AT_MAIN_DEFINE(java)): Exit failure on failure.
12795	(AT_PARSER_CHECK): If in Java, run AT_JAVA_PARSER_CHECK.
12796	* tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Simplify.
12797
127982019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12799
12800	tests: fix a Java tests
12801	* tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Fix quotation error.
12802
128032019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12804
12805	tests: simplify AT_PARSER_CHECK usage
12806	Currently the caller must specify the ./ prefix to its command.  Let's
12807	avoid that: it will be nicer to read, make it easier to have a version
12808	that works for Java and C/C++.
12809
12810	* tests/local.at (AT_PARSER_CHECK): Prefix the command with ./.
12811	Adjust callers.
12812
128132019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12814
12815	tests: java: factor the definition of Position
12816	* tests/local.at (AT_JAVA_POSITION_DEFINE): New.
12817	* tests/java.at, tests/javapush.at: Use it.
12818
128192019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12820
12821	tests: dispatch per lang on AT_DATA_GRAMMAR
12822	* tests/java.at: Do that.
12823	* tests/conflicts.at: Simplify.
12824
12825	* tests/actions.at, tests/c++.at, tests/input.at, tests/local.at,
12826	* tests/named-refs.at:
12827	Use AT_BISON_OPTION_PUSHDEFS/AT_BISON_OPTION_POPDEFS.
12828
128292019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12830
12831	tests: dispatch per lang on the definition of yylex
12832	* tests/local.at (AT_YYLEX_DEFINE): Dispatch on the language.
12833	(AT_YYLEX_DEFINE(java)): New.
12834	* tests/conflicts.at, tests/java.at: Use it.
12835
128362019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12837
12838	tests: de-duplicate
12839	* tests/conflicts.at (AT_YYLEX_PROTOTYPE): Don't define it, leave that
12840	task to AT_DATA_GRAMMAR.
12841	But be honest: tell AT_BISON_OPTION_PUSHDEFS all the options we use.
12842
128432019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12844
12845	tests: formatting changes
12846	* tests/local.at: here.
12847
128482019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12849
12850	graph: prefer *.gv to *.dot
12851	Reported by Hans Åberg.
12852	https://lists.gnu.org/archive/html/help-bison/2019-02/msg00064.html
12853
12854	* src/files.c (spec_graph_file): Use `*.gv` when 3.4 or better,
12855	otherwise `*.dot`.
12856	* src/parse-gram.y (handle_require): Pretend we are already 3.4.
12857	* doc/bison.texi: Adjust.
12858	* tests/local.at, tests/output.at: Exercise this.
12859
128602019-02-21  Akim Demaille  <akim.demaille@gmail.com>
12861
12862	doc: fixes to please older versions of Texinfo
12863	Currently, we have errors:
12864
12865	    ./doc/bison.texi:13005: node `History' lacks menu item for `Yacc' despite being its Up target
12866
12867	* doc/bison.texi (History): Add the local menu.
12868	While at it, add a few index entries.
12869
128702019-02-17  Akim Demaille  <akim.demaille@gmail.com>
12871
12872	doc: style changes
12873	* doc/bison.texi (Bibliography): Add [Corbett 1984] and [Johnson
12874	1978].
12875	(History): Use them.
12876	And other minor changes.
12877
128782019-02-17  Eric S. Raymond  <esr@thyrsus.com>
12879
12880	doc: a history section
12881	* bison.texi (A Brief History of the Greater Ungulates): New section.
12882
128832019-02-17  Akim Demaille  <akim.demaille@gmail.com>
12884
12885	examples: add an example with a reentrant parser in Flex+Bison
12886	Suggested by Eric S. Raymond.
12887	https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00066.html
12888
12889	* examples/c/reentrant-calc/Makefile, examples/c/reentrant-calc/README.md,
12890	* examples/c/reentrant-calc/parse.y, examples/c/reentrant-calc/scan.l
12891	* examples/c/reentrant-calc/lexcalc.test,
12892	* examples/c/reentrant-calc/local.mk:
12893	New.
12894
128952019-02-16  Akim Demaille  <akim.demaille@gmail.com>
12896
12897	examples: fixes in lexcalc
12898	* examples/c/lexcalc/parse.y: Formatting/comment changes.
12899	(line): Don't return a value.
12900	Print the result here, which avoids printing a value for lines with an
12901	error.
12902	(yyerror): Be sure to increment the pointed, not the pointer...
12903	* examples/c/lexcalc/lexcalc.test: Check errors.
12904	* examples/c/lexcalc/local.mk: Fix a dependency.
12905
129062019-02-16  Akim Demaille  <akim.demaille@gmail.com>
12907
12908	build: fix distcheck
12909	Regression introduced in 05a80977798abf472bfc11c477751303ad604733.
12910
12911	* doc/local.mk (bison.help): Don't depend on the path of the bison
12912	executable.
12913
129142019-02-16  Akim Demaille  <akim.demaille@gmail.com>
12915
12916	style: move pkgdatadir to files.*
12917	Let's move it to a more logical place.
12918
12919	* src/output.h, src/output.c (pkgdatadir): Move to...
12920	* src/files.h, src/files.c: here.
12921
129222019-02-14  Akim Demaille  <akim.demaille@gmail.com>
12923
12924	style: rename cleanup_caret as caret_free
12925	* src/location.c, src/location.h, src/main.c: here.
12926
129272019-02-14  Akim Demaille  <akim.demaille@gmail.com>
12928
12929	style: avoid default in switch on enums
12930	* src/assoc.c (assoc_to_string): here.
12931
129322019-02-14  Akim Demaille  <akim.demaille@gmail.com>
12933
12934	doc: run tests/bison, not src/bison
12935	* doc/local.mk: Don't run src/bison, as it expects to find all its
12936	files installed.  Instead, run tests/bison which is ready to run in
12937	builddir.
12938
129392019-02-13  Akim Demaille  <akim.demaille@gmail.com>
12940
12941	gnulib: update
12942
129432019-02-12  Akim Demaille  <akim.demaille@gmail.com>
12944
12945	style: comment and names changes in map_goto
12946	* src/lalr.h, src/lalr.c: Use clearer names.
12947
129482019-02-12  Akim Demaille  <akim.demaille@gmail.com>
12949
12950	yacc: support parse.assert
12951	While hacking on the computation of the automaton, I had yystate being
12952	equal to -1, and the parser loops.  Let's catch this when
12953	parser.assert is enabled.
12954
12955	* data/skeletons/yacc.c (YY_ASSERT): New.
12956	Use it.
12957	Not using the name YYASSERT, to make it clear that this is private.
12958	glr.c should probably move to YY_ASSERT too.
12959	Also, while at it, report 'Entering state...' even before growing the
12960	stacks.
12961
129622019-02-12  Akim Demaille  <akim.demaille@gmail.com>
12963
12964	examples: depend on Bison's sources
12965	* examples/c/calc/local.mk, examples/c/lexcalc/local.mk,
12966	* examples/c/mfcalc/local.mk, examples/c/rpcalc/local.mk:
12967	Regenerate the files if dependencies have changed.
12968
129692019-02-12  Eric S. Raymond  <esr@thyrsus.com>
12970
12971	README: point to README-hacking
12972	* README (Build from git): New.
12973	* README-hacking: Describe easier submodule update.
12974
129752019-02-10  Akim Demaille  <akim.demaille@gmail.com>
12976
12977	doc: a single space before closing comments
12978	I don't think this style:
12979
12980	    /* If buffer is full, make it bigger.        */
12981	    if (i == length)
12982	      {
12983	        length *= 2;
12984	        symbuf = (char *) realloc (symbuf, length + 1);
12985	      }
12986	    /* Add this character to the buffer.         */
12987	    symbuf[i++] = c;
12988	    /* Get another character.                    */
12989	    c = getchar ();
12990
12991	or more readable than
12992
12993	    /* If buffer is full, make it bigger. */
12994	    if (i == length)
12995	      {
12996	        length *= 2;
12997	        symbuf = (char *) realloc (symbuf, length + 1);
12998	      }
12999	    /* Add this character to the buffer. */
13000	    symbuf[i++] = c;
13001	    /* Get another character. */
13002	    c = getchar ();
13003
13004	Actually, I think the latter is more readable, and helps with width
13005	issues in the PDF.  As a matter of fact, I would happily move to //
13006	only for single line comments.
13007
13008	* doc/bison.texi: A single space before closing comments.
13009
130102019-02-10  Akim Demaille  <akim.demaille@gmail.com>
13011
13012	doc: modernize the examples
13013	* doc/bison.texi: Prefer 'fun' to 'fnct'.
13014	Reduce local variable scopes.
13015	Prefer strdup to malloc + strcpy.
13016	Avoid gratuitous casts.
13017	Use simpler names (e.g., 'name' instead of 'fname').
13018	Avoid uses of 0 for NULL.
13019	Avoid using NULL when possible (e.g., 'p' instead of 'p != NULL').
13020	Prefer union names to casts (e.g. 'yylval.VAR = s' instead of
13021	'*((symrec**) &yylval) = s').
13022	Give arguments a name in fun declarations.
13023	Use our typedefs instead of duplicating them (func_t).
13024	Stop promoting an explicit $$ = $1;, it should be implicit (Bison
13025	might be able to eliminate useless chain rules).
13026	Help a bit Texinfo by making smaller groups.
13027	Rely on the C compiler to call function pointers (prefer
13028	'$1->value.fun ($3)' to (*($1->value.fnctptr))($3)').
13029
130302019-02-10  Akim Demaille  <akim.demaille@gmail.com>
13031
13032	examples: add a simple infix calculator in C
13033	Currently we have no simple example: rpcalc in reverse Polish, mfcalc
13034	has functions, and lexcalc is using lex.
13035
13036	* examples/c/calc/Makefile, examples/c/calc/calc.y,
13037	* examples/c/calc/calc.test, examples/c/calc/local.mk: New.
13038
130392019-02-10  Akim Demaille  <akim.demaille@gmail.com>
13040
13041	examples: fix annoying off-by-one errors
13042	* examples/extexi: Since we issue #lines only at the beginning of
13043	@example, leave empty line when removing content (such as @comment
13044	lines), otherwise the lines that follow have incorrect source line
13045	location.  This leaves ugly empty lines, but they are removed when you
13046	tidy the output for the end user: sequences of \n are mapped to at
13047	most two sucessive \n.
13048
130492019-02-09  Akim Demaille  <akim.demaille@gmail.com>
13050
13051	style: factor printing of rules
13052	* src/gram.h, src/gram.c (rule_print): New.
13053	Use it.
13054
130552019-02-09  Akim Demaille  <akim.demaille@gmail.com>
13056
13057	style: use lower case for variable names
13058	* src/relation.c (INDEX, VERTICES): Rename as...
13059	(indexes, vertices): these.
13060
130612019-02-09  Akim Demaille  <akim.demaille@gmail.com>
13062
13063	style: scope reduction in relation.c
13064
130652019-02-09  Akim Demaille  <akim.demaille@gmail.com>
13066
13067	report: stop counting uselessly
13068	* src/print.c (print_nonterminal_symbols): Replace left_count and
13069	right_count with on_left and on_right.
13070
130712019-02-09  Akim Demaille  <akim.demaille@gmail.com>
13072
13073	report: clean up its format
13074	The format is inconsistent.  For instance most sections are
13075	indented (including "Terminals unused in grammar" for instance), but
13076	the sections "Terminals, with rules where they appear" and
13077	"Nonterminals, with rules where they appear" are not.  Let's indent
13078	them.  Also, these two sections try to wrap the output to avoid lines
13079	too long.  Yet we don't do that in the rest of the file, for instance
13080	when listing the lookaheads of an item.
13081
13082	For instance in the case of Bison's parse-gram.output we go from:
13083
13084	    Terminals, with rules where they appear
13085
13086	    "end of file" (0) 0
13087	    error (256) 28 88
13088	    "string" <char*> (258) 9 13 16 17 20 23 24 109 116
13089	    [...]
13090
13091	    Nonterminals, with rules where they appear
13092
13093	    $accept (58)
13094	        on left: 0
13095	    input (59)
13096	        on left: 1, on right: 0
13097	    prologue_declarations (60)
13098	        on left: 2 3, on right: 1 3
13099	    prologue_declaration (61)
13100	        on left: 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24
13101	        25 26 27 28 29, on right: 3
13102	    [...]
13103
13104	to
13105
13106	    Terminals, with rules where they appear
13107
13108	    "end of file" (0) 0
13109	    error (256) 28 88
13110	    "string" <char*> (258) 9 13 16 17 20 23 24 109 116
13111	    [...]
13112
13113	    Nonterminals, with rules where they appear
13114
13115	        $accept (58)
13116	            on left: 0
13117	        input (59)
13118	            on left: 1
13119	            on right: 0
13120	        prologue_declarations (60)
13121	            on left: 2 3
13122	            on right: 1 3
13123	        prologue_declaration (61)
13124	            on left: 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29
13125	            on right: 3
13126	    [...]
13127
13128	* src/print.c (END_TEST): Remove.
13129	(print_terminal_symbols): Don't try to wrap the output.
13130	(print_nonterminal_symbols): Likewise.
13131	Make two different lines for occurrences on the left, and occurrence
13132	on the rhs of the rules.
13133	Indent by 4 and 8, not 3.
13134	* src/reduce.c (reduce_output): Indent by 4, not 3.
13135
13136	* tests/conflicts.at, tests/existing.at, tests/reduce.at,
13137	* tests/regression.at, tests/report.at:
13138	Adjust.
13139
131402019-02-05  Akim Demaille  <akim.demaille@gmail.com>
13141
13142	add LR(0) output
13143	This should not be used to generate parsers.  My point is actually to
13144	facilitate debugging (when tweaking the generation of the LR(0)
13145	automaton for instance, not carying -yet- about lookaheads).
13146
13147	* src/reader.c (prepare_percent_define_front_end_variables): Add lr(0).
13148	* src/conflicts.c (set_conflicts): Be robust to reds not having
13149	lookaheads at all.
13150	* src/ielr.c (LrType, lr_type_get): Adjust.
13151	(ielr): Implement support for LR(0).
13152	* src/lalr.c (lalr_free): Don't free LA when it's not computed.
13153
131542019-02-05  Akim Demaille  <akim.demaille@gmail.com>
13155
13156	style: scope reduction in derives.c
13157	* src/derives.c: here.
13158
131592019-02-05  Akim Demaille  <akim.demaille@gmail.com>
13160
13161	style: comment changes and refactoring in state.c
13162	* src/state.h, src/state.c: Comment changes.
13163	(transitions_to): Take a state* as argument.
13164	* src/lalr.h, src/lalr.c: Comment changes.
13165	(initialize_F): Use clear variable names.
13166
131672019-02-05  Akim Demaille  <akim.demaille@gmail.com>
13168
13169	tests: fix typos
13170	* tests/reduce.at: here.
13171
131722019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13173
13174	Merge branch maint
13175	* maint:
13176	  maint: post-release administrivia
13177	  version 3.3.2
13178	  style: minor fixes
13179	  NEWS: named constructors are preferable to symbol_type ctors
13180	  gram: fix handling of nterms in actions when some are unused
13181	  style: rename local variable
13182	  CI: update the ICC serial number for travis-ci.org
13183
131842019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13185
13186	maint: post-release administrivia
13187	* NEWS: Add header line for next release.
13188	* .prev-version: Record previous version.
13189	* cfg.mk (old_NEWS_hash): Auto-update.
13190
131912019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13192
13193	version 3.3.2
13194	* NEWS: Record release date.
13195
131962019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13197
13198	style: minor fixes
13199	* NEWS, src/reduce.c, src/reduce.h: Use 'nonterminal'.
13200	Fix comments.
13201
132022019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13203
13204	NEWS: named constructors are preferable to symbol_type ctors
13205	Reported by Frank Heckenbach.
13206	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00043.html
13207
132082019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13209
13210	gram: fix handling of nterms in actions when some are unused
13211	Since Bison 3.3, semantic values in rule actions (i.e., '$...') are
13212	passed to the m4 backend as the symbol number.  Unfortunately, when
13213	there are unused symbols, the symbols are renumbered _after_ the
13214	numbers were used in the rule actions.  As a result, the evaluation of
13215	the skeleton failed because it used non existing symbol numbers.
13216	Which is the happy scenario: we could use numbers of other existing
13217	symbols...
13218
13219	Reported by Balázs Scheidler.
13220	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00044.html
13221
13222	Translating the rule actions after the symbol renumbering moves too
13223	many parts in bison.  Relying on the symbol identifiers is more
13224	troublesome than it might first seem: some don't have an
13225	identifier (tokens with only a literal string), some might have a
13226	complex one (tokens with a literal string with characters special for
13227	M4).  Well, these are tokens, but nterms also have issues: "dummy"
13228	nterms (for midrule actions) are named $@32 etc. which is risky for
13229	M4.
13230
13231	Instead, let's simply give M4 the mapping between the old numbers and
13232	the new ones.  To avoid confusion between old and new numbers, always
13233	emit pre-renumbering numbers as "orig NUM".
13234
13235	* data/README: Give details about "orig NUM".
13236	* data/skeletons/bison.m4 (__b4_symbol, _b4_symbol): Resolve the
13237	"orig NUM".
13238	* src/output.c (prepare_symbol_definitions): Pass nterm_map to m4.
13239	* src/reduce.h, src/reduce.c (nterm_map): Extract it from
13240	nonterminals_reduce, to make it public.
13241	(reduce_free): Free it.
13242	* src/scan-code.l (handle_action_dollar): When referring to a nterm,
13243	use "orig NUM".
13244	* tests/reduce.at (Useless Parts): New, based Balázs Scheidler's
13245	report.
13246
132472019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13248
13249	tests: strengthen some of them
13250	* tests/reduce.at: Check that the generated parsers are proper C.
13251
132522019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13253
13254	package: rename data/README as data/README.md
13255	So that it is properly rendered by online git services.
13256
132572019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13258
13259	style: reduce scopes
13260	* src/symlist.c (symbol_list_free): New.
13261
132622019-02-03  Akim Demaille  <akim.demaille@gmail.com>
13263
13264	style: prefer snprintf to sprintf
13265	* src/symtab.c (dummy_symbol_get): There's no need for the buffer to
13266	be so big and static.
13267	Use snprintf for safety.
13268
132692019-02-02  Akim Demaille  <akim.demaille@gmail.com>
13270
13271	style: comment and name changes
13272	* src/output.c (prepare_symbol_names): here.
13273	* src/reader.c: Remove obsolete comment.
13274	* src/scan-code.l: Use || for Boolean or.
13275
132762019-02-02  Akim Demaille  <akim.demaille@gmail.com>
13277
13278	style: comment changes
13279	* src/reader.c, src/scan-code.l: here.
13280
132812019-02-02  Akim Demaille  <akim.demaille@gmail.com>
13282
13283	make: regenerate the example parsers when bison changes
13284	* Makefile.am (dependencies): Also depend on Bison's sources.
13285
132862019-02-02  Akim Demaille  <akim.demaille@gmail.com>
13287
13288	style: rename local variable
13289	* src/reduce.c (nonterminals_reduce): Rename nontermmap as nterm_map.
13290	We will expose it.
13291
132922019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13293
13294	gram: detect and report (in debug traces) useless chain rules
13295	A rule is a useless chain iff it's a chain (aka unit, or injection)
13296	rule (i.e., the RHS has length 1), and it's useless (it has no used
13297	defined semantic action).
13298
13299	* src/gram.h, src/gram.c (rule_useless_chain_p): New.
13300	(grammar_dump): Report useless chain rules.
13301	* tests/sets.at: Check the traces.
13302
133032019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13304
13305	lr(0): more debug traces
13306	* src/lr0.c (core_print, kernel_print): New.
13307	Use them.
13308
133092019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13310
13311	lr(0): remove useless conditional
13312	* src/lr0.c (new_itemsets): There's no harm in setting a Boolean
13313	several times.
13314
133152019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13316
13317	style: sort includes and avoid assignments
13318	* src/symtab.c: Sort includes.
13319	* src/gram.c (grammar_rules_print_xml): Avoid assignments to define
13320	'usefulness'.
13321
133222019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13323
13324	style: use item_rule
13325	* src/print-graph.c, src/print-xml.c: here.
13326
133272019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13328
13329	gram: factor the printing of items and the computation of their rule
13330	There are several places where we need to recover the rule from an
13331	item, let's factor that into item_rule.  We also want to print items
13332	in a nice way: we do it when generating the *output file, but it is
13333	also useful in debug messages.
13334
13335	* src/gram.h, src/gram.c (item_rule, item_print): New.
13336	* src/print.c (print_core): Use them.
13337	* src/state.h, src/state.c: Propagate constness.
13338
133392019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13340
13341	style: scope reduction in print-xml
13342	* src/print-xml.c: here.
13343
133442019-01-30  Akim Demaille  <akim.demaille@gmail.com>
13345
13346	tests: check XML and dot reports
13347	* tests/report.at: Here.
13348
133492019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13350
13351	CI: update the ICC serial number for travis-ci.org
13352	On travis-ci.org, there are five concurrent slaves, instead of three
13353	on travis-ci.com.
13354
133552019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13356
13357	CI: update the ICC serial number for travis-ci.org
13358	On travis-ci.org, there are five concurrent slaves, instead of three
13359	on travis-ci.com.
13360
133612019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13362
13363	style: comment changes
13364	* src/lr0.c, src/state.c, src/state.h: here.
13365
133662019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13367
13368	closure: initialize it once for all
13369	The memory allocated by 'closure' (and some data such as 'fderives')
13370	is used to computed a state's full itemset from its core.  This is
13371	needed during the construction of the LR(0) automaton, and the memory
13372	is reclaimed immediately afterwards.
13373
13374	Unfortunately the reports (graph, text, xml) also need this
13375	information when describing the states with their full itemsets.  As a
13376	consequence the memory was allocated again, fderives computed again
13377	too, and more --trace reports are generated which only duplicate what
13378	was already reported.
13379
13380	Stop that.  It does mean that we release the memory later (hence the
13381	peak memory usage is higher now), but I don't think that's a problem
13382	today.
13383
13384	* src/lr0.c (generate_states): Don't call closure_free.
13385	* src/state.c (states_free): Do it here.
13386	(for symmetry with closure_new which is called in generate_states).
13387	* src/print-graph.c, src/print-xml.c, src/print.c: You can now expect
13388	the closure module to be functional.
13389
133902019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13391
13392	style: rename closure_* functions as closure_*
13393	This is more consistent with the other files.
13394
13395	* closure.h, closure.c (new_closure, free_closure): Rename as...
13396	(closure_new, closure_free): this.
13397	Adjust dependencies.
13398
133992019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13400
13401	lr0: use a bitset for the set of "shiftable symbols"
13402	This will make it easier to add new elements (that might already be
13403	part of shift_symbol) without having to worry about the size of
13404	shift_symbol (which is currently a fixed size vector).
13405
13406	I could not measure any significant differences in performances in the
13407	generation of LR(0) automaton (benched on gramamrs of Ruby, C, and C++).
13408
13409	* src/lr0.c (shift_symbol): Make it a bitset.
13410
134112019-01-28  Akim Demaille  <akim.demaille@gmail.com>
13412
13413	add -fsyntax-only
13414	When debugging Bison itself, this is very handy, especially when
13415	tweaking the frontend badly enough to break the backends. It can also
13416	be used to check a grammar.
13417
13418	* src/getargs.h, src/getargs.c (feature_syntax_only): New.
13419	(feature_args, feature_types): Adjust.
13420	* src/main.c (main): Use it.
13421
134222019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13423
13424	style: beware of collisions on status
13425	* src/symtab.h (status): Rename as...
13426	(declaration_status): this, to avoid colliding with status, the
13427	argument of 'usage'.
13428	'status' seems a tad too general to be used only here.
13429
134302019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13431
13432	gnulib: update
13433
134342019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13435
13436	usage: document -ffixit
13437	* src/getargs.c (usage): Document -ffixit.
13438	Document the aliases of -f.
13439
134402019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13441
13442	style: reduce scopes in state.c and ielr.c
13443
134442019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13445
13446	Merge branch 'maint'
13447	* maint:
13448	  maint: post-release administrivia
13449	  version 3.3.1
13450	  yacc: issue warnings, not errors, for Bison extensions
13451	  style: formatting changes in NEWS and complain.c
13452	  tests: don't depend on the user's definition of SHELL
13453
134542019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13455
13456	maint: post-release administrivia
13457	* NEWS: Add header line for next release.
13458	* .prev-version: Record previous version.
13459	* cfg.mk (old_NEWS_hash): Auto-update.
13460
134612019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13462
13463	version 3.3.1
13464	* NEWS: Record release date.
13465
134662019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13467
13468	yacc: issue warnings, not errors, for Bison extensions
13469	Reported by Kiyoshi Kanazawa.
13470	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00029.html
13471
13472	* src/getargs.c (getargs): Let --yacc imply -Wyacc, not -Werror=yacc.
13473	* tests/input.at: Adjust.
13474	* doc/bison.tex (Bison Options): Document.
13475
134762019-01-27  Akim Demaille  <akim.demaille@gmail.com>
13477
13478	style: formatting changes in NEWS and complain.c
13479
134802019-01-27  Kiyoshi Kanazawa  <yoi_no_myoujou@yahoo.co.jp>
13481
13482	tests: don't depend on the user's definition of SHELL
13483	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00031.html
13484
13485	* examples/test (SHELL): Set it to /bin/sh.
13486
134872019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13488
13489	traces: always print the reduced grammar and fix it
13490	* src/gram.c (grammar_dump): Print the effective number first instead
13491	of last.  And fix it (remove the incorrect "+1").
13492	Use t/f for Booleans.
13493	* src/reduce.c: When asked, always print the reduced grammar, even if
13494	there was nothing useless.
13495	* tests/sets.at (Reduced Grammar): Check that.
13496
134972019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13498
13499	style: rename LR0.* as lr0.*
13500	Let's stick to lower case for file names.
13501
13502	* src/LR0.h, src/LR0.c: Rename as...
13503	* src/lr0.h, src/lr0.c: these.
13504
135052019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13506
13507	style: rename print_graph.* as print-graph.*
13508	These are the only files with _.
13509
13510	* src/print_graph.h, src/print_graph.c: Rename as...
13511	* src/print-graph.h, src/print-graph.c: these.
13512
135132019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13514
13515	style: various fixes
13516	* src/gram.c: Use consistent variable names.
13517	Prefix prefix unary operators.
13518	(grammar_dump): Use rule_rhs_length instead of duplicating it.
13519	* src/reduce.c: Avoid useless variables.
13520
135212019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13522
13523	style: comment changes in gram.h
13524	* src/gram.h: Shorten comments.
13525
135262019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13527
13528	maint: post-release administrivia
13529	* NEWS: Add header line for next release.
13530	* .prev-version: Record previous version.
13531	* cfg.mk (old_NEWS_hash): Auto-update.
13532
135332019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13534
13535	version 3.3
13536	* NEWS: Record release date.
13537
135382019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13539
13540	NEWS: update
13541
135422019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13543
13544	c++: fix comment
13545	* data/skeletons/c++.m4: here.
13546
135472019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13548
13549	style: formatting changes
13550	* data/skeletons/lalr1.cc: Add dnl.
13551	* data/skeletons/bison.m4: Comment the use of dnl.
13552
135532019-01-26  Akim Demaille  <akim.demaille@gmail.com>
13554
13555	tests: run the printer/destructor test on glr.cc
13556	* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust for
13557	glr.cc, and use it.
13558
135592019-01-24  Akim Demaille  <akim.demaille@gmail.com>
13560
13561	gnulib: update
13562
135632019-01-22  Akim Demaille  <akim.demaille@gmail.com>
13564
13565	--update: when used, do not generate the output files
13566	It is inconvenient that we also generate the output files when we
13567	update the grammar file, and it's somewhat unexpected.  Let's not do
13568	that.
13569
13570	* src/main.c (main): Skip generation when --update is passed.
13571	* src/getargs.c (usage): Update the help message.
13572	* doc/bison.texi (Bison Options): Likewise.
13573	* tests/input.at: Check that we don't generate the output.
13574
135752019-01-22  Akim Demaille  <akim.demaille@gmail.com>
13576
13577	diagnostics: let redundant definitions be only warnings
13578	After all, this is clearly harmless.
13579
13580	* src/muscle-tab.c (muscle_percent_define_insert): Let equal
13581	definitions of a %define variable be only a warning.
13582	Adjust test cases.
13583
135842019-01-22  Akim Demaille  <akim.demaille@gmail.com>
13585
13586	tests: improve check for updated variable names
13587	* tests/input.at ("%define" backward compatibility): Don't define
13588	twice "api.namespace", so that we don't get an error, which stops the
13589	process too soon to see an error about the value given to
13590	'lr.keep-unreachable-state'.
13591
135922019-01-21  Akim Demaille  <akim.demaille@gmail.com>
13593
13594	diagnostics: remove redundancy
13595	Don't repeat the name of the warning in the sub messages.  E.g.,
13596	remove the second "[-Wother]" in the following message
13597
13598	    foo.y:2.1-27: warning: %define variable 'parse.error' redefined [-Wother]
13599	     %define parse.error verbose
13600	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
13601	    foo.y:1.1-27:     previous definition [-Wother]
13602	     %define parse.error verbose
13603	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
13604
13605	* src/complain.c (error_message): Don't print the warning type when
13606	it's indented.
13607	Adjust test cases.
13608
136092019-01-20  Akim Demaille  <akim.demaille@gmail.com>
13610
13611	c++: better "scope" a workaround for GCC
13612	* data/skeletons/lalr1.cc: Enable it only for GCC 4.8 and before.
13613
136142019-01-20  Akim Demaille  <akim.demaille@gmail.com>
13615
13616	c++: address -Wweak-vtables warnings
13617	Reported by Derek Clegg
13618	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00021.html
13619
13620	    aux/parser-internal.h:429:12: error: 'syntax_error' has no out-of-line virtual
13621	         method definitions; its vtable will be emitted in every translation unit
13622	         [-Werror,-Wweak-vtables]
13623	       struct syntax_error : std::runtime_error
13624
13625	To avoid this warning, we need syntax_error to have a virtual function
13626	defined in a compilation unit.  Let it be the destructor.  To comply
13627	with C++98, this dtor should be 'throw()'.  Merely making YY_NOEXCEPT
13628	be 'throw()' in C++98 triggers
13629	errors (http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00022.html),
13630	so let's introduce YY_NOTHROW and flag only ~syntax_error with it.
13631
13632	Also, since we now have an explicit dtor, we need to provide an copy
13633	ctor.
13634
13635	* configure.ac (warn_cxx): Add -Wweak-vtables.
13636	* data/skeletons/c++.m4 (YY_NOTHROW): New.
13637	(syntax_error): Declare the dtor, and define the copy ctor.
13638	* data/skeletons/glr.cc, data/skeletons/lalr1.cc (~syntax_error):
13639	Define.
13640
136412019-01-20  Akim Demaille  <akim.demaille@gmail.com>
13642
13643	style: prefer bool to char
13644	* src/state.h, src/state.c (state::consistent): Make it a bool.
13645	Adjust dependencies.
13646
136472019-01-20  Akim Demaille  <akim.demaille@gmail.com>
13648
13649	glr.cc: be more alike lalr1.cc
13650
136512019-01-20  Akim Demaille  <akim.demaille@gmail.com>
13652
13653	style: formatting changes
13654	* data/skeletons/c++.m4: Un-remove an end-of-line.
13655
136562019-01-20  Akim Demaille  <akim.demaille@gmail.com>
13657
13658	NEWS: fixes
13659
136602019-01-19  Akim Demaille  <akim.demaille@gmail.com>
13661
13662	maint: post-release administrivia
13663	* NEWS: Add header line for next release.
13664	* .prev-version: Record previous version.
13665	* cfg.mk (old_NEWS_hash): Auto-update.
13666
136672019-01-19  Akim Demaille  <akim.demaille@gmail.com>
13668
13669	version 3.2.91
13670	* NEWS: Record release date.
13671
136722019-01-18  Akim Demaille  <akim.demaille@gmail.com>
13673
13674	style: various fixes
13675	Some reported by syntax-check.
13676
13677	* po/POTFILES.in: Add fixits.cc.
13678	* src/muscle-tab.c: Don't cast for free.
13679	* src/files.c: Reduce scopes.
13680	* cfg.mk: We need the cast for free in muscle_percent_define_insert.
13681
136822019-01-18  Akim Demaille  <akim.demaille@gmail.com>
13683
13684	doc: document -ffixit and --update
13685	* doc/bison.texi (Bison Options): here.
13686
136872019-01-18  Akim Demaille  <akim.demaille@gmail.com>
13688
13689	doc: style fixes
13690	* doc/bison.texi: Use @kbd where appropriate.
13691	Update ^~~~ marks for caret-errors.
13692	* build-aux/cross-options.pl: Do not add quotes to %define's argument.
13693
136942019-01-18  Akim Demaille  <akim.demaille@gmail.com>
13695
13696	NEWS: update for fixits and --update
13697
136982019-01-17  Akim Demaille  <akim.demaille@gmail.com>
13699
13700	fixits: handle duplicates of %name-prefix
13701	The test case "Deprecated directives" (currently 56) no longer emits
13702	warnings after 'bison -u'!
13703
13704	* src/files.h, src/files.c (spec_name_prefix_loc): New.
13705	* src/parse-gram.y (handle_name_prefix): Emit fixits for duplicate
13706	%name-prefix.
13707	* tests/input.at (Deprecated directives): Adjust.
13708
137092019-01-17  Akim Demaille  <akim.demaille@gmail.com>
13710
13711	regen
13712
137132019-01-17  Akim Demaille  <akim.demaille@gmail.com>
13714
13715	fixits: handle %file-prefix
13716	* src/files.h, src/files.c (spec_file_prefix_loc): New.
13717	* src/scan-gram.l (%file-prefix): Delegate diagnostics to...
13718	* src/parse-gram.y (handle_file_prefix): here.
13719	* src/complain.c (duplicate_directive): Quote the directive.
13720	* tests/input.at: Adjust.
13721
137222019-01-17  Akim Demaille  <akim.demaille@gmail.com>
13723
13724	fixits: handle per-rule duplicates
13725	* src/complain.c (duplicate_rule_directive): Here.
13726	* tests/actions.at (Invalid uses of %empty): Check it.
13727
137282019-01-17  Akim Demaille  <akim.demaille@gmail.com>
13729
13730	fixits: fix warnings about duplicates
13731	* src/complain.c (duplicate_directive): Fix the complaint level.
13732	* tests/input.at: Adjust.
13733
137342019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13735
13736	diagnostics: properly indent the "previous declaration" message
13737	* src/complain.c (duplicate_directive, duplicate_rule_directive):
13738	Here.
13739
137402019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13741
13742	regen
13743
137442019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13745
13746	style: rename some functions for consistency
13747	"handle_" is the prefix used in scan-code.l for instance.
13748
13749	* src/parse-gram.y (do_error_verbose, do_name_prefix, do_require)
13750	(do_skeleton, do_yacc):
13751	Rename as...
13752	(handle_error_verbose, handle_name_prefix, handle_require)
13753	(handle_skeleton, handle_yacc):
13754	these.
13755
137562019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13757
13758	fixits: report duplicate %yacc directives
13759	We should use -ffixit and --update to clean files with duplicate
13760	directives.  And we should complain only once about duplicate obsolete
13761	directives: keep only the "duplicate" warning.  Let's start with %yacc.
13762
13763	For instance on:
13764
13765	    %fixed-output_files
13766	    %fixed-output-files
13767	    %yacc
13768	    %%
13769	    exp:
13770
13771	This run of bison:
13772
13773	    $ bison /tmp/foo.y -u
13774	    foo.y:1.1-19: warning: deprecated directive, use '%fixed-output-files' [-Wdeprecated]
13775	     %fixed-output_files
13776	     ^~~~~~~~~~~~~~~~~~~
13777	    foo.y:2.1-19: warning: duplicate directive [-Wother]
13778	     %fixed-output-files
13779	     ^~~~~~~~~~~~~~~~~~~
13780	    foo.y:1.1-19: previous declaration
13781	     %fixed-output_files
13782	     ^~~~~~~~~~~~~~~~~~~
13783	    foo.y:3.1-5: warning: duplicate directive [-Wother]
13784	     %yacc
13785	     ^~~~~
13786	    foo.y:1.1-19: previous declaration
13787	     %fixed-output_files
13788	     ^~~~~~~~~~~~~~~~~~~
13789	    bison: file 'foo.y' was updated (backup: 'foo.y~')
13790
13791	gives:
13792
13793	    %fixed-output-files
13794	    %%
13795	    exp:
13796
13797	* src/location.h, src/location.c (location_empty): New.
13798	* src/complain.h, src/complain.c (duplicate_directive): New.
13799
13800	* src/getargs.h, src/getargs.c (yacc_flag): Instead of a Boolean, be
13801	the location of the definition.
13802	Update dependencies.
13803
13804	* src/scan-gram.l (%yacc, %fixed-output-files): Move the handling of
13805	its warnings to...
13806	* src/parse-gram.y (do_yacc): This new function.
13807
13808	* tests/input.at (Deprecated Directives): Adjust expectations.
13809
138102019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13811
13812	style: rename duplicate_directive as duplicate_rule_directive
13813	* src/complain.h, src/complain.c: here.
13814	Adjust callers.
13815
138162019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13817
13818	fixits: suggest running --update if there are fixits
13819	* src/fixits.h, src/fixits.c (fixits_empty): New.
13820	* src/complain.c (deprecated_directive): Register the Wdeprecated
13821	fixits only if -Wdeprecated was enabled, so that we don't apply
13822	updates if the user didn't ask for them.
13823	* src/main.c (main): If there were fixits, issue a warning suggesting
13824	running with --update.
13825	Free uniqstrs after the fixits, since the latter use the former.
13826	* tests/headers.at, tests/input.at: Update expectations.
13827
138282019-01-16  Akim Demaille  <akim.demaille@gmail.com>
13829
13830	fixits: avoid generating empty lines
13831	* src/fixits.c (fixits_run): If erase the content of a line, also
13832	erase the following \n.
13833	* tests/input.at (Deprecated directives): Update expectations.
13834
138352019-01-15  Akim Demaille  <akim.demaille@gmail.com>
13836
13837	configure: don't try to run C++ warnings on C
13838	Reported by Derek Clegg.
13839	https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00066.html
13840
13841	* configure.ac: here.
13842
138432019-01-15  Akim Demaille  <akim.demaille@gmail.com>
13844
13845	c, c++: avoid implicit fall-throw
13846	Reported by Derek Clegg.
13847	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00004.html
13848
13849	* configure.ac (warn_common): Add -Wimplicit-fallthrough.
13850	This does trigger failures in the test suite.
13851	* data/skeletons/glr.c, data/skeletons/lalr1.cc,
13852	* data/skeletons/yacc.c, tests/c++.at:
13853	Make fall-throws explicit.
13854
138552019-01-15  Akim Demaille  <akim.demaille@gmail.com>
13856
13857	c++: avoid -Wundefined-func-template warnings from clang
13858	Reported by Derek Clegg.
13859	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00006.html
13860
13861	Clang does not like this:
13862
13863	    template <typename D>
13864	    struct basic_symbol : D
13865	    {
13866	      basic_symbol();
13867	    };
13868
13869	    struct by_type {};
13870
13871	    struct symbol_type : basic_symbol<by_type>
13872	    {
13873	      symbol_type(){}
13874	    };
13875
13876	It gives:
13877
13878	    $ clang++-mp-7.0 -Wundefined-func-template foo.cc -c
13879	    foo.cc:11:3: warning: instantiation of function 'basic_symbol<by_type>::basic_symbol'
13880	                 required here, but no definition is available [-Wundefined-func-template]
13881	      symbol_type(){}
13882	      ^
13883	    foo.cc:4:3: note: forward declaration of template entity is here
13884	      basic_symbol();
13885	      ^
13886	    foo.cc:11:3: note: add an explicit instantiation declaration to suppress this warning
13887	                 if 'basic_symbol<by_type>::basic_symbol' is explicitly instantiated in
13888	                 another translation unit
13889	      symbol_type(){}
13890	      ^
13891	    1 warning generated.
13892
13893	The same applies for the basic_symbol's destructor and `clear()`.
13894
13895	* configure.ac (warn_cxx): Add -Wundefined-func-template.
13896	This triggered one failure in the test suite:
13897	* tests/headers.at (Sane headers): here, where we check that we can
13898	compile the generated headers in other compilation units than the
13899	parser's.
13900	Add a variant type to make sure that basic_symbol and symbol_type are
13901	properly generated in this case.
13902	* data/skeletons/c++.m4 (basic_symbol): Inline the definitions of the
13903	destructor and of `clear` in the class definition.
13904
139052019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13906
13907	Revert the last two commits
13908	They should not have been pushed, sorry about that.
13909
13910	This reverts
13911	- commit 8575bd06ae6e65f3a30b21a3e022a968e4c7ae7a.
13912	- commit 55bf52860eac5c1394dc344a691220272df32b09.
13913
139142019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13915
13916	c++: avoid warnings about extraneous semi-colons
13917	Reported by Derek Clegg.
13918
13919	* configure.ac (warn_common): Add -Wextra-semi.
13920	* data/skeletons/c++.m4: Remove extraneous semi-colon.
13921
139222019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13923
13924	WIP
13925
139262019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13927
13928	diagnostics: add fixit support for duplicate removal
13929	* src/muscle-tab.c (muscle_percent_define_insert): Register a fixit
13930	for duplicate removal.
13931	* tests/input.at: Adjust expectations.
13932
139332019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13934
13935	regen
13936
139372019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13938
13939	diagnostics: improve the accuracy for %error-verbose
13940	Avoid duplicate warnings about %error-verbose, once for deprecation,
13941	another for duplicate.  Keep only the duplicate warning for the second
13942	occurrence of %error-verbose.
13943
13944	This will help removal fixits.
13945
13946	* src/scan-gram.l (%error-verbose): Return as a PERCENT_ERROR_VERBOSE
13947	token.
13948	* src/parse-gram.y (do_error_verbose): New.
13949	Use it.
13950	* src/muscle-tab.c (muscle_percent_variable_update): Handle pseudo
13951	variables such as %error-verbose.
13952
139532019-01-14  Akim Demaille  <akim.demaille@gmail.com>
13954
13955	diagnostics: avoid duplicate warnings for deprecated directives
13956	Currently, on
13957
13958	    %define parser_class_name "Parser"
13959	    %define parser_class_name "Parser"
13960	    %%
13961	    exp:;
13962
13963	we issue:
13964
13965	    foo.y:1.9-25: warning: deprecated directive, use '%define api.parser.class {Parser}' [-Wdeprecated]
13966	     %define parser_class_name "Parser"
13967	             ^~~~~~~~~~~~~~~~~
13968	    foo.y:2.9-25: warning: deprecated directive, use '%define api.parser.class {Parser}' [-Wdeprecated]
13969	     %define parser_class_name "Parser"
13970	             ^~~~~~~~~~~~~~~~~
13971	    foo.y:2.9-25: error: %define variable 'api.parser.class' redefined
13972	     %define parser_class_name "Parser"
13973	             ^~~~~~~~~~~~~~~~~
13974	    foo.y:1.9-25:     previous definition
13975	     %define parser_class_name "Parser"
13976	             ^~~~~~~~~~~~~~~~~
13977
13978	Let's get rid of the second warning about the deprecated variable
13979	parser_class_name.  This is noise, but it will also be a problem with
13980	fixits for removing duplicates, as we will first generate the update,
13981	and then it's too late to remove it: fixits do not edit the result of
13982	previous fixits.
13983
13984	So generate this instead:
13985
13986	    foo.y:1.1-34: warning: deprecated directive, use '%define api.parser.class {Parser}' [-Wdeprecated]
13987	     %define parser_class_name "Parser"
13988	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13989	    foo.y:2.1-34: error: %define variable 'api.parser.class' redefined
13990	     %define parser_class_name "Parser"
13991	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13992	    foo.y:1.1-34:     previous definition
13993	     %define parser_class_name "Parser"
13994	     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13995
13996	* src/muscle-tab.c (muscle_percent_variable_update): Pass the warning
13997	to the caller, instead of issuing it.
13998	(muscle_percent_define_insert): Issue this warning only if we don't
13999	have to complain about a duplicate definition.
14000	* tests/input.at: Adjust expectations.
14001
140022019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14003
14004	diagnostics: update the grammar file
14005	Let's use the fixits to actually update the grammar files.
14006
14007	* src/getargs.h, src/getargs.c (update_flag): New.
14008	* src/fixits.h, src/fixits.c (fixits_run): New.
14009	* src/main.c (main): Invoke fixits_run when --update is passed.
14010	* tests/input.at (Deprecated directives): Check --update.
14011
140122019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14013
14014	diagnostics: improve accuracy for deprecated %define variables
14015	* src/parse-gram.y: Use the location of the whole definition to record
14016	the location of a %define variable, instead of just the name of the
14017	variable.
14018	Adjust tests.
14019
140202019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14021
14022	diagnostics: keep the fixits
14023	Introduce proper support for fixits, instead of just printing them on
14024	demand.
14025
14026	* bootstrap.conf: We need gnulib's xlists.
14027	* src/fixits.h, src/fixits.c: New.
14028	* src/complain.c (deprecated_directive): Use fixits_register.
14029	* src/main.c (main): Use fixits_free.
14030
140312019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14032
14033	diagnostics: add -ffixit support for deprecated features
14034	Issue directives for IDE/editors to fix the source file.
14035	http://clang.llvm.org/docs/UsersManual.html#cmdoption-fdiagnostics-parseable-fixits
14036
14037	Do it for deprecated features.  For instance:
14038
14039	    $ cat foo.y
14040	    %error-verbose
14041
14042	    %name-prefix = "foo"
14043	    %name-prefix="bar"
14044	    %define parser_class_name "Parser"
14045
14046	    %%
14047	    exp:;
14048
14049	    $ LC_ALL=C ./_build/8d/tests/bison -ffixit /tmp/foo.yy
14050	    /tmp/foo.yy:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
14051	     %error-verbose
14052	     ^^^^^^^^^^^^^^
14053	    fix-it:"/tmp/foo.yy":{1:1-1:15}:"%define parse.error verbose"
14054	    /tmp/foo.yy:3.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
14055	     %name-prefix = "foo"
14056	     ^^^^^^^^^^^^^^^^^^^^
14057	    fix-it:"/tmp/foo.yy":{3:1-3:21}:"%define api.prefix {foo}"
14058	    /tmp/foo.yy:4.1-18: warning: deprecated directive, use '%define api.prefix {bar}' [-Wdeprecated]
14059	     %name-prefix="bar"
14060	     ^^^^^^^^^^^^^^^^^^
14061	    fix-it:"/tmp/foo.yy":{4:1-4:19}:"%define api.prefix {bar}"
14062	    /tmp/foo.yy:5.9-25: warning: deprecated directive, use '%define api.parser.class {Parser}' [-Wdeprecated]
14063	     %define parser_class_name "Parser"
14064	             ^^^^^^^^^^^^^^^^^
14065	    fix-it:"/tmp/foo.yy":{5:9-5:26}:"%define api.parser.class {Parser}"
14066	    /tmp/foo.yy:5.9-25: error: %define variable 'api.parser.class' is not used
14067	     %define parser_class_name "Parser"
14068	             ^^^^^^^^^^^^^^^^^
14069
14070	* src/getargs.h, src/getargs.c (feature_fixit_parsable): New.
14071	(feature_types, feature_args): Use it.
14072	* src/complain.c (deprecated_directive): Use it.
14073
14074	* tests/input.at: Check it.
14075
140762019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14077
14078	diagnostics: prefer ^~~~ to ^^^^ to underline code
14079	That's what both GCC and Clang do, and it is indeed much nicer to
14080	read.  From:
14081
14082	    foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
14083	     %error-verbose
14084	     ^^^^^^^^^^^^^^
14085	    foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
14086	     %name-prefix = "foo"
14087	     ^^^^^^^^^^^^^^^^^^^^
14088
14089	to:
14090
14091	    foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
14092	     %error-verbose
14093	     ^~~~~~~~~~~~~~
14094	    foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
14095	     %name-prefix = "foo"
14096	     ^~~~~~~~~~~~~~~~~~~~
14097
14098	* src/location.c (location_caret): Use ^~~~.
14099	Adjust tests expectations.
14100
141012019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14102
14103	regen
14104
141052019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14106
14107	diagnostics: improve them for %name-prefix
14108	Currently the diagnostics for %name-prefix are not precise enough.  In
14109	particular, they does not show that braces must be used instead of
14110	quotes.
14111
14112	Before:
14113
14114	    foo.y:3.1-14: warning: deprecated directive, use '%define api.prefix' [-Wdeprecated]
14115	     %name-prefix = "foo"
14116	     ^^^^^^^^^^^^^^
14117
14118	After:
14119
14120	    foo.y:3.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
14121	     %name-prefix = "foo"
14122	     ^^^^^^^^^^^^^^^^^^^^
14123
14124	To do this we need the value passed to %name-prefix, so move the
14125	warning from the scanner to the parser.
14126
14127	Accuracy will be very important for the forthcoming changes.
14128
14129	* src/parse-gram.y (do_name_prefix): New.
14130	(PERCENT_NAME_PREFIX): Have a semantic value: the raw source, with
14131	possibly underscores, equal sign, and spaces.  This is used to provide
14132	a more accurate message.  It does not take comments into account,
14133	but...
14134	* src/scan-gram.l (%name-prefix): Delegate the warnings to the parser.
14135
14136	* tests/headers.at, tests/input.at: Adjust expectations.
14137
141382019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14139
14140	diagnostics: style: avoid allocating memory when not needed
14141	* src/muscle-tab.c (muscle_percent_variable_update): Avoid allocating
14142	memory when it is not needed, which should be most of the time (when
14143	there's no update to perform).
14144	Adjust callers.
14145
141462019-01-14  Akim Demaille  <akim.demaille@gmail.com>
14147
14148	c++: avoid warnings about extraneous semi-colons
14149	Reported by Derek Clegg.
14150	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00005.html
14151
14152	* configure.ac (warn_cxx): Add -Wextra-semi.
14153	* data/skeletons/c++.m4: Remove extraneous semi-colon.
14154
141552019-01-13  Akim Demaille  <akim.demaille@gmail.com>
14156
14157	style: minor changes
14158	* src/muscle-tab.c: Sort alphabetically.
14159	* src/scan-gram.l: Reduce scopes.
14160	Initialize variables.
14161
141622019-01-13  Akim Demaille  <akim.demaille@gmail.com>
14163
14164	c++: beware of -Wshadow
14165	This line:
14166
14167	    slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
14168
14169	triggers warnings:
14170
14171	    parse.h:1790:11: note: shadowed declaration is here
14172
14173	Reported by Frank Heckenbach.
14174	http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00002.html
14175
14176	* configure.ac (warn_c): Move -Wshadow to...
14177	(warn_common): here.
14178	* data/skeletons/stack.hh (slice): Define as an inner class of stack.
14179	* data/skeletons/lalr1.cc: Adjust.
14180	Rename the variable as 'range' instead of 'slice'.
14181
141822019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14183
14184	maint: post-release administrivia
14185	* NEWS: Add header line for next release.
14186	* .prev-version: Record previous version.
14187	* cfg.mk (old_NEWS_hash): Auto-update.
14188
141892019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14190
14191	version 3.2.90
14192	* NEWS: Record release date.
14193
141942019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14195
14196	yacc: fix relocatability
14197	* src/yacc.in (prefix): Define it, as it's typically needed for
14198	exec_prefix.
14199
142002019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14201
14202	syntax-check: adjust paths
14203	* cfg.mk: here.
14204	(require_config_h): New.
14205
142062019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14207
14208	style: formatting clean up
14209	* data/skeletons/d.m4, examples/d/calc.y, src/output.c,
14210	* src/parse-gram.y:
14211	No tab, no trailing spaces.
14212	Reported by syntax-check.
14213
142142019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14215
14216	po: remove bitset/stats.c
14217	* po/POTFILES.in: here.
14218
142192019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14220
14221	tests: fix usage of AT_PARSER_CHECK
14222	The parser must be the first command.  Caught by syntax-check.
14223
14224	* tests/c++.at: here.
14225
142262019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14227
14228	gnulib: update
14229
142302019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14231
14232	NEWS: update
14233
142342019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14235
14236	style: isolate the creation of tname in a function
14237	* src/output.c (prepare_symbol_names): New.
14238	Use it.
14239
142402019-01-12  Akim Demaille  <akim.demaille@gmail.com>
14241
14242	tests: formatting changes
14243	* tests/input.at, tests/regression.at: here.
14244
142452019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14246
14247	doc: use @option consistently
14248	* doc/bison.texi: Use @option, not @code, for options.
14249
142502019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14251
14252	yacc.c: avoid negated if
14253	* data/skeletons/yacc.c: Prefer a "direct" conditional.
14254
142552019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14256
14257	package: bump copyrights to 2019
14258
142592019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14260
14261	java/d: rename some %define variables for consistency
14262	See 890ee8a1fd288b3cc1c21c49ea0ece696ef40565 and
14263	https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00024.html.
14264
14265	* data/skeletons/d.m4, data/skeletons/java.m4
14266	(abstract, annotations, extends, final, implements, public, strictfp):
14267	Rename as...
14268	(api.parser.abstract, api.parser.annotations, api.parser.extends)
14269	(api.parser.final, api.parser.implements, api.parser.public)
14270	(api.parser.strictfp):
14271	these.
14272
14273	* src/muscle-tab.c (muscle_percent_variable_update): Ensure backward
14274	compatibility.
14275
14276	* doc/bison.texi, examples/d/calc.y, examples/java/Calc.y,
14277	tests/input.at: Adjust.
14278
142792019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14280
14281	java/d: remove useless macros
14282	There are many macros that are defined and used just
14283	once (b4_public_if, b4_abstract_if, etc.).  That's overkill.  Rather,
14284	let's define a macro to build the "public class YYParser" line.
14285
14286	It appears that the same syntax with "extends", "abstract", etc. is
14287	implemented in the D parser, which looks very fishy...
14288
14289	* data/skeletons/d.m4, data/skeletons/java.m4 (b4_public_if)
14290	(b4_abstract_if, b4_final_if, b4_strictfp_if): Replace with
14291	(b4_parser_class_declaration): this.
14292	* data/skeletons/lalr1.d, data/skeletons/lalr1.java: Adjust.
14293
142942019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14295
14296	style: clean tests
14297	* tests/named-refs.at: here.
14298
142992019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14300
14301	gnulib: update
14302	In particular, report uninitialized submodules instead of breaking
14303	symlinks.
14304
14305	For reports, see
14306	https://lists.gnu.org/archive/html/bug-bison/2011-05/msg00012.html
14307	https://lists.gnu.org/archive/html/help-bison/2018-12/msg00034.html
14308
14309	For a fix, see
14310	https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00024.html
14311
143122019-01-05  Akim Demaille  <akim.demaille@gmail.com>
14313
14314	glr.cc: fix the handling of syntax_error from the scanner
14315	Commit 90a8537e6287f92fb3d5be0258a69247a742f12e was right, but issued
14316	two error messages.  Commit 80ef7e7639f99618bee490b2dea02b5fd9ab28e5
14317	tried to address that by mapping yychar and yytoken to empty, but that
14318	completely breaks the invariants of glr.c.  In particular, yygetToken
14319	can be called repeatedly and is expected to return the latest result,
14320	unless yytoken is YYEMPTY.  Since the previous attempt was "recording"
14321	that the token was coming from an exception by setting it to YYEMPTY,
14322	instead of getting again the faulty token, we fetched another one.
14323
14324	Rather, revert to the first approach: map yytoken to "invalid token",
14325	but record in yychar the fact that we come from an exception thrown in
14326	the scanner.
14327
14328	* data/skeletons/glr.c (YYFAULTYTOK): New.
14329	(yygetToken): Use it to record syntax errors from the scanner.
14330	* tests/c++.at (Syntax error as exception): In addition to checking
14331	syntax_error with error recovery, make sure it also behaves as
14332	expected without.
14333
143342019-01-03  Akim Demaille  <akim.demaille@gmail.com>
14335
14336	clearly deprecate %name-prefix
14337	* src/scan-gram.l (%name-prefix): Issue a deprecation warning.
14338
14339	* tests/calc.at, tests/headers.at, tests/input.at, tests/java.at,
14340	* tests/javapush.at, tests/local.at: Adjust expectations.
14341	Or disable -Wdeprecated.
14342
14343	* doc/bison.texi: Document that %name-prefix is replaced by %define
14344	api.prefix.
14345
143462019-01-03  Akim Demaille  <akim.demaille@gmail.com>
14347
14348	examples: clean up the Java/D examples
14349	* examples/java/Calc.y: Fix indentation.
14350	Sort.
14351	Don't use %name-prefix, since api.parser.class is already defined.
14352	* examples/d/calc.y: Likewise.
14353
143542019-01-03  Akim Demaille  <akim.demaille@gmail.com>
14355
14356	doc: formatting changes
14357	* doc/bison.texi: here.
14358
143592019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14360
14361	rename parser_class_name as api.parser.class
14362	The previous name was historical and inconsistent.
14363
14364	* src/muscle-tab.c (define_directive): Use the proper value passing
14365	syntax, based on the muscle kind.
14366	(muscle_percent_variable_update): Use the right value passing syntax.
14367	Migrate from parser_class_name to api.parser.class.
14368
14369	* data/skeletons: Migrate from parser_class_name to api.parser.class.
14370
14371	* doc/bison.texi (%define Summary): Document both parser_class_name
14372	and api.parser.class.
14373	Promote the latter over the former.
14374
143752019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14376
14377	style: formatting changes
14378	* src/scan-gram.l: Here.
14379
143802019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14381
14382	style: glr.c: prefer returning a value rather than passing pointers
14383	This is very debatable.  This function is not pure at all, so it could
14384	stick to returning void: that's a common coding style to tell the
14385	difference between "real" (pure) functions and side-effecting
14386	subroutines.  However, we already have this style elsewhere (e.g.,
14387	yylex), and I feel the callers are somewhat nice to read this way.
14388
14389	* data/skeletons/glr.c (yygetLRActions): Return the action rather than
14390	passing by pointer.
14391	While at it, fix type of yytoken.
14392	Adjust callers.
14393
143942019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14395
14396	glr.cc: don't issue two error messages when syntax_error is thrown
14397	Reported by Askar Safin.
14398	https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00000.html
14399
14400	* data/skeletons/glr.c (yygetToken): Return YYEMPTY when an exception
14401	is thrown.
14402	* data/skeletons/lalr1.cc: Log when an exception is caught.
14403	* tests/c++.at (Syntax error as exception): Be sure to recover from
14404	error before triggering another error.
14405
144062019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14407
14408	skeletons: shorten b4_parser_class_name to b4_parser_class
14409	* skeletons/c++.m4, skeletons/d.m4, skeletons/glr.c, skeletons/glr.cc,
14410	* skeletons/java.m4, skeletons/lalr1.cc, skeletons/lalr1.d,
14411	* skeletons/lalr1.java: Here.
14412
144132019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14414
14415	glr.cc: remove duplicate definition of YYLLOC_DEFAULT
14416	It's already provided by glr.c.
14417
14418	* data/skeletons/glr.cc (b4_post_prologue): Here.
14419
144202019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14421
14422	style: sort includes in scanners
14423	* src/scan-code.l, src/scan-gram.l, src/scan-skel.l: Reorder includes.
14424
144252019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14426
14427	style: formatting changes in the doc
14428	* doc/bison.texi: here.
14429
144302019-01-02  Akim Demaille  <akim.demaille@gmail.com>
14431
14432	style: remove stray empty lines
14433	* data/skeletons/glr.c, data/skeletons/glr.cc: here.
14434	* data/skeletons/bison.m4 (b4_glr_cc_if): Move it here.
14435
144362018-12-31  Akim Demaille  <akim.demaille@gmail.com>
14437
14438	glr.cc: support syntax_error exceptions
14439	Kindly requested by Аскар Сафин (Askar Safin).
14440	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00033.html
14441
14442	* data/skeletons/glr.c (b4_glr_cc_if): New.
14443	Use it.
14444	(yygetToken): Catch syntax_errors.
14445	* data/skeletons/glr.cc (YY_EXCEPTIONS): New.
14446	* tests/c++.at: Check it.
14447
144482018-12-31  Akim Demaille  <akim.demaille@gmail.com>
14449
14450	glr.c: factor the calls to yylex
14451	The call protocol of yylex is quite complex, and repeated three
14452	times.  Let's factor it.
14453
14454	* data/skeletons/glr.c (yygetToken): New.
14455	Use it.
14456
144572018-12-31  Akim Demaille  <akim.demaille@gmail.com>
14458
14459	style: reduce scopes in glr.c
14460	* data/skeletons/glr.c (yyrecoverSyntaxError): here.
14461
144622018-12-30  Akim Demaille  <akim.demaille@gmail.com>
14463
14464	tests: refactor
14465
144662018-12-30  Akim Demaille  <akim.demaille@gmail.com>
14467
14468	c++: inline the implementation of syntax_error in its definition
14469	This way, it is easier to make sure its implementation is available in
14470	glr.cc too, which is not the case currently.
14471
14472	* data/skeletons/c++.m4 (b4_public_types_define): Move the
14473	implementation of syntax_error...
14474	(b4_public_types_declare): here.
14475
144762018-12-29  Akim Demaille  <akim.demaille@gmail.com>
14477
14478	style: formatting changes
14479	* tests/input.at: here.
14480
144812018-12-29  Akim Demaille  <akim.demaille@gmail.com>
14482
14483	symbol: don't crash on symbol without content
14484	When running with --trace=parse, we may crash.
14485
14486	* src/symtab.c (symbol_print): Avoid that.
14487
144882018-12-28  Akim Demaille  <akim.demaille@gmail.com>
14489
14490	README-hacking: update
14491
144922018-12-28  Akim Demaille  <akim.demaille@gmail.com>
14493
14494	reader: get rid of a useless function
14495	Useless since 58d7a1a1c7497ba51a35fcf991c5b047f692fe18 (2006).
14496
14497	* src/parse-gram.y, src/reader.h (token_name): Remove, unused.
14498
144992018-12-27  Akim Demaille  <akim.demaille@gmail.com>
14500
14501	parsers: fix minor stylistic issues
14502	* data/skeletons/variant.hh (b4_token_constructor_declare): Remove,
14503	unused since the previous commit.
14504	Fix indentation issues.
14505	* data/skeletons/c++.m4: Fix indentation issues.
14506
145072018-12-27  Akim Demaille  <akim.demaille@gmail.com>
14508
14509	c++: check several parsers in the same program
14510	* tests/local.at (AT_LOCATION_TYPE_IF): Turn into...
14511	(AT_LOCATION_TYPE_SPAN_IF): this.
14512	Adjust dependencies.
14513	* tests/headers.at (Several parsers): Add another C++ parser,
14514	which uses the first C++ parser's locations.
14515
145162018-12-26  Akim Demaille  <akim.demaille@gmail.com>
14517
14518	c++: variants: fuse declarations and definitions
14519	We used to create a short definition of yy::parser with all the
14520	implementations of its member functions outside.  But yy::parser is no
14521	longer short and simple to read.  Maintaining each function twice is
14522	painful: a lot of redundancy but different indentation levels, output
14523	which depends on whether we are in a header or not (see
14524	d132c2d5455135f63a7497c38358eadd6e3a6af8), etc.
14525
14526	Let's simplify this and put the implementations into the class
14527	definition itself.
14528
14529	Discussed in this monologue:
14530	https://lists.gnu.org/archive/html/bison-patches/2018-12/msg00058.html.
14531
14532	* data/skeletons/c++.m4, data/skeletons/lalr1.cc,
14533	* data/skeletons/variant.hh (b4_basic_symbol_constructor_define)
14534	(_b4_token_constructor_declare, b4_token_constructor_declare)
14535	Merge into...
14536	(b4_basic_symbol_constructor_define, _b4_token_constructor_define)
14537	(b4_token_constructor_define): these.
14538
145392018-12-26  Akim Demaille  <akim.demaille@gmail.com>
14540
14541	examples: fix dependencies
14542	Commit 112ccb5ed73ba5c64b0b5300d8b9b686f02f094c moved the skeletons
14543	from dist_pkgdata_DATA to dist_skeletons_DATA, hence broke the dependencies.
14544
14545	* Makefile.am (dependencies): New.
14546	Use it where appropriate.
14547
145482018-12-26  Akim Demaille  <akim.demaille@gmail.com>
14549
14550	c++: move stack<T> inside yy::parser
14551	We used to define such auxiliary structures outside the class, mainly
14552	as a matter of style to keep the definition of yy::parser short and
14553	simple.  However, now there's a lot more code generated inside the
14554	class definition (e.g., all the token constructors), so the
14555	readability no longer applies.
14556
14557	However, if we move stack (and slice) inside yy::parser, then it
14558	should no longer be needed to change the namespace to have multiple
14559	parsers: changing the class name should suffice.
14560
14561	One common argument against inner classes is that they code bloat.  It
14562	hardly applies here, since typically different parsers will have
14563	different semantic value types, hence different actual stack types.
14564
14565	* data/skeletons/lalr1.cc: Invoke b4_stack_define inside yy::parser.
14566
145672018-12-25  Akim Demaille  <akim.demaille@gmail.com>
14568
14569	package: make bison a relocatable package
14570	Suggested by David Barto
14571	https://lists.gnu.org/archive/html/help-bison/2015-02/msg00004.html
14572	and Victor Zverovich.
14573	https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00121.html
14574
14575	This is very easy to do, thanks to work by Bruno Haible in gnulib.
14576	See "Supporting Relocation" in gnulib's documentation.
14577
14578	* bootstrap.conf: We need relocatable-prog and relocatable-script (for yacc).
14579
14580	* src/yacc.in: New.
14581	* configure.ac, src/local.mk: Instantiate it.
14582	* src/main.c, src/output.c (main, pkgdatadir): Use relocatable2.
14583
14584	* doc/bison.texi (FAQ): Document it.
14585
145862018-12-25  Akim Demaille  <akim.demaille@gmail.com>
14587
14588	README: wrap paragraphs
14589
145902018-12-25  Akim Demaille  <akim.demaille@gmail.com>
14591
14592	gnulib: update
14593
145942018-12-25  Akim Demaille  <akim.demaille@gmail.com>
14595
14596	package: move skeletons into data/skeletons
14597	* data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-like.m4,
14598	* data/c-skel.m4, data/c.m4, data/d-skel.m4, data/d.m4, data/glr.c,
14599	* data/glr.cc, data/java-skel.m4, data/java.m4, data/lalr1.cc,
14600	* data/lalr1.d, data/lalr1.java, data/location.cc, data/stack.hh,
14601	* data/variant.hh, data/yacc.c:
14602	Move to...
14603	* data/skeletons: here.
14604	Use b4_skeletonsdir instead of b4_pkgdatadir.
14605
14606	* data/local.mk, src/output.c: Adjust.
14607
146082018-12-24  Akim Demaille  <akim.demaille@gmail.com>
14609
14610	c++: style: use consistently this/that instead of this/other
14611	* data/lalr1.cc, data/variant.hh: here.
14612
146132018-12-24  Akim Demaille  <akim.demaille@gmail.com>
14614
14615	c++: also provide a copy constructor for symbol_type
14616	Suggested by Wolfgang Thaller.
14617	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00081.html
14618
14619	* data/c++.m4 (basic_symbol, by_type): Instead of provide either move
14620	or copy constructor, always provide the copy one.
14621	* tests/c++.at (C++ Variant-based Symbols Unit Tests): Check it.
14622
146232018-12-24  Akim Demaille  <akim.demaille@gmail.com>
14624
14625	c++: fix double free when a symbol_type was moved
14626	Currently the following piece of code crashes (with parse.assert),
14627	because we don't record that s was moved-from, and we invoke its dtor.
14628
14629	    {
14630	      auto s = parser::make_INT (42);
14631	      auto s2 = std::move (s);
14632	    }
14633
14634	Reported by Wolfgang Thaller.
14635	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00077.html
14636
14637	* data/c++.m4 (by_type): Provide a move-ctor.
14638	(basic_symbol): Be sure not to read a moved-from value.
14639	* tests/c++.at (C++ Variant-based Symbols Unit Tests): Check this case.
14640
146412018-12-24  Akim Demaille  <akim.demaille@gmail.com>
14642
14643	c++: style: improve tests
14644	* tests/c++.at (C++ Variant-based Symbols Unit Tests): Provide better
14645	assertions.
14646	Use them.
14647	Avoid useless Bison invocations.
14648
146492018-12-24  Akim Demaille  <akim.demaille@gmail.com>
14650
14651	c++: style: use consistently this/that instead of this/other
14652	* data/c++.m4: here.
14653
146542018-12-23  Akim Demaille  <akim.demaille@gmail.com>
14655
14656	tests: fixes
14657	* tests/c++.at: Use AT_YYLEX_PROTOTYPE etc.
14658	Which requires that we use the same argument names (lvalp, etc.).
14659	* tests/local.at (AT_NAME_PREFIX): Fix regex.
14660
146612018-12-22  Akim Demaille  <akim.demaille@gmail.com>
14662
14663	c++: style: rename a few macros for clarity
14664	* data/c++.m4, data/lalr1.cc, data/variant.hh:
14665	s/b4_symbol_constructor/b4_token_constructor/g, as this is really what
14666	is being defined.
14667
146682018-12-22  Akim Demaille  <akim.demaille@gmail.com>
14669
14670	c++: exhibit a safe symbol_type
14671	Instead of introducing make_symbol (whose name, btw, somewhat
14672	infringes on the user's "name space", if she defines a token named
14673	"symbol"), let's make the construction of symbol_type safer, using
14674	assertions.
14675
14676	For instance with:
14677
14678	    %token ':' <std::string> ID <int> INT;
14679
14680	generate:
14681
14682	    symbol_type (int token, const std::string&);
14683	    symbol_type (int token, const int&);
14684	    symbol_type (int token);
14685
14686	It does mean that now named token constructors (make_ID, make_INT,
14687	etc.) go through a useless assert, but I think we can ignore this: I
14688	assume any decent compiler will inline the symbol_type ctor inside the
14689	make_TOKEN functions, which will show that the assert is trivially
14690	verified, hence I expect no code will be emitted for it.  And anyway,
14691	that's an assert, NDEBUG controls it.
14692
14693	* data/c++.m4 (symbol_type): Turn into a subclass of
14694	basic_symbol<by_type>.
14695	Declare symbol constructors when variants are enabled.
14696	* data/variant.hh (_b4_type_constructor_declare)
14697	(_b4_type_constructor_define): Replace with...
14698	(_b4_symbol_constructor_declare, _b4_symbol_constructor_def): these.
14699	Generate symbol_type constructors.
14700	* doc/bison.texi (Complete Symbols): Document.
14701	* tests/types.at: Check.
14702
147032018-12-22  Akim Demaille  <akim.demaille@gmail.com>
14704
14705	c++: provide symbol constructors per type
14706	On
14707
14708	    %token <int> FOO BAR
14709
14710	we currently generate make_FOO(int) and make_BAR(int).  However, in
14711	order to factor their scanners, some users would also like to have
14712	make_symbol(tok, int), where tok is FOO or BAR.  To ensure type
14713	safety, add assertions that do check that value type and token type
14714	match.  Bind this assertion to the parse.assert %define variable.
14715
14716	Suggested by Frank Heckenbach.
14717	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00034.html
14718	Should also match expectations from Аскар Сафин.
14719	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00023.html
14720
14721	* data/variant.hh: Use b4_token_visible_if where applicable.
14722	(_b4_type_constructor_declare, _b4_type_constructor_define): New.
14723	Use them.
14724
147252018-12-22  Akim Demaille  <akim.demaille@gmail.com>
14726
14727	c++: style changes
14728	* data/c++.m4, data/variant.hh: Improve layout of the generated code.
14729	Avoid casts.
14730	(_b4_symbol_constructor_declare, _b4_symbol_constructor_define): Rename
14731	as...
14732	(_b4_token_maker_declare, _b4_token_maker_define): these.
14733	* tests/types.at: Improve pair printing.
14734
147352018-12-22  Akim Demaille  <akim.demaille@gmail.com>
14736
14737	style: simplify tests
14738	* tests/types.at: Simplify C++ instantiations.
14739
147402018-12-19  Akim Demaille  <akim.demaille@gmail.com>
14741
14742	style: use b4_token_visible_if
14743	And other formatting/comment changes.
14744
14745	* data/variant.hh: Here.
14746
147472018-12-19  Akim Demaille  <akim.demaille@gmail.com>
14748
14749	NEWS: update
14750
147512018-12-19  Akim Demaille  <akim.demaille@gmail.com>
14752
14753	c++: fix token constructors for types with commas
14754	Bitten by macros, again.
14755	See 680b715518795c8648360fcf05f3772c04d2eed2.
14756
14757	* data/variant.hh (_b4_symbol_constructor_declare)
14758	(_b4_symbol_constructor_define): Do not use user types, which can
14759	include commas as in `std::pair<int, int>`, to macros.
14760
14761	* tests/local.at: Adjust the lex related macros to support the
14762	case of token constructors.
14763	* tests/types.at: Also check token constructors on types with commas.
14764
147652018-12-19  Akim Demaille  <akim.demaille@gmail.com>
14766
14767	gnulib: update
14768
147692018-12-17  Akim Demaille  <akim.demaille@gmail.com>
14770
14771	symbols: document the overhaul of symbol declarations
14772	* doc/bison.texi (Symbol Decls): New.
14773
147742018-12-16  Akim Demaille  <akim.demaille@gmail.com>
14775
14776	symbols: check more invalid declarations
14777	* tests/input.at (Invalid %nterm uses): Rename as...
14778	(Invalid symbol declarations): this.
14779	Extend.
14780
147812018-12-16  Akim Demaille  <akim.demaille@gmail.com>
14782
14783	symbols: check the previous commit
14784	* tests/input.at (Symbol declarations): New.
14785
147862018-12-16  Akim Demaille  <akim.demaille@gmail.com>
14787
14788	regen
14789
147902018-12-16  Akim Demaille  <akim.demaille@gmail.com>
14791
14792	symbols: clean up their parsing
14793	Prompted by Rici Lake.
14794	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html
14795
14796	We have four classes of directives that declare symbols: %nterm,
14797	%type, %token, and the family of %left etc.  Currently not all of them
14798	support the possibility to have several type tags (`<type>`), and not
14799	all of them support the fact of not having any type tag at all
14800	(%type).  Let's unify this.
14801
14802	- %type
14803	  POSIX Yacc specifies that %type is for nonterminals only.  However,
14804	  some Bison users want to use it for both tokens and nterms
14805	  (actually, Bison's own grammar does this in several places, e.g.,
14806	  CHAR).  So it should accept char/string literals.
14807
14808	  As a consequence cannot be used to declare tokens with their alias:
14809	  `%type foo "foo"` would be ambiguous (are we defining foo = "foo",
14810	  or are these two different symbols?)
14811
14812	  POSIX specifies that it is OK to use %type without a type tag.  I'm
14813	  not sure what it means, but we support it.
14814
14815	- %token
14816	  Accept token declarations with number and string literal:
14817	  (ID|CHAR) NUM? STRING?.
14818
14819	- %left, etc.
14820	  They cannot be the same as %token, because we accept to declare the
14821	  symbol with %token, and to then qualify its precedence with %left.
14822	  Then `%left foo "foo"` would also be ambiguous: foo="foo", or two
14823	  symbols.
14824
14825	  They cannot be simply a list of identifiers, but POSIX Yacc says we
14826	  can declare token numbers here.  I personally think this is a bad
14827	  idea, precedence management is tricky in itself and should not be
14828	  cluttered with token declaration issues.
14829
14830	  We used to accept declaring a token number on a string literal here
14831	  (e.g., `%left "token" 1`).  This is abnormal.  Either the feature is
14832	  useful, and then it should be supported in %token, or it's useless
14833	  and we should not support it in corner cases.
14834
14835	- %nterm
14836	  Obviously cannot accept tokens, nor char/string literals.  Does not
14837	  exist in POSIX Yacc, but since %type also works for terminals, it is
14838	  a nice option to have.
14839
14840	* src/parse-gram.y: Avoid relying on side effects.  For instance, get
14841	rid of current_type, rather, build the list of symbols and iterate
14842	over it to assign the type.
14843	It's not always possible/convenient.  For instance, we still use
14844	current_class.
14845	Prefer "decl" to "def", since in the rest of the implementation we
14846	actually "declare" symbols, we don't "define" them.
14847	(token_decls, token_decls_for_prec, symbol_decls, nterm_decls): New.
14848	Use them for %token, %left, %type and %nterm.
14849	* src/symlist.h, src/symlist.c (symbol_list_type_set): New.
14850	* tests/regression.at b/tests/regression.at
14851	(Token number in precedence declaration): We no longer accept
14852	to give a number to string literals.
14853
148542018-12-15  Akim Demaille  <akim.demaille@gmail.com>
14855
14856	symbols: set tag_seen when assigning a type to symbols
14857	* src/reader.h, src/reader.c (tag_seen): Move to...
14858	* src/symtab.h, src/symtab.c: here.
14859	(symbol_type_set): Set it to true.
14860	* src/parse-gram.y: Don't.
14861
148622018-12-14  Akim Demaille  <akim.demaille@gmail.com>
14863
14864	tests: isolate test about Yacc warnings
14865	* tests/input.at (Yacc warnings): New.
14866	(AT_CHECK_UNUSED_VALUES): Remove checks about yacc.
14867
148682018-12-14  Akim Demaille  <akim.demaille@gmail.com>
14869
14870	parser: warn about string literals in Yacc mode
14871	* src/scan-gram.l (scan_integer): Warn.
14872	* tests/input.at (Yacc warnings on symbols): Check.
14873
148742018-12-14  Akim Demaille  <akim.demaille@gmail.com>
14875
14876	parser: warn about hexadecimal token numbers in Yacc mode
14877	* src/scan-gram.l (scan_integer): Warn.
14878	* tests/input.at (Yacc warnings on symbols): Check.
14879
148802018-12-14  Akim Demaille  <akim.demaille@gmail.com>
14881
14882	parser: reprecate %nterm back
14883	After having spent quite some time on cleaning the handling of symbol
14884	declarations in the grammar files, I believe we should keep it.
14885
14886	It looks like it's a duplicate of %type, but it is not.  While POSIX
14887	Yacc requires %type to apply only to nonterminal symbols, it appears
14888	that both byacc and bison accept it for tokens too.  And some
14889	experienced users do actually expect this feature to group
14890	symbols (terminal or not) by type ("On the other hand, it is generally
14891	more useful IMHO to group terminals and non-terminals with the same
14892	type tag together",
14893	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html).
14894	Even Bison's own parser does this today (see CHAR).
14895
14896	Basically reverts 7928c3e6fbdf47ff81184966cee937e6aa694b94.
14897
14898	* src/scan-gram.l (%nterm): Dedeprecate, but issue a Wyacc warning.
14899	* tests/input.at: Adjust expectations.
14900	(Yacc warnings  on symbols): New.
14901	* src/symtab.c (symbol_class_set): Fix error introduced in
14902	20b07467938cf880a1d30eb30d6e191843a21fec.
14903
149042018-12-11  Eduard Staniloiu  <edi33416@gmail.com>
14905
14906	CI: add dmd support
14907	* .travis.yml: here.
14908
149092018-12-11  Akim Demaille  <akim.demaille@gmail.com>
14910
14911	style: s/non-terminal/nonterminal/
14912	I personally prefer 'non terminal', or 'non-terminal', but
14913	'nonterminal' is the common spelling.
14914
14915	* data/glr.c, src/parse-gram.y, src/symtab.c, src/symtab.h,
14916	* tests/input.at, doc/refcard.tex: here.
14917
149182018-12-11  Akim Demaille  <akim.demaille@gmail.com>
14919
14920	style: rename error functions for clarity
14921	* src/symtab.c (symbol_redeclaration, semantic_type_redeclaration)
14922	(user_token_number_redeclaration):
14923	Rename as...
14924	(complain_symbol_redeclared, complain_semantic_type_redeclared)
14925	(complain_user_token_number_redeclared):
14926	this.
14927
149282018-12-11  Akim Demaille  <akim.demaille@gmail.com>
14929
14930	parser: improve the error message for symbol class redefinition
14931	Currently our error messages include both "symbol redeclared" and
14932	"symbol redefined", and they mean something different.  This is
14933	obscure, let's make this clearer.
14934
14935	I think the idea between 'definition' vs. 'declaration' is that in the
14936	case of the nonterminals, the actual definition is its set of rules,
14937	so %nterm would be about declaration.  The case of %token is less
14938	clear.
14939
14940	* src/symtab.c (complain_class_redefined): New.
14941	(symbol_class_set): Use it.
14942	Simplify the logic of this function to clearly skip its body when the
14943	preconditions are not met.
14944	* tests/input.at (Symbol class redefinition): New.
14945
149462018-12-11  Akim Demaille  <akim.demaille@gmail.com>
14947
14948	examples: simplify computation of yydebug
14949	* examples/c/lexcalc/parse.y: here.
14950
149512018-12-10  Akim Demaille  <akim.demaille@gmail.com>
14952
14953	C++: support variadic emplace
14954	Suggested by Askar Safin.
14955	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00006.html
14956
14957	* data/variant.hh: Implement.
14958	* tests/types.at: Check.
14959	* doc/bison.texi: Document.
14960
149612018-12-09  Akim Demaille  <akim.demaille@gmail.com>
14962
14963	examples: add a simple Flex+Bison example in C
14964	Suggested by Askar Safin.
14965	http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00003.html
14966
14967	* examples/c/lexcalc/Makefile, examples/c/lexcalc/README.md,
14968	* examples/c/lexcalc/lexcalc.test, examples/c/lexcalc/local.mk,
14969	* examples/c/lexcalc/parse.y, examples/c/lexcalc/scan.l:
14970	New.
14971
149722018-12-09  Akim Demaille  <akim.demaille@gmail.com>
14973
14974	regen
14975
149762018-12-09  Akim Demaille  <akim.demaille@gmail.com>
14977
14978	examples: sort them per language and complete them
14979	Convert some of the READMEs to Markdown, which is now more common, and
14980	nicely displayed in some git hosting services.
14981
14982	Add missing READMEs and Makefiles.  Generate XML, HTML and Dot files.  Be
14983	sure to ship the test files.  Complete CLEANFILES to remove all generated
14984	files.
14985
14986	* examples/calc++: Move into...
14987	* examples/c++: here.
14988	* examples/mfcalc, examples/rpcalc: Move into...
14989	* examples/c: here.
14990
14991	* examples/README.md, examples/c++/calc++/Makefile, examples/c/local.mk,
14992	* examples/c/mfcalc/Makefile, examples/c/rpcalc/Makefile,
14993	* examples/d/README.md, examples/java/README.md:
14994	New files.
14995
14996	* examples/test (medir): Be robust to deeper directory nesting.
14997
149982018-12-09  Akim Demaille  <akim.demaille@gmail.com>
14999
15000	regen
15001
150022018-12-09  Akim Demaille  <akim.demaille@gmail.com>
15003
15004	parser: minor refactoring
15005	* src/parse-gram.y (symbol.prec): Reuse int.opt.
15006
150072018-12-09  Akim Demaille  <akim.demaille@gmail.com>
15008
15009	parser: move checks inside the called functions
15010	Revamping the handling of the symbols is the grammar is much more
15011	delicate than I anticipated.  Let's first move things around for
15012	clarity.
15013
15014	* src/symtab.c (symbol_make_alias): Don't accept to alias
15015	non-terminals.
15016	(symbol_user_token_number_set): Don't accept user token numbers
15017	for non-terminals.
15018	Don't do anything in case of redefinition, instead of trying to
15019	update.  The flow is eaier to follow this way.
15020
150212018-12-08  Akim Demaille  <akim.demaille@gmail.com>
15022
15023	d: fix double definition of YYSemanticType
15024	* data/lalr1.d: When moving to b4_user_union_members, it also defines
15025	b4_tag_seen_flag, so we had two definitions.
15026
150272018-12-08  Akim Demaille  <akim.demaille@gmail.com>
15028
15029	gnulib: update
15030
150312018-12-06  Akim Demaille  <akim.demaille@gmail.com>
15032
15033	parser: fix incorrect condition to raise a syntax error
15034	* src/parse-gram.y (symbol_def): Fix test.
15035
150362018-12-06  Akim Demaille  <akim.demaille@gmail.com>
15037
15038	d: fix use of b4_union_members
15039	* data/lalr1.d: Use b4_user_union_members instead.
15040
150412018-12-06  Akim Demaille  <akim.demaille@gmail.com>
15042
15043	style: comment changes
15044	* data/variant.hh: here.
15045
150462018-12-06  Akim Demaille  <akim.demaille@gmail.com>
15047
15048	java, d: add a Makefile for the example
15049	* examples/java/Makefile, examples/d/Makefile: New.
15050
150512018-12-05  Akim Demaille  <akim.demaille@gmail.com>
15052
15053	style: scope reduction in ielr.c
15054	* src/ielr.c: here.
15055
150562018-12-05  Akim Demaille  <akim.demaille@gmail.com>
15057
15058	style: scope reduction in lalr.c
15059	* src/lalr.c: here.
15060
150612018-12-05  Akim Demaille  <akim.demaille@gmail.com>
15062
15063	d, java: compute static subtractions
15064	* data/d.m4, data/java.m4: Use b4_subtract where appropriate.
15065
150662018-12-04  Akim Demaille  <akim.demaille@gmail.com>
15067
15068	d: add an example
15069	* examples/d/calc.test, examples/d/calc.y, examples/d/local.mk:
15070
150712018-12-04  Akim Demaille  <akim.demaille@gmail.com>
15072
15073	d: update the skeleton
15074	* data/d.m4, data/lalr1.d: Catch up with Bison.
15075	And actually, also catch up with D.
15076
150772018-12-04  Akim Demaille  <akim.demaille@gmail.com>
15078
15079	d: add experimental support for the D language
15080	* configure.ac (ENABLE_D): New.
15081	* src/getargs.c (valid_languages): Add d.
15082
150832018-12-04  Akim Demaille  <akim.demaille@gmail.com>
15084
15085	d: add skeleton for the D language
15086	Contributed by Oliver Mangold.
15087	https://lists.gnu.org/archive/html/help-bison/2012-01/msg00000.html
15088
15089	* README-D.txt, d-skel.m4, d.m4, lalr1.d: New.
15090
150912018-12-04  Akim Demaille  <akim.demaille@gmail.com>
15092
15093	examples: regenerate them when version.texi changes
15094	When we extract the examples from the documentation, %require
15095	"@value{VERSION}" is replaced with the current version.  If we change
15096	the git branch, without changing the documentation, the generated
15097	examples will %require a version of Bison that differs from the actual
15098	version.
15099
15100	* examples/local.mk (extracted.stamp): Depend on doc/version.texi.
15101
151022018-12-04  Akim Demaille  <akim.demaille@gmail.com>
15103
15104	skeletons: start some technical documentation
15105	* data/README: Convert to Markdown.
15106	Start documenting some of the macros used in all our skeletons.
15107	Simplify and fix the documentation of the macros in the skeletons.
15108
151092018-12-03  Akim Demaille  <akim.demaille@gmail.com>
15110
15111	regen
15112
151132018-12-03  Akim Demaille  <akim.demaille@gmail.com>
15114
15115	backend: revamp the handling of symbol types
15116	Currently it is the front end that passes the symbol types to the
15117	backend.  For instance:
15118
15119	  %token <ival> NUM
15120	  %type <ival> exp1 exp2
15121	  exp1: NUM { $$ = $1; }
15122	  exp2: NUM { $<ival>$ = $<ival>1; }
15123
15124	In both cases, $$ and $1 are passed to the backend as having type
15125	'ival' resulting in code like `val.ival`.  This is troublesome in the
15126	case of api.value.type=union, since in that the case the code this:
15127
15128	  %define api.value.type union
15129	  %token <int> NUM
15130	  %type <int> exp1 exp2
15131	  exp1: NUM { $$ = $1; }
15132	  exp2: NUM { $<int>$ = $<int>1; }
15133
15134	because in this case, since the backend does not know the symbol being
15135	processed, it is forced to generate casts in both cases: *(int*)(&val)`.
15136	This is unfortunate in the first case (exp1) where there is no reason
15137	at all to use a cast instead of `val.NUM` and `val.exp1`.
15138
15139	So instead delegate the computation of the actual value type to the
15140	backend: pass $<ival>$ as `symbol-number, ival` and $$ as
15141	`symbol-number, MULL`, instead of passing `ival` before.
15142
15143	* src/scan-code.l (handle_action_dollar): Find the symbol the action
15144	is about, not just its tyye.  Pass both symbol-number, and explicit
15145	type tag ($<tag>n when there is one) to b4_lhs_value and b4_rhs_value.
15146
15147	* data/bison.m4 (b4_symbol_action): adjust to the new signature to
15148	b4_dollar_pushdef.
15149
15150	* data/c-like.m4 (_b4_dollar_dollar, b4_dollar_pushdef): Accept the
15151	symbol-number as new argument.
15152
15153	* data/c.m4 (b4_symbol_value): Accept the symbol-number as new
15154	argument, and use it.
15155	(b4_symbol_value_union): Accept the symbol-number as new
15156	argument, and use it to prefer ready a union member rather than
15157	casting the union.
15158	* data/yacc.c (b4_lhs_value, b4_rhs_value): Accept the new
15159	symbol-number argument.
15160	Adjust uses of b4_dollar_pushdef.
15161	* data/glr.c (b4_lhs_value, b4_rhs_value): Adjust.
15162
15163	* data/lalr1.cc (b4_symbol_value_template, b4_lhs_value): Adjust
15164	to the new symbol-number argument.
15165	* data/variant.hh (b4_symbol_value, b4_symbol_value_template): Accept
15166	the new symbol-number argument.
15167
15168	* data/java.m4 (b4_symbol_value, b4_rhs_data): New.
15169	(b4_rhs_value): Use them.
15170	* data/lalr1.java: Adjust to b4_dollar_pushdef, and use b4_rhs_data.
15171
151722018-12-03  Akim Demaille  <akim.demaille@gmail.com>
15173
15174	style: comment and formatting changes
15175	* data/bison.m4, data/c++.m4, data/glr.c, data/java.m4, data/lalr1.cc,
15176	* data/yacc.c, src/scan-code.l:
15177	Fix comments.
15178	Prefer POS to denote the position of a symbol in a rule, since NUM
15179	is also used to denote symbol numbers.
15180
151812018-12-03  Akim Demaille  <akim.demaille@gmail.com>
15182
15183	NEWS: update
15184
151852018-12-03  Akim Demaille  <akim.demaille@gmail.com>
15186
15187	java: make sure the build dir exists
15188	* examples/java/local.mk (%D%/Calc.java): here.
15189
151902018-12-03  Akim Demaille  <akim.demaille@gmail.com>
15191
15192	c++: don't define variant<S>, directly define semantic_type
15193	Instead of defining yy::variant<S> and then alias
15194	yy::parser::semantic_type to variant<sizeof (union_type)>, directly
15195	define yy::parser::semantic_type.
15196
15197	This model is more appropriate if we want to sit the storage on top of
15198	unions in C++11.
15199
15200	* data/variant.hh (b4_variant_define): Specialize and inline the
15201	definition into...
15202	(b4_value_type_declare): Here.
15203	Define union_type here.
15204	* data/lalr1.cc: Adjust.
15205
152062018-12-01  Akim Demaille  <akim.demaille@gmail.com>
15207
15208	NEWS: update
15209
152102018-12-01  Akim Demaille  <akim.demaille@gmail.com>
15211
15212	C++: use noexcept and constexpr
15213	There are probably more opportunities for them.
15214	So far, I observed no performance improvements.
15215
15216	* data/c++.m4, data/lalr1.cc, data/stack.hh: here.
15217
152182018-12-01  Akim Demaille  <akim.demaille@gmail.com>
15219
15220	CI: also display the examples' test suite log
15221	* .travis.yml: here.
15222
152232018-12-01  Akim Demaille  <akim.demaille@gmail.com>
15224
15225	java: add an example
15226	* examples/java/Calc.y: New, based on test 495: "Calculator
15227	parse.error=verbose %locations".
15228	* examples/java/Calc.test, examples/java/local.mk: New.
15229
15230	* configure.ac (ENABLE_JAVA): New.
15231	* examples/test (prog): Be ready to run Java programs.
15232
152332018-12-01  Akim Demaille  <akim.demaille@gmail.com>
15234
15235	style: unsigned int -> unsigned
15236	See
15237	https://lists.gnu.org/archive/html/bison-patches/2018-08/msg00027.html
15238
15239	* src/output.c (muscle_insert_unsigned_int_table): Rename as...
15240	(muscle_insert_unsigned_table): this.
15241
152422018-12-01  Akim Demaille  <akim.demaille@gmail.com>
15243
15244	output: restore yyrhs and yyprhs
15245	This was demanded several times.  See for instance:
15246
15247	- David M. Warme
15248	  https://lists.gnu.org/archive/html/help-bison/2011-04/msg00003.html
15249
15250	- box12009
15251	  http://lists.gnu.org/archive/html/bug-bison/2016-10/msg00001.html
15252
15253	Basically, this reverts:
15254
15255	- commit 3d3bc1fe30f356cf674a979409e86ea0f88de4a0
15256	  Get rid of (yy)rhs and (yy)prhs
15257
15258	- commit d333175f63f402dbadb647175e40ad88bf1defb5
15259	  Avoid compiler warning.
15260
15261	Note that since these tables are not needed in the generated parsers,
15262	no skeleton requests them.  This change only brings back their
15263	definition to M4, making it possible to user-defined skeletons to use
15264	these tables.
15265
15266	* src/output.c (muscle_insert_item_number_table): Define.
15267	(prepare_rules): Generate the rhs and prhs tables.
15268
152692018-11-30  Akim Demaille  <akim.demaille@gmail.com>
15270
15271	regen
15272
152732018-11-30  Akim Demaille  <akim.demaille@gmail.com>
15274
15275	parser: shorten side-effects on current_type
15276	* src/parse-gram.y (tag.opt): Don't change current_type.
15277	Rather, return its value.
15278	Adjust dependencies.
15279
152802018-11-30  Akim Demaille  <akim.demaille@gmail.com>
15281
15282	style: reduce scopes
15283	* src/symlist.c: here.
15284
152852018-11-29  Akim Demaille  <akim.demaille@gmail.com>
15286
15287	tests: don't name C++ files *.c
15288	* tests/synclines.at (syncline escapes): Here.
15289	Otherwise, Clang generates an error and skips the test.
15290
152912018-11-29  Akim Demaille  <akim.demaille@gmail.com>
15292
15293	gnulib: update
15294
152952018-11-29  Akim Demaille  <akim.demaille@gmail.com>
15296
15297	regen
15298
152992018-11-29  Akim Demaille  <akim.demaille@gmail.com>
15300
15301	parser: factor the symbol definition
15302	* src/parse-gram.y (int.opt, string_as_id.opt): New.
15303	(symbol_def): Use it.
15304
153052018-11-29  Akim Demaille  <akim.demaille@gmail.com>
15306
15307	parser: improve location of string alias errors
15308	* src/parse-gram.y (symbol_def): Pass the right location for symbol_make_alias.
15309	* tests/regression.at (Duplicate string): Move to...
15310	* tests/input.at: here.
15311	(Token collisions): New.
15312
153132018-11-29  Akim Demaille  <akim@lrde.epita.fr>
15314
15315	diagnostics: complain about Bison directives when -Wyacc
15316	* src/complain.h, src/complain.c (bison_directive): New.
15317	* src/scan-gram.l (BISON_DIRECTIVE): New.
15318	Use it for Bison extensions.
15319
153202018-11-28  Akim Demaille  <akim.demaille@gmail.com>
15321
15322	doc: formatting changes
15323	* doc/bison.texi: here.
15324
153252018-11-27  Akim Demaille  <akim.demaille@gmail.com>
15326
15327	style: fix quotation in the test suite
15328	* tests/input.at: here.
15329
153302018-11-27  Akim Demaille  <akim.demaille@gmail.com>
15331
15332	regen
15333
153342018-11-27  Akim Demaille  <akim.demaille@gmail.com>
15335
15336	%nterm: do not accept character literals
15337	Reported by Rici Lake.
15338	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html
15339
15340	* src/complain.h: Formatting change.
15341	* src/parse-gram.y (id): Reject character literals used in a context
15342	for non-terminals.
15343	* tests/input.at (Invalid %nterm uses): Check that.
15344
153452018-11-27  Akim Demaille  <akim.demaille@gmail.com>
15346
15347	%nterm: do not accept numbers nor string alias
15348	Reported by Rici Lake.
15349	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html
15350
15351	* src/parse-gram.y (symbol_def): Refuse string aliases and numbers
15352	for non-terminals.
15353	(prologue_declaration): Recover from errors ended with ';'.
15354	* tests/input.at (Invalid %nterm uses): New.
15355
153562018-11-27  Akim Demaille  <akim.demaille@gmail.com>
15357
15358	TODO: update
15359
153602018-11-26  Akim Demaille  <akim.demaille@gmail.com>
15361
15362	doc: formatting changes
15363	* doc/bison.texi: Here.
15364
153652018-11-26  Akim Demaille  <akim.demaille@gmail.com>
15366
15367	style: comment changes
15368	* tests/testsuite.at: here.
15369
153702018-11-26  Akim Demaille  <akim.demaille@gmail.com>
15371
15372	gnulib: update ignores
15373
153742018-11-26  Akim Demaille  <akim.demaille@gmail.com>
15375
15376	gnulib: update to use its bitsets
15377	Bison's bitset were moved to gnulib.
15378
15379	* lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
15380	* lib/bitset.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15381	* lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c,
15382	* lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h,
15383	* lib/lbitset.h, lib/vbitset.c, lib/vbitset.h:
15384	Remove.
15385
15386	* gnulib: Update.
15387	* bootstrap.conf, lib/local.mk: Adjust.
15388
153892018-11-25  Akim Demaille  <akim.demaille@gmail.com>
15390
15391	gnulib: use conditional dependencies
15392	* bootstrap.conf: here.
15393
153942018-11-25  Akim Demaille  <akim.demaille@gmail.com>
15395
15396	CI: run on xenial
15397	Xenial (Ubuntu 16.04) is finally available on Travis.  Let's use it.
15398
15399	Among the changes:
15400
15401	- Automake 1.14.1 -> 1.15.0
15402	- Doxygen  1.8.6  -> 1.8.11
15403	- Flex     2.5.35 -> 2.6.0, with plenty of new compiler warnings
15404	- Gettext  0.18.3 -> 0.19.7
15405	- Graphviz 2.36.0 -> 2.38.0
15406	- Texinfo  5.2    -> 6.1
15407
15408	* .travis.yml: here.
15409
154102018-11-25  Akim Demaille  <akim.demaille@gmail.com>
15411
15412	CI: we don't need git show
15413	* .travis.yml: Don't run it.
15414
154152018-11-25  Akim Demaille  <akim.demaille@gmail.com>
15416
15417	regen
15418
154192018-11-25  Akim Demaille  <akim.demaille@gmail.com>
15420
15421	warning: avoid warnings about unreachable code
15422	Reported by Uxio Prego.
15423	https://lists.gnu.org/archive/html/help-bison/2018-11/msg00031.html
15424
15425	We also need to move the unreachable 'goto' to a reachable place,
15426	otherwise clang complains about the code being unreachable anyway.
15427	See also https://bugs.llvm.org/show_bug.cgi?id=39736.
15428
15429	Interestingly, we don't have to apply that trick to
15430	`#define YYCDEBUG if (false) std::cerr`, clang does not warn when the
15431	code comes from macro expansion.
15432
15433	* configure.ac: Use -Wunreachable-code when supported.
15434	* data/lalr1.cc, data/yacc.c: Pacify clang's warning about `if (0)`
15435	by using a macro.
15436	Another possibility was to move this statement to a reachable place.
15437	* tests/actions.at, tests/c++.at: Avoid generating unreachable code.
15438
154392018-11-24  Akim Demaille  <akim.demaille@gmail.com>
15440
15441	yacc.c: avoid generating dead code
15442	We should probably introduce some struct and functions to deal with
15443	stack management, rather than open coding it.  yyparse would be much
15444	nicer to read, and a better model for possible other skeletons.
15445
15446	* data/yacc.c (yyparse::yysetstate): Avoid generating code when
15447	neither yyoverflow nor YYSTACK_RELOCATE is defined.
15448
154492018-11-22  Akim Demaille  <akim.demaille@gmail.com>
15450
15451	%expect-rr: tune the number of conflicts per rule
15452	Currently on a grammar such as
15453
15454	    exp : a '1' | a '2' | a '3' | b '1' | b '2' | b '3'
15455	    a:
15456	    b:
15457
15458	we count only one rr-conflict on the `b:` rule, i.e., we expect:
15459
15460	    b: %expect-rr 1
15461
15462	although there are 3 conflicts in total.  That's because in the
15463	conflicted state we count only a single conflict, not three (one for
15464	each of the lookaheads: '1', '2', '3').
15465
15466	    State 0
15467
15468	        0 $accept: . exp $end
15469	        1 exp: . a '1'
15470	        2    | . a '2'
15471	        3    | . a '3'
15472	        4    | . b '1'
15473	        5    | . b '2'
15474	        6    | . b '3'
15475	        7 a: . %empty  ['1', '2', '3']
15476	        8 b: . %empty  ['1', '2', '3']
15477
15478	        '1'       reduce using rule 7 (a)
15479	        '1'       [reduce using rule 8 (b)]
15480	        '2'       reduce using rule 7 (a)
15481	        '2'       [reduce using rule 8 (b)]
15482	        '3'       reduce using rule 7 (a)
15483	        '3'       [reduce using rule 8 (b)]
15484	        $default  reduce using rule 7 (a)
15485
15486	        exp  go to state 1
15487	        a    go to state 2
15488	        b    go to state 3
15489
15490	See https://lists.gnu.org/archive/html/bison-patches/2013-02/msg00106.html.
15491
15492	* src/conflicts.c (rule_has_state_rr_conflicts): Rename as...
15493	(count_rule_state_sr_conflicts): this.
15494	DWIM.
15495	(count_rule_rr_conflicts): Adjust.
15496	* tests/conflicts.at (%expect-rr in grammar rules)
15497	(%expect-rr too much in grammar rules)
15498	(%expect-rr not enough in grammar rules): New.
15499
155002018-11-22  Akim Demaille  <akim.demaille@gmail.com>
15501
15502	%expect-rr: fix the computation of the overall number of conflicts
15503	On a grammar such as
15504
15505	   exp: "num" | "num" | "num"
15506
15507	we currently report only one RR conflict, instead of two.
15508
15509	This bug is present since the origins of Bison
15510
15511	    commit 08089d5d35ece0c7d41659cc1bc09638e2abb151
15512	    Author: David MacKenzie <djm@djmnet.org>
15513	    Date:   Tue Apr 20 05:42:52 1993 +0000
15514
15515	       Initial revision
15516
15517	and was preserved in
15518
15519	    commit 676385e29c4aedfc05d20daf1ef20cd4ccc84856
15520	    Author: Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15521	    Date:   Fri Jun 28 02:26:44 2002 +0000
15522
15523	       Initial check-in introducing experimental GLR parsing.  See entry in
15524	       ChangeLog dated 2002-06-27 from Paul Hilfinger for details.
15525
15526	See
15527	https://lists.gnu.org/archive/html/bison-patches/2018-11/msg00011.html
15528
15529	* src/conflicts.h, src/conflicts.c (count_state_rr_conflicts)
15530	(count_rr_conflicts): Use only the correct count of conflicts.
15531	* tests/glr-regression.at: Fix expectations.
15532
155332018-11-21  Akim Demaille  <akim.demaille@gmail.com>
15534
15535	tests: generate *.output files
15536	* tests/glr-regression.at: here.
15537
155382018-11-21  Akim Demaille  <akim.demaille@gmail.com>
15539
15540	%expect: tune the number of conflicts per rule
15541	Currently on a grammar such as
15542
15543	    exp: "number" | exp "+" exp | exp "*" exp
15544
15545	we count only one sr-conflict for both binary rules, i.e., we expect:
15546
15547	    exp: "number" | exp "+" exp  %expect 1 | exp "*" exp  %expect 1
15548
15549	although there are 4 conflicts in total.  That's because in the states
15550	in conflict, for instance that for the "+" rule:
15551
15552	    State 6
15553
15554	        2 exp: exp . "+" exp
15555	        2    | exp "+" exp .  [$end, "+", "*"]
15556	        3    | exp . "*" exp
15557
15558	        "+"  shift, and go to state 4
15559	        "*"  shift, and go to state 5
15560
15561	        "+"       [reduce using rule 2 (exp)]
15562	        "*"       [reduce using rule 2 (exp)]
15563	        $default  reduce using rule 2 (exp)
15564
15565	we count only a single conflict, although there are two (one on "+"
15566	and another with "*").
15567
15568	See https://lists.gnu.org/archive/html/bison-patches/2013-02/msg00106.html.
15569
15570	* src/conflicts.c (rule_has_state_sr_conflicts): Rename as...
15571	(count_rule_state_sr_conflicts): this.
15572	DWIM.
15573	(count_rule_sr_conflicts): Adjust.
15574	* tests/conflicts.at (%expect in grammar rules): New.
15575
155762018-11-21  Akim Demaille  <akim.demaille@gmail.com>
15577
15578	regen
15579
155802018-11-21  Akim Demaille  <akim@lrde.epita.fr>
15581
15582	style: reduce scopes
15583	* src/conflicts.c, src/reader.c: Minor style changes.
15584
155852018-11-21  Paul Hilfinger  <hilfingr@eecs.berkeley.edu>
15586
15587	allow %expect and %expect-rr modifiers on individual rules
15588	This change allows one to document (and check) which rules participate
15589	in shift/reduce and reduce/reduce conflicts.  This is particularly
15590	important GLR parsers, where conflicts are a normal occurrence.  For
15591	example,
15592
15593	    %glr-parser
15594	    %expect 1
15595	    %%
15596
15597	    ...
15598
15599	    argument_list:
15600	      arguments %expect 1
15601	    | arguments ','
15602	    | %empty
15603	    ;
15604
15605	    arguments:
15606	      expression
15607	    | argument_list ',' expression
15608	    ;
15609
15610	    ...
15611
15612	Looking at the output from -v, one can see that the shift-reduce
15613	conflict here is due to the fact that the parser does not know whether
15614	to reduce arguments to argument_list until it sees the token AFTER the
15615	following ','.  By marking the rule with %expect 1 (because there is a
15616	conflict in one state), we document the source of the 1 overall shift-
15617	reduce conflict.
15618
15619	In GLR parsers, we can use %expect-rr in a rule for reduce/reduce
15620	conflicts.  In this case, we mark each of the conflicting rules.  For
15621	example,
15622
15623	    %glr-parser
15624	    %expect-rr 1
15625
15626	    %%
15627
15628	    stmt:
15629	      target_list '=' expr ';'
15630	    | expr_list ';'
15631	    ;
15632
15633	    target_list:
15634	      target
15635	    | target ',' target_list
15636	    ;
15637
15638	    target:
15639	      ID %expect-rr 1
15640	    ;
15641
15642	    expr_list:
15643	      expr
15644	    | expr ',' expr_list
15645	    ;
15646
15647	    expr:
15648	      ID %expect-rr 1
15649	    | ...
15650	    ;
15651
15652	In a statement such as
15653
15654	    x, y = 3, 4;
15655
15656	the parser must reduce x to a target or an expr, but does not know
15657	which until it sees the '='.  So we notate the two possible reductions
15658	to indicate that each conflicts in one rule.
15659
15660	See https://lists.gnu.org/archive/html/bison-patches/2013-02/msg00105.html.
15661
15662	* doc/bison.texi (Suppressing Conflict Warnings): Document %expect,
15663	%expect-rr in grammar rules.
15664	* src/conflicts.c (count_state_rr_conflicts): Adjust comment.
15665	(rule_has_state_sr_conflicts): New static function.
15666	(count_rule_sr_conflicts): New static function.
15667	(rule_nast_state_rr_conflicts): New static function.
15668	(count_rule_rr_conflicts): New static function.
15669	(rule_conflicts_print): New static function.
15670	(conflicts_print): Also use rule_conflicts_print to report on individual
15671	rules.
15672	* src/gram.h (struct rule): Add new fields expected_sr_conflicts,
15673	expected_rr_conflicts.
15674	* src/reader.c (grammar_midrule_action): Transfer expected_sr_conflicts,
15675	expected_rr_conflicts to new rule, and turn off in current_rule.
15676	(grammar_current_rule_expect_sr): New function.
15677	(grammar_current_rule_expect_rr): New function.
15678	(packgram): Transfer expected_sr_conflicts, expected_rr_conflicts
15679	to new rule.
15680	* src/reader.h (grammar_current_rule_expect_sr): New function.
15681	(grammar_current_rule_expect_rr): New function.
15682	* src/symlist.c (symbol_list_sym_new): Initialize expected_sr_conflicts,
15683	expected_rr_conflicts.
15684	* src/symlist.h (struct symbol_list): Add new fields expected_sr_conflicts,
15685	expected_rr_conflicts.
15686	* tests/conflicts.at: Add tests "%expect in grammar rule not enough",
15687	"%expect in grammar rule right.", "%expect in grammar rule too much."
15688
156892018-11-21  Akim Demaille  <akim.demaille@gmail.com>
15690
15691	NEWS: update
15692
156932018-11-21  Akim Demaille  <akim.demaille@gmail.com>
15694
15695	gnulib: update
15696
156972018-11-21  Akim Demaille  <akim.demaille@gmail.com>
15698
15699	remove ancient lint directives
15700	* data/c++.m4, data/yacc.c: Remove surprising remains of lint
15701	directives.
15702
157032018-11-21  Jannick  <thirdedition@gmx.net>
15704
15705	doc: calc++: remove ancient fix for flex
15706	* doc/bison.texi (Calc++ Scanner): Remove fix for Flex 2.5.31-2.5.33.
15707
157082018-11-21  Jannick  <thirdedition@gmx.net>
15709
15710	doc: calc++: ignore \r in the scaner
15711	* doc/bison.texi (Calc++ Scanner): Ignore \r.
15712
157132018-11-20  Akim Demaille  <akim.demaille@gmail.com>
15714
15715	style: harmonize the labels of yyparse
15716	* data/glr.c, data/lalr1.cc, data/yacc.c: Fix indentation and
15717	other formatting issues.
15718
157192018-11-20  Akim Demaille  <akim.demaille@gmail.com>
15720
15721	regen
15722
157232018-11-20  Akim Demaille  <akim.demaille@gmail.com>
15724
15725	style: avoid lengthy actions
15726	We also lack a consistent naming for directive implementations.
15727	`directive_skeleton` is too long, `percent_skeleton` is not very nice
15728	looking, `process_skeleton` looks ambiguous, `do_skeleton` is somewhat
15729	ambiguous too, but seems a better track.
15730
15731	* src/parse-gram.y (version_check): Rename as...
15732	(do_require): this.
15733	(do_skeleton): New.
15734	Use it.
15735
157362018-11-20  Akim Demaille  <akim.demaille@gmail.com>
15737
15738	c++: using macros around user types breaks when they include comma
15739	We may generate code such as
15740
15741	    basic_symbol (typename Base::kind_type t, YY_RVREF (std::pair<int,int>) v);
15742
15743	which, of course, breaks, because YY_RVREF sees two arguments.  Let's
15744	not play tricks with _VA_ARGS__, I'm unsure about it portability.
15745	Anyway, I plan to change more things in this area.
15746
15747	Reported by Sébastien Villemot.
15748	http://lists.gnu.org/archive/html/bug-bison/2018-11/msg00014.html
15749
15750	* data/variant.hh (b4_basic_symbol_constructor_declare)
15751	(b4_basic_symbol_constructor_define): Don't use macro on user types.
15752	* tests/types.at: Check that we support pairs.
15753
157542018-11-16  Akim Demaille  <akim.demaille@gmail.com>
15755
15756	README: update
15757
157582018-11-16  Akim Demaille  <akim.demaille@gmail.com>
15759
15760	tests: remove duplicate definition
15761	Probably imported by 6d58c632025cb6928a90e4176577982bfb9c3981, a merge
15762	commit.
15763
15764	* tests/atlocal.in (POSIXLY_CORRECT_IS_EXPORTED): Define it once.
15765
157662018-11-16  Akim Demaille  <akim.demaille@gmail.com>
15767
15768	glr.c: fix use of _Noreturn
15769	In C++, [[noreturn]] must not be between "static" and the rest of the
15770	function signature, it must precede it.  C's _Noreturn does not seem
15771	to have such a constraint, but it is therefore compatible with the C++
15772	constraint.  Since we #define _Noreturn as [[noreturn]] is modern C++,
15773	be sure to push the _Noreturn first.
15774
15775	Unfortunately this was not caught by the test suite, because it always
15776	loads config.h first, and config.h contains another definition of
15777	_Noreturn that does not use [[noreturn]], and hides ours.  That's
15778	probably a sign we should avoid always loading config.h.
15779
15780	* data/glr.c (yyFail, yyMemoryExhausted): here.
15781
157822018-11-16  Akim Demaille  <akim.demaille@gmail.com>
15783
15784	tests: run the api.value.type tests for all C++ standards
15785	* tests/local.at (AT_LANG_FOR_EACH_STD): New.
15786	(AT_REQUIRE_CXX_VERSION): Rename as...
15787	(AT_REQUIRE_CXX_STD): this.
15788	Accept an argument for what to do when the requirement is not met.
15789	* tests/types.at (api.value.type): Check all the C++ stds.
15790
157912018-11-16  Akim Demaille  <akim.demaille@gmail.com>
15792
15793	CI: split the ASAN job in two
15794	The following commit introduce even more compilations/runs than
15795	before, and with ASAN on, we go beyond to 50min credit from Travis.
15796
15797	* .travis.yml (Clang 7 libc++ and ASAN): Split in two.
15798
157992018-11-14  Akim Demaille  <akim.demaille@gmail.com>
15800
15801	c++: use YY_CPLUSPLUS
15802	* data/c++.m4: here.
15803
158042018-11-13  Akim Demaille  <akim.demaille@gmail.com>
15805
15806	c++: factor the handling of __cplusplus into YY_CPLUSPLUS
15807	* data/c++.m4 (b4_cxx_portability): Define it.
15808	Use it.
15809	* data/lalr1.cc, data/variant.hh: Use it.
15810
158112018-11-13  Akim Demaille  <akim.demaille@gmail.com>
15812
15813	style: formatting changes
15814	* src/scan-gram.l: here.
15815
158162018-11-13  Akim Demaille  <akim.demaille@gmail.com>
15817
15818	tests: clarify some magic constant
15819	* tests/c++.at (C++ Variant-based Symbols Unit Tests): here.
15820
158212018-11-13  Akim Demaille  <akim.demaille@gmail.com>
15822
15823	examples: remove useless includes
15824	* examples/c++/variant-11.yy, examples/c++/variant.yy: here.
15825	Fix warning when storing a long into an int.
15826
158272018-11-12  Akim Demaille  <akim.demaille@gmail.com>
15828
15829	tests: compile the C++ examples with warnings
15830	* examples/c++/local.mk: Pass $(WARN_CXXFLAGS_TEST).
15831
158322018-11-12  Akim Demaille  <akim.demaille@gmail.com>
15833
15834	regen
15835
158362018-11-12  Akim Demaille  <akim.demaille@gmail.com>
15837
15838	parser: deprecate %error-verbose
15839	It is unfortunate that %error_verbose was properly diagnosed as
15840	obsoleted by "%define parse.error verbose", but %error-verbose was
15841	not.
15842
15843	* src/parse-gram.y (%error-verbose): Remove support.
15844	* src/scan-gram.l: Do it here instead, with a warning.
15845	* tests/input.at (Deprecated directives): Check it.
15846
158472018-11-12  Akim Demaille  <akim.demaille@gmail.com>
15848
15849	tests: migrate from %error-verbose to %define parse.error verbose
15850	* tests/actions.at, tests/c++.at, tests/conflicts.at,
15851	* tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
15852	* tests/headers.at, tests/input.at, tests/java.at, tests/javapush.at,
15853	* tests/local.at, tests/regression.at, tests/skeletons.at,
15854	* tests/torture.at:
15855	Here.
15856
158572018-11-12  Akim Demaille  <akim.demaille@gmail.com>
15858
15859	parser: deprecate %nterm
15860	It has several weaknesses.
15861	Reported by Rici Lake.
15862	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html
15863
15864	* src/scan-gram.l: here.
15865
158662018-11-12  Akim Demaille  <akim.demaille@gmail.com>
15867
15868	tests: fix syncline tests
15869	These tests are skipped with GCC:
15870
15871	    "\"".c:1:5: error: function declaration isn't a prototype [-Werror=strict-prototypes]
15872	     int main() { return 0; }
15873	         ^~~~
15874
15875	* tests/synclines.at: Stop writing C++ in C.
15876	* tests/local.at: Formatting changes.
15877
158782018-11-11  Akim Demaille  <akim.demaille@gmail.com>
15879
15880	NEWS: expected features of Bison 3.3
15881
158822018-11-11  Akim Demaille  <akim.demaille@gmail.com>
15883
15884	yacc: reduce scope in push mode
15885	* data/yacc.c (yypull_parse): Here.
15886
158872018-11-11  Akim Demaille  <akim.demaille@gmail.com>
15888
15889	style: comment changes
15890	* data/c++.m4, data/glr.c, data/lalr1.java, data/yacc.c
15891	(yytranslate, YYTRANSLATE): Harmonize comments.
15892
158932018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15894
15895	c++: simplify a default construction
15896	* data/lalr1.cc (yytnamerr_): here.
15897
158982018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15899
15900	regen
15901
159022018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15903
15904	reader: no longer accept %define variable names in quotes
15905	It was never documented.
15906
15907	* src/parse-gram.y (variable): Here.
15908
159092018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15910
15911	dogfooding: use api.value.type union
15912	* src/parse-gram.y (api.value.type): Set to union.
15913	Replace occurrences of %union with explicit %types.
15914	* src/scan-gram.l: Adjust yylval's field names.
15915	(RETURN_VALUE): No longer needs the Field argument.
15916	Use it more.
15917
159182018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15919
15920	djgpp: remove
15921	Support for DJGPP was announced to be removed in the NEWS of Bison
15922	3.1 (2018-08-27) unless someone expressed interest.  There was no answer.
15923
15924	* djgpp: Remove.
15925	* NEWS, Makefile.am, cfg.mk, po/POTFILES.in: Adjust.
15926
159272018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15928
15929	scanner: simplify use of gettext
15930	* src/scan-gram.l (unexpected_end): Leave the actual call to gettext
15931	to the caller.
15932
159332018-11-10  Akim Demaille  <akim.demaille@gmail.com>
15934
15935	style: clean up the scanner and parser
15936	* src/scan-gram.l: Formatting changes.
15937	Add "missing" assertion for symmetry.
15938	* src/parse-gram.y: Formatting changes.
15939
159402018-11-09  Akim Demaille  <akim.demaille@gmail.com>
15941
15942	maint: post-release administrivia
15943	* NEWS: Add header line for next release.
15944	* .prev-version: Record previous version.
15945	* cfg.mk (old_NEWS_hash): Auto-update.
15946
159472018-11-09  Akim Demaille  <akim.demaille@gmail.com>
15948
15949	version 3.2.1
15950	* NEWS: Record release date.
15951
159522018-11-08  Akim Demaille  <akim.demaille@gmail.com>
15953
15954	build: fix issues in the generated tarball
15955	Reported by Andre da Costa Barros.
15956	https://savannah.gnu.org/patch/?9716
15957
15958	* examples/calc++/local.mk: We no longer generate position.hh and
15959	stack.hh.  Leaving them here triggers their concurrent generation,
15960	which fails.
15961	(%C%_calc___CPPFLAGS): Fix the extracted headers in the source tree.
15962	* examples/mfcalc/local.mk (%C%_mfcalc_CPPFLAGS): Ditto.
15963
159642018-11-07  Akim Demaille  <akim.demaille@gmail.com>
15965
15966	build: fix typo
15967	Reported by Horst Von Brand.
15968	https://savannah.gnu.org/support/?109580
15969
15970	* examples/local.mk (.PHOMY): Rename as...
15971	(.PHONY): this.
15972
159732018-11-06  Akim Demaille  <akim.demaille@gmail.com>
15974
15975	NEWS: update
15976
159772018-11-06  Akim Demaille  <akim.demaille@gmail.com>
15978
15979	examples: ship them
15980	Currently, the examples are extracted on the user's side.
15981	Unfortunately, that requires that the user has Perl, which is
15982	otherwise not needed for Bison.  Let's ship the examples instead.
15983
15984	The examples were handled this way so that we could depend on
15985	configure flags: if --enable-gcc-warnings is passed, it is understood
15986	as "I'm a maintainer", so the examples are generated with `#line`s.
15987	Regular users should not see them, so they are now unconditionally
15988	removed when rolling a tarball.
15989
15990	Reported by Mike Frysinger.
15991	https://lists.gnu.org/archive/html/bison-patches/2015-04/msg00000.html
15992
15993	* examples/local.mk: Ship all the extracted files.
15994	(examples-unline): New.
15995	Make sure that the generated tarballs do not contain the #lines.
15996
159972018-11-06  Akim Demaille  <akim.demaille@gmail.com>
15998
15999	build: minor fixes in doc/
16000	* doc/local.mk: Consistently use *.tmp for temporary files.
16001	Fix comments.
16002
160032018-11-05  Akim Demaille  <akim.demaille@gmail.com>
16004
16005	CI: maximize chances of errors sooner
16006	* .travis.yml: Try clang and icc soon, so that we don't have to wait
16007	for the end of the run to know that they fail.
16008
160092018-11-04  Akim Demaille  <akim.demaille@gmail.com>
16010
16011	c++: improve the generated documentation
16012	* data/lalr1.cc, data/location.cc: Improve documenting comments.
16013	* tests/c++.at (Doxygen Documentation): Fix AT_BISON_OPTION_PUSHDEFS,
16014	so that the generated yyerror is correct.
16015	* tests/c++.at, tests/headers.at: Prefer %empty.
16016
160172018-11-04  Akim Demaille  <akim.demaille@gmail.com>
16018
16019	tests: don't fail if the C++ compiler does not work
16020	Also, make sure that `make dist` generates a correct tarball even if
16021	the C++ compiler does not work.
16022
16023	Reported by Nelson H. F. Beebe.
16024
16025	* m4/cxx.m4 (BISON_CXX_WORKS): Define to true/false instead of
16026	true/exit 77.  The latter is too dangerous to use (it directly quits).
16027	(ENABLE_CXX): New name for the Automake conditional, for consistency
16028	with ENABLE_CXX11 etc.
16029	* tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Adjust to the new
16030	semantics of BISON_CXX_WORKS.
16031	* examples/c++/local.mk: Skip the variant test if C++ does not work.
16032	* examples/calc++/local.mk: Likewise.
16033
160342018-11-04  Akim Demaille  <akim.demaille@gmail.com>
16035
16036	tests: don't disable C++ warnings in C files
16037	This triggers error with GCC.
16038	See eff6739124c61bb5660d78453210d1d6a17d30e7.
16039
16040	* tests/testsuite.h: Disable -Wzero-as-null-pointer-constant only for
16041	C++.
16042
160432018-11-04  Akim Demaille  <akim.demaille@gmail.com>
16044
16045	c++: workaround portability issue
16046	On some systems (x86_64-pc-solaris2.11), with Developer Studio 12.5's
16047	CC, we get:
16048
16049	    ".../include/CC/Cstd/vector.cc", line 127: Error: Cannot assign const yy::parser::stack_symbol_type to yy::parser::stack_symbol_type without "yy::parser::stack_symbol_type::operator=(const yy::parser::stack_symbol_type&)";.
16050	    ".../include/CC/Cstd/vector", line 475:     Where: While instantiating "std::vector<yy::parser::stack_symbol_type>::__insert_aux(yy::parser::stack_symbol_type*, const yy::parser::stack_symbol_type&)".
16051	    ".../include/CC/Cstd/vector", line 475:     Where: Instantiated from non-template code.
16052	    1 Error(s) detected.
16053
16054	Don't expect __cplusplus to be always defined.  If it's not, consider
16055	this is C++98.
16056
16057	Reported by Nelson H. F. Beebe.
16058
16059	* data/c++.m4, data/lalr1.cc, examples/c++/variant.yy, tests/local.at,
16060	* tests/testsuite.h:
16061	An undefined __cplusplus means pre C++11.
16062
160632018-11-03  Akim Demaille  <akim.demaille@gmail.com>
16064
16065	tests: work around getopt portability issues
16066	On some systems, we don't use our getopt.  As a consequence the error
16067	messages vary:
16068
16069	    $ bison --skeleton
16070	    bison: option requires an argument -- skeleton
16071	    Try 'bison --help' for more information.
16072
16073	instead of
16074
16075	    bison: option '--skeleton' requires an argument
16076	    Try 'bison --help' for more information.
16077
16078	Reported by Jannick and Nelson H. F. Beebe.
16079	https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00140.html
16080
16081	* tests/input.at (Invalid number of arguments): work around getopt
16082	portability issues.
16083
160842018-11-03  Akim Demaille  <akim.demaille@gmail.com>
16085
16086	doc: -Wzero-as-null-pointer-constant was added to GCC 4.7
16087	It is not supported by previous versions.
16088	See https://www.gnu.org/software/gcc/gcc-4.7/changes.html
16089	Reported by Nelson H. F. Beebe.
16090
16091	* doc/bison.texi (Calc++ Scanner): here.
16092
160932018-11-02  Adam Sampson  <ats@offog.org>
16094
16095	examples: #include <cstring> in calc++
16096	strerror is defined by <string.h>, and recent versions of GNU libstdc++
16097	no longer include this automatically from <string>.
16098
160992018-10-31  Akim Demaille  <akim.demaille@gmail.com>
16100
16101	c: provide a definition of _Noreturn that works for C++
16102	On Solaris, GCC 7.3 defines:
16103
16104	                      -std=c++14  -std=c++17
16105	    __cplusplus       201402L       201703L
16106	    __STDC_VERSION__  199901L       201112L
16107
16108	So the current #definition of _Noreturn sees that 201112 <=
16109	__STDC_VERSION__, i.e., that C11 is supported, so it expects _Noreturn
16110	to be supported.  Apparently it is not.
16111
16112	This is only for C++, the test suite works for C.  However, the test
16113	suite does not try several C standards, maybe we should...
16114
16115	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00064.html
16116
16117	* data/c.m4 (b4_attribute_define): Define _Noreturn as [[noreturn]] in
16118	modern C++.
16119
161202018-10-30  Akim Demaille  <akim.demaille@gmail.com>
16121
16122	c: update the definition of _Noreturn
16123	Does not work on Solaris 11.3 x86/64:
16124
16125	    479. c++.at:1293: testing C++ GLR parser identifier shadowing ...
16126	    ======== Testing with C++ standard flags: '-std=c++17'
16127	    ./c++.at:1332: $BISON_CXX_WORKS
16128	    stderr:
16129	    stdout:
16130	    ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS  $LDFLAGS -o input input.cc $LIBS
16131	    stderr:
16132	    input.cc:837:8: error: '_Noreturn' does not name a type
16133	     static _Noreturn void
16134	            ^~~~~~~~~
16135	    input.cc:845:8: error: '_Noreturn' does not name a type
16136	     static _Noreturn void
16137	            ^~~~~~~~~
16138
16139	Reported by Kiyoshi Kanazawa.
16140	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00051.html
16141
16142	* data/c.m4 (b4_attribute_define): Use the snippet which is currently
16143	in gnulib's m4/gnulib-common.m4 (which seems a little more advanced
16144	than lib/_Noreturn.h).
16145
161462018-10-30  Akim Demaille  <akim.demaille@gmail.com>
16147
16148	tests: don't expect the shell to support 'local'
16149	It doesn't work on Solaris 11.3 x86/64.
16150	Reported by Kiyoshi Kanazawa.
16151	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00051.html
16152
16153	* examples/test: Don't use 'local'.
16154
161552018-10-30  Akim Demaille  <akim.demaille@gmail.com>
16156
16157	bitset: fix warning
16158	Reported by Hans Åberg.
16159	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00047.html
16160
16161	* lib/bitset.c (bitset_count_): here.
16162
161632018-10-30  Akim Demaille  <akim.demaille@gmail.com>
16164
16165	build: fix use of gnulib Make variables
16166	Reported by Kiyoshi Kanazawa.
16167	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00048.html
16168
16169	* lib/local.mk (lib_libbison_a_LIBADD): Merge into...
16170	* src/local.mk (src_bison_LDADD): here.
16171
161722018-10-29  Akim Demaille  <akim.demaille@gmail.com>
16173
16174	maint: post-release administrivia
16175	* NEWS: Add header line for next release.
16176	* .prev-version: Record previous version.
16177	* cfg.mk (old_NEWS_hash): Auto-update.
16178
161792018-10-29  Akim Demaille  <akim.demaille@gmail.com>
16180
16181	version 3.2
16182	* NEWS: Record release date.
16183
161842018-10-29  Akim Demaille  <akim.demaille@gmail.com>
16185
16186	build: don't depend on the libc to generate bison.help
16187	The "Report translation bugs to..." part of --help is issued only on
16188	glibc systems.  So if the tarball is not wrapped on such a system, and
16189	used on such a system (or the converse), then bison.help will differ
16190	on the user's system, and help2man will be called to update bison.1.
16191
16192	But help2man should not be a requirement.
16193
16194	Reported by Alexandre Duret-Lutz.
16195
16196	* doc/local.mk (doc/bison.help): Remove the possible doc about
16197	translation bugs.
16198	Pass LC_ALL=C, as reported in src/getargs.c's usage().
16199	(doc/cross-options.texi): Use bison.help instead of calling bison
16200	--help.
16201
162022018-10-29  Akim Demaille  <akim.demaille@gmail.com>
16203
16204	c++: always issue the "generated by" message
16205	Some users rely on this sentence to know that the file can be ignored.
16206	Reported by Alexandre Duret-Lutz.
16207
16208	* data/bison.m4 (b4_generated_by): New.
16209	(b4_copyright): Use it.
16210	* data/location.cc, data/stack.hh: Use it too, for the stub files
16211	(position.hh and stack.hh).
16212
162132018-10-28  Akim Demaille  <akim.demaille@gmail.com>
16214
16215	cfg.mk: remove exceptions for timevar
16216	They appear to be no longer needed.
16217
16218	* cfg.mk: here.
16219
162202018-10-28  Akim Demaille  <akim.demaille@gmail.com>
16221
16222	style: clean up src/AnnotationList.c
16223	* src/AnnotationList.c: Reduce scopes.
16224
162252018-10-28  Akim Demaille  <akim.demaille@gmail.com>
16226
16227	style: clean up print.c
16228	* src/print.c: Reduce scopes.
16229
162302018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16231
16232	bitset: clean up bbitset.h
16233	* lib/libiberty.h: Inline in...
16234	* lib/bbitset.h: here.
16235	* lib/local.mk: Adjust.
16236
162372018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16238
16239	bitset: clean up bitset.h
16240	* lib/bitset.h: Fix include order.
16241
162422018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16243
16244	bitset: clean up vbitset.c
16245	* lib/vbitset.c: Reduce scopes, etc.
16246
162472018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16248
16249	bitset: clean up lbitset.c
16250	* lib/lbitset.c: Reduce scopes, etc.
16251
162522018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16253
16254	bitset: clean up ebitset.c
16255	* lib/ebitset.c: Reduce scopes, etc.
16256
162572018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16258
16259	bitset: clean up bitset_stats.c
16260	* lib/bitset_stats.c: Reduce scopes, etc.
16261
162622018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16263
16264	bitset: clean up bitset.c
16265	* lib/bitset.c: Reduce scopes, etc.
16266
162672018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16268
16269	bitset: clean up abitset.c
16270	* lib/abitset.c: Reduce scopes, etc.
16271
162722018-10-27  Jannick  <thirdedition@gmx.net>
16273
16274	xml2dot.xsl: fix typos in comments
16275
162762018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16277
16278	doc: fix distcheck
16279	The extracted example, simple.yy, does not use %require "3.2", so it
16280	generates a stack.hh, which breaks distcheck.
16281
16282	* doc/bison.texi: Fix it.
16283
162842018-10-27  Akim Demaille  <akim.demaille@gmail.com>
16285
16286	NEWS: prepare for 3.2
16287
162882018-10-26  Akim Demaille  <akim.demaille@gmail.com>
16289
16290	tests: beware of Windows file name constraints
16291	Don't expect to be able to build a file named '"\"".y' (6 characters)
16292	on Windows.
16293
16294	Reported by Jannick.
16295	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00042.html
16296
16297	* tests/synclines.at (syncline escapes): Skip if we failed to create
16298	the file.
16299
163002018-10-26  Akim Demaille  <akim.demaille@gmail.com>
16301
16302	tests: fix invocation of m4_map
16303	* tests/actions.at, tests/synclines.at: m4_map takes a list of
16304	arguments in $2, m4_map_args takes arguments in $2, $3, etc.
16305
163062018-10-26  Akim Demaille  <akim.demaille@gmail.com>
16307
16308	doc: spell check
16309	* README, doc/bison.texi, examples/README, examples/c++/README: here.
16310
163112018-10-26  Akim Demaille  <akim.demaille@gmail.com>
16312
16313	examples: add a Makefile for C++ short examples
16314	* examples/c++/Makefile: New.
16315	* examples/c++/local.mk, examples/c++/README: Adjust.
16316
163172018-10-26  Akim Demaille  <akim.demaille@gmail.com>
16318
16319	doc: some improvements
16320	* doc/bison.texi (Calc++ Scanner): Show how exception can be thrown
16321	from auxiliary functions.
16322	Clarify the meaning of the various flex %options we use.
16323	Get rid of a warning.
16324	(Calc++ Parsing Driver): Use the parser as a functor.
16325
163262018-10-26  Akim Demaille  <akim.demaille@gmail.com>
16327
16328	examples: check the errors
16329	* examples/test (run): Check stderr, unless -noerr is passed.
16330	* examples/calc++/calc++.test, examples/mfcalc/mfcalc.test: Check
16331	errors.
16332
163332018-10-25  Akim Demaille  <akim.demaille@gmail.com>
16334
16335	doc: minor fixes
16336	* doc/bison.texi: Simplify wording.
16337	Fix Texinfo error.
16338	(Complete Symbols): Handle the token EOF.
16339	(Calc++ Parser): In the modern C++ world, prefer assignment to swap.
16340	(Strings are Destroyed): Prefer an explicit 'continue' to a comment.
16341
163422018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16343
16344	configure: quit on trying to get ICC and Flex be friends
16345	The CI is using Flex 2.5.35.  And ICC is too picky for it.  Let's stop
16346	making these warnings errors.  I wish I could disable them in the
16347	source files using the ICC version and the Flex version, but ICC's
16348	pragma support is unclear, and I'm tired of fighting it.
16349
16350	* configure.ac (FLEX_SCANNER_CXXFLAGS): Make warnings warnings.
16351	* examples/c++/local.mk: Comment changes.
16352
163532018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16354
16355	doc: mention earlier how to disable the generation of location.hh
16356	Suggested by Victor Khomenko.
16357
16358	* doc/bison.texi (C++ Bison Interface): Here.
16359
163602018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16361
16362	c++: std::to_string is available in C++11
16363	Reported by Victor Khomenko.
16364	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00033.html
16365
16366	* doc/bison.texi, examples/c++/variant-11.yy: Use std::to_string
16367	instead of ours.
16368
163692018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16370
16371	examples: move the variant examples into the C++ directory
16372	* examples/variant-11.test examples/variant-11.yy,
16373	* examples/variant.test examples/variant.yy:
16374	Move into examples/c++/.
16375	* examples/c++/README: New.
16376	* examples/README, examples/c++/local.mk, examples/local.mk:
16377	Adjust.
16378
163792018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16380
16381	doc: an introductory example for C++
16382	Suggested by Victor Khomenko.
16383	http://lists.gnu.org/archive/html/bug-bison/2018-08/msg00037.html
16384
16385	* doc/bison.texi (A Simple C++ Example): New.
16386	* examples/c++/local.mk, examples/c++/simple.test: New.
16387	Extract, check, and install this new example.
16388	* examples/local.mk: Adjust.
16389	* examples/test: Adjust to the case where the dirname differs
16390	from the test name.
16391
163922018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16393
16394	build: remove a few copies of the Copyright from the generated Makefile
16395	* build-aux/local.mk, cfg.mk, examples/calc++/local.mk,
16396	* examples/local.mk, examples/mfcalc/local.mk,
16397	* examples/rpcalc/local.mk, lib/local.mk, src/local.mk,
16398	* tests/local.mk:
16399	Use Automake comments so that we don't get a copy of each in the
16400	generated Makefile.
16401
164022018-10-24  Akim Demaille  <akim.demaille@gmail.com>
16403
16404	c++: make operator() an alias to the parse function
16405	* data/glr.cc, data/lalr1.cc (operator()): New.
16406	* doc/bison.texi: Update.
16407
164082018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16409
16410	build: enable more warnings during tests
16411	Prompted by Derek Clegg.
16412	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00018.html
16413
16414	* configure.ac: here.
16415
164162018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16417
16418	regen
16419
164202018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16421
16422	yacc.c: work around strange typing issues
16423	On the CI, both GCC and Clang report:
16424
16425	    src/parse-gram.c: In function 'yy_lac':
16426	    src/parse-gram.c:1479:29: error: format '%hd' expects argument of type 'int',
16427	       but argument 3 has type 'yytype_int16 {aka long int}' [-Werror=format=]
16428	             YYDPRINTF ((stderr, " G%hd", yystate));
16429	                                 ^
16430
16431	Although yytype_int16 is supposed to be a short int, not a long int.
16432	This must be explored.
16433
16434	* data/yacc.c (yy_lac): Work around typing issue.
16435
164362018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16437
16438	yacc.c: don't define _Noreturn uselessly
16439	Clang warns:
16440
16441	     aux/x.h:97:11: error: macro name is a reserved identifier
16442	           [-Werror,-Wreserved-id-macro]
16443	     #  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
16444
16445	Reported by Derek Clegg.
16446	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00024.html
16447
16448	* data/c.m4 (b4_attribute_define): Don't define _Noreturn unconditionally.
16449	* data/glr.c: Ask for _Noreturn.
16450
164512018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16452
16453	pacify ICC 16.0.3 20160415
16454	Found on the CI.
16455
16456	yacc.c:
16457
16458	    error #2259: non-pointer conversion from "int" to "yytype_int16={short}" may lose significant bits
16459	        yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
16460	                ^
16461
16462	glr.c:
16463
16464	    error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
16465	      yybool yynormal YY_ATTRIBUTE_UNUSED = (yystackp->yysplitPoint == YY_NULLPTR);
16466	                                          ^
16467
16468	    error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
16469	      return yypact_value_is_default (yypact[yystate]);
16470	             ^
16471
16472	    error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
16473	      return 0 < yyaction;
16474	             ^
16475
16476	    error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
16477	      return yyaction == 0;
16478	             ^
16479
16480	    error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
16481	      yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
16482	                                                     ^
16483
16484	* data/glr.c, data/yacc.c: Avoid these warnings.
16485
164862018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16487
16488	flex: work around more warnings
16489	* doc/bison.texi: here.
16490
164912018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16492
16493	examples: clang 5 defines nullptr as a macro
16494	* examples/variant.yy: So don't do it.
16495	* examples/variant-11.yy: Fix comment.
16496
164972018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16498
16499	glr.c: be strict about types
16500	* data/glr.c: Don't use `foo |= bar` with foo and bar being yybool:
16501	the result appears to be an int, not a yybool.
16502	Use yybool where appropriate.
16503	Add casts where needed.
16504
165052018-10-23  Akim Demaille  <akim.demaille@gmail.com>
16506
16507	yacc.c: fix warnings about integral types
16508	Reported by Derek Clegg.
16509	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00018.html
16510
16511	Rather than adding casts, we should be more careful with types.  For
16512	instance yystate should be a yytype_int16.  But currently we can't: it
16513	is also used sometimes for storing other things that state numbers.
16514
16515	* data/yacc.c (yyparse): Add missing casts.
16516
165172018-10-22  Akim Demaille  <akim.demaille@gmail.com>
16518
16519	yacc.c: clarify the computation of yystate
16520	The yacc.c skeleton is old, and was using many tricks to save
16521	registers.  Today's register allocators can do this themselves.  Let's
16522	keep the code simpler to read and let compilers do their job.
16523
16524	* data/yacc.c: Avoid using yystate for different types of content.
16525	An inline function would be better, but doing this portably will be
16526	a problem.
16527
165282018-10-22  Akim Demaille  <akim.demaille@gmail.com>
16529
16530	printf returns a signed int
16531	* tests/local.at: Adjust location_print's signature.
16532
165332018-10-22  Akim Demaille  <akim.demaille@gmail.com>
16534
16535	tests: be strict about types
16536	* tests/actions.at, tests/c++.at, tests/cxx-type.at,
16537	* tests/glr-regression.at, tests/local.at, tests/torture.at,
16538	* tests/types.at:
16539	Pay stricter attention to types to avoid warnings.
16540
165412018-10-22  Akim Demaille  <akim.demaille@gmail.com>
16542
16543	c++: fix signedness issues
16544	* data/lalr1.cc, data/stack.hh: The callers of stack use int, while
16545	stack is based on size_type.  Add overloads to avoid warnings.
16546
165472018-10-22  Akim Demaille  <akim.demaille@gmail.com>
16548
16549	c++: minor changes
16550	* data/lalr1.cc: Fix oldish comment.
16551	* data/stack.hh: Prefer typename for type names.
16552	Use size() instead of duplicating it.
16553	* examples/variant-11.yy, examples/variant.yy (yylex): Use int,
16554	as this is the type of the semantic value.
16555
165562018-10-22  Akim Demaille  <akim.demaille@gmail.com>
16557
16558	all: display a clear warning about private macros
16559	* data/bison.m4 (b4_disclaimer): New.
16560	* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
16561
165622018-10-21  Akim Demaille  <akim.demaille@gmail.com>
16563
16564	c++: minor simplification
16565	* data/stack.hh: Prefer a default argument value to two constructors.
16566
165672018-10-21  Akim Demaille  <akim.demaille@gmail.com>
16568
16569	regen
16570
165712018-10-21  Akim Demaille  <akim.demaille@gmail.com>
16572
16573	all: avoid useless comments and #lines
16574	Currently we emit useless code for places where we might issue user
16575	content, but there is none.  This commit avoids this.  Besides, some
16576	of the comments looked like implementation details ("Copy the first
16577	part of user declarations"), rather than made for the reader of the
16578	result ("First part of user prologue").
16579
16580	On Bison's parse-gram.c we get:
16581
16582	    @@ -76,10 +76,6 @@
16583	     #define yynerrs         gram_nerrs
16584
16585	    -/* Copy the first part of user declarations.  */
16586	    -
16587	    -#line 82 "src/parse-gram.c" /* yacc.c:339  */
16588	    -
16589
16590	* data/bison.m4 (b4_define_user_code): Accept a comment to document
16591	the section.
16592	Do not emit any code if the content is empty.
16593	Adjust callers to not emit the comment.
16594	Do not
16595	* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java, data/yacc.c:
16596	Adjust.
16597
165982018-10-21  Akim Demaille  <akim.demaille@gmail.com>
16599
16600	tests: refactor
16601	* tests/actions.at, tests/synclines.at: Prefer iteration to
16602	copy-paste.
16603
166042018-10-21  Akim Demaille  <akim.demaille@gmail.com>
16605
16606	tests: rename AT_SKEL_CC_IF/AT_SKEL_JAVA_IF as AT_CXX_IF/AT_JAVA_IF
16607	The previous name is too obscure, and the other macros for C++ use
16608	CXX, not CC.
16609
16610	* tests/local.at (AT_SKEL_CC_IF, AT_SKEL_JAVA_IF): Rename as...
16611	(AT_CXX_IF, AT_JAVA_IF): these.
16612	Adjust callers.
16613
166142018-10-21  Akim Demaille  <akim.demaille@gmail.com>
16615
16616	c++: check that emplace for rvalues works
16617	See the previous commit.
16618
16619	* tests/local.at (AT_REQUIRE_CXX_VERSION): New.
16620	* tests/types.at (api.value.type): Check emplace in C++14.
16621
166222018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16623
16624	c++: prefer a perfect forwarding version of variant's emplace
16625	* data/variant.hh (emplace): In modern C++, use only a perfect
16626	forwarding version.
16627	And use it.
16628	* doc/bison.texi: Document it.
16629
166302018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16631
16632	c++: prefer 'emplace' to 'build'
16633	When we introduced variants in Bison, C++ did not have the 'emplace'
16634	functions, and we chose 'build'.  Let's align with modern C++ and
16635	promote 'emplace' rather than 'build'.
16636
16637	* data/lalr1.cc, data/variant.hh (emplace): New.
16638	(build): Deprecate in favor of emplace.
16639	* doc/bison.texi: Adjust.
16640
166412018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16642
16643	%printer: promote yyo rather than yyoutput
16644	* doc/bison.texi: Promote yyo rather than yyoutput.
16645
16646	* data/c.m4, data/glr.cc, tests/types.at, tests/calc.at,
16647	tests/regression.at: Adjust.
16648
166492018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16650
16651	doc: improve the C++ section
16652	* doc/bison.texi (C++ Parser): file.hh and location.hh are no longer
16653	mandatory.
16654	Various minor fixes.
16655
166562018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16657
16658	doc: reorder C++ sections
16659	* doc/bison.texi (C++ Parser Interface): Document before semantic_type
16660	and location_type.
16661
166622018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16663
16664	git: don't ignore auxiliary Texinfo files
16665	As a matter of fact, I think it is wrong to gitignore generated files
16666	that belong to the build tree.  There should be the strict minimum,
16667	and it's up to people that build in place to adjust their own
16668	~/.gitignore.
16669
16670	* doc/.gitignore: here.
16671	Remove files we no longer produce (thanks to texi2dvi).
16672
166732018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16674
16675	c++: do not exhibit private macros
16676	* examples/variant-11.yy: here.
16677
166782018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16679
16680	c++: don't obfuscate std::move when not needed
16681	* data/lalr1.cc, data/variant.hh: Avoid macros that depend on the
16682	version of C++ when not needed.
16683
166842018-10-20  Akim Demaille  <akim.demaille@gmail.com>
16685
16686	build: add missing gnulib libs
16687	Reported by Denis Excoffier.
16688
16689	* lib/local.mk, src/local.mk: here.
16690
166912018-10-18  Akim Demaille  <akim.demaille@gmail.com>
16692
16693	maint: post-release administrivia
16694	* NEWS: Add header line for next release.
16695	* .prev-version: Record previous version.
16696	* cfg.mk (old_NEWS_hash): Auto-update.
16697
166982018-10-18  Akim Demaille  <akim.demaille@gmail.com>
16699
16700	version 3.1.91
16701	* NEWS: Record release date.
16702
167032018-10-18  Akim Demaille  <akim.demaille@gmail.com>
16704
16705	NEWS: update
16706
167072018-10-18  Akim Demaille  <akim.demaille@gmail.com>
16708
16709	examples: force stack resizing with unique_ptr
16710	In the previous commit we fixed a problem when the C++ stack was
16711	resized.  The test was using ints.  Let's add a test with someone
16712	quite touchy: unique_ptr
16713
16714	* examples/variant-11.yy: Accept an argument, which is the number of
16715	numbers to send to the parser.
16716	* examples/variant-11.test: Check with many numbers.
16717
167182018-10-18  Akim Demaille  <akim.demaille@gmail.com>
16719
16720	lalr1.cc: fix stack symbol move
16721	In some casing, once we moved a stack symbol, we forget to mark the
16722	source stack symbol as emptied.  As a consequence, it may be destroyed
16723	a second time.
16724
16725	This happens when the stack has to be resized.
16726
16727	* data/lalr1.cc (stack_symbol_type::stack_symbol_type): Record that
16728	the source was emptied.
16729	(stack_symbol_type::operator=): Likewise.
16730	* tests/c++.at (C++ Variant-based Symbols Unit Tests): Force the stack
16731	to be resized.  Check its content.
16732
167332018-10-17  Akim Demaille  <akim.demaille@gmail.com>
16734
16735	doc: improve the doc of the examples
16736	* examples/README: here.
16737
167382018-10-17  Akim Demaille  <akim.demaille@gmail.com>
16739
16740	reader: recognize C++ even when it's not lalr1.cc or glr.cc
16741	* src/reader.c (grammar_rule_check_and_complete): If a user uses her
16742	own skeleton but sets the language to C++, recognize it as C++.
16743
167442018-10-17  Akim Demaille  <akim.demaille@gmail.com>
16745
16746	maint: post-release administrivia
16747	* NEWS: Add header line for next release.
16748	* .prev-version: Record previous version.
16749	* cfg.mk (old_NEWS_hash): Auto-update.
16750
167512018-10-17  Akim Demaille  <akim.demaille@gmail.com>
16752
16753	version 3.1.90
16754	* NEWS: Record release date.
16755
167562018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16757
16758	examples: don't generate the position/stack files
16759	* examples/variant-11.yy, examples/variant.yy: Require 3.2.
16760
167612018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16762
16763	gnulib: update
16764
167652018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16766
16767	pacify syntax-checks
16768	* lib/lbitset.c, tests/c++.at: here.
16769	* cfg.mk: Add exceptions.
16770
167712018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16772
16773	regen
16774
167752018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16776
16777	generate the default action only for C++
16778	This commit adds restrictions to what was done in
16779	01898726e27c8cf64f8fcea7f26f8ce62f3f5cf2 [1].
16780
16781	Rici Lake [2] has shown that it's risky to disable the pre-action, at
16782	least now.  Also, generating the default $$ = $1 action can have bad
16783	effects in some cases [3].
16784
16785	The original change [1] was prompted for C++.  Let's try it there
16786	only, for a start.  We could restrict it further to lalr1.cc with
16787	variants, but we need to see in the wild how this change behaves.  And
16788	it is not unreasonable to expect grammar files in C++ to behave better
16789	wrt types.
16790
16791	See
16792	[1] https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00050.html
16793	[2] https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00061.html
16794	[3] https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00066.html
16795
16796	* src/getargs.c: Style changes.
16797	* src/reader.c (grammar_rule_check_and_complete): Complete only for
16798	C++.
16799
168002018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16801
16802	regen
16803
168042018-10-16  Akim Demaille  <akim.demaille@gmail.com>
16805
16806	C++: let %require "3.2" disable the generation of obsolete files
16807	The files stack.hh and position.hh are deprecated.  Rather than
16808	devoting specify %define variables to discard them (api.position.file
16809	and api.stack.file), and rather than having to use special rules when
16810	api.location.file is used, let's simply decide that from %require
16811	"3.2" onwards, these files will not be generated.
16812
16813	The only noticeable thing here is that, in order to be able to check
16814	the behavior of %require "3.2", to have this version (which is still
16815	3.1-*) to accept %require "3.2".
16816
16817	* src/gram.h, src/gram.c (required_version): New.
16818	* src/parse-gram.y (version_check): Set it.
16819	* src/output.c (prepare): Pass it m4.
16820	* data/bison.m4 (b4_required_version_if): Receive it and use it.
16821	* data/location.cc, data/stack.hh: Replace the api.*.file with only
16822	required version comparison.
16823	* tests/input.at: No longer check api.stack.file and api.position.file.
16824	* NEWS, doc/bison.texi: Don't mention them.
16825	Document the %require 3.2 behavior.
16826	* tests/output.at: Use %require 3.2 instead.
16827
168282018-10-15  Akim Demaille  <akim.demaille@gmail.com>
16829
16830	java: bump to Java SE 7
16831	macOS 10.14 no longer supports versions of Java earlier than 5.
16832	And Java 6 will be deprecated by the end of this year.  So let's move
16833	our requirement to Java 7.
16834	Reported by Yu Yijun.
16835	https://lists.gnu.org/archive/html/bug-bison/2018-09/msg00060.html
16836	Suggested by Paul Eggert and Bruno Haible.
16837	http://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00094.html
16838
16839	* configure.ac: Require Java 7, both compiler and runtime.
16840
168412018-10-15  Akim Demaille  <akim.demaille@gmail.com>
16842
16843	doc: do not advertise %nterm
16844	Reported by Rici Lake.
16845	http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html
16846
16847	* NEWS, doc/bison.texi: here.
16848
168492018-10-14  Akim Demaille  <akim.demaille@gmail.com>
16850
16851	generate the default semantic action
16852	Currently, in C, the default semantic action is implemented by being
16853	always run before running the actual user semantic action.  As a
16854	consequence, when the user action is run, $$ is already set as $1.
16855
16856	In C++ with variants, we don't do that, since we cannot manipulate the
16857	semantic value without knowing its exact type.  When variants are
16858	enabled, the only guarantee is that $$ is default contructed and ready
16859	to the used.
16860
16861	Some users still would like the default action to be run with
16862	variants.  Frank Heckenbach's parser in
16863	C++17 (http://lists.gnu.org/archive/html/bug-bison/2018-04/msg00011.html)
16864	provides this feature, but relying on std::variant's dynamic typing,
16865	which we forbid in lalr1.cc.
16866
16867	The simplest seems to be actually generating the default semantic
16868	action (in all languages/skeletons).  This makes the pre-action (that
16869	sets $$ to $1) useless.  But...  maybe some users depend on this, in
16870	spite of the comments that clearly warn againt this.  So let's not
16871	turn this off just yet.
16872
16873	* src/reader.c (grammar_rule_check_and_complete): Rename as...
16874	(grammar_rule_check_and_complete): this.
16875	Install the default semantic action when applicable.
16876	* examples/variant-11.yy, examples/variant.yy, tests/calc.at:
16877	Exercise the default semantic action, even with variants.
16878
168792018-10-14  Jannick  <thirdedition@gmx.net>
16880
16881	xml2xhtml.xsl: add UTF-8 encoding
16882	To make arrows appear nicely in the browser. Currently it is shown as
16883	some garbled something in mine (Firefox).
16884
16885	* data/xslt/xml2xhtml.xsl: here.
16886
168872018-10-14  Akim Demaille  <akim.demaille@gmail.com>
16888
16889	reader: reorder some calls to separate checks from assignments
16890	* src/reader.c (packgram): Move assignments to rules[ruleno] after the
16891	checks on the rule.
16892
168932018-10-14  Akim Demaille  <akim.demaille@gmail.com>
16894
16895	C++: style: add missing space before parens
16896	* data/c++.m4, data/lalr1.cc, data/stack.hh, data/variant.hh,
16897	* examples/variant-11.yy: here.
16898
168992018-10-14  Akim Demaille  <akim.demaille@gmail.com>
16900
16901	gnulib: update timevar
16902	See
16903	https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00005.html.
16904
169052018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16906
16907	style: modernize lib/vbitset.h
16908
169092018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16910
16911	style: modernize lib/vbitset.c
16912
169132018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16914
16915	style: modernize lib/lbitset.c
16916
169172018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16918
16919	style: modernize lib/lbitset.h
16920
169212018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16922
16923	style: modernize lib/ebitset.c
16924
169252018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16926
16927	style: modernize lib/ebitset.h
16928
169292018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16930
16931	style: modernize lib/bitsetv.c
16932
169332018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16934
16935	style: modernize lib/bitsetv.h
16936
169372018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16938
16939	style: modernize lib/bitsetv-print.c
16940
169412018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16942
16943	style: modernize lib/bitsetv-print.h
16944
169452018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16946
16947	style: modernize lib/bitset_stats.c
16948
169492018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16950
16951	style: modernize lib/bitset_stats.h
16952
169532018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16954
16955	style: modernize lib/bitset.c
16956
169572018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16958
16959	style: modernize lib/bitset.h
16960
169612018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16962
16963	style: modernize lib/bbitset.h
16964
169652018-10-11  Akim Demaille  <akim.demaille@gmail.com>
16966
16967	style: modernize lib/abitset.c
16968
169692018-10-10  Akim Demaille  <akim.demaille@gmail.com>
16970
16971	style: modernize lib/abitset.h
16972
169732018-10-09  Akim Demaille  <akim.demaille@gmail.com>
16974
16975	C++: issue a better CPP guard and Doxygen file command
16976	Currently we use "<dir><api.location.file>" as \file argument, and as
16977	base for the CPP guard.  This is not nice when <dir> is absolute, in
16978	which case it is expected that the user will use api.location.include
16979	to get something nicer.  If defined, use that name instead.
16980
16981	* data/location.cc (b4_location_path): New.
16982	Use it.
16983	* tests/c++.at (Shared locations): Check the guard and Doxygen doc.
16984
169852018-10-09  Akim Demaille  <akim.demaille@gmail.com>
16986
16987	C++: remove stray empty line
16988	* data/stack.hh: here.
16989
169902018-10-09  Akim Demaille  <akim.demaille@gmail.com>
16991
16992	doc: spell check
16993
169942018-10-09  Akim Demaille  <akim.demaille@gmail.com>
16995
16996	doc: document api.*.file and the like
16997	* doc/bison.texi (Exposing the Location Classes): New.
16998	(%define Summary): Document api.location.file, api.location.include,
16999	api.stack.file and api.position.file.
17000	(C++ Bison Interface): stack.hh and position.hh are deprecated.
17001
170022018-10-07  Akim Demaille  <akim.demaille@gmail.com>
17003
17004	build: add missing gnulib libs
17005	* src/local.mk (LDADD): Here.
17006
170072018-10-07  Akim Demaille  <akim.demaille@gmail.com>
17008
17009	build: let timevar be dealt with by gnulib
17010	* lib/local.mk (lib_libbison_a_SOURCES): Remove timevar.
17011
170122018-10-07  Akim Demaille  <akim.demaille@gmail.com>
17013
17014	build: fix distcheck
17015	Now that distcheck no longer fails (see previous commit), let's
17016	address the shortcomings.
17017
17018	* Makefile.am (CLEANDIRS, clean-local): New.
17019	* doc/local.mk, examples/calc++/local.mk, examples/local.mk,
17020	* examples/mfcalc/local.mk, examples/rpcalc/local.mk,
17021	* src/local.mk
17022	(CLEANDIRS): Get rid of Apple's *.dSYM directories.
17023	(CLEANFILES): Get rid of *.output files.
17024	* examples/variant-11.yy, examples/variant.yy: Don't generate
17025	any of the auxiliary files (location.hh and the like).
17026
170272018-10-07  Akim Demaille  <akim.demaille@gmail.com>
17028
17029	README: work around a nasty behavior of gettext
17030	`make update-po` runs:
17031
17032	    package_gnu="$(PACKAGE_GNU)"; \
17033	    test -n "$$package_gnu" || { \
17034	      if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
17035	             LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
17036	                           -size -10000000c -exec grep 'GNU @PACKAGE@' \
17037	                           /dev/null '{}' ';' 2>/dev/null; \
17038	           else \
17039	             LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
17040	           fi; \
17041	         } | grep -v 'libtool:' >/dev/null; then \
17042	         package_gnu=yes; \
17043	       else \
17044	         package_gnu=no; \
17045	       fi; \
17046	    }; \
17047
17048	and based on the result, put GNU or not in the following line from
17049	bison.pot:
17050
17051	    # This file is distributed under the same license as the GNU bison package.
17052
17053	It turns out that in my environment some log files had the 'GNU bison'
17054	string (note the lower case), but in distcheck, these files are no
17055	longer visible, so the generate bison.pot was different, and distcheck
17056	failed because we try to update bison.pot, which is read only in
17057	distcheck.
17058
17059	The heuristics should look accept 'GNU Bison', not just 'GNU bison'.
17060	But let's please it to make sure we have our 'GNU'.
17061
17062	* README: Mention 'GNU bison'.
17063
170642018-10-07  Akim Demaille  <akim.demaille@gmail.com>
17065
17066	NEWS: document api.*.file changes
17067
170682018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17069
17070	c++: provide a means to control how location.hh is included
17071	Users may want to generate the location file elsewhere, say
17072	$top_srcdir/include/ast/location.hh.  Yet, we should not generate
17073	`#include "$top_srcdir/include/ast/location.hh"` but probably
17074	something like `#include <ast/location.hh>`, or `#include
17075	"ast/location.hh", or `#include <location.hh>`.  It entirely depends
17076	on the compiler flags (-I/-isystem) that are used.  Bison cannot guess
17077	what is expected, so let's give the user a means to tell how the
17078	location file should be included.
17079
17080	* data/location.cc (b4_location_file): New.
17081	* data/glr.cc, data/lalr1.cc: Use it.
17082
170832018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17084
17085	c++: support absolute api.location.file names
17086	In the case a user wants to create location.hh elsewhere, it can be
17087	helpful to define api.location.file to some possibly absolute path
17088	such as -Dapi.location.file='"$(top_srcdir)/include/ast/location.hh"'.
17089	Currently this does not work with `-o foo/parser.cc`, as we join foo/
17090	and $(top_srcdir) together, the latter starting with slash.
17091
17092	We should not try to do that in m4, manipulating file names is quite
17093	complex when you through Windows file name in.  Let m4 delegate this
17094	to gnulib.
17095
17096	* src/scan-skel.l (at_output): Accept up to two arguments.
17097	* data/bison.m4 (b4_output): Adjust.
17098	* tests/skeletons.at (Fatal errors but M4 continues producing output):
17099	Adjust to keep the error.
17100
17101	* data/location.cc, data/stack.hh: Leave the concatenation to @output.
17102	* tests/output.at: Exercise api.location.file with an absolute path.
17103
171042018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17105
17106	c++: when api.location.file is defined, don't generate stack.hh
17107	Make it easier to have fewer files.
17108
17109	* data/stack.hh: Don't generate stack.hh when api.location.file is
17110	specified.
17111	* tests/calc++.at, tests/output.at: Adjust tests.
17112
171132018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17114
17115	c++: make position.hh completely useless
17116	Let's put the definition of position into location.hh, there's no real
17117	value in keeping them separate: they are small, and share the same
17118	requirements.
17119
17120	To help users transition to this new model, still generate position.hh
17121	by default, but as a simple include to location.hh.
17122
17123	* data/location.cc (api.position.file): Accept only 'none' as possible
17124	value.
17125	(position.hh): Make it a stub.
17126	(location.hh): Adjust.
17127	(b4_position_define): Merge into...
17128	(b4_location_define): this.
17129	* data/glr.cc, data/lalr1.cc, tests/input.at, tests/output.at: Adjust.
17130
171312018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17132
17133	c++: make stack.hh completely useless
17134	Let's completely deprecate stack.hh.  Don't provide a means to give it
17135	a new name, allow only its removal.
17136
17137	See https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00151.html
17138	and https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00182.html.
17139
17140	* data/stack.hh: Reduce stack.hh to a simple comment explaining how to
17141	get rid of it.
17142	* data/lalr1.cc: Adjust
17143	* tests/input.at (%define file variables): Adjust.
17144	* tests/output.at: Remove cases where stack.hh was removed.
17145
171462018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17147
17148	c++: add support for api.position.file and api.location.file
17149	* data/location.cc: Sort includes.
17150	(b4_position_file, b4_location_file): New.
17151	When there's a file for locations but not for positions, include the
17152	definition of position in the location file.
17153	* data/lalr1.cc (b4_shared_declarations): Include the
17154	position/location file when it exists.
17155	Otherwise, define the class.
17156	* data/glr.cc: Likewise.
17157	* tests/input.at (%define file variables): Check them.
17158	* tests/output.at (C++ output): Check various cases with
17159	api.position.file and api.location.file.
17160
171612018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17162
17163	c++: provide control over the stack.hh file name
17164	It was not a good idea to generate the file stack.hh.  It never was.
17165	But now we have to deal with backward compatibility: if we stop
17166	generating it, the build system of some build system will probably
17167	break.
17168
17169	So offer the user a means to (i) decide what the name of the output
17170	file should be, and (ii) not generate this file at all (its content
17171	will be inline where the parser is defined).
17172
17173	* data/lalr1.cc (b4_percent_define_check_file_complain)
17174	(b4_percent_define_check_file): New.
17175	* data/stack.hh: Generate the file only if api.stack.file is not
17176	empty.
17177	In that case, use it as file name.
17178	* data/lalr1.cc: Adjust to include the right file, or to include
17179	the definition of stack.
17180	* tests/calc.at, tests/output.at: Exercise api.stack.file.
17181
171822018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17183
17184	tests: c++: don't fuse prefix and namespace
17185	They are not the same concept.  It appears that we still consider that
17186	api.prefix is the default for api.namespace.  We should stop that.
17187
17188	* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
17189	Separate namespace and prefix.
17190	Adjust dependencies.
17191
171922018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17193
17194	style: tests: factor file extension computations
17195	* tests/local.at (AT_LANG_HDR): New.
17196	* tests/calc.at, tests/headers.at, tests/synclines.at: Use it, and
17197	AT_LANG_EXT.
17198
171992018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17200
17201	c++: style changes
17202	* data/lalr1.cc: Formatting changes.
17203	Remove duplicate definition of YY_NULLPTR.
17204	Add quotes to help Emacs track balanced parens.
17205
172062018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17207
17208	lib: introduce xpath_join
17209	* lib/path-join.h, lib/path-join.c: New.
17210	* lib/local.mk: Adjust.
17211	* src/output.c: Use it.
17212
172132018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17214
17215	CI: travis finally knows about llvm-toolchain-trusty-7
17216	See https://github.com/travis-ci/apt-source-safelist/pull/392.
17217
172182018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17219
17220	gnulib: update
17221
172222018-10-06  Akim Demaille  <akim.demaille@gmail.com>
17223
17224	doc: restore spello made on purpose
17225
172262018-10-05  Akim Demaille  <akim.demaille@gmail.com>
17227
17228	THANKS: add Josh Soref
17229
172302018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17231
17232	spelling: whether
17233
172342018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17235
17236	spelling: typedef
17237
172382018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17239
17240	spelling: troubleshooting
17241
172422018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17243
17244	spelling: transparent
17245
172462018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17247
17248	spelling: translated
17249
172502018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17251
17252	spelling: transitions
17253
172542018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17255
17256	spelling: transition
17257
172582018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17259
17260	spelling: tracking
17261
172622018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17263
17264	spelling: suppress
17265
172662018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17267
17268	spelling: succesful
17269
172702018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17271
17272	spelling: storage
17273
172742018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17275
17276	spelling: safely
17277
172782018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17279
17280	spelling: responsibility
17281
172822018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17283
17284	spelling: resources
17285
172862018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17287
17288	spelling: releases
17289
172902018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17291
17292	spelling: reduction
17293
172942018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17295
17296	spelling: reachable
17297
172982018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17299
17300	spelling: rawtoknumflag
17301
173022018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17303
17304	spelling: possibly
17305
173062018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17307
17308	spelling: persistent
17309
173102018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17311
17312	spelling: outputting
17313
173142018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17315
17316	spelling: otherwise
17317
173182018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17319
17320	spelling: occurrence
17321
173222018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17323
17324	spelling: namespace
17325
173262018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17327
17328	spelling: minimal
17329
173302018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17331
17332	spelling: invocations
17333
173342018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17335
17336	spelling: initialize
17337
173382018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17339
17340	spelling: incorrectly
17341
173422018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17343
17344	spelling: included
17345
173462018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17347
17348	spelling: illicit
17349
173502018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17351
17352	spelling: handling
17353
173542018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17355
17356	spelling: gratuitously
17357
173582018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17359
17360	spelling: grammar
17361
173622018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17363
17364	spelling: generation
17365
173662018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17367
17368	spelling: generate
17369
173702018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17371
17372	spelling: forewarn
17373
173742018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17375
17376	spelling: fnchange
17377
173782018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17379
17380	spelling: family
17381
173822018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17383
17384	spelling: extensions
17385
173862018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17387
17388	spelling: enum
17389
173902018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17391
17392	spelling: diagnostics
17393
173942018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17395
17396	spelling: determined
17397
173982018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17399
17400	spelling: detailed
17401
174022018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17403
17404	spelling: descriptive
17405
174062018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17407
17408	spelling: definitions
17409
174102018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17411
17412	spelling: declaration
17413
174142018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17415
17416	spelling: corrupted
17417
174182018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17419
17420	spelling: consuming
17421
174222018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17423
17424	spelling: consistently
17425
174262018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17427
17428	spelling: conflicts
17429
174302018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17431
17432	spelling: concatenation
17433
174342018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17435
17436	spelling: complete
17437
174382018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17439
17440	spelling: compatibility
17441
174422018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17443
17444	spelling: comparison
17445
174462018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17447
17448	spelling: combination
17449
174502018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17451
17452	spelling: characters
17453
174542018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17455
17456	spelling: builddir
17457
174582018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17459
17460	spelling: assoc
17461
174622018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17463
17464	spelling: appropriate
17465
174662018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17467
17468	spelling: alignment
17469
174702018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17471
17472	spelling: aggregate
17473
174742018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17475
17476	spelling: adjust
17477
174782018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17479
17480	spelling: additional
17481
174822018-10-05  Josh Soref  <jsoref@users.noreply.github.com>
17483
17484	spelling: accurately
17485
174862018-10-05  Akim Demaille  <akim.demaille@gmail.com>
17487
17488	README-hacking: details about make check-local
17489
174902018-10-05  Akim Demaille  <akim.demaille@gmail.com>
17491
17492	gnulib: update
17493
174942018-10-04  Akim Demaille  <akim.demaille@gmail.com>
17495
17496	main: fix error message for missing argument
17497	* src/getargs.c (getargs): Don't display any argv other that argv[0]
17498	when reporting a missing argument.
17499	* tests/bison.in: Neutralize path differences in stderr.
17500	* tests/input.at (Invalid number of arguments): New.
17501
175022018-09-30  Akim Demaille  <akim.demaille@gmail.com>
17503
17504	gnulib: move timevar to it
17505	* lib/timevar.c, lib/timevar.h, m4/timevar.m4: Remove.
17506	* gnulib: Update.
17507	* configure.ac: Adjust.
17508	* lib/timevar.def: Use lower case for the timevvars.
17509	Adjust dependencies.
17510
175112018-09-29  Akim Demaille  <akim.demaille@gmail.com>
17512
17513	style: comment changes
17514	* data/glr.cc, data/lalr1.cc: here.
17515
175162018-09-29  Akim Demaille  <akim.demaille@gmail.com>
17517
17518	gnulib: update
17519
175202018-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17521
17522	getargs: use LC_MESSAGES trick only on glibc
17523	* src/getargs.c (usage): Rely on setlocale (LC_MESSAGES, NULL)
17524	trick only on glibc, as POSIX does not specify the output
17525	of setlocale in this case, and the Gnulib localename module
17526	source code indicates that the trick works only on glibc.
17527
175282018-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17529
17530	uniqstr: avoid need for VLAs
17531	C11 no longer requires support for variable-length arrays, and
17532	VS2015 does not have them.  Redo UNIQSTR_CONCAT to use a method
17533	that is simpler and better anyway.
17534	* src/uniqstr.c (uniqstr_vsprintf): Remove; no longer needed.
17535	* src/uniqstr.h (UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_):
17536	* src/uniqstr.c (uniqstr_concat): New function.
17537	* src/uniqstr.h (UNIQSTR_CONCAT): Use it instead of using
17538	uniqstr_vsprintf.
17539
175402018-09-26  Akim Demaille  <akim.demaille@gmail.com>
17541
17542	doc: clean up the C++ section
17543	* doc/bison.texi: Minor fixes in typography.
17544	It is no longer require to pass --defines for C++ (it was addressed
17545	long ago).
17546	No longer refer to the `variant` define variable, it was replaced by
17547	`api.value.type variant`.
17548	Prefer nullptr to 0 for the null pointer.
17549	Use deftypeop for constructors.
17550	(Complete Symbols): Give the expected signature of yylex.
17551	Don't document the symbol_type constructors, as we want users to focus
17552	on make_TOKEN.
17553	Also show the case without locations.
17554
175552018-09-26  Akim Demaille  <akim.demaille@gmail.com>
17556
17557	CI: fixes for clang and asan
17558	Bison's test 464 (Syntax error as exception) fails on the CI.
17559	Do not use clang with asan on Ubuntu's libc++.
17560	https://bugs.llvm.org/show_bug.cgi?id=17379
17561
17562	* .travis.yml (Clang 7 libc++ and ASAN): New.
17563	(Clang 6 -O3 and libc++): Really use libc++.
17564	(Clang 5): Don't use libc++, nor asan (does not work either, same
17565	reason).
17566
175672018-09-24  Akim Demaille  <akim.demaille@gmail.com>
17568
17569	style: reduce scopes in muscle-tab.c
17570
175712018-09-24  Akim Demaille  <akim.demaille@gmail.com>
17572
17573	style: remove useless parens
17574	* data/bison.m4, data/glr.c, data/glr.cc, data/lalr1.cc,
17575	* data/lalr1.java, data/location.cc, data/yacc.c: Call b4_output_end
17576	without parens.
17577
175782018-09-24  Akim Demaille  <akim.demaille@gmail.com>
17579
17580	c++: fix warning message for automove
17581	* src/scan-code.l: Remove 'enabled'.
17582	Use only $k (numeric), even for named references, for clarity.
17583	* tests/c++.at: Adjust expectations.
17584
175852018-09-24  Akim Demaille  <akim.demaille@gmail.com>
17586
17587	style: minor refactoring
17588	* data/bison.m4: Formatting changes.
17589	* src/scan-code.l: Avoid loops, prefer standard string functions.
17590	(find_prefix_end): Be const correct.
17591	Avoid useless intermediate variables.
17592	(variant_add): Be const correct.
17593	(parse_ref): Prefer variable definitions to assignments.
17594
175952018-09-24  Akim Demaille  <akim.demaille@gmail.com>
17596
17597	CI: don't exit
17598	* .travis.yml: Prefer `false` to `exit`, as it completely ends the
17599	script (so we don't get the logs).
17600
176012018-09-24  Akim Demaille  <akim.demaille@gmail.com>
17602
17603	CI: really use Clang 3.3 and 3.4, not 5.0
17604	* .travis.yml: Don't define CC/CXX, it does not work.
17605	Use `[[...]]` instead of `[...]`.
17606	Show the compiler versions.
17607	(Clang 3.3, Clang 3.4): Specify the path to avoid using
17608	/usr/local/clang-5.0.0/bin's clang.
17609
176102018-09-23  Akim Demaille  <akim.demaille@gmail.com>
17611
17612	CI: more compiler configurations
17613	* .travis.yml (GCC 8): Use sanitizers.
17614	(Clang 5 -O3): Remove, replaced by...
17615	(Clang 7 ASAN and libc++, Clang 6 -O3 and libc++): New.
17616
176172018-09-23  Akim Demaille  <akim.demaille@gmail.com>
17618
17619	build: rename and simplify the -std checks for C++
17620	Too much code duplication.
17621
17622	* m4/bison-cxx-std.m4: s/BISON_CXX_COMPILE_STDCXX/BISON_CXXSTD/.
17623	(BISON_CXXSTD): New.
17624	* configure.ac: Use it.
17625
176262018-09-23  Akim Demaille  <akim.demaille@gmail.com>
17627
17628	build: check for C++98 and 03 like the others
17629	* m4/bison-cxx-std.m4 (BISON_CXX_COMPILE_STDCXX_98)
17630	(BISON_CXX_COMPILE_STDCXX_03): New.
17631	* configure.ac: Use them.
17632
176332018-09-23  Akim Demaille  <akim.demaille@gmail.com>
17634
17635	build: use our own version of ax_check_link_flag
17636	The message on configure is misleading:
17637
17638	    checking whether the linker accepts -std=c++11... yes
17639	    checking whether the linker accepts -std=c++14... yes
17640	    checking whether the linker accepts -std=c++17... no
17641
17642	It is the compiler that we check, not just the linker.
17643
17644	* m4/ax_check_link_flag.m4: Remove.
17645	* m4/bison-check-compiler-flag.m4: New.
17646	* m4/bison-cxx-std.m4: Use it.
17647
176482018-09-23  Akim Demaille  <akim.demaille@gmail.com>
17649
17650	build: fix Autoconf macros to check for C++ standard flags
17651	* m4/bison-cxx-std.m4: Since now we link the program, we need a
17652	program: main was missing and linking was failing.
17653
176542018-09-23  Akim Demaille  <akim.demaille@gmail.com>
17655
17656	tests: fix a memory leak
17657	This has been bugging me for while.  I was hard to reproduce: it
17658	worked only on GNU/Linux, probably because libc++ implements the small
17659	string optimization, while libstdc++ did not and actually allocated on
17660	the heap for this small string.
17661
17662	See https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00110.html.
17663
17664	* tests/types.at (api.value.type): Do not provide a semantic value to
17665	EOF.
17666
176672018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17668
17669	doc: work around Flex's use of 'register'
17670	The CI uses an old version of Flex.
17671	See 65fa634cdcfc5cf59b8b074670f488bba4df57cd.
17672
17673	* doc/bison.texi (calc++/scanner.ll): Here.
17674
176752018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17676
17677	timevar: don't declare getrusage if we don't use it
17678	This fails on MinGW.
17679	Reported by Simon Sobisch.
17680	http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00058.html
17681
17682	* lib/timevar.c: Don't provide default prototypes for functions
17683	we don't use.
17684
176852018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17686
17687	timevar: get rid of a useless macro
17688	* lib/timevar.h (timevar_report): Rename as...
17689	(timevar_enabled): this.
17690	* lib/timevar.c (TIMEVAR_ENABLE): Remove.
17691
176922018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17693
17694	timevar: introduce and use get_current_time
17695	* lib/timevar.c: here.
17696	Remove useless prototypes.
17697	(timevar_accumulate): Be const correct.
17698
176992018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17700
17701	timevar: rename get_time as set_to_current_time
17702	* lib/timevar.c: here.
17703
177042018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17705
17706	timevar: reduce scopes
17707	* lib/timevar.c: here.
17708
177092018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17710
17711	timevar: document in the header, not in the implementation
17712	* lib/timevar.c: Move documentation from here...
17713	* lib/timevar.h: to there.
17714
177152018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17716
17717	timevar: remove useless 'extern' for prototypes
17718	* lib/timevar.h, lib/timevar.c: here.
17719
177202018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17721
17722	timevar: rename init_timevar as timevar_init
17723	* lib/timevar.h, lib/timevar.c: here.
17724	* src/main.c: Adjust.
17725
177262018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17727
17728	timevar: we don't care about backward compatibility
17729	* lib/timevar.h, lib/timevar.c (get_run_time, print_time): Remove.
17730
177312018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17732
17733	timevar: prefer #elif
17734	* lib/timevar.c: Use #if/#elif to be clearer about mutually exclusive
17735	cases.
17736	Indent CPP nested directives.
17737
177382018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17739
17740	timevar: assume ANSI C
17741	Suggested by Bruno Haible.
17742	https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00102.html
17743
17744	* lib/timevar.c: Wow...  This was still KnR C!
17745
177462018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17747
17748	timevar: remove remains of GCC
17749	* lib/timevar.h, lib/timevar.c: Rename the header guard.
17750	Get rid of parts meant for GCC only.
17751
177522018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17753
17754	news: c++: move semantics
17755
177562018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17757
17758	c++: issue a warning with a value is moved several times
17759	Suggested by Frank Heckenbach.
17760	http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00022.html
17761
17762	* src/scan-code.l (parse_ref): Check multiple occurrences of rhs
17763	values.
17764	* tests/c++.at (Multiple occurrences of $n and api.value.automove): New.
17765
177662018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17767
17768	c++: introduce api.value.automove
17769	Based on work by Frank Heckenbach.
17770	See http://lists.gnu.org/archive/html/bug-bison/2018-04/msg00000.html
17771	and http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00019.html.
17772
17773	* data/lalr1.cc (b4_rhs_value): Use YY_MOVE api.rhs.automove is set.
17774	* doc/bison.texi (%define Summary): Document api.rhs.automove.
17775	* examples/variant-11.yy: Use it.
17776
17777	* tests/local.at (AT_AUTOMOVE_IF): New.
17778	* tests/c++.at (Variants): Check move semantics.
17779
177802018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17781
17782	tests: c++: use a custom string type
17783	The forthcoming automove feature, to be properly checked, will require
17784	that we can rely on the value of a moved-from string, which is not
17785	something the C++ standard guarantees.  So introduce our own wrapper.
17786
17787	Suggested by Frank Heckenbach.
17788	https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00111.html
17789
17790	* tests/c++.at (Variants): Introduce and use a new 'string' class.
17791
177922018-09-22  Akim Demaille  <akim.demaille@gmail.com>
17793
17794	tests: prepare a test for automove
17795	The 'Variants' tests are well suited to check support for move, and in
17796	particular for the forthcoming automove feature.  But the tests were
17797	written to show the best practice in C++98, using swap:
17798
17799	    list "," item { std::swap ($$, $1); $$.push_back ($3); }
17800
17801	This cannot work with std::move.  So, make this example simpler, based
17802	on regular assignment instead of swap, which is a regression for
17803	C++98 (as the new traces show), but will be an improvement for modern
17804	C++ with automove.
17805
17806	* tests/c++.at (Variants): Stop using swap.
17807	We don't generate a header file, so remove the 'require' code section.
17808	Adjust expectations.
17809
178102018-09-20  Akim Demaille  <akim.demaille@gmail.com>
17811
17812	style: reduce scopes in gram.c
17813	* src/gram.c: here.
17814
178152018-09-20  Akim Demaille  <akim.demaille@gmail.com>
17816
17817	style: reduce scopes in reduce.c
17818	* src/reduce.c: Here.
17819
178202018-09-20  Akim Demaille  <akim.demaille@gmail.com>
17821
17822	gnulib: update
17823
178242018-09-20  Akim Demaille  <akim.demaille@gmail.com>
17825
17826	build: work around ICC's limitations
17827	Several types of failures.  First, unable to pass the file name
17828	properly to the linker.
17829
17830	    ./synclines.at:416: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o \"\\\"\" \"\\\"\".c $LIBS
17831	    stderr:
17832	    ld: cannot open output file "/"": No such file or directory
17833	    stdout:
17834
17835	Unable to save under such a file name.
17836
17837	    ./synclines.at:421: $CXX $CXXFLAGS $CPPFLAGS -c $LDFLAGS -o \"\\\"\" \"\\\"\".cc $LIBS
17838	    stderr:
17839	    error: can't open file "/"" for write
17840	    compilation aborted for "\"".cc (code 1)
17841
17842	Spurious output because of warning flags is failed to reject as an
17843	error during configure:
17844
17845	    ./headers.at:343: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS c-only.o cxx-only.o -o c-and-cxx ||
17846	              exit 77
17847	    --- /dev/null	2018-09-18 21:21:37.745649000 +0000
17848	    +++ /home/travis/build/akimd/bison/tests/testsuite.dir/at-groups/222/stderr	2018-09-18 21:28:17.291919519 +0000
17849	    @@ -0,0 +1,7 @@
17850	    +icpc: command line warning #10006: ignoring unknown option '-Wcast-align'
17851	    +icpc: command line warning #10006: ignoring unknown option '-fparse-all-comments'
17852	    +icpc: command line warning #10006: ignoring unknown option '-Wdocumentation'
17853	    +icpc: command line warning #10006: ignoring unknown option '-Wnull-dereference'
17854	    +icpc: command line warning #10006: ignoring unknown option '-Wnoexcept'
17855	    +icpc: command line warning #10006: ignoring unknown option '-fno-color-diagnostics'
17856	    +icpc: command line warning #10006: ignoring unknown option '-Wno-keyword-macro'
17857	    stdout:
17858
17859	* tests/local.at (AT_SKIP_IF_CANNOT_LINK_C_AND_CXX): Also ignore
17860	stderr, as with ICC we get
17861	* tests/synclines.at (syncline escapes): Don't link the output.
17862
178632018-09-19  Akim Demaille  <akim.demaille@gmail.com>
17864
17865	doc: fix typo
17866	Introduced in the previous commit.
17867
17868	* doc/bison.texi: here.
17869
178702018-09-19  Akim Demaille  <akim.demaille@gmail.com>
17871
17872	style: use midrule only, not mid-rule
17873	The code was already using midrule only, never mid_rule.  This is
17874	simpler to remember, and matches a similar change we made from
17875	look-ahead to lookahead.
17876
17877	* NEWS, doc/bison.texi, src/reader.c, src/scan-code.h, src/scan-code.l
17878	* tests/actions.at, tests/c++.at, tests/existing.at: here.
17879
178802018-09-19  Akim Demaille  <akim.demaille@gmail.com>
17881
17882	style: use _foo for private macros, not foo_
17883	We use both styles, let's stick to a single one.  Autoconf uses the
17884	prefix one, let's do the same.
17885
17886	* data/bison.m4, data/c++.m4, data/c-like.m4, data/lalr1.cc,
17887	* data/variant.hh, data/yacc.c: Rename all the b4_*_ macros
17888	as _b4_*.
17889
178902018-09-19  Akim Demaille  <akim.demaille@gmail.com>
17891
17892	build: don't accept a broken standard lib for C++
17893	On the CI, we had failures such as:
17894
17895	    ./c++.at:401:  $PREPARSER ./list
17896	    stderr:
17897	    ./list: error while loading shared libraries: libc++.so.1:
17898	            cannot open shared object file: No such file or directory
17899
17900	because we accepted `-std=c++ -stdlib=libc++` although libc++ is not
17901	installed on the machine.
17902
17903	* m4/ax_check_compile_flag.m4 (AX_CHECK_COMPILE_FLAG): Rewrite as...
17904	* m4/bison-check-compile-flag.m4 (BISON_CHECK_COMPILE_FLAG): this, so
17905	that we use AC_LINK_IFELSE to check the compiler (and its std lib)
17906	instead of AC_COMPILE_IFELSE.
17907
179082018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
17909
17910	doc: document older compiler issues
17911	* doc/bison.texi (Compiler Requirements for GLR):
17912	Rename from Compiler Requirements.
17913	(I can't build Bison): Add FAQ for older compilers.
17914
179152018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17916
17917	glr.c: work around ICC limitations
17918	The CI is littered with
17919
17920	    #                             -*- compilation -*-
17921	    423. regression.at:907: testing Dancer %glr-parser ...
17922	    ./regression.at:907: bison -fno-caret -o dancer.c dancer.y
17923	    ./regression.at:907: $BISON_C_WORKS
17924	    stderr:
17925	    stdout:
17926	    ./regression.at:907: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o dancer dancer.c $LIBS
17927	    stderr:
17928	    icc: command line warning #10006: ignoring unknown option '-Wcast-align'
17929	    icc: command line warning #10006: ignoring unknown option '-fparse-all-comments'
17930	    icc: command line warning #10006: ignoring unknown option '-Wdocumentation'
17931	    icc: command line warning #10006: ignoring unknown option '-Wnull-dereference'
17932	    icc: command line warning #10006: ignoring unknown option '-Wbad-function-cast'
17933	    icc: command line warning #10006: ignoring unknown option '-fno-color-diagnostics'
17934	    icc: command line warning #10006: ignoring unknown option '-Wno-keyword-macro'
17935	    dancer.c(755): error #1628: function declared with "noreturn" does return
17936	      }
17937	      ^
17938
17939	    dancer.c(761): error #1628: function declared with "noreturn" does return
17940	      }
17941	      ^
17942
17943	    compilation aborted for dancer.c (code 2)
17944
17945	ICC sees that `longjmp(buf, 1);` does not return, it sees that
17946	`abort();` does not either, but fails to see it for
17947	`longjmp(buf, 1); abort();`
17948
17949	* data/glr.c (YYLONGJMP): Be even clearer on the fact this does not
17950	return.
17951
179522018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17953
17954	TODO: more
17955
179562018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17957
17958	CI: change strategy to pass CXXFLAGS and the like
17959	Putting them in the env is useless.  We don't want to pass
17960	`CPPFLAGS="$CPPFLAGS"` to configure, as it means "set it to nothing"
17961	when $CPPFLAGS is not set, which is not what we want.
17962
17963	This correctly started to use libc++, but it is not installed on the
17964	Ubuntu.  We will see later if we can use it.
17965
17966	* .travis.yml: Define CONFIGUREFLAGS, and pass it to configure.
17967
179682018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17969
17970	CI: also use GCC 4.7 and 4.8
17971	* .travis.yml (matrix): here.
17972
179732018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17974
17975	CI: name the items of the matrix
17976	* .travis.yml: here.
17977
179782018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17979
17980	CI: also check with ICC
17981	* build-aux/install-icc.sh: New.
17982	* .travis.yml (icc): New.
17983	Use -k to get as many errors as possible from the start.
17984	* src/complain.c (warnings_types): Use a more precise type.
17985
179862018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17987
17988	CI: be sure to exit on failures
17989	a807cfa6eb1a5362ead0b7c99bdc8fd2f4f896da completely broke the whole
17990	point of having a CI: we always exit with success!
17991
179922018-09-18  Akim Demaille  <akim.demaille@gmail.com>
17993
17994	build: strengthen the C++ standard flag test
17995	On the CI, we have this spurious failure with clang 3.9 with
17996	-std=c++17:
17997
17998	    In file included from list.y:23:
17999	    In file included from /usr/include/c++/4.8/iostream:39:
18000	    In file included from /usr/include/c++/4.8/ostream:38:
18001	    In file included from /usr/include/c++/4.8/ios:42:
18002	    In file included from /usr/include/c++/4.8/bits/ios_base.h:41:
18003	    In file included from /usr/include/c++/4.8/bits/locale_classes.h:40:
18004	    In file included from /usr/include/c++/4.8/string:52:
18005	    In file included from /usr/include/c++/4.8/bits/basic_string.h:2815:
18006	    In file included from /usr/include/c++/4.8/ext/string_conversions.h:43:
18007	    /usr/include/c++/4.8/cstdio:120:11: error: no member named 'gets' in the global namespace
18008	      using ::gets;
18009	            ~~^
18010
18011	This shows that our test, based on gl_WARN_ADD, is a joke.  We have to
18012	really check for at least a bit of C++.
18013
18014	* m4/ax_check_compile_flag.m4, m4/bison-cxx-std.m4: New.
18015	* configure.ac: Use them to make sure the compiler actually works.
18016
180172018-09-18  Akim Demaille  <akim.demaille@gmail.com>
18018
18019	tests: fix memory leak
18020	This was reported by ASAN on the CI.
18021
18022	* tests/types.at (api.value.type): Don't set a semantic value to EOF.
18023
180242018-09-18  Akim Demaille  <akim.demaille@gmail.com>
18025
18026	glr.c: prefer true/false to 1/0 in C++
18027	* data/glr.c: here.
18028
180292018-09-18  Akim Demaille  <akim.demaille@gmail.com>
18030
18031	doc: work around Flex's use of 'register'
18032	The CI uses an old version of Flex.
18033
18034	* doc/bison.texi (calc++/scanner.ll): Here.
18035
180362018-09-18  Akim Demaille  <akim.demaille@gmail.com>
18037
18038	tests: fight G++ warnings about zero as null pointer constant
18039	In C++ pre C++11 it is standard practice to use 0 for the null pointer.
18040	But GCC pre 8 -std=c++98 with -Wzero-as-null-pointer-constant warns about
18041	this.
18042
18043	So disable -Wzero-as-null-pointer-constant when compiling C++ pre 11.
18044	Let's do this in AT_DATA_SOURCE_PROLOGUE (which is pasted on top of
18045	all the test grammar files).  Unfortunately, that shifts all the
18046	locations in the expected error messages, which would be too noisy.
18047	Instead, let's introduce testsuite.h, which can vary in length, and
18048	include it in AT_DATA_SOURCE_PROLOGUE.
18049
18050	* tests/testsuite.h: New.
18051	Disable -Wzero-as-null-pointer-constant's warning with GCC pre 8,
18052	C++ pre 11.
18053	* tests/local.at (AT_DATA_SOURCE_PROLOGUE): Use it.
18054	* tests/atlocal.in (CPPFLAGS): Find it.
18055	* tests/local.mk: Ship it.
18056	* data/c.m4 (YY_NULLPTR): Prefer ((void*)0) to 0 in C.
18057
180582018-09-18  Akim Demaille  <akim.demaille@gmail.com>
18059
18060	CI: make sure `git describe` works
18061	For some reasons, the checkout on travis may not have any tags, so
18062	`git describe` fails, so bootstrap fails.
18063
18064	* .travis.yml: If git describe fails, install some tag.
18065
180662018-09-18  Akim Demaille  <akim.demaille@gmail.com>
18067
18068	CI: install Doxygen
18069	* .travis.yml: here, so that its tests are not skipped.
18070	Remove valgrind: it's too expensive on the CI, and asan does the job.
18071
180722018-09-16  Akim Demaille  <akim.demaille@gmail.com>
18073
18074	style: prefer %D% in Automake files
18075	* tests/local.mk: Prefer %D%/ to tests/.
18076
180772018-09-15  Akim Demaille  <akim.demaille@gmail.com>
18078
18079	style: reduce scopes in complain.c
18080
180812018-09-15  Akim Demaille  <akim.demaille@gmail.com>
18082
18083	style: reduce scopes in tables.c
18084	* src/tables.c: here.
18085	* src/state.h: Formatting changes.
18086
180872018-09-15  Akim Demaille  <akim.demaille@gmail.com>
18088
18089	style: reduce scopes in graphviz.c
18090
180912018-09-15  Akim Demaille  <akim.demaille@gmail.com>
18092
18093	style: reduce scopes in LR0.c
18094
180952018-09-15  Akim Demaille  <akim.demaille@gmail.com>
18096
18097	style: reduce scopes in print_graph.c
18098	* src/print_graph.c: here.
18099
181002018-09-15  Akim Demaille  <akim.demaille@gmail.com>
18101
18102	doc: formatting changes
18103	* doc/bison.texi: No changes in the output.
18104
181052018-09-13  Akim Demaille  <akim.demaille@gmail.com>
18106
18107	tests: run the C++ tests on all the available standards
18108	This is much of course more efficient than in the matrix of the CI (or
18109	on our own machines), but a bit more tedious.
18110
18111	* configure.ac (CXX03_CXXFLAGS, CXX11_CXXFLAGS, CXX14_CXXFLAGS)
18112	(CXX17_CXXFLAGS, CXX2A_CXXFLAGS, STDCXX_FLAGS): New.
18113	* tests/atlocal.in: Receive them.
18114	* tests/local.at (AT_FOR_EACH_CXX): New.
18115	* tests/c++.at: Use AT_FOR_EACH_CXX.
18116
181172018-09-13  Akim Demaille  <akim.demaille@gmail.com>
18118
18119	tests: allow to override variables with envvars
18120	* tests/atlocal.in: Allow the user to change interesting variables
18121	(CFLAGS, CXXFLAGS, etc.).
18122
181232018-09-13  Akim Demaille  <akim.demaille@gmail.com>
18124
18125	lalr1.cc: modern C++ no longer needs an assignment for symbols
18126	Reported by Frank Heckenbach.
18127	http://lists.gnu.org/archive/html/bug-bison/2018-03/msg00002.html
18128
18129	Actually the assignment operator should never be needed: the C++98
18130	requirements for vector::push_back is CopyInsertable, which does not require
18131	an assignment operator.  However, libstdc++ shipped with GCC up to (and
18132	including) 6 uses the assignment operator (which affects Clang on top of
18133	libstdc++, but also ICC).  So let's keep it for legacy C++.
18134
18135	See https://gcc.godbolt.org/z/q0XXmC.
18136
18137	* data/lalr1.cc (stack_symbol_type::operator=): Remove.
18138	* data/c++.m4 (basic_symbol::operator=): Ditto.
18139	* tests/c++.at (C++ Variant-based Symbols Unit Tests): Adjust.
18140
181412018-09-13  Akim Demaille  <akim.demaille@gmail.com>
18142
18143	lalr1.cc: support move semantics
18144	Modern C++ (i.e., C++11 and later) introduced "move only" types: types such
18145	as std::unique_ptr<T> that can never be duplicated.  They must never be
18146	copied (by assignments and constructors), they must be "moved".  The
18147	implementation of lalr1.cc used to copy symbols (including their semantic
18148	values).  This commit ensures that values are only moved in modern C++, yet
18149	remain compatible with C++98/C++03.
18150
18151	Suggested by Frank Heckenbach, who provided a full implementation on
18152	top of C++17's std::variant.
18153	See http://lists.gnu.org/archive/html/bug-bison/2018-03/msg00002.html,
18154	and https://lists.gnu.org/archive/html/bison-patches/2018-04/msg00002.html.
18155
18156	Symbols (terminal/non terminal) are handled by several functions that used
18157	to take const-refs, which resulted eventually in a copy pushed on the stack.
18158	With modern C++ (C++11 and later) the callers must use std::move, and the
18159	callees must take their arguments as rvalue refs (foo&&).  In order to avoid
18160	duplicating these functions to support both legacy C++ and modern C++, let's
18161	introduce macros (YY_MOVE, YY_RVREF, etc.)  that rely on copy-semantics for
18162	C++98/03, and move-semantics for modern C++.
18163
18164	That's easy for inner types, when the parser's functions pass arguments to
18165	each other.  Functions facing the user (make_NUMBER, make_STRING, etc.)
18166	should support both rvalue-refs (for instance to support move-only types:
18167	make_INT (std::make_unique<int> (1))), and lvalue-refs (so that we can pass
18168	a variable: make_INT (my_int)).  To avoid the multiplication of the
18169	signatures (there is also the location), let's take the argument by value.
18170
18171	See:
18172	https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00024.html.
18173
18174	* data/c++.m4 (b4_cxx_portability): New.
18175	(basic_symbol): In C++11, replace copy-ctors with move-ctors.
18176	In C++11, replace copies with moves.
18177	* data/lalr1.cc (stack_symbol_type, yypush_): Likewise.
18178	Use YY_MOVE to avoid useless copies.
18179	* data/variant.hh (variant): Support move-semantics.
18180	(make_SYMBOL): In C++11, in order to support both read-only lvalues,
18181	and rvalues, take the argument as a copy.
18182	* data/stack.hh (yypush_): Use rvalue-refs in C++11.
18183	* tests/c++.at: Use move semantics.
18184
18185	* tests/headers.at: Adjust to the new macros (YY_MOVE, etc.).
18186
18187	* configure.ac (CXX98_CXXFLAGS, CXX11_CXXFLAGS, CXX14_CXXFLAGS)
18188	(CXX17_CXXFLAGS, ENABLE_CXX11): New.
18189	* tests/atlocal.in: Receive them.
18190
18191	* examples/variant.yy: Don't define things in std.
18192	* examples/variant-11.test, examples/variant-11.yy: New.
18193	Check the support of move-only types.
18194	* examples/README, examples/local.mk: Adjust.
18195
181962018-09-12  Akim Demaille  <akim.demaille@gmail.com>
18197
18198	tests: factor the definition of full compilation
18199	* tests/local.at (AT_LANG_EXT): New.
18200	(AT_FULL_COMPILE): Simplify.
18201
182022018-09-10  Akim Demaille  <akim.demaille@gmail.com>
18203
18204	CI: use clang with libc++
18205	GCC uses libstdc++.  Let's also check libc++.
18206
18207	* .travis.yml: here.
18208
182092018-09-10  Akim Demaille  <akim.demaille@gmail.com>
18210
18211	CI: use address sanitizer
18212	* .travis.yml (matrix): Use the latest (available) clang with asan.
18213
182142018-09-10  Akim Demaille  <akim.demaille@gmail.com>
18215
18216	CI: sort the matrix in reverse-chronological
18217	There are only three builds at a time: show the result of modern
18218	compilers first.
18219
18220	* .travis.yml (matrix): Sort in reverse-chronological.
18221
182222018-09-10  Akim Demaille  <akim.demaille@gmail.com>
18223
18224	build: use -fparse-all-comments with -Wdocumentation
18225	Clang checks only /** ... */ comments without this flag.
18226
18227	* configure.ac (warn_common): Also check -fparse-all-comments.
18228
182292018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18230
18231	TODO: minor updates
18232
182332018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18234
18235	build: fix support for --disable-dependency-tracking
18236	Reported by Juan Manuel Guerrero.
18237	https://lists.gnu.org/archive/html/bug-bison/2014-07/msg00000.html.
18238
18239	* examples/local.mk (%D%/extracted.stamp): Make sure the output
18240	directory exists.
18241	* examples/extexi (process): Likewise.
18242
182432018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18244
18245	configure.ac: fix definition of NO_EXCEPTIONS_CXXFLAGS
18246	* configure.ac: Always define it, not just when --enable-gcc-warnings
18247	is passed.
18248
182492018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18250
18251	skeletons: style/comment changes
18252	* data/c++.m4, data/c.m4, data/glr.c: Here.
18253
182542018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18255
18256	variant: indent better the generated code
18257	* data/variant.hh (b4_basic_symbol_constructor_declare)
18258	(b4_basic_symbol_constructor_define): here.
18259
182602018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18261
18262	lalr1.cc: don't generate useless constructors when variant is used
18263	This generates less code, which is nicer to read, but also takes less
18264	chances with compilers such as G++ 4.8 that are too strict and check
18265	"dead code" (templated code that is not instantiated).
18266
18267	* data/c++.m4 (b4_symbol_type_declare, b4_symbol_type_define): When
18268	variants are used, don't generate code meant for non variants.
18269
182702018-09-09  Akim Demaille  <akim.demaille@gmail.com>
18271
18272	CI: Clang 6.0 is not available
18273	But Clang 3.3 and 3.4 are.
18274
18275	* .travis.yml (addons): Remove, it appears to be ignore if the matrix
18276	also defines it.
18277	(matrix): Update.
18278
182792018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18280
18281	build: work around warnings in Flex
18282	See ea0db44fedc8d5cbdc5c3180bef0285d7ae83803.  We also need to disable
18283	the warning in the examples (but don't want to clutter the
18284	documentation with such details).
18285
18286	* doc/bison.texi (scanner.ll): Disable Clang's -Wdocumentation.
18287	While at it, hide the other kludges.
18288
182892018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18290
18291	CI: more compiler configurations
18292	* .travis.yml: here.
18293
182942018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18295
18296	configure: reveal the name of the Valgrind suppression file we use
18297	* configure.ac: here.
18298	* build-aux/Linux.valgrind (libstdcxx_init): New.
18299
183002018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18301
18302	build: work around warnings in Flex 2.5.35
18303	That's the version on Ubuntu Precise.
18304	See also 1dac131ec45ffa1e382319a94640c65bd10f6aa5.
18305
18306	* src/flex-scanner.h: Disable -Wdocumentation.
18307	* doc/bison.texi: Turn off a warning triggered by Flex 2.6.4.
18308
183092018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18310
18311	CI: show the version of the tools we use
18312	We have failures on Flex output, which are probably related to an old
18313	release.  Let's check.
18314
18315	    In file included from src/scan-code-c.c:3:
18316	    src/scan-code.c:2198:21: error: empty paragraph passed to '@param' command
18317	          [-Werror,-Wdocumentation]
18318	     * @param line_number
18319	       ~~~~~~~~~~~~~~~~~^
18320
18321	* .travis.yml: here.
18322
183232018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18324
18325	CI: run more maintainer tests and show the logs
18326	Running all these tests might be overkill: it is very long, and don't
18327	need full portability checks.  Besides, some tests under Valgrind are
18328	too slow and get killed by the CI (timeout of 10min without output).
18329
18330	* .travis.yml: here.
18331
183322018-09-08  Akim Demaille  <akim.demaille@gmail.com>
18333
18334	CI: enable compiler warnings
18335	* .travis.yml: here.
18336	* README-hacking: We no longer aim at K&R C.
18337
183382018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18339
18340	build: work around GCC warnings on Flex code
18341	See ef98967ada3c1cd48c177d7349e65a709bb49b97.
18342
18343	* src/flex-scanner.h: Disable -Wnull-dereference for GCC 6+.
18344
183452018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18346
18347	tests: fix target naming convention
18348	We have some maintainer-check-foo and some maintainer-foo-check.  Keep
18349	only the former.
18350
18351	* tests/local.mk (maintainer-push-check, maintainer-xml-check)
18352	(maintainer-release-check): Rename as...
18353	(maintainer-check-push, maintainer-check-xml)
18354	(maintainer-check-release): these.
18355
183562018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18357
18358	tests: fix variable naming convention
18359	Most of our variables for C++ flags are named FOO_CXXFLAGS, not
18360	CXXFLAGS_FOO.
18361
18362	* configure.ac, tests/atlocal.in, tests/calc.at
18363	(NO_EXCEPTIONS_CXXFLAGS): Rename as...
18364	(CXXFLAGS_NO_EXCEPTIONS): this.
18365
183662018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18367
18368	tests: fix maintainer-check-g++ make recipe
18369	Clang++ issues warnings when it's used to compile C.  This make target
18370	is precisely checking whether we can do that.
18371
18372	* configure.ac (NO_DEPRECATED_CXXFLAGS): New.
18373	* tests/atlocal.in: Use it.
18374
183752018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18376
18377	tests: fix maintainer-check-valgrind make recipe
18378	* tests/local.mk (maintainer-check-valgrind): Run the with Valgrind
18379	when it's available, not the converse.
18380
183812018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18382
18383	CI: prepare for travis
18384	* .travis.yml: New.
18385
183862018-09-06  Akim Demaille  <akim.demaille@gmail.com>
18387
18388	examples: beware of shell portability issues
18389	This completes 2d7e7438024e47650c3a0c9f5f313c6eb6acae2d.
18390
18391	Some shells don't grok "local var=`cmd`" very well: they need the rhs
18392	to be quoted.
18393
18394	    ./examples/test: 72: local: you.,: bad variable name
18395	    FAIL examples/variant.test (exit status: 2)
18396
18397	Reported by Étienne Renault.
18398
18399	* examples/test (run): Quote the values in 'local' assignments.
18400
184012018-09-04  Akim Demaille  <akim.demaille@gmail.com>
18402
18403	tests: style changes
18404	* tests/c++.at: Formatting changes.
18405	Use 'using' to shorten the code.
18406
184072018-09-02  Akim Demaille  <akim.demaille@gmail.com>
18408
18409	tests: disable GCC7 warnings for some tests
18410	With GCC7 we have warnings (false positive):
18411
18412	    x8.c: In function 'x8_parse':
18413	    x8.c:1233:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
18414	             yylval = *yypushed_val;
18415	             ~~~~~~~^~~~~~~~~~~~~~~
18416	    x8.c: In function 'x8_pull_parse':
18417	    x8.c:1233:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
18418	             yylval = *yypushed_val;
18419	             ~~~~~~~^~~~~~~~~~~~~~~
18420
18421	See also 9645a2b20ee7cbfa8bb4ac2237f87d598afe349c.
18422
18423	* tests/local.at (AT_PUSH_IF): New.
18424	(AT_BISON_OPTION_POPDEFS): Pop it, and pop AT_PURE_IF.
18425	* tests/headers.at (Several parsers, Several parsers): Disable these
18426	warnings when in push parser.
18427
184282018-09-02  Akim Demaille  <akim.demaille@gmail.com>
18429
18430	C++: don't issue the definition of symbol_type when not used
18431	Currently, in glr.cc, we emit the definitions of basic_symbol and
18432	symbol_type, although there are not used.
18433
18434	* data/c++.m4 (b4_public_types_declare): Extract these definitions from
18435	here, and move them...
18436	(b4_symbol_type_declare): here.
18437	(b4_public_types_declare): Also remove the definition of the symbol
18438	constructors.
18439	* data/lalr1.cc (b4_shared_declarations): Adjust: call
18440	b4_symbol_type_declare and b4_symbol_constructor_declare.
18441
184422018-09-02  Akim Demaille  <akim.demaille@gmail.com>
18443
18444	examples: beware of shell portability issues
18445	Some shells don't grok `local var=$val` very well: they need the rhs
18446	to be quoted.
18447
18448	    ./examples/test: 66: local: you.,: bad variable name
18449	    FAIL examples/variant.test (exit status: 2)
18450
18451	Reported by Étienne Renault.
18452
18453	* examples/test (run): Quote the values in 'local' assignments.
18454
184552018-08-31  Akim Demaille  <akim.demaille@gmail.com>
18456
18457	C++: leave 'inline' on the definition, not the declaration
18458	This is for consistency with the other uses of 'inline' in the C++
18459	skeletons.  On examples/variant.yy, this change gives:
18460
18461	    --- examples/variant.hh	2018-08-31 07:16:57.214222580 +0200
18462	    +++ examples/variant.hh	2018-08-31 07:19:52.285431997 +0200
18463	    @@ -444,15 +444,15 @@
18464	         typedef basic_symbol<by_type> symbol_type;
18465
18466	         // Symbol constructors declarations.
18467	    -    static inline
18468	    +    static
18469	         symbol_type
18470	         make_END_OF_FILE (const location_type& l);
18471
18472	    -    static inline
18473	    +    static
18474	         symbol_type
18475	         make_TEXT (const ::std::string& v, const location_type& l);
18476
18477	    -    static inline
18478	    +    static
18479	         symbol_type
18480	         make_NUMBER (const int& v, const location_type& l);
18481
18482	    @@ -945,19 +945,23 @@
18483	         };
18484	         return static_cast<token_type> (yytoken_number_[type]);
18485	       }
18486	    +
18487	       // Implementation of make_symbol for each symbol type.
18488	    +  inline
18489	       parser::symbol_type
18490	       parser::make_END_OF_FILE (const location_type& l)
18491	       {
18492	         return symbol_type (token::END_OF_FILE, l);
18493	       }
18494
18495	    +  inline
18496	       parser::symbol_type
18497	       parser::make_TEXT (const ::std::string& v, const location_type& l)
18498	       {
18499	         return symbol_type (token::TEXT, v, l);
18500	       }
18501
18502	    +  inline
18503	       parser::symbol_type
18504	       parser::make_NUMBER (const int& v, const location_type& l)
18505	       {
18506	    @@ -967,7 +971,7 @@
18507
18508	     } // yy
18509	    -#line 971 "examples/variant.hh" // lalr1.cc:380
18510	    +#line 975 "examples/variant.hh" // lalr1.cc:380
18511
18512	and no changes on variant.cc.
18513
18514	* data/c++.m4 (b4_public_types_define): Formatting changes.
18515	* data/variant.hh (b4_symbol_value_template_, b4_symbol_constructor_declare_):
18516	Move the 'inline' from declaration to implementation.
18517
185182018-08-30  Akim Demaille  <akim.demaille@gmail.com>
18519
18520	c++: style changes
18521	Instead of
18522
18523	    parser::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
18524	      : super_type (that.state, that.location)
18525	    {
18526	      value = that.value;
18527	    }
18528
18529	generate
18530
18531	    parser::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
18532	      : super_type (that.state, that.value, that.location)
18533	    {}
18534
18535	* data/lalr1.cc (stack_symbol_type): Improve the copy ctor, when not
18536	using the variants.
18537	(yypush_): Rename arguments for clarity.
18538
185392018-08-30  Akim Demaille  <akim.demaille@gmail.com>
18540
18541	c++: the assignment operator does not have to be const
18542	* data/lalr1.cc (stack_symbol_type::operator=): Don't copy the
18543	argument, move it.
18544
185452018-08-30  Akim Demaille  <akim.demaille@gmail.com>
18546
18547	tests: style changes
18548	* tests/c++.at (C++ Variant-based Symbols): Rename as...
18549	(C++ Variant-based Symbols Unit Tests): this.
18550	Comment/style changes.
18551
185522018-08-27  Akim Demaille  <akim.demaille@gmail.com>
18553
18554	maint: post-release administrivia
18555	* NEWS: Add header line for next release.
18556	* .prev-version: Record previous version.
18557	* cfg.mk (old_NEWS_hash): Auto-update.
18558
185592018-08-27  Akim Demaille  <akim.demaille@gmail.com>
18560
18561	version 3.1
18562	* NEWS: Record release date.
18563
185642018-08-27  Akim Demaille  <akim.demaille@gmail.com>
18565
18566	build: tabs are ok in a Makefile
18567	* cfg.mk: TABs are ok in examples/calc++/Makefile.
18568
185692018-08-26  Akim Demaille  <akim.demaille@gmail.com>
18570
18571	C++: make sure the generated header is self container
18572	See the previous commit.
18573
18574	* data/lalr1.cc: Be sure to define YY_NULLPTR.
18575	* tests/headers.at: Check the case that was failing.
18576
185772018-08-26  Akim Demaille  <akim.demaille@gmail.com>
18578
18579	tests: check that headers are sane
18580	The header generated for variants with assertions but without
18581	locations, is not self-contained.  Prepare a check for this.
18582
18583	* tests/headers.at (Sane headers): New, extracted from...
18584	(Several parsers): here.
18585
185862018-08-25  Akim Demaille  <akim.demaille@gmail.com>
18587
18588	"C++: restore copy-constructor for stack_symbol_type
18589	Benchmarks show that it is more efficient to keep this copy
18590	constructor, rather than forcing the use of the default constructor
18591	and then assignment.
18592
18593	This reverts commit 7ab25ad0208d00f509613e1e151aa3043cf2862f.
18594
185952018-08-25  Akim Demaille  <akim.demaille@gmail.com>
18596
18597	examples: calc++: a Makefile and a README
18598	* examples/calc++/Makefile, examples/calc++/README: New.
18599	* examples/calc++/local.mk: Ship and install them.
18600	* doc/bison.texi: Formatting changes.
18601
186022018-08-25  Akim Demaille  <akim.demaille@gmail.com>
18603
18604	gnulib: update
18605
186062018-08-25  Jiahao Li  <jiahaoli@fb.com>
18607
18608	variant: fix uninitialized memory access in `variant<>`
18609	Currently, in bison's C++ parser template (`lalr.cc`), the `variant<>`
18610	struct's `build()` method uses placement-new in the form `new (...) T`
18611	to initialize a variant type.  However, for POD variant types, this
18612	will leave the memory space uninitialized.  If we subsequently tries
18613	to `::move` into a variant object in such state, the call can trigger
18614	clang's undefined behavior sanitizer due to accessing the
18615	uninitialized memory.
18616
18617	https://lists.gnu.org/archive/html/bison-patches/2018-08/msg00098.html
18618
18619	* data/variant.hh (build): Always initialize the stored value.
18620
186212018-08-24  Akim Demaille  <akim.demaille@gmail.com>
18622
18623	NEWS: update
18624
186252018-08-24  Akim Demaille  <akim.demaille@gmail.com>
18626
18627	examples: calc++: minor improvements
18628	* doc/bison.texi (A Complete C++ Example): Prefer throw exceptions
18629	from the scanner.
18630	Show the invalid characters.
18631	Since the scanner sends exceptions, it no longer needs to report
18632	errors, so we can get rid of the driver's routine to report error,
18633	do it in yyerror.
18634	Use @group/@end group to improve rendering.
18635
186362018-08-24  Akim Demaille  <akim.demaille@gmail.com>
18637
18638	examples: calc++: make sure the file name in location is set
18639	Reported by Hans Åberg.
18640	http://lists.gnu.org/archive/html/bug-bison/2018-08/msg00039.html
18641
18642	* doc/bison.texi (A Complete C++ Example): Move the token's location
18643	from the scanner to the driver.
18644
186452018-08-24  Akim Demaille  <akim.demaille@gmail.com>
18646
18647	examples: calc++: remove prefixes
18648	This example uses the calcxx_ prefix for each class.  That's uselessly
18649	heavy.
18650
18651	* doc/bison.texi (A Complete C++ Example): Simplify the class names.
18652	Since now 'driver' denotes the class, use 'drv' for the values.
18653	Formatting changes.
18654
186552018-08-23  Akim Demaille  <akim.demaille@gmail.com>
18656
18657	examples: fix the leading empty line
18658	* examples/extexi: Really avoid the first empty line.
18659	Remove useless `next`.
18660
186612018-08-23  Akim Demaille  <akim.demaille@gmail.com>
18662
18663	examples: shorten the name of the calc++ files
18664	* doc/bison.texi: Turn the calc++- prefix into calc++/.
18665	* examples/extexi (%file_wanted): Replace with
18666	(&file_wanted): this.
18667	* examples/calc++/local.mk: Adjust.
18668
186692018-08-23  Akim Demaille  <akim.demaille@gmail.com>
18670
18671	tests: disable -Wmaybe-uninitialized in some tests
18672	On these tests, at -O2 and above, GCC 8 complains that yylval may be
18673	uninitialized.  But it seems wrong: it is initialized.  Rather than
18674	turning off the warning in the skeleton (hence possibility hiding
18675	relevant warnings of user parsers), let's turn it off in the tests
18676	only.
18677
18678	    163: parse.error=verbose and consistent errors:      FAILED (conflicts.at:625)
18679	    165: parse.error=verbose and consistent errors: lr.default-reduction=consistent FAILED (conflicts.at:635)
18680	    166: parse.error=verbose and consistent errors: lr.default-reduction=accepting FAILED (conflicts.at:641)
18681	    167: parse.error=verbose and consistent errors: lr.type=canonical-lr FAILED (conflicts.at:645)
18682	    168: parse.error=verbose and consistent errors: parse.lac=full FAILED (conflicts.at:650)
18683	    169: parse.error=verbose and consistent errors: parse.lac=full lr.default-reduction=accepting FAILED (conflicts.at:655)
18684
18685	We get:
18686
18687	    input.c: In function 'yyparse':
18688	    input.c:980:9: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
18689	     YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
18690	             ^~~~~~
18691	    cc1: all warnings being treated as errors
18692
18693	See https://lists.gnu.org/archive/html/bison-patches/2018-08/msg00063.html.
18694
18695	* tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Disable
18696	-Wmaybe-uninitialized.
18697
186982018-08-19  Akim Demaille  <akim.demaille@gmail.com>
18699
18700	doc: clarify that the push parser object can be reused
18701	Suggested by Rici Lake.
18702	https://lists.gnu.org/archive/html/bug-bison/2018-08/msg00033.html
18703
18704	* doc/bison.texi: Complete description of the first node in the main
18705	@menu.
18706	(Push Decl): Remove the 'experimental' warnings about push parser.
18707	Clarify that the push parser object can be reused in several parses.
18708
187092018-08-19  Akim Demaille  <akim.demaille@gmail.com>
18710
18711	lalr1.cc: support compilation with disabled support for exceptions
18712	Reported by Brooks Moses <bmoses@google.com>
18713	http://lists.gnu.org/archive/html/bison-patches/2018-02/msg00000.html
18714
18715	* data/lalr1.cc (YY_EXCEPTIONS): New.
18716	Use it to disable try/catch clauses.
18717
18718	* doc/bison.texi (C++ Parser Interface): Document it.
18719
18720	* configure.ac (CXXFLAGS_NO_EXCEPTIONS): New.
18721	* tests/atlocal.in: Receive it.
18722	* tests/local.at (AT_FULL_COMPILE, AT_LANG_COMPILE):
18723	Accept a new argument, extra compiler flags.
18724	* tests/calc.at: Run the C++ calculator with exception support disabled.
18725
187262018-08-19  Akim Demaille  <akim.demaille@gmail.com>
18727
18728	examples: add empty lines
18729	Currently the examples are too dense, let's put empty lines where
18730	'#line' would be issued.  And also remove some spurious empty
18731	lines (remains from @group, @end group, etc.).
18732
18733	* examples/extexi: Do that.
18734	* examples/local.mk (extexiFLAGS): Rename as...
18735	(EXTEXIFLAGS): this.
18736
187372018-08-19  Akim Demaille  <akim.demaille@gmail.com>
18738
18739	examples: check the variant example
18740	* examples/mfcalc/local.mk, examples/rpcalc/local.mk: Define the
18741	programs in a more natural order, source, preproc, then linker.
18742
18743	* examples/test: Be ready to work on programs that are not in
18744	a subdir.
18745	* examples/variant.test: New.
18746	* examples/local.mk: Use it.
18747	* examples/variant.yy: Don't use 0 for nullptr.
18748	Use a more natural output for a list of string.
18749
187502018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18751
18752	C++: fix portability issue with MSVC 2017
18753	Visual Studio issues a C4146 warning on '-static_cast<unsigned>(rhs)'.
18754	The code is weird, probably to cope with INT_MIN.  Let's go back to
18755	using std::max (whose header is still included in position.hh...) like
18756	originally, but with the needed casts.
18757
18758	Reported by 長田偉伸, and with help from Rici Lake.
18759
18760	See also
18761	http://lists.gnu.org/archive/html/bug-bison/2013-02/msg00000.html
18762	and commit 75ae8299840bbd854fa2474d38402bbb933c6511.
18763
18764	* data/location.cc (position::add_): Take min as an int.
18765	Use std::max.
18766	While here, get rid of a couple of useless inlines.
18767
187682018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18769
18770	build: fix concurrent build failure
18771	Reported by Dengke Du and Robert Yang.
18772	https://lists.gnu.org/archive/html/bison-patches/2017-07/msg00000.html
18773
18774	* src/local.mk (src/yacc): Make sure the directory exists.
18775
187762018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18777
18778	lalr1.cc: remove debug comment
18779	* data/lalr1.cc: Remove a comment about indentation.
18780	I'm not sure it would be nice to indent even more, it's already quite
18781	of the right.
18782
187832018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18784
18785	doc: fix the name of the GFDL section
18786	Reported by dine <2500418497@qq.com>.
18787	http://lists.gnu.org/archive/html/bug-bison/2016-10/msg00000.html
18788
18789	I mirrored what the Coreutils do.
18790
18791	* doc/bison.texi (Copying This Manual): Rename as...
18792	(GNU Free Documentation License): this, since that the name we
18793	used in the preamble.
18794
187952018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18796
18797	doc: clarify the destructor selection example
18798	Reported by Gary L Peskin.
18799	http://lists.gnu.org/archive/html/help-bison/2016-02/msg00000.html
18800
18801	* doc/bison.texi (Destructor Decl): here.
18802
188032018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18804
18805	portability: don't use _Pragma with ICC
18806	ICC defines __GNUC__ [1], but does not support GCC's _Pragma for
18807	diagnostics.  As a matter of fact, I believe it does not support
18808	_Pragma at all (only #pragma) [2].
18809
18810	Reported by Maxim Prohorenko.
18811	https://savannah.gnu.org/support/index.php?108339
18812
18813	[1] https://software.intel.com/en-us/cpp-compiler-18.0-developer-guide-and-reference-gcc-compatibility-and-interoperability
18814	[2] https://software.intel.com/en-us/cpp-compiler-18.0-developer-guide-and-reference-pragmas
18815
18816	* data/c.m4 (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN): Exclude ICC from
18817	the club.
18818
188192018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18820
18821	doc: typed mid-rule actions
18822	* doc/bison.texi (Mid-Rule Actions): Restructure to insert...
18823	(Typed Mid-Rule Actions): this new section.
18824	Move the manual translation of mid-rule actions into regular actions
18825	to...
18826	(Mid-Rule Action Translation): here.
18827
188282018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18829
18830	escape properly the file names in #line for printer/destructor
18831	Reported by Jannick.
18832	http://lists.gnu.org/archive/html/bug-bison/2017-05/msg00001.html
18833
18834	"Amusingly" enough, we have the same problem with %defines when the
18835	parser file name has backslashes or quotes: we generate #includes with
18836	an incorrect C string.
18837
18838	* src/output.c (prepare_symbol_definitions): Escape properly the file
18839	names before passing them to M4.
18840	* data/bison.m4, data/lalr1.cc: Don't simply put the file name between
18841	two quotes (that should have been strong enough a smell...), expect
18842	the string to be properly quoted.
18843	* tests/synclines.at: New tests to check this.
18844
188452018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18846
18847	tests: fix title and improve quoting
18848	* tests/synclines.at: here.
18849	Also, prefer '%code' to ;%{...%}' for yylex/yyerror prototypes.
18850
188512018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18852
18853	style: reduce scopes
18854	* src/output.c: here.
18855
188562018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18857
18858	style: reduce scopes
18859	* src/scan-code.l: here.
18860
188612018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18862
18863	regen
18864
188652018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18866
18867	style: reduce scopes
18868	* src/parse-gram.y: Declare iterator within the for-loop.
18869
188702018-08-18  Akim Demaille  <akim.demaille@gmail.com>
18871
18872	tests: style changes
18873	* tests/c++.at, tests/local.at: Formatting and title changes.
18874
188752018-08-17  Akim Demaille  <akim.demaille@gmail.com>
18876
18877	reader: simplify the search of the start symbol
18878	Suggested by Paul Eggert.
18879
18880	* src/reader.c (find_start_symbol): Don't check 'res', we know it is
18881	not null.  That suffices to avoid the GCC warnings.
18882	* bootstrap.conf: We don't need 'assume', which doesn't exist anyway.
18883
188842018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18885
18886	c++: fix GCC8 warnings about uninitialized values
18887	In 0931d14728fb4a2272399f2c927ae78e2607b4fb I removed too many
18888	initializations from some ctors: some were not about base ctors, but
18889	about member variables.  In fact, more of them were missing to please
18890	GCC 8.
18891
18892	While at it, generate more natural code for C++ without variant:
18893	instead of
18894
18895	    template <typename Base>
18896	    parser::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
18897	      : Base (other)
18898	      , value ()
18899	    {
18900	      value = other.value
18901	    }
18902
18903	generate
18904
18905	    template <typename Base>
18906	    parser::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
18907	      : Base (other)
18908	      , value (other.value)
18909	    {}
18910
18911	* data/c++.m4 (basic_symbol::basic_symbol): Always initialize 'value',
18912	it might be a POD without a ctor.
18913	* data/lalr1.cc (stack_symbol_type::stack_symbol_type): Likewise.
18914	* data/variant.hh (variant::variant): Default initialize the buffer too.
18915
189162018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18917
18918	tests: style: use %empty
18919	* tests/conflicts.at: here.
18920
189212018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18922
18923	tests: fix warnings in push mode
18924	Fix warning with GCC 8, -DNDEBUG.
18925
18926	    422. push.at:83: testing Multiple impure instances ...
18927	    input.y: In function 'main':
18928	    input.c:1022:12: error: potential null pointer dereference [-Werror=null-dereference]
18929	       if (!yyps->yynew && yyps->yyss != yyps->yyssa)
18930	            ~~~~^~~~~~~
18931
18932	* data/yacc.c (pstate_delete): Do nothing if called on null pointer.
18933
189342018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18935
18936	c++: avoid GCC 8 warnings
18937	GCC 8 issues warnings whose root cause was a bit hard to find.
18938
18939	    calc.cc: In member function 'virtual int yy::parser::parse()':
18940	    calc.cc:810:18: warning: '*((void*)&<anonymous> +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
18941	         , location (l)
18942	                      ^
18943	    calc.cc: In member function 'void yy::parser::yypush_(const char*, yy::parser::stack_symbol_type&)':
18944	    calc.cc:810:18: warning: '*((void*)&<anonymous> +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
18945	         , location (l)
18946	                      ^
18947	    calc.cc: In member function 'void yy::parser::yypush_(const char*, yy::parser::state_type, yy::parser::symbol_type&)':
18948	    calc.cc:810:18: warning: '*((void*)&<anonymous> +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
18949	         , location (l)
18950	                      ^
18951
18952	The problem is with locations that don't have a constructor, such as
18953	Span (in calc.cc) which is POD.  It is POD on purpose: so that we can
18954	use that structure to test glr.cc which cannot use non POD in its
18955	(C) stacks.
18956
18957	* data/c++.m4 (basic_symbol): Also ensure that 'location' is
18958	initialized.
18959
189602018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18961
18962	tests: avoid compiler warnings
18963	* tests/calc.at (AT_CALC_MAIN): Declare yyparse and operator<< in an
18964	unnamed namespace to avoid "not declared" warnings (clang
18965	-Weverything).
18966	Remove useless prototypes.
18967
189682018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18969
18970	build: work around GCC warnings on Flex code
18971	With GCC 7.3.0 and Flex 2.6.4, we get warnings on all the generated
18972	scanners:
18973
18974	    examples/calc++/calc++-scanner.cc: In function 'void yyrestart(FILE*)':
18975	    examples/calc++/calc++-scanner.cc:1611:20: error: potential null pointer dereference [-Werror=null-dereference]
18976	     /* %endif */
18977	      ~~~~~~~~~~~       ^
18978	    examples/calc++/calc++-scanner.cc:1607:19: error: potential null pointer dereference [-Werror=null-dereference]
18979	     /* %if-c-only */
18980	      ~~~~~~~~~~~~~~~  ^
18981	    examples/calc++/calc++-scanner.cc:1611:20: error: potential null pointer dereference [-Werror=null-dereference]
18982	     /* %endif */
18983	      ~~~~~~~~~~~       ^
18984	    examples/calc++/calc++-scanner.cc:1607:19: error: potential null pointer dereference [-Werror=null-dereference]
18985	     /* %if-c-only */
18986	      ~~~~~~~~~~~~~~~  ^
18987	    cc1plus: all warnings being treated as errors
18988
18989	Obviously the lines are incorrect, and the warnings are emitted twice.
18990	Still, let's get rid of these warnings.
18991
18992	* doc/bison.texi, src/flex-scanner.h: Disable these warnings in code
18993	generated by Flex.
18994
189952018-08-15  Akim Demaille  <akim.demaille@gmail.com>
18996
18997	fix incorrect C code
18998	Commit 3df32101e7978eaafa63bce8908de3dcae4d9cda introduced invalid C
18999	code.  Caught by GCC 7.3.0.
19000
19001	* bootstrap.conf (gnulib_modules): We need assume.
19002	* src/reader.c (find_start_symbol): Fix the signature (too much C++,
19003	sorry...).
19004	Prefer 'assume' to 'assert', so that we don't have these warnings even
19005	when NDEBUG is defined.
19006
190072018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19008
19009	examples: fix Englishoes
19010	* examples/README: Fix my mistakes.
19011
190122018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19013
19014	examples: ship and install variant.yy
19015	This file was meant to be shown as an example.  Install it.
19016
19017	* README, data/README: Put Emacs metadata in the final section.
19018	* examples/README: New.
19019	* examples/variant.yy: Use %empty.
19020	* examples/local.mk: Install both these files.
19021
190222018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19023
19024	C++: remove useless copy-constructor
19025	We currently generate copy constructors such as the following
19026	one (taken from examples/variant.yy):
19027
19028	    parser::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
19029	      : super_type (that.state, that.location)
19030	    {
19031	      switch (that.type_get ())
19032	      {
19033	        case 3: // TEXT
19034	        case 8: // item
19035	          value.copy< ::std::string > (that.value);
19036	          break;
19037
19038	        case 7: // list
19039	          value.copy< ::std::vector<std::string> > (that.value);
19040	          break;
19041
19042	        case 4: // NUMBER
19043	          value.copy< int > (that.value);
19044	          break;
19045
19046	        default:
19047	          break;
19048	      }
19049	    }
19050
19051	they are actually useless: we never need it.
19052
19053	* data/lalr1.cc: Don't generate the stack_symbol_type copy ctor.
19054
190552018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19056
19057	C++: symbol constructors: add a missing reference
19058	Fix a typo so that instead of
19059
19060	    basic_symbol::basic_symbol (typename Base::kind_type t, const int v)
19061
19062	we now generate
19063
19064	    basic_symbol::basic_symbol (typename Base::kind_type t, const int& v)
19065
19066	* data/variant.hh (b4_basic_symbol_constructor_declare)
19067	(b4_basic_symbol_constructor_define): Add missing reference.
19068
190692018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19070
19071	C++: remove useless calls to the base default constructor
19072	* data/c++.m4, data/stack.hh, data/variant.hh: here.
19073
190742018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19075
19076	C++: prefer size_type to unsigned for indexes
19077	* data/stack.hh (size_type): New, based on the container type.
19078
190792018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19080
19081	regen
19082
190832018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19084
19085	style: m4: remove useless reference to 'int' in integral types
19086	* m4/cxx.m4: Prefer 'unsigned' to 'unsigned int'.
19087
190882018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19089
19090	style: doc: remove useless reference to 'int' in integral types
19091	* doc/bison.texi: Prefer 'unsigned' to 'unsigned int'.  Likewise for
19092	long and short.
19093
190942018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19095
19096	style: lib: remove useless reference to 'int' in integral types
19097	* lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
19098	* lib/bitset_stats.c, lib/bitsetv-print.c, lib/bitsetv.c,
19099	* lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/timevar.c,
19100	* lib/vbitset.c:
19101	Prefer 'unsigned' to 'unsigned int'.  Likewise for long and short.
19102
191032018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19104
19105	style: src: remove useless reference to 'int' in integral types
19106	* src/AnnotationList.c, src/AnnotationList.h, src/InadequacyList.h,
19107	* src/closure.c, src/closure.h, src/gram.c, src/gram.h, src/ielr.c,
19108	* src/location.c, src/output.c, src/reader.c, src/relation.c,
19109	* src/scan-code.l, src/scan-gram.l, src/tables.c, src/tables.h:
19110	Prefer 'unsigned' to 'unsigned int'.  Likewise for long and short.
19111
191122018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19113
19114	style: tests: remove useless reference to 'int' in integral types
19115	* tests/actions.at, tests/cxx-type.at: Prefer 'unsigned' to 'unsigned
19116	int'.  Likewise for long and short.
19117
191182018-08-14  Akim Demaille  <akim.demaille@gmail.com>
19119
19120	style: data: remove useless reference to 'int' in integral types
19121	* data/c.m4, data/glr.c, data/yacc.c: Prefer 'unsigned' to 'unsigned
19122	int'.  Likewise for long and short.
19123
191242018-08-12  Akim Demaille  <akim.demaille@gmail.com>
19125
19126	gnulib: update
19127	* bootstrap.conf: gnulib_mk is defined again by bootstrap.
19128
191292018-08-12  Akim Demaille  <akim.demaille@gmail.com>
19130
19131	doc: avoid type aliases
19132	* doc/bison.texi (C++ Location Values): Use 'unsigned' instead of
19133	'uint'.
19134
191352018-08-12  Akim Demaille  <akim.demaille@gmail.com>
19136
19137	doc: remove the "experimental" warning for some features
19138	Several features were flagged 'experimental' and waiting for user
19139	feedback to 'stabilize', but i. AFAIK, no user ever reported anything
19140	about them, ii. they'be been here long enough to prove they don't do
19141	harm.
19142
19143	* doc/bison.texi: No longer experimental: default %printer and
19144	%destructor (typed: <*> and untyped: <>), %define api.value.type union
19145	and variant, Java parsers, XML output, LR family (lr, ielr, lalr),
19146	semantic predicates (%?).
19147
191482018-08-12  Akim Demaille  <akim.demaille@gmail.com>
19149
19150	tests: check variants and typed mid-rule actions
19151	See
19152	http://lists.gnu.org/archive/html/bison-patches/2018-08/msg00013.html
19153
19154	* tests/c++.at (Variants and Typed Mid-rule Actions): New.
19155
191562018-08-12  Akim Demaille  <akim.demaille@gmail.com>
19157
19158	tests: fix minor issues
19159	* tests/actions.at: Fix some log messages.
19160	Prefer #error to fprintf: it fixes the invalid use of yyoutput in
19161	%destructor, and it is an even stronger check: that the code is not
19162	even emitted.  The portability of #error is not really a problem here,
19163	since the point is anyway to have the compilation fail.
19164
191652018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19166
19167	c++: variant: add more assertions
19168	* data/variant.hh (variant::as): Check yytypeid_ before
19169	checking *yytypeid_.
19170
191712018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19172
19173	doc: -fcaret is enabled by default
19174	* doc/bison.texi (Mid-Rule Action Translation): So no need to pass it.
19175
191762018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19177
19178	style: reduce scopes
19179	* src/closure.c, src/conflicts.c: here.
19180
191812018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19182
19183	NEWS: update
19184
191852018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19186
19187	rule actions cannot be typed
19188	Make sure that we cannot apply a type to the (main) action of a rule.
19189
19190	* src/reader.c (grammar_rule_check): Issue the warning.
19191	* tests/input.at (Cannot type action): Check the warning.
19192
191932018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19194
19195	warn about typed mid-rule actions in Yacc mode
19196	* src/reader.c (grammar_current_rule_action_append): Warn.
19197	* tests/input.at (AT_CHECK_UNUSED_VALUES): Check.
19198
191992018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19200
19201	tests: check typed mid-rule actions
19202	* tests/input.at (_AT_UNUSED_VALUES_DECLARATIONS): Check
19203	typed mid-rule actions.
19204	* tests/report.at (Reports): Check that types of typed mid-rule
19205	actions are reported.
19206	* tests/actions.at (Typed mid-rule actions): Check that
19207	the values of typed mid-rule actions are correct.
19208
192092018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19210
19211	regen
19212
192132018-08-11  Akim Demaille  <akim.demaille@gmail.com>
19214
19215	add support for typed mid-rule actions
19216	Prompted on Piotr Marcińczyk's message:
19217	http://lists.gnu.org/archive/html/bug-bison/2017-06/msg00000.html.
19218	See also http://lists.gnu.org/archive/html/bug-bison/2018-06/msg00001.html.
19219
19220	Because their type is unknown to Bison, the values of midrule actions are
19221	not treated like the others: they don't have %printer and %destructor
19222	support.  In addition, in C++, (Bison) variants cannot work properly.
19223
19224	Typed midrule actions address these issues.  Instead of:
19225
19226	    exp: { $<ival>$ = 1; } { $<ival>$ = 2; }   { $$ = $<ival>1 + $<ival>2; }
19227
19228	write:
19229
19230	    exp: <ival>{ $$ = 1; } <ival>{ $$ = 2; }   { $$ = $1 + $2; }
19231
19232	* src/scan-code.h, src/scan-code.l (code_props): Add a `type` field to
19233	record the declared type of an action.
19234	(code_props_rule_action_init): Add a type argument.
19235	* src/parse-gram.y: Accept an optional type tag for actions.
19236	* src/reader.h, src/reader.c (grammar_current_rule_action_append): Add
19237	a type argument.
19238	(grammar_midrule_action): When a mid-rule is typed, pass its type to
19239	the defined dummy non terminal symbol.
19240
192412018-08-05  Akim Demaille  <akim.demaille@gmail.com>
19242
19243	tests: make room for more cases
19244	* tests/input.at (AT_CHECK_UNUSED_VALUES): Add an empty line
19245	to allow more symbols, and adjust line numbers.
19246	Use a more consistent m4 quoting scheme.
19247
192482018-08-05  Akim Demaille  <akim.demaille@gmail.com>
19249
19250	warnings: address -Wnull-dereference in reader.c
19251	Based on a patch by David Michael.
19252	http://lists.gnu.org/archive/html/bison-patches/2018-07/msg00000.html
19253
19254	* src/reader.c (find_start): New, extracted from...
19255	(check_and_convert_grammar): here.
19256
192572018-08-05  Akim Demaille  <akim.demaille@gmail.com>
19258
19259	style: ielr: reduce scopes
19260	* src/ielr.c: Use modern C to reduce the scopes of some variables.
19261
192622018-07-26  Akim Demaille  <akim.demaille@gmail.com>
19263
19264	style: move to C99 to reduce scopes
19265	* src/symtab.c, src/reader.c: Freely mix statements and variable
19266	definitions.  And use for-loops with initializers.
19267
192682018-07-26  Akim Demaille  <akim.demaille@gmail.com>
19269
19270	style: split a function in two
19271	grammar_current_rule_action_append was used in two different places:
19272	for actual action (`{...}`), and for predicates (`%?{...}`).  Let's
19273	split this in two different functions.
19274
19275	* src/reader.h, src/reader.c (grammar_current_rule_predicate_append): New.
19276	Extracted from...
19277	(grammar_current_rule_action_append): here.
19278	Remove arguments that don't apply.
19279	Adjust dependencies.
19280
192812018-07-26  Akim Demaille  <akim.demaille@gmail.com>
19282
19283	tests: fix typo
19284	* tests/actions.at: Remove (harmless) stray character.
19285
192862018-07-26  Akim Demaille  <akim.demaille@gmail.com>
19287
19288	print: remove unused function
19289	This function was unused since 1991's original import by
19290	rms (e06f0c34427faedc7afbec9554adbffc4c87312e).
19291
19292	* src/print.c (print_token): Remove.
19293
192942018-06-23  Akim Demaille  <akim.demaille@gmail.com>
19295
19296	doc: fix Texinfo syntax error
19297	* doc/bison.texi (Understanding): here.
19298
192992018-06-22  Akim Demaille  <akim.demaille@gmail.com>
19300
19301	doc: we now show the type of the symbols
19302	* doc/bison.texi (Understanding Your Parser): Update the output
19303	from Bison.
19304	Use types in the example, and show them in the report.
19305	* NEWS: Update.
19306
193072018-06-18  Akim Demaille  <akim.demaille@gmail.com>
19308
19309	tests: check the typed symbols in the reports
19310	* tests/report.at: New.
19311	* tests/local.mk, tests/testsuite.at: Use it.
19312
193132018-06-18  Akim Demaille  <akim.demaille@gmail.com>
19314
19315	report: display the type of the symbols
19316	* src/print.c (print_nonterminal_symbols, print_terminal_symbols):
19317	Also should the type of the symbols.
19318
193192018-06-18  Akim Demaille  <akim.demaille@gmail.com>
19320
19321	style: reduce scopes
19322	* src/print.c (print_terminal_symbols, print_nonterminal_symbols): Here.
19323
193242018-06-18  Akim Demaille  <akim.demaille@gmail.com>
19325
19326	style: split large function
19327	* src/print.c (print_grammar): Split into...
19328	(print_terminal_symbols, print_nonterminal_symbols): these.
19329	Adjust dependencies.
19330
193312018-06-18  Akim Demaille  <akim.demaille@gmail.com>
19332
19333	style: reduce scopes
19334	* src/print.c (print_grammar): Shorten scopes.
19335
193362018-06-18  Akim Demaille  <akim.demaille@gmail.com>
19337
19338	gnulib: update
19339	Fixes the `make install-pdf` problem reported by Hans Åberg in
19340	http://lists.gnu.org/archive/html/bug-bison/2018-06/msg00000.html
19341	that had already been fixed by Joel E. Denny in
19342	http://lists.gnu.org/archive/html/bug-bison/2012-04/msg00011.html
19343	Final fix in
19344	http://lists.gnu.org/archive/html/bug-gnulib/2018-06/msg00019.html
19345
193462018-06-17  Akim Demaille  <akim.demaille@gmail.com>
19347
19348	Merge maint into master
19349	* upstream/maint: (48 commits)
19350	  THANKS: update an address
19351	  tests: adjust syncline tests to GCC 7
19352	  glr: fix improperly placed synclines
19353	  bison: be git grep friendly
19354	  Replace ftp with https
19355	  maint: post-release administrivia
19356	  version 3.0.5
19357	  bison: style: indentation fixes
19358	  regen
19359	  bison: please address sanitizer
19360	  C++: style: fix indentation
19361	  NEWS: update
19362	  C++: style: prefer `unsigned` to `unsigned int`
19363	  C++: style: space before paren
19364	  C++: fix -Wdeprecated warnings
19365	  tests: fix -Wdeprecated warning
19366	  maint: update syntax-check exclusions
19367	  autoconf: update
19368	  regen
19369	  Update copyright years
19370	  ...
19371
193722018-05-30  Akim Demaille  <akim.demaille@gmail.com>
19373
19374	THANKS: update an address
19375
193762018-05-30  Akim Demaille  <akim.demaille@gmail.com>
19377
19378	tests: adjust syncline tests to GCC 7
19379	GCC 7 also underlines the error.
19380
19381	    syncline.c:4:2: error: #error "4"
19382	     #error "4"
19383	      ^~~~~
19384
19385	* tests/synclines.at (_AT_SYNCLINES_COMPILE): Remove tildas from GCC 7.
19386
193872018-05-29  Akim Demaille  <akim.demaille@gmail.com>
19388
19389	glr: fix improperly placed synclines
19390	Predicates with GLR are issued with synclines in the middle of C code:
19391
19392	          case 2:
19393	      if (! (#line 6 "sempred.y" /* glr.c:816  */
19394	      new_syntax)) YYERROR;
19395	    #line 793 "sempred.tab.c" /* glr.c:816  */
19396	      break;
19397
19398	Reported by Rici Lake.
19399	http://lists.gnu.org/archive/html/bug-bison/2018-05/msg00033.html
19400
19401	* data/c.m4 (b4_predicate_case): Be sure to start on column 0.
19402	It would be nicer if b4_syncline could ensure this by itself
19403	(that would avoid ugly code when synclines are disabled), but that's
19404	way more work.
19405	* tests/glr-regression.at (Predicates): Be a real end-to-end test.
19406	This would have caught this error years ago...
19407
194082018-05-29  Akim Demaille  <akim.demaille@gmail.com>
19409
19410	bison: be git grep friendly
19411	* src/output.c (user_actions_output): Make calls to b4_case and
19412	b4_predicate_case explicit.
19413
194142018-05-29  Akim Demaille  <akim.demaille@gmail.com>
19415
19416	Replace ftp with https
19417	Reported by Hans Åberg.
19418
19419	* README, cfg.mk, doc/bison.texi: here.
19420
194212018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19422
19423	maint: post-release administrivia
19424	* NEWS: Add header line for next release.
19425	* .prev-version: Record previous version.
19426	* cfg.mk (old_NEWS_hash): Auto-update.
19427
194282018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19429
19430	version 3.0.5
19431	* NEWS: Record release date.
19432
194332018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19434
19435	bison: style: indentation fixes
19436	* src/parse-gram.y: here.
19437
194382018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19439
19440	regen
19441
194422018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19443
19444	bison: please address sanitizer
19445	* src/parse-gram.y (add_param): Asan does not like that the second
19446	argument of strspn is not 0-terminated.
19447
194482018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19449
19450	C++: style: fix indentation
19451	* data/variant.hh (b4_symbol_variant): De-indent, as the callers are
19452	indented.
19453
194542018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19455
19456	NEWS: update
19457
194582018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19459
19460	C++: style: prefer `unsigned` to `unsigned int`
19461	* data/c++.m4: here.
19462
194632018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19464
19465	C++: style: space before paren
19466	* data/c++.m4, data/lalr1.cc: here.
19467
194682018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19469
19470	C++: fix -Wdeprecated warnings
19471	For instance on test 99:
19472
19473	    In file included from @@.cc:56:
19474	    @@.hh:409:26: error: definition of implicit copy constructor for
19475	                         'stack_symbol_type' is deprecated because it
19476	                         has a user-declared copy assignment operator
19477	                         [-Werror,-Wdeprecated]
19478	          stack_symbol_type& operator= (const stack_symbol_type& that);
19479	                         ^
19480
19481	Reported by Derek Clegg.
19482	https://lists.gnu.org/archive/html/bison-patches/2018-05/msg00036.html
19483
19484	* configure.ac (warn_tests): Add -Wdeprecated.
19485	* data/lalr1.cc (stack_symbol_type): Add an explicit copy ctor.
19486	We cannot rely on the explicit default implementation (`= default`)
19487	as we support C++ 98.
19488
194892018-05-27  Akim Demaille  <akim.demaille@gmail.com>
19490
19491	tests: fix -Wdeprecated warning
19492	With recent compilers:
19493
19494	    input.yy:49:5: error: definition of implicit copy assignment
19495	                          operator for 'Object' is deprecated because
19496	                          it has a user-declared destructor
19497	                          [-Werror,-Wdeprecated]
19498	        ~Object ()
19499	        ^
19500	    input.yy:130:35: note: in implicit copy assignment operator for
19501	                           'Object' first required here
19502	        { yylhs.value.as< Object > () = yystack_[0].value.as< Object > (); }
19503
19504	* tests/c++.at (Object): Add missing assignment operator.
19505
195062018-05-19  Akim Demaille  <akim.demaille@gmail.com>
19507
19508	maint: update syntax-check exclusions
19509	sc_two_space_separator_in_usage complains about bootstrap:
19510
19511	    two_space_separator_in_usage
19512	    /Users/akim/src/gnu/bison/bootstrap:905:   --aux-dir $build_aux\
19513	    /Users/akim/src/gnu/bison/bootstrap:906:   --doc-base $doc_base\
19514	    /Users/akim/src/gnu/bison/bootstrap:907:   --lib $gnulib_name\
19515	    /Users/akim/src/gnu/bison/bootstrap:908:   --m4-base $m4_base/\
19516	    /Users/akim/src/gnu/bison/bootstrap:909:   --source-base $source_base/\
19517	    /Users/akim/src/gnu/bison/bootstrap:910:   --tests-base $tests_base\
19518	    /Users/akim/src/gnu/bison/bootstrap:911:   --local-dir $local_gl_dir\
19519	    maint.mk: help2man requires at least two spaces between an option and its description
19520
19521	* cfg.mk: Exclude bootstrap from this check.
19522
195232018-05-19  Akim Demaille  <akim.demaille@gmail.com>
19524
19525	autoconf: update
19526	* submodules/autoconf: Update to latest master.
19527	No difference on the M4 files we use.
19528
195292018-05-19  Akim Demaille  <akim.demaille@gmail.com>
19530
19531	regen
19532
195332018-05-12  Akim Demaille  <akim.demaille@gmail.com>
19534
19535	Update copyright years
19536	Run `make update-copyright`.
19537
195382018-05-12  Nate Guerin  <nathan.guerin@riseup.net>
19539
19540	Add a missing word in the documentation
19541	Small patch adds the word 'to' to the documentation.
19542
195432018-05-12  Akim Demaille  <akim.demaille@gmail.com>
19544
19545	Examples: improve C++ style
19546	* examples/variant.yy: Prefer vector to list.
19547	Remove useless inline.
19548
195492018-05-12  Akim Demaille  <akim.demaille@gmail.com>
19550
19551	Avoid compiler warnings
19552	At least GCC 7.3, with -O1 or -O2 (but not -O0 or -O3) generates
19553	warnings with -Wnull-dereference when using yyformat: it fails to see
19554	yyformat cannot be null.
19555
19556	Reported by Frank Heckenbach, https://savannah.gnu.org/patch/?9620.
19557
19558	* configure.ac: Use -Wnull-dereference if supported.
19559	* data/glr.c, data/lalr1.cc, data/yacc.c: Define yyformat in such
19560	a way that GCC cannot not see that yyformat is defined.
19561	Using `default: abort();` also addresses the issue, but forces
19562	the inclusion of `stdlib.h`, which we avoid.
19563
195642018-05-10  Akim Demaille  <akim.demaille@gmail.com>
19565
19566	C++: fix uses of `inline`
19567	Sometimes `inline` would be used in *.cc files on symbols that are not
19568	exported (useless but harmless), and sometimes on exported symbols
19569	such as the constructor of syntax_error (harmful: linking fails).
19570
19571	Reported several times, including:
19572
19573	- by Dennis T
19574	  http://lists.gnu.org/archive/html/bug-bison/2016-03/msg00002.html
19575	- by Frank Heckenbach
19576	  https://savannah.gnu.org/patch/?9616
19577
19578	* data/c++.m4 (b4_inline): New: expands to `inline` or nothing.
19579	Use it where appropriate.
19580	* data/lalr1.cc: Use it where appropriate.
19581
19582	* tests/c++.at (Syntax error as exception): Put the scanner in another
19583	compilation unit to exercise the constructor of syntax_error.
19584
195852018-05-10  Akim Demaille  <akim.demaille@gmail.com>
19586
19587	C++: remove useless `inline` in CC files
19588	* data/glr.cc, data/lalr1.cc: Remove `inline` from implementations
19589	that are not in headers.
19590
195912018-05-10  Akim Demaille  <akim.demaille@gmail.com>
19592
19593	C++: remove useless `inline` on templates
19594	Templates are implicitly `inline`.
19595
19596	* data/c++.m4, data/lalr1.cc: Remove `inline` from templates.
19597
195982018-05-08  Akim Demaille  <akim.demaille@gmail.com>
19599
19600	style: don't use std::endl
19601	* data/lalr1.cc, doc/bison.texi, etc/bench.pl.in, examples/variant.yy,
19602	* tests/actions.at, tests/atlocal.in, tests/c++.at, tests/headers.at,
19603	* tests/local.at, tests/types.at:
19604	Don't use std::endl, it flushes uselessly, and is considered bad
19605	style.
19606
196072018-05-08  Akim Demaille  <akim.demaille@gmail.com>
19608
19609	doc: wrap
19610	* README-hacking: Refill paragraphs.
19611
196122018-05-08  Akim Demaille  <akim.demaille@gmail.com>
19613
19614	gnulib: update
19615	* README-hacking: Commit before bootstrapping.
19616	* bootstrap.conf: gnulib_mk is no longer defined by bootstrap.
19617	* bootstrap, gnulib, lib/.gitignore, m4/.gitignore: Update/regen.
19618
196192018-05-08  Akim Demaille  <akim.demaille@gmail.com>
19620
19621	tests: we might need to find gnulib headers
19622	    315. calc.at:596: testing Calculator  ...
19623	    ++ cat
19624	    ++ test x = x1
19625	    ++ set +x
19626	    bison/tests/calc.at:596: bison -fno-caret -o calc.c calc.y
19627	    ++ bison -fno-caret -o calc.c calc.y
19628	    ++ set +x
19629	    bison/tests/calc.at:596: $BISON_C_WORKS
19630	    stderr:
19631	    stdout:
19632	    ++ set +x
19633	    bison/tests/calc.at:596: $CC $CFLAGS $CPPFLAGS $LDFLAGS -o calc calc.c $LIBS
19634	    ++ ccache clang-mp-6.0 -Qunused-arguments -O3 -g -Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation -Wformat -Wpointer-arith -Wwrite-strings -Wbad-function-cast -Wshadow -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wmissing-declarations -Wmissing-prototypes -Wundef -pedantic -Wsign-compare -fno-color-diagnostics -Wno-keyword-macro -Werror -Ibison/_build/6s/lib -DNDEBUG -isystem /opt/local/include -I/opt/local/include -L/opt/local/lib -o calc calc.c bison/_build/6s/lib/libbison.a -lintl -Wl,-framework -Wl,CoreFoundation
19635	    stderr:
19636	    In file included from calc.y:198:
19637	    bison/_build/6s/lib/unistd.h:592:11: fatal error: 'getopt-pfx-core.h' file not found
19638	    # include <getopt-pfx-core.h>
19639	              ^~~~~~~~~~~~~~~~~~~
19640	    1 error generated.
19641	    stdout:
19642	    bison/tests/calc.at:596: exit code was 1, expected 0
19643	    315. calc.at:596: 315. Calculator  (calc.at:596): FAILED (calc.at:596)
19644
19645	* tests/atlocal.in (CPPFLAGS): Find gnulib's headers.
19646
196472018-05-08  Akim Demaille  <akim.demaille@gmail.com>
19648
19649	getargs: rename argument to avoid gnulib's renaming
19650	With Clang 6.0:
19651
19652	      CC       src/bison-getargs.o
19653	    bison/src/getargs.c:67:12: error: parameter 'option' not found in the
19654	                               function declaration [-Werror,-Wdocumentation]
19655	     *  \param option   option being decoded.
19656	               ^~~~~~
19657	    bison/src/getargs.c:67:12: note: did you mean 'rpl_option'?
19658
19659	* src/getargs.c: Don't use `option` as a documentation argument.
19660
196612017-09-22  Paul Eggert  <eggert@cs.ucla.edu>
19662
19663	Capitalize "Polish" when it's a proper adjective
19664
196652017-09-17  Paul Eggert  <eggert@cs.ucla.edu>
19666
19667	Adjust to recent Gnulib changes
19668
196692017-09-17  Paul Eggert  <eggert@cs.ucla.edu>
19670
19671	autoconf: update
19672
196732017-09-17  Paul Eggert  <eggert@cs.ucla.edu>
19674
19675	gnulib: update
19676
196772015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19678
19679	gnulib: update
19680
196812015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19682
19683	lalr1, yacc: use the default location as initial error location
19684	Currently lalr1.cc makes an out-of-bound access when trying to read @1
19685	in rules with an empty rhs (i.e., when there is no @1) that raises an
19686	error (YYERROR).
19687
19688	glr.c already gracefully handles this by using @$ as initial location
19689	for the errors.  Let's do that in yacc.c and lalr1.cc.
19690
19691	* data/lalr1.cc, data/yacc.c: Use @$ to initialize the error location.
19692	* tests/actions.at: Check that case.
19693
196942015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19695
19696	style: formatting and comment changes
19697	* data/glr.c: Avoid empty lines.
19698	* data/lalr1.cc: Use the same comments as in glr.c and yacc.c.
19699
197002015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19701
19702	c++: style: use "unsigned", not "unsigned int"
19703	This style appears to be more traditional, at least in C++.
19704	For instance in the standard, [facets.examples].
19705	There are occurrences using "unsigned int" too though.
19706
19707	* data/lalr1.cc, data/location.cc, data/stack.hh: here.
19708
197092015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19710
19711	c++: style: remove useless "inline" and fix space issues
19712	* data/lalr1.cc, data/c++.m4: Formatting changes.
19713	* data/stack.hh: Remove useless "inline".
19714	Add documentation.
19715	* data/location.cc: Prefer {} for empty bodies.
19716
197172015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19718
19719	tests: beware of additional warnings from GCC 5
19720	* tests/synclines.at (AT_SYNCLINES_COMPILE): Avoid warnings about
19721	unused functions.
19722
197232015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19724
19725	tests: beware that clang warns about "#define private public"
19726	We use this trick to write some test about internal details.  But
19727	since we use -Werror, clang++ 3.6 dies issueing a warning about it.
19728
19729	* configure.ac (warn_tests): Disable this warning.
19730
197312015-08-12  Akim Demaille  <akim@lrde.epita.fr>
19732
19733	tests: update our Valgrind suppression files
19734	* build-aux/linux-gnu.valgrind, build-aux/darwin11.4.0.valgrind: Rename as...
19735	* build-aux/Linux.valgrind, build-aux/Darwin.valgrind: these.
19736	* build-aux/Linux.valgrind: Add suppression clause.
19737	* configure.ac: Update.
19738	* tests/local.mk: Use it.
19739
197402015-03-03  Akim Demaille  <akim@lrde.epita.fr>
19741
19742	doc: improve html and pdf rendering
19743	* doc/bison.texi: Help html conversion to understand where the
19744	function names end.
19745	Beware of PDF width.
19746
197472015-03-03  Akim Demaille  <akim@lrde.epita.fr>
19748
19749	doc: fixes in the C++ part
19750	Reported by Askar Safin.
19751
19752	http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00018.html
19753	http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00019.html
19754
19755	* doc/bison.texi (Split Symbols): Fix access to token types.
19756	yylval is a pointer, so use ->.
19757	Fix coding style issues: space before paren.
19758
197592015-02-10  Akim Demaille  <akim@lrde.epita.fr>
19760
19761	tests: be robust to platforms that support UTF-8 even with LC_ALL=C
19762	Because musl supports UTF-8 with LC_ALL=C, gcc produces:
19763
19764	  input.y: In function ‘yyparse’:
19765
19766	instead of:
19767
19768	  input.y: In function 'yyparse':
19769
19770	Reported by Ferdinand Thiessen.
19771	http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00001.html
19772
19773	* tests/synclines.at (AT_SYNCLINES_COMPILE): Skip syncline tests when
19774	we can't trust error messages issued about a function body.
19775
197762015-02-10  Akim Demaille  <akim@lrde.epita.fr>
19777
19778	tests: java: avoid recent Java features
19779	Tests 463 and 464 fail with Java 1.4 compilers.
19780
19781	Reported by Michael Felt.
19782	<http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00091.html>
19783
19784	* tests/javapush.at: Use StringBuffer instead of StringBuilder.
19785
197862015-01-26  Akim Demaille  <akim@lrde.epita.fr>
19787
19788	tests: c++: fix symbol lookup issue
19789	Sun C 5.13 SunOS_sparc 2014/10/20 reports errors on tests 430-432.
19790
19791	Reported by Dennis Clarke.
19792	<http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00087.html>
19793
19794	* tests/c++.at (Variants): Be sure to emit operator<< before using it:
19795	use "%code top" rather than "%code".
19796	Prefer std::vector to std::list.
19797	Do not define anything in std::, to avoid undefined behavior.
19798
197992015-01-23  Akim Demaille  <akim@lrde.epita.fr>
19800
19801	Merge remote-tracking branch 'origin/maint'
19802	* origin/maint:
19803	  maint: post-release administrivia
19804	  version 3.0.4
19805	  gnulib: update
19806	  build: re-enable compiler warnings, and fix them
19807	  tests: c++: fix a C++03 conformance issue
19808	  tests: fix a title
19809	  c++: reserve 200 slots in the parser's stack
19810	  tests: be more robust to unrecognized synclines, and try to recognize xlc
19811	  tests: fix C++ conformance
19812	  build: fix some warnings
19813	  build: avoid infinite recursions on include_next
19814
198152015-01-23  Akim Demaille  <akim@lrde.epita.fr>
19816
19817	maint: post-release administrivia
19818	* NEWS: Add header line for next release.
19819	* .prev-version: Record previous version.
19820	* cfg.mk (old_NEWS_hash): Auto-update.
19821
198222015-01-23  Akim Demaille  <akim@lrde.epita.fr>
19823
19824	version 3.0.4
19825	* NEWS: Record release date.
19826
198272015-01-23  Akim Demaille  <akim@lrde.epita.fr>
19828
19829	gnulib: update
19830
198312015-01-23  Akim Demaille  <akim@lrde.epita.fr>
19832
19833	build: re-enable compiler warnings, and fix them
19834	There are warnings (-Wextra) in generated C++ code:
19835
19836	  ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type
19837	  ltlyy::parser::by_state::type_get() const':
19838	  ltlparse.cc:452:33: warning: enumeral and non-enumeral type in
19839	  conditional expression
19840	      return state == empty_state ? empty_symbol : yystos_[state];
19841
19842	Reported by Alexandre Duret-Lutz.
19843
19844	It turns out that -Wall and -Wextra were disabled because of a stupid
19845	typo.
19846
19847	* configure.ac: Fix the stupid typo.
19848	* data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c,
19849	* src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c,
19850	* src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at,
19851	* tests/calc.at, tests/cxx-type.at, tests/glr-regression.at,
19852	* tests/named-refs.at, tests/torture.at:
19853	Fix warnings, mostly issues about variables used only with assertions,
19854	which are disabled with -DNDEBUG.
19855
198562015-01-22  Akim Demaille  <akim@lrde.epita.fr>
19857
19858	tests: c++: fix a C++03 conformance issue
19859	This fixes test 241 on xLC:
19860
19861	"input.y", line 42.11: 1540-0274 (S) The name lookup for "report" did not find a declaration.
19862	"input.y", line 42.11: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.
19863
19864	where report is:
19865
19866	  static void
19867	  report (std::ostream& yyo, int ival, float fval)
19868	  {
19869	    yyo << "ival: " << ival << ", fval: " <<  fval;
19870	  }
19871
19872	and line 42 is:
19873
19874	  %printer { report (yyo, $$,       $<fval>$); } <ival>;
19875
19876	It turns out that indeed this function must not be declared static,
19877	<http://stackoverflow.com/a/17662745/1353549>.  Let's put it into an
19878	anonymous namespace.
19879
19880	Reported by Thomas Jahns.
19881	http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
19882
19883	* tests/actions.at (Qualified $$ in actions): Don't use "static",
19884	prefer anonymous namespace.
19885
198862015-01-20  Akim Demaille  <akim@lrde.epita.fr>
19887
19888	tests: fix a title
19889	* tests/conflicts.at: De-overquote.
19890
198912015-01-20  Akim Demaille  <akim@lrde.epita.fr>
19892
19893	c++: reserve 200 slots in the parser's stack
19894	This is consistent with what is done with yacc.c and glr.c.  Because
19895	it also avoids that the stack needs to be resized very soon, it should
19896	help keeping tests about destructors more reliable.
19897
19898	Indeed, if the stack is created too small, very soon the C++ library
19899	needs to enlarge it, which means creating a new one, copying the
19900	elements from the initial one onto it, and then destroy the elements
19901	of the initial stack: that would be a spurious call to a destructor.
19902
19903	Reported by Thomas Jahns.
19904	http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
19905
19906	* data/stack.hh (stack::stack): Reserve 200 slots.
19907	* tests/c++.at: Remove traces of stack expansions.
19908
199092015-01-20  Akim Demaille  <akim@lrde.epita.fr>
19910
19911	tests: be more robust to unrecognized synclines, and try to recognize xlc
19912	Reported by Thomas Jahns.
19913	http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
19914
19915	* tests/synclines.at (AT_SYNCLINES_COMPILE): Rename as...
19916	(_AT_SYNCLINES_COMPILE): this.
19917	Try to recognize xlc locations.
19918	(AT_SYNCLINES_COMPILE): New.  Skips the test if we can't read the
19919	synclines.
19920
199212015-01-20  Akim Demaille  <akim@lrde.epita.fr>
19922
19923	tests: fix C++ conformance
19924	Reported by Thomas Jahns.
19925	http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
19926
19927	* tests/c++.at (Exception safety): Add missing include.
19928	Don't use const_iterator for erase.
19929
199302015-01-18  Akim Demaille  <akim@lrde.epita.fr>
19931
19932	build: fix some warnings
19933	Reported by John Horigan.
19934	http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00034.html
19935
19936	* src/graphviz.c, src/symtab.h: Address compiler warnings.
19937
199382015-01-16  Akim Demaille  <akim@lrde.epita.fr>
19939
19940	Merge remote-tracking branch 'origin/maint' into origin/master
19941	* origin/maint:
19942	  doc: minor fixes
19943	  gnulib: strtoul is considered obsolete and now useless
19944	  c++: avoid warnings when destructors don't use $$
19945	  maint: post-release administrivia
19946	  version 3.0.3
19947	  gnulib: update
19948
199492015-01-16  Akim Demaille  <akim@lrde.epita.fr>
19950
19951	build: avoid infinite recursions on include_next
19952	On MacOS X 10.5 PPC with Apple's GCC 4.0.1:
19953
19954	  % uname -a
19955	  Darwin aria.cielonegro.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:0
19956	  1 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC Power Macintosh
19957	  % gcc --version
19958	  powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
19959	  Copyright (C) 2005 Free Software Foundation, Inc.
19960	  This is free software; see the source for copying conditions.  There is NO
19961	  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19962
19963	building in place enters into an infinite recursion on "#include_next":
19964
19965	  % gmake V=1
19966	  [snip]
19967	  depbase=`echo lib/math.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
19968	  gcc -std=gnu99    -I. -Ilib -I. -I./lib   -g -O2 -MT lib/math.o -MD -MP -MF $depbase.Tpo -c -o lib/math.o lib/math.c &&\
19969	  mv -f $depbase.Tpo $depbase.Po
19970	  In file included from lib/math.h:27,
19971	                   from lib/math.h:27,
19972	                   from lib/math.h:27,
19973	                   from lib/math.h:27,
19974	  [snip]
19975	                   from lib/math.h:27,
19976	                   from lib/math.h:27,
19977	                   from lib/math.c:3:
19978	  lib/math.h:27:23: error: #include nested too deeply
19979	  Makefile:3414: recipe for target 'lib/math.o' failed
19980	  gmake[2]: *** [lib/math.o] Error 1
19981
19982	Using -I./lib instead of -Ilib fixes the problem.
19983
19984	Reported by Pho.
19985	<https://lists.gnu.org/archive/html/bison-patches/2014-01/msg00000.html>
19986
19987	* Makefile.am (AM_CPPFLAGS): Use -I./lib instead of -Ilib.
19988
199892015-01-16  Akim Demaille  <akim@lrde.epita.fr>
19990
19991	doc: minor fixes
19992	* doc/bison.texi: Fix warnings about colon in reference names.
19993	* data/bison.m4, src/files.h: Fix comments.
19994	* doc/Doxyfile.in: update.
19995
199962015-01-15  Akim Demaille  <akim@lrde.epita.fr>
19997
19998	gnulib: strtoul is considered obsolete and now useless
19999	* bootstrap.conf: here.
20000
200012015-01-15  Akim Demaille  <akim@lrde.epita.fr>
20002
20003	c++: avoid warnings when destructors don't use $$
20004	* data/c++.m4: here.
20005
200062015-01-15  Akim Demaille  <akim@lrde.epita.fr>
20007
20008	maint: post-release administrivia
20009	* NEWS: Add header line for next release.
20010	* .prev-version: Record previous version.
20011	* cfg.mk (old_NEWS_hash): Auto-update.
20012
200132015-01-15  Akim Demaille  <akim@lrde.epita.fr>
20014
20015	version 3.0.3
20016	* NEWS: Record release date.
20017
200182015-01-15  Akim Demaille  <akim@lrde.epita.fr>
20019
20020	gnulib: update
20021
200222015-01-14  Akim Demaille  <akim@lrde.epita.fr>
20023
20024	symbol: use the first occurrence as an LHS as defining location
20025	Currently on the following grammar:
20026
20027	    %type <foo> foo
20028	    %%
20029	    start: foo | bar | "baz"
20030	    foo: foo
20031	    bar: bar
20032
20033	bison reports:
20034
20035	    warning: 2 nonterminals useless in grammar [-Wother]
20036	    warning: 4 rules useless in grammar [-Wother]
20037	    1.13-15: warning: nonterminal useless in grammar: foo [-Wother]
20038	     %type <foo> foo
20039	                 ^^^
20040	    3.14-16: warning: nonterminal useless in grammar: bar [-Wother]
20041	     start: foo | bar | "baz"
20042	                  ^^^
20043	    [...]
20044
20045	i.e., the location of the first occurrence of a symbol is taken as its
20046	definition point.  In the case of nonterminals, the first occurrence
20047	as a left-hand side of a rule makes more sense:
20048
20049	    warning: 2 nonterminals useless in grammar [-Wother]
20050	    warning: 4 rules useless in grammar [-Wother]
20051	    4.1-3: warning: nonterminal useless in grammar: foo [-Wother]
20052	     foo: foo
20053	     ^^^
20054	    5.1-3: warning: nonterminal useless in grammar: bar [-Wother]
20055	     bar: bar
20056	     ^^^
20057	    [...]
20058
20059	* src/symtab.h, src/symtab.c (symbol::location_of_lhs): New.
20060	(symbol_location_as_lhs_set): New.
20061	* src/parse-gram.y (current_lhs): Use it.
20062	* tests/reduce.at: Update locations.
20063
200642015-01-14  Akim Demaille  <akim@lrde.epita.fr>
20065
20066	reduce: don't complain about rules whose lhs is useless
20067	In the following grammar, the 'exp' nonterminal is trivially useless.
20068	So, of course, its rules are useless too.
20069
20070	    %%
20071	    input: '0' | exp
20072	    exp: exp '+' exp | exp '-' exp | '(' exp ')'
20073
20074	Previously all the useless rules were reported, including those whose
20075	left-hand side is the 'exp' nonterminal:
20076
20077	    warning: 1 nonterminal useless in grammar [-Wother]
20078	    warning: 4 rules useless in grammar [-Wother]
20079	    2.14-16: warning: nonterminal useless in grammar: exp [-Wother]
20080	     input: '0' | exp
20081	                  ^^^
20082	    2.14-16: warning: rule useless in grammar [-Wother]
20083	     input: '0' | exp
20084	                  ^^^
20085	  ! 3.6-16: warning: rule useless in grammar [-Wother]
20086	  !  exp: exp '+' exp | exp '-' exp | '(' exp ')'
20087	  !       ^^^^^^^^^^^
20088	  ! 3.20-30: warning: rule useless in grammar [-Wother]
20089	  !  exp: exp '+' exp | exp '-' exp | '(' exp ')'
20090	  !                     ^^^^^^^^^^^
20091	  ! 3.34-44: warning: rule useless in grammar [-Wother]
20092	  !  exp: exp '+' exp | exp '-' exp | '(' exp ')'
20093	  !                                   ^^^^^^^^^^^
20094
20095	The interest of being so verbose is dubious.  I suspect most of the
20096	time nonterminals are not expected to be useless, so the user wants to
20097	fix the nonterminal, not remove its rules.  And even if the user
20098	wanted to get rid of its rules, the position of these rules probably
20099	does not help more that just having the name of the nonterminal.
20100
20101	This commit discard these messages, marked with '!', and keep the
20102	others.  In particular, we still report:
20103
20104	    2.14-16: warning: rule useless in grammar [-Wother]
20105	     input: '0' | exp
20106	                  ^^^
20107
20108	All the useless rules (including the '!' ones) are still reported in
20109	the reports (xml, text, etc.); only the diagnostics on stderr change.
20110
20111	* src/gram.c (grammar_rules_useless_report): Don't complain about
20112	useless rules whose lhs is useless.
20113	* src/reduce.h, src/reduce.c (reduce_nonterminal_useless_in_grammar):
20114	Take a sym_content as argument.
20115	Adjust callers.
20116	* tests/reduce.at (Useless Rules, Underivable Rules, Reduced Automaton):
20117	Adjust.
20118
201192015-01-14  Akim Demaille  <akim@lrde.epita.fr>
20120
20121	style: reduce: use unsigned to count a number of objects
20122	* src/reduce.h, src/reduce.c (nuseful_productions, nuseless_productions)
20123	(nuseful_nonterminals, nuseless_nonterminals): Declare as unsigned.
20124	Simplify "0 <" tests into non-zero tests.
20125
201262015-01-14  Akim Demaille  <akim@lrde.epita.fr>
20127
20128	style: reduce: introduce and use a swap for bitset
20129	* src/reduce.c (bitset_swap): New.
20130	Use it.
20131
201322015-01-14  Akim Demaille  <akim@lrde.epita.fr>
20133
20134	style: reduce: reduce scopes and other stylistic changes
20135	* src/reduce.c: Various stylistic changes:
20136	Reduce scopes.
20137	Prefer ++i to i++.
20138	Prefer < to >.
20139
201402015-01-13  Akim Demaille  <akim@lrde.epita.fr>
20141
20142	Merge remote-tracking branch 'origin/maint'
20143	* origin/maint:
20144	  tests: split a large test case into several smaller ones
20145	  package: a bit of trouble shooting indications
20146	  doc: liby's main arms the internationalization
20147	  bison: avoid warnings from static code analysis
20148	  c++: fix the use of destructors when variants are enabled
20149	  style: tests: simplify the handling of some C++ tests
20150	  c++: symbols can be empty, so use it
20151	  c++: variants: don't leak the lookahead in error recovery
20152	  c++: provide a means to clear symbols
20153	  c++: clean up the handling of empty symbols
20154	  c++: comment and style changes
20155	  c++: variants: comparing addresses of typeid.name() is undefined
20156	  c++: locations: complete the API and fix comments
20157	  build: do not clean figure sources in make clean
20158
201592015-01-13  Akim Demaille  <akim@lrde.epita.fr>
20160
20161	tests: split a large test case into several smaller ones
20162	* tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Move AT_SETUP/AT_CLEANUP
20163	into it, so that we don't skip non Java tests following a test case in Java.
20164
201652015-01-12  Akim Demaille  <akim@lrde.epita.fr>
20166
20167	package: a bit of trouble shooting indications
20168	* README-hacking: here.
20169
201702015-01-12  Akim Demaille  <akim@lrde.epita.fr>
20171
20172	doc: liby's main arms the internationalization
20173	Reported by Nicolas Bedon.
20174	<https://lists.gnu.org/archive/html/bug-bison/2014-11/msg00005.html>
20175
20176	* doc/bison.texi (Yacc Library): Document the call the setlocale.
20177
201782015-01-09  Akim Demaille  <akim@lrde.epita.fr>
20179
20180	bison: avoid warnings from static code analysis
20181	A static analysis tool reports that some callers of symbol_list_n_get
20182	might get NULL and not handle it properly.  This is not the case, yet
20183	we can suppress this pattern.
20184
20185	Reported by Mike Sullivan.
20186	<https://lists.gnu.org/archive/html/bug-bison/2013-12/msg00027.html>
20187
20188	* src/symlist.c (symbol_list_n_get): Actually it is never called
20189	to return 0.  Enforce this postcondition via aver.
20190	(symbol_list_n_type_name_get): Simplify accordingly.  In particular,
20191	discards a (translated) useless error message.
20192	* src/symlist.h: Adjust documentation.
20193	* src/scan-code.l: Style change.
20194
201952015-01-09  Akim Demaille  <akim@lrde.epita.fr>
20196
20197	c++: fix the use of destructors when variants are enabled
20198	When using variants, destructors generate invalid code.
20199	<http://lists.gnu.org/archive/html/bug-bison/2014-09/msg00005.html>
20200	Reported by Michael Catanzaro.
20201
20202	* data/c++.m4 (~basic_symbol): b4_symbol_foreach works on yysym:
20203	define it.
20204	* tests/c++.at (Variants): Check it.
20205
202062015-01-08  Akim Demaille  <akim@lrde.epita.fr>
20207
20208	style: tests: simplify the handling of some C++ tests
20209	* tests/c++.at: here.
20210	(Doxygen): Pass %define, so that files such as position.hh etc.
20211	are generated, instead of putting everything into input.hh.
20212
202132015-01-08  Akim Demaille  <akim@lrde.epita.fr>
20214
20215	c++: symbols can be empty, so use it
20216	The previous patches ensure that symbols (symbol_type and
20217	stack_symbol_type) can be empty, cleared, and their emptiness can be
20218	checked.  Therefore, yyempty, which codes whether yyla is empty or
20219	not, is now useless.
20220
20221	In C skeletons (e.g., yacc.c), the fact that the lookahead is empty is
20222	coded by "yychar = YYEMPTY", which is exactly what this patch
20223	restores, since yychar/yytoken corresponds to yyla.type.
20224
20225	* data/lalr1.cc (yyempty): Remove.
20226	Rather, depend on yyla.empty ().
20227
202282015-01-08  Akim Demaille  <akim@lrde.epita.fr>
20229
20230	c++: variants: don't leak the lookahead in error recovery
20231	During error recovery, when discarding the lookeahead, we don't
20232	destroy it, which is caught by parse.assert assertions.
20233
20234	Reported by Antonio Silva Correia.
20235	With an analysis and suggested patch from Michel d'Hooge.
20236	<http://savannah.gnu.org/support/?108481>
20237
20238	* tests/c++.at (Variants): Strengthen the test to try syntax errors
20239	with discarded lookahead.
20240
202412015-01-08  Akim Demaille  <akim@lrde.epita.fr>
20242
20243	c++: provide a means to clear symbols
20244	The symbol destructor is currently the only means to clear a symbol.
20245	Unfortunately during error recovery we might have to clear the
20246	lookahead, which is a local variable (yyla) that has not yet reached
20247	its end of scope.
20248
20249	Rather that duplicating the code to destroy a symbol, or rather than
20250	destroying and recreating yyla, let's provide a means to clear a
20251	symbol.
20252
20253	Reported by Antonio Silva Correia, with an analysis from Michel d'Hooge.
20254	<http://savannah.gnu.org/support/?108481>
20255
20256	* data/c++.m4, data/lalr1.cc (basis_symbol::clear, by_state::clear)
20257	(by_type::clear): New.
20258	(basic_symbol::~basic_symbol): Use clear.
20259
202602015-01-08  Akim Demaille  <akim@lrde.epita.fr>
20261
20262	c++: clean up the handling of empty symbols
20263	* data/c++.m4, data/lalr1.cc (yyempty_): Remove, replaced by...
20264	(empty_symbol, by_state::empty_state): these.
20265	(basic_symbol::empty): New.
20266
202672015-01-08  Akim Demaille  <akim@lrde.epita.fr>
20268
20269	c++: comment and style changes
20270	* data/c++.m4, data/lalr1.cc: More documentation.
20271	Tidy.
20272	* tests/c++.at (string_cast): Rename as...
20273	(to_string): this C++11 name.
20274
202752015-01-07  Akim Demaille  <akim@lrde.epita.fr>
20276
20277	c++: variants: comparing addresses of typeid.name() is undefined
20278	Instead of storing and comparing pointers to names of types, store
20279	pointers to the typeids, and compares the typeids.
20280	Reported by Thomas Jahns.
20281	<http://lists.gnu.org/archive/html/bug-bison/2014-03/msg00001.html>
20282
20283	* data/variant.hh (yytname_): Replace with...
20284	(yytypeid_): this.
20285
202862015-01-05  Akim Demaille  <akim@lrde.epita.fr>
20287
20288	c++: locations: complete the API and fix comments
20289	There are no support for += between locations, and some comments are wrong.
20290	Reported by Alexandre Duret-Lutz.
20291
20292	* data/location.cc: Fix.
20293	* doc/bison.texi: Document.
20294	* tests/c++.at: Check.
20295
202962015-01-05  Akim Demaille  <akim@lrde.epita.fr>
20297
20298	build: do not clean figure sources in make clean
20299	"make clean && make" fails in in-tree builds.
20300
20301	* doc/local.mk (CLEANDIRS): Replace with...
20302	(CLEANFILES): this safer list of files to clean.
20303
203042015-01-05  Akim Demaille  <akim@lrde.epita.fr>
20305
20306	Merge remote-tracking branch 'origin/maint'
20307	* origin/maint:
20308	  build: don't try to generate docs when cross-compiling
20309	  package: fix a reporter's name
20310	  %union: fix the support for named %union
20311	  package: bump to 2015
20312	  flex: don't trust YY_USER_INIT
20313	  yacc.c: fix broken union when api.value.type=union and %defines are used
20314	  doc: fix missing xref
20315	  gnulib: update
20316	  location: remove some ugly debugging code traces
20317	  build: use abort to pacify compiler errors
20318	  package: bump to 2014
20319	  doc: specify documentation encoding
20320
203212015-01-05  Akim Demaille  <akim@lrde.epita.fr>
20322
20323	build: don't try to generate docs when cross-compiling
20324	When cross-compiling don't run the generated bison to update the docs.
20325	Reported by Aaro Koskinen.
20326	<http://lists.gnu.org/archive/html/bison-patches/2014-03/msg00000.html>
20327
20328	* configure.ac (CROSS_COMPILING): New.
20329	* doc/local.mk: Use it.
20330
203312015-01-04  Akim Demaille  <akim@lrde.epita.fr>
20332
20333	package: fix a reporter's name
20334	* THANKS, build-aux/git-log-fix: s/Bernd Edligner/Bernd Edlinger/.
20335
203362015-01-04  Akim Demaille  <akim@lrde.epita.fr>
20337
20338	%union: fix the support for named %union
20339	Bison supports a union tag, for obscure reasons.  But it does a poor
20340	job at it, especially since Bison 3.0.
20341	Reported by Stephen Cameron and Tobias Frost.
20342
20343	It did not ensure that the name was not given several times.  An easy
20344	way to do this is to make the %union tag be handled as a %define
20345	variable, as they cannot be defined several times.
20346
20347	Since Bison 3.0, the synclines were wrongly placed, resulting in
20348	invalid code.  Addressing this issue, because of the way the union tag
20349	was stored (as a code muscle), would have been tedious.  Unless we
20350	rather define the %union tag as a %percent variable, whose synclines
20351	are easier to manipulate.
20352
20353	So replace the b4_union_name muscle by the api.value.union.name
20354	%define variable, document, and check.
20355
20356	* data/bison.m4: Make sure that api.value.union.name has a keyword value.
20357	* data/c++.m4: Make sure that api.value.union.name is not defined.
20358	* data/c.m4 (b4_union_name): No longer use it, use api.value.union.name.
20359	* doc/bison.texi (%define Summary): Document it.
20360	* src/parse-gram.y (union_name): No longer define b4_uion_name, but
20361	api.value.union.name.
20362	* tests/input.at (Redefined %union name): New.
20363	* tests/synclines.at (%union name syncline): New.
20364	* tests/types.at: Check named %unions.
20365
203662015-01-04  Akim Demaille  <akim@lrde.epita.fr>
20367
20368	package: bump to 2015
20369	Which also requires:
20370
20371	* gnulib: Update.
20372
203732014-12-31  Akim Demaille  <akim@lrde.epita.fr>
20374
20375	flex: don't trust YY_USER_INIT
20376	Reported by Bernd Edlinger and others.
20377
20378	* src/scan-gram.l: here.
20379
203802014-12-31  Akim Demaille  <akim@lrde.epita.fr>
20381
20382	yacc.c: fix broken union when api.value.type=union and %defines are used
20383	Reported by Rich Wilson.
20384
20385	* data/c.m4 (b4_symbol_type_register): Append to b4_union_members,
20386	not b4_user_union_members.
20387	The latter invokes the former, but it is the former which is reinitialized
20388	to empty by b4_value_type_setup_union.
20389	* tests/types.at: Check it.
20390
20391	This reveals another bug, this time in the case of glr.c parsers.
20392
20393	* data/glr.c: Generate the header file before the implementation file,
20394	to be sure that the setup is run before what depends on it.
20395
203962014-12-31  Akim Demaille  <akim@lrde.epita.fr>
20397
20398	doc: fix missing xref
20399	Reported by xolodho.
20400
20401	* doc/bison.texi (Printer Decl): here.
20402
204032014-12-29  Akim Demaille  <akim@lrde.epita.fr>
20404
20405	gnulib: update
20406
204072014-02-03  Akim Demaille  <akim@lrde.epita.fr>
20408
20409	location: remove some ugly debugging code traces
20410	* data/location.cc: here.
20411
204122014-02-03  Akim Demaille  <akim@lrde.epita.fr>
20413
20414	build: use abort to pacify compiler errors
20415	clang, with -DNDEBUG and -Werror fails on some functions that might
20416	lack a return.  This is because aver is just another assert, discarded
20417	with -DNDEBUG.  So use abort.
20418
20419	* src/muscle-tab.c, src/scan-skel.l: here.
20420
204212014-02-03  Akim Demaille  <akim@lrde.epita.fr>
20422
20423	package: bump to 2014
20424	* AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README,
20425	* README-alpha, README-hacking, THANKS, TODO, bootstrap.conf,
20426	* build-aux/darwin11.4.0.valgrind, build-aux/local.mk,
20427	* build-aux/update-b4-copyright,
20428	* build-aux/update-package-copyright-year, cfg.mk, configure.ac,
20429	* data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4,
20430	* data/c-like.m4, data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc,
20431	* data/java-skel.m4, data/java.m4, data/lalr1.cc, data/lalr1.java,
20432	* data/local.mk, data/location.cc, data/stack.hh, data/variant.hh,
20433	* data/xslt/bison.xsl, data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl,
20434	* data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint,
20435	* djgpp/README.in, djgpp/config.bat, djgpp/config.sed,
20436	* djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat,
20437	* djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h,
20438	* djgpp/testsuite.sed, doc/bison.texi, doc/local.mk, doc/refcard.tex,
20439	* etc/README, etc/bench.pl.in, etc/local.mk,
20440	* examples/calc++/calc++.test, examples/calc++/local.mk,
20441	* examples/extexi, examples/local.mk, examples/mfcalc/local.mk,
20442	* examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk,
20443	* examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy,
20444	* lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
20445	* lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
20446	* lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
20447	* lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
20448	* lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
20449	* lib/local.mk, lib/main.c, lib/timevar.c, lib/timevar.def,
20450	* lib/timevar.h, lib/vbitset.c, lib/vbitset.h, lib/yyerror.c,
20451	* m4/bison-i18n.m4, m4/c-working.m4, m4/cxx.m4, m4/flex.m4,
20452	* m4/timevar.m4, src/AnnotationList.c, src/AnnotationList.h,
20453	* src/InadequacyList.c, src/InadequacyList.h, src/LR0.c, src/LR0.h,
20454	* src/Sbitset.c, src/Sbitset.h, src/assoc.c, src/assoc.h,
20455	* src/closure.c, src/closure.h, src/complain.c, src/complain.h,
20456	* src/conflicts.c, src/conflicts.h, src/derives.c, src/derives.h,
20457	* src/files.c, src/files.h, src/flex-scanner.h, src/getargs.c,
20458	* src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c,
20459	* src/graphviz.h, src/ielr.c, src/ielr.h, src/lalr.c, src/lalr.h,
20460	* src/local.mk, src/location.c, src/location.h, src/main.c,
20461	* src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c,
20462	* src/named-ref.h, src/nullable.c, src/nullable.h, src/output.c,
20463	* src/output.h, src/parse-gram.c, src/parse-gram.y, src/print-xml.c,
20464	* src/print-xml.h, src/print.c, src/print.h, src/print_graph.c,
20465	* src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
20466	* src/reduce.h, src/relation.c, src/relation.h, src/scan-code.h,
20467	* src/scan-code.l, src/scan-gram.h, src/scan-gram.l, src/scan-skel.h,
20468	* src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
20469	* src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
20470	* src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
20471	* tests/actions.at, tests/atlocal.in, tests/bison.in, tests/c++.at,
20472	* tests/calc.at, tests/conflicts.at, tests/cxx-type.at,
20473	* tests/existing.at, tests/glr-regression.at, tests/headers.at,
20474	* tests/input.at, tests/java.at, tests/javapush.at, tests/local.at,
20475	* tests/local.mk, tests/named-refs.at, tests/output.at, tests/push.at,
20476	* tests/reduce.at, tests/regression.at, tests/sets.at,
20477	* tests/skeletons.at, tests/synclines.at, tests/testsuite.at,
20478	* tests/torture.at, tests/types.at:
20479	here.
20480
204812014-01-03  Paul Eggert  <eggert@cs.ucla.edu>
20482
20483	doc: specify documentation encoding
20484	* doc/bison.texi: Add '@documentencoding UTF-8'; needed since the
20485	manual contains UTF-8 characters.  This will cause the .info files
20486	to contain UTF-8 quotes and the like, which should be OK nowadays.
20487	Add @documentlanguage while we're at it.
20488
204892013-12-10  Akim Demaille  <akim@lrde.epita.fr>
20490
20491	symbols: properly fuse the properties of two symbol aliases
20492	This completes and fixes a7280757105b2909f6a58fdd1c582de8e278319a.
20493	Reported by Valentin Tolmer.
20494
20495	Before it Bison used to put the properties of the symbols
20496	(associativity, printer, etc.) in the 'symbol' structure.  An
20497	identifier-named token (FOO) and its string-named alias ("foo")
20498	duplicated these properties, and symbol_check_alias_consistency()
20499	checked that both had compatible properties and fused them, at the end
20500	of the parsing of the grammar.
20501
20502	The commit a7280757105b2909f6a58fdd1c582de8e278319a introduces a
20503	sym_content structure that keeps all these properties, and ensures
20504	that both aliases point to the same sym_content (instead of
20505	duplicating).  However, it removed symbol_check_alias_consistency,
20506	which resulted in the non-fusion of *existing* properties:
20507
20508	  %token FOO "foo"
20509	  %left FOO %left "foo"
20510
20511	was properly diagnosed as a redeclaration, but
20512
20513	  %left FOO %left "foo"
20514	  %token FOO "foo"
20515
20516	was not, as the properties of FOO and "foo" were not checked before
20517	fusion.  It certainly also means that
20518
20519	  %left "foo"
20520	  %token FOO "foo"
20521
20522	did not transfer properly the associativity to FOO.
20523
20524	The fix is simple: reintroduce symbol_check_alias_consistency (under a
20525	better name, symbol_merge_properties) and call it where appropriate.
20526
20527	Also, that commit made USER_NUMBER_HAS_STRING_ALIAS useless, but left
20528	it.
20529
20530	* src/symtab.h (USER_NUMBER_HAS_STRING_ALIAS): Remove, unused.
20531	Adjust dependencies.
20532	* src/symtab.c (symbol_merge_properties): New, based on the former
20533	symbol_check_alias_consistency.
20534	* tests/input.at: Re-enable tests that we now pass.
20535
205362013-12-10  Akim Demaille  <akim@lrde.epita.fr>
20537
20538	Merge remote-tracking branch 'origin/maint'
20539	* origin/maint:
20540	  package: install the examples
20541	  package: install README and the like in docdir
20542	  diagnostics: fix the order of multiple declarations reports
20543	  symbol: provide an easy means to compare them in source order
20544
205452013-12-09  Akim Demaille  <akim@lrde.epita.fr>
20546
20547	package: install the examples
20548	Currently, we do not install the various examples extracted from the
20549	documentation.  Let's do it, as they are useful starting points.
20550
20551	* configure.ac: When --enable-gcc-warnings is set, enable ENABLE_GCC_WARNINGS.
20552	* examples/extexi: No longer issue synclines by default.
20553	* examples/local.mk: Except if ENABLE_GCC_WARNINGS.
20554	* examples/calc++/local.mk, examples/mfcalc/local.mk,
20555	* examples/rpcalc/local.mk: Install the example files.
20556
205572013-12-09  Akim Demaille  <akim@lrde.epita.fr>
20558
20559	package: install README and the like in docdir
20560	* Makefile.am: here.
20561
205622013-12-09  Akim Demaille  <akim@lrde.epita.fr>
20563
20564	diagnostics: fix the order of multiple declarations reports
20565	On
20566
20567	  %token FOO "foo"
20568	  %printer {} "foo"
20569	  %printer {} FOO
20570
20571	we report
20572
20573	  /tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO
20574	   %printer {} "foo"
20575	            ^^
20576	  /tmp/foo.yy:3.10-11:     previous declaration
20577	   %printer {} FOO
20578	            ^^
20579
20580	* src/symtab.c (locations_sort): New.
20581	Use it.
20582	* tests/input.at (Invalid Aliases): Stress the order of diagnostics.
20583
205842013-12-09  Akim Demaille  <akim@lrde.epita.fr>
20585
20586	symbol: provide an easy means to compare them in source order
20587	* src/symtab.c (symbols_sort): New.
20588	(user_token_number_redeclaration): Taken from here.
20589
205902013-12-09  Akim Demaille  <akim@lrde.epita.fr>
20591
20592	Merge remote-tracking branch 'origin/maint'
20593	* origin/maint: (43 commits)
20594	  maint: post-release administrivia
20595	  version 3.0.2
20596	  gnulib: update
20597	  output: do not generate source files when late errors are caught
20598	  output: record what generated files are source or report files
20599	  output: do not generate source files when early errors are caught
20600	  xml: also use "%empty" with html output
20601	  style: formatting changes
20602	  xml: also display %empty for empty right-hand sides
20603	  reports: display %empty in the generated pointed-rules
20604	  news: YYERROR vs variants
20605	  style: scope reduction in lalr.cc
20606	  lalr1.cc: formatting changes
20607	  lalr1.cc: fix the support of YYERROR with variants
20608	  tests: check $$'s destruction with variant, YYERROR, and no error recovery
20609	  tests: simplify useless obfuscation
20610	  skeletons: use better names when computing a "goto"
20611	  maint: post-release administrivia
20612	  version 3.0.1
20613	  aver: it is no longer "protected against NDEBUG"
20614	  ...
20615
206162013-12-05  Akim Demaille  <akim@lrde.epita.fr>
20617
20618	maint: post-release administrivia
20619	* NEWS: Add header line for next release.
20620	* .prev-version: Record previous version.
20621	* cfg.mk (old_NEWS_hash): Auto-update.
20622
206232013-12-05  Akim Demaille  <akim@lrde.epita.fr>
20624
20625	version 3.0.2
20626	* NEWS: Record release date.
20627
206282013-12-05  Akim Demaille  <akim@lrde.epita.fr>
20629
20630	gnulib: update
20631	* gnulib: here.
20632
206332013-12-04  Akim Demaille  <akim@lrde.epita.fr>
20634
20635	output: do not generate source files when late errors are caught
20636	Reported by Alexandre Duret-Lutz as "second problem" in:
20637	http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html
20638
20639	* bootstrap.conf: We need the "unlink" module.
20640	* src/files.h, src/files.c (unlink_generated_sources): New.
20641	* src/output.c: Use it.
20642	* tests/output.at: Check the case of late errors.
20643
206442013-12-04  Akim Demaille  <akim@lrde.epita.fr>
20645
20646	output: record what generated files are source or report files
20647	* src/files.h, src/files.c (output_file_name_check): Take an additional
20648	argument to record whether a file is a source or report file.
20649	* src/files.c (generated_file): New.
20650	(file_names, file_names_count): Replace with...
20651	(generated_files, generated_files_size): these.
20652	* src/scan-skel.l: Adjust.
20653
206542013-12-04  Akim Demaille  <akim@lrde.epita.fr>
20655
20656	output: do not generate source files when early errors are caught
20657	Reported by Alexandre Duret-Lutz as "second problem" in:
20658	http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html
20659
20660	One problem is that some errors are caught early, before the
20661	generation of output files, while others can only be detected
20662	afterwards (since, for instance, skeletons can raise errors
20663	themselves).
20664
20665	This will be addressed in two steps: early errors do not generate
20666	source files at all, while later errors will remove the files that
20667	have already been generated.
20668
20669	* src/scan-skel.l (yyout): Open to /dev/null when there are errors.
20670	* tests/output.at (AT_CHECK_FILES): Factored out of...
20671	(AT_CHECK_OUTPUT): this.
20672	Fuse the "SHELLIO" argument in the "FLAGS" one.
20673	Use $5 to denote the expected exit status.
20674	Add a test case for early errors.
20675
206762013-11-26  Akim Demaille  <akim@lrde.epita.fr>
20677
20678	xml: also use "%empty" with html output
20679	* data/xslt/xml2xhtml.xsl: No longer issue an Epsilon, display as in
20680	dot and text formats.
20681
206822013-11-26  Akim Demaille  <akim@lrde.epita.fr>
20683
20684	style: formatting changes
20685	* src/print-xml.c: here.
20686
206872013-11-26  Akim Demaille  <akim@lrde.epita.fr>
20688
20689	xml: also display %empty for empty right-hand sides
20690	* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl: Display %empty where needed.
20691
206922013-11-26  Akim Demaille  <akim@lrde.epita.fr>
20693
20694	reports: display %empty in the generated pointed-rules
20695	* src/print.c (print_core): Use %empty for empty rules.
20696	* src/print_graph.c (print_core): Ditto.
20697	* tests/conflicts.at, tests/output.at, tests/reduce.at: Adjust
20698	expectations.
20699
207002013-11-26  Akim Demaille  <akim@lrde.epita.fr>
20701
20702	news: YYERROR vs variants
20703
207042013-11-18  Akim Demaille  <akim@lrde.epita.fr>
20705
20706	style: scope reduction in lalr.cc
20707	* src/lalr.c: Shorten variable scopes.
20708	(lookahead_tokens_print): Use the same variable name in two loops
20709	iterating over the same structure.
20710
207112013-11-15  Akim Demaille  <akim@lrde.epita.fr>
20712
20713	lalr1.cc: formatting changes
20714	* data/lalr1.cc: Fix indentation.
20715
207162013-11-15  Akim Demaille  <akim@lrde.epita.fr>
20717
20718	lalr1.cc: fix the support of YYERROR with variants
20719	When variant are enabled, the yylhs variable (the left-hand side of
20720	the rule being reduced, i.e. $$ and @$) is explicitly destroyed when
20721	YYERROR is called.  This is because before running the user code, $$
20722	is initialized, so that the user can properly use it.
20723
20724	However, when quitting yyparse, yylhs is also reclaimed by the C++
20725	compiler: the variable goes out of scope.
20726
20727	Instead of trying to be too smart, let the compiler do its job: reduce
20728	the scope of yylhs to exactly the reduction.  This way, whatever the
20729	type of scope exit (regular, exception, return, goto...) this variable
20730	will be properly reclaimed.
20731
20732	Reported by Paolo Simone Gasparello.
20733	<http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
20734
20735	* data/lalr1.cc (yyparse): Reduce the scope of yylhs.
20736	* tests/c++.at: We now pass this test.
20737
207382013-11-15  Akim Demaille  <akim@lrde.epita.fr>
20739
20740	tests: check $$'s destruction with variant, YYERROR, and no error recovery
20741	When variant are enabled, the yylhs variable (the left-hand side of
20742	the rule being reduced, i.e. $$ and @$) is explicitly destroyed when
20743	YYERROR is called.  This is because before running the user code, $$
20744	is initialized, so that the user can properly use it.
20745
20746	However, when quitting yyparse, yylhs is also reclaimed by the C++
20747	compiler: the variable goes out of scope.
20748
20749	This was not detected by the test suite because (i) the Object tracker
20750	was too weak, and (ii) the problem does not show when there is error
20751	recovery.
20752
20753	Reported by Paolo Simone Gasparello.
20754	<http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html>
20755
20756	* tests/c++.at (Exception safety): Improve the objects logger to make
20757	sure that we never destroy twice an object.
20758	Also track copy-constructors.
20759	Use a set instead of a list.
20760	Display the logs before running the function body, this is more
20761	useful in case of failure.
20762	Generalize to track with and without error recovery.
20763
207642013-11-15  Akim Demaille  <akim@lrde.epita.fr>
20765
20766	tests: simplify useless obfuscation
20767	* tests/c++.at: $$ is not special for M4, there is no need to "escape"
20768	it.
20769
207702013-11-14  Akim Demaille  <akim@lrde.epita.fr>
20771
20772	skeletons: use better names when computing a "goto"
20773	* data/glr.c (yyLRgotoState): Name the symbol argument yysym, instead
20774	of yylhs.
20775	* data/lalr1.cc (yy_lr_goto_state_): Likewise.
20776	* data/lalr1.java (yy_lr_goto_state_): New, modeled after the previous
20777	two routines.
20778	Use it.
20779
207802013-11-12  Akim Demaille  <akim@lrde.epita.fr>
20781
20782	maint: post-release administrivia
20783	* NEWS: Add header line for next release.
20784	* .prev-version: Record previous version.
20785	* cfg.mk (old_NEWS_hash): Auto-update.
20786
207872013-11-12  Akim Demaille  <akim@lrde.epita.fr>
20788
20789	version 3.0.1
20790	* NEWS: Record release date.
20791
207922013-11-12  Akim Demaille  <akim@lrde.epita.fr>
20793
20794	aver: it is no longer "protected against NDEBUG"
20795	Apply the same rules for aver as for assert: no side effects,
20796	especially not important ones.
20797
20798	* src/AnnotationList.c, src/muscle-tab.c: Adjust aver uses to resist
20799	to -DNDEBUG.
20800
208012013-11-08  Akim Demaille  <akim@lrde.epita.fr>
20802
20803	parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
20804	Flex also defines YY_NULL (to 0).  Avoid gratuitous conflicts.
20805
20806	* data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR.
20807
20808	* data/glr.c, data/lalr1.cc, data/location.cc, data/variant.hh,
20809	* data/yacc.c, src/parse-gram.c, tests/actions.at, tests/c++.at,
20810	* tests/cxx-type.at, tests/glr-regression.at, tests/headers.at,
20811	* tests/push.at, tests/regression.at:
20812	Adjust.
20813
208142013-11-05  Akim Demaille  <akim@lrde.epita.fr>
20815
20816	build: use Automake 1.14's non-recursive Makefile features
20817	* configure.ac: Require Automake 1.14.
20818	* examples/calc++/local.mk, examples/local.mk, examples/mfcalc/local.mk,
20819	* examples/rpcalc/local.mk, tests/local.mk: Use %D% and %C%.
20820
208212013-11-05  Akim Demaille  <akim@lrde.epita.fr>
20822
20823	build: restore maintainer-push-check
20824	* tests/local.mk: here.
20825
208262013-11-05  Akim Demaille  <akim@lrde.epita.fr>
20827
20828	c++: use __attribute__((__pure__)) to avoid warnings
20829	Building C++ parsers with -Wsuggest-attribute=const and
20830	-Wsuggest-attribute=noreturn triggers warning in generated code.
20831
20832	* data/lalr1.cc: Call b4_attribute_define.
20833	(debug_stream, debug_level): Flag as pure.
20834	* tests/headers.at (Several parsers): There are now more YY macros
20835	that "leak".
20836
208372013-11-05  Akim Demaille  <akim@lrde.epita.fr>
20838
20839	skeletons: update the handling of compiler attributes
20840	* data/c.m4 (b4_attribute_define): Instead of defining __attribute__,
20841	define YY_ATTRIBUTE conditionally.
20842	(YY_ATTRIBUTE_PURE, YY_ATTRIBUTE_UNUSED, _Noreturn): New.
20843	Use them.
20844	* data/glr.c: Use them.
20845
208462013-11-05  Akim Demaille  <akim@lrde.epita.fr>
20847
20848	gnulib: update
20849
208502013-10-24  Akim Demaille  <akim@lrde.epita.fr>
20851
20852	style: use /* ... */ comments
20853	* src/complain.c: Here.
20854
208552013-10-24  Akim Demaille  <akim@lrde.epita.fr>
20856
20857	tests: skip C++ tests that are too demanding for some compilers
20858	Some tests now fail when compiled with G++ 4.3 or 4.4 on MacPorts.
20859
20860	* tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): New.
20861	* tests/c++.at (Exception safety): Use it.
20862
208632013-10-22  Akim Demaille  <akim@lrde.epita.fr>
20864
20865	install: do not install yacc.1 when --disable-yacc
20866	* configure.ac (ENABLE_YACC): New conditional.
20867	(YACC_SCRIPT, YACC_LIBRARY): Remove.
20868	* lib/local.mk, src/local.mk: Use the former instead of the latter.
20869	* doc/local.mk: Use ENABLE_YACC to avoid installing yacc.1.
20870
208712013-10-22  Akim Demaille  <akim@lrde.epita.fr>
20872
20873	style: avoid tabs
20874	* src/scan-code.l: here.
20875
208762013-10-22  Akim Demaille  <akim@lrde.epita.fr>
20877
20878	c++: fix generated doxygen comments
20879	* configure.ac: Enable -Wdocumentation if supported.
20880	* data/lalr1.cc: Fix comments.
20881
208822013-10-22  Akim Demaille  <akim@lrde.epita.fr>
20883
20884	fix: uniqstr are already pointers
20885	* src/uniqstr.c (uniqstr_assert): Remove incorrect double indirection,
20886	and now useless cast.
20887
208882013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20889
20890	bison: pacify Sun C 5.12
20891	* src/scan-code.l (show_sub_message):
20892	Redo initializations to work around a bogus Sun C 5.12 warning.
20893	(parse_ref): Remove unreachable code that Sun C 5.12 complains about.
20894	* src/uniqstr.h (uniqstr_vsprintf): Use
20895	_GL_ATTRIBUTE_FORMAT_PRINTF (...)  instead of __attribute__
20896	((__format__ (__printf__, ...))).  Otherwise, Sun C 5.12
20897	complains about an unknown attribute.
20898
208992013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20900
20901	maint: git now ignores rpcalc
20902	* examples/rpcalc/.gitignore: Ignore rpcalc.
20903
209042013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20905
20906	build: examples/calc++/calc++ requires flex
20907	* configure.ac (FLEX_CXX_WORKS): New AM_CONDITIONAL.
20908	* examples/calc++/local.mk (examples/calc++/calc++):
20909	Build if FLEX_CXX_WORKS, not BISON_CXX_WORKS.
20910
209112013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20912
20913	maint: mention help2man, texinfo, apt-get
20914	* README-hacking: Add help2man, texinfo.
20915	Describe how to add packages if you're using Debian.
20916
209172013-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20918
20919	maint: git now ignores .log and .trs files
20920	* .gitignore: Add *.log, *.trs.
20921
209222013-10-21  Akim Demaille  <akim@lrde.epita.fr>
20923
20924	tests: fix incorrect object construction
20925	Reported by Ken Moffat.
20926	http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00009.html
20927
20928	* tests/c++.at (Exception safety): Here.
20929
209302013-10-16  Akim Demaille  <akim@lrde.epita.fr>
20931
20932	glr: allow spaces between "%?" and "{" in predicates
20933	Reported by Rici Lake.
20934	http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00004.html
20935	http://stackoverflow.com/questions/19330171/
20936
20937	* src/scan-gram.l: Do not try to be too smart when diagnosing invalid
20938	directives.
20939	* tests/glr-regression.at (Predicates): New test.
20940
209412013-10-16  Akim Demaille  <akim@lrde.epita.fr>
20942
20943	diagnostics: "-Werror -Wno-error=foo" must not emit errors
20944	Currently "-Werror -Wno-error=foo" still turns "foo" warnings into errors.
20945	Reported by Alexandre Duret-Lutz.
20946	See http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html.
20947
20948	* src/complain.c (errority, errority_flag): New.
20949	(complain_init): Initialize the latter.
20950	(warning_argmatch): Extract the loop iterating on the flag's bits.
20951	Set and unset errority_flag here.
20952	(warnings_argmatch): -Wno-error is not the same as -Wno-error=everything:
20953	we must remember if category foo was explicitly turned in an error/warning
20954	via -W(no-)error=foo.
20955	(warning_severity): Use errority_flag.
20956
20957	* tests/input.at (Symbols): Just check --yacc, not -Wyacc, that's the
20958	job of tests on -W.
20959	(-Werror is not affected by -Wnone and -Wall): Rename as...
20960	(-Werror combinations): this.
20961	Tests more combinations of -W, -W(no-)error, and -W(no-)error=foo.
20962	* tests/local.at (AT_BISON_CHECK_WARNINGS): Don't expect -Werror
20963	to turn runs that issue warnings into runs with errors, as the
20964	warnings might be enforced as warnings by -Wno-error=foo, in which
20965	case -Werror does not change anything.
20966
20967	* doc/bison.texi (Bison Options): Try to be clearer about how
20968	-W(no-)error and -W(no-)error=foo interact.
20969
209702013-10-16  Akim Demaille  <akim@lrde.epita.fr>
20971
20972	comment changes
20973	* src/complain.h, src/complain.c: More documentation, more comments.
20974
209752013-10-04  Andreas Schwab  <schwab@linux-m68k.org>
20976
20977	location: fix EOF check
20978	* location.c (location_caret): Use int, not char, for values from
20979	getc.
20980
209812013-09-19  Akim Demaille  <akim@lrde.epita.fr>
20982
20983	style: variant: remove empty line
20984	* data/variant.hh (b4_symbol_constructor_define_): Remove
20985	stray eol.
20986
209872013-09-19  Akim Demaille  <akim@lrde.epita.fr>
20988
20989	Merge remote-tracking branch 'origin/maint'
20990	* origin/maint:
20991	  glr: more assertions
20992	  glr: shorten scopes
20993	  glr: formatting changes
20994	  glr: better use of tracing macros
20995	  examples: improve the output of the "variant" example
20996	  variant: remove useless assertion
20997	  tests: remove stray debugging traces
20998	  tests: do not use grep -q
20999	  build: don't require flex for ordinary builds
21000	  maint: update .gitignore
21001	  build: port to pre-5.8.7 perl
21002	  tests: minor change to make it easier to test other skeletons
21003	  uniqstr: fix assertion
21004
210052013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21006
21007	glr: simplify the invocation of YYLLOC_DEFAULT
21008	The commit which introduces yyresolveLocations (commit
21009	8710fc41aaebc5d167a2783a4b8b60849a803869) saves and restores the
21010	look-ahead (type, value and location) for no clear reason.  This
21011	appears to be useless.
21012
21013	* data/glr.c (yyresolveLocations): Don't save/restore the current
21014	look-ahead to call YYLLOC_DEFAULT.
21015	Minor style changes.
21016
210172013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21018
21019	glr: more assertions
21020	* data/glr.c (yyaddDeferredAction, yyglrShiftDefer, yypdumpstack):
21021	More assertions.
21022
210232013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21024
21025	glr: shorten scopes
21026	* data/glr.c (yyglrReduce): Define yyflag with its value.
21027
210282013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21029
21030	glr: formatting changes
21031	* data/glr.c: here.
21032
210332013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21034
21035	glr: better use of tracing macros
21036	* data/glr.c (yydestroyGLRState): Use YY_SYMBOL_PRINT instead of
21037	yy_symbol_print.
21038
210392013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21040
21041	examples: improve the output of the "variant" example
21042	* examples/variant.yy: Improve the printing of lists.
21043
210442013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21045
21046	variant: remove useless assertion
21047	* data/variant.hh (move): Remove precondition assertion which is
21048	ensured by the first call of the body (this precondition is also one
21049	of "build").
21050
210512013-09-19  Akim Demaille  <akim@lrde.epita.fr>
21052
21053	tests: remove stray debugging traces
21054	* tests/atlocal.in: Remove traces.
21055	Be ready to remove conftest.dSYM generated on OS X.
21056
210572013-09-04  Akim Demaille  <akim@lrde.epita.fr>
21058
21059	tests: do not use grep -q
21060	Reported by Daniel Galloway.
21061	http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00020.html
21062
21063	* tests/java.at: Ignore grep's output instead.
21064
210652013-08-25  Paul Eggert  <eggert@cs.ucla.edu>
21066
21067	build: don't require flex for ordinary builds
21068	* configure.ac (LEX): Don't fail if this is lex, as flex is not
21069	required for ordinary builds.  Instead, issue a warning and
21070	substitute a no-op LEX.  Reported by Michael Felt in
21071	<http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00009.html>.
21072
210732013-08-25  Paul Eggert  <eggert@cs.ucla.edu>
21074
21075	maint: update .gitignore
21076	* .gitignore: Add *.eps, *.o, *.pdf, *.png, *.stamp, *~,
21077	.deps, .dirstamp.  Needed to suppress unwanted chatter from
21078	'git status' after a bootstrap build.
21079
210802013-08-24  Paul Eggert  <eggert@cs.ucla.edu>
21081
21082	build: port to pre-5.8.7 perl
21083	* examples/local.mk (extract): Omit -f from perl options.
21084	This doesn't work with perl versions before 5.8.7
21085	that are configured without USE_SITECUSTOMIZE.
21086	Reported by Michael Felt in
21087	<http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00006.html>.
21088
210892013-08-01  Akim Demaille  <akim@lrde.epita.fr>
21090
21091	tests: minor change to make it easier to test other skeletons
21092	* tests/c++.at (Variants): Pass the skeleton as argument.
21093
210942013-08-01  Valentin Tolmer  <valentin.tolmer@gmail.com>
21095
21096	uniqstr: fix assertion
21097	* src/uniqstr.c (uniqstr_assert): Really make sure str is a uniqstr,
21098	not just whether some uniqstr with the same content was registered.
21099
211002013-08-01  Valentin Tolmer  <nitnelave1@gmail.com>
21101
21102	symbols: improve symbol aliasing
21103	Rather than having duplicate info in the symbol and the alias that has
21104	to be resolved later on, both the symbol and the alias have a common
21105	pointer to a separate structure containing this info.
21106
21107	* src/symtab.h (sym_content): New structure.
21108	* src/symtab.c (sym_content_new, sym_content_free, symbol_free): New
21109
21110	* src/AnnotationList.c, src/conflicts.c, src/gram.c, src/gram.h,
21111	* src/graphviz.c, src/ielr.c, src/output.c, src/parse-gram.y, src/print.c
21112	* src/print-xml.c, src/print_graph.c, src/reader.c, src/reduce.c,
21113	* src/state.h, src/symlist.c, src/symtab.c, src/symtab.h, src/tables.c:
21114	Adjust.
21115
21116	* tests/input.at: Fix expectations (order changes).
21117
211182013-08-01  Akim Demaille  <akim@lrde.epita.fr>
21119
21120	build: ship the ASCII art figures
21121	We don't ship the *.txt files that are used to build the info
21122	file.
21123	Reported by Colin Daley.
21124
21125	* doc/figs/example.txt: New.
21126	* doc/local.mk (bison.info): Depend on the txt files.
21127	And ship them.
21128
211292013-08-01  Akim Demaille  <akim@lrde.epita.fr>
21130
21131	doc: prefer the ".gv" extension to ".dot"
21132	See http://marc.info/?l=graphviz-devel&m=129418103126092 for the
21133	motivation (basically, some word processor now uses *.dot).
21134
21135	* doc/figs/example-reduce.dot: Rename as...
21136	* doc/figs/example-reduce.gv: this.
21137	* doc/figs/example-shift.dot: Rename as...
21138	* doc/figs/example-shift.gv: this.
21139	* doc/figs/example.dot: Rename as...
21140	* doc/figs/example.gv: this.
21141	* doc/local.mk: Adjust.
21142
211432013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21144
21145	maint: post-release administrivia
21146	* NEWS: Add header line for next release.
21147	* .prev-version: Record previous version.
21148	* cfg.mk (old_NEWS_hash): Auto-update.
21149
211502013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21151
21152	version 3.0
21153	* NEWS: Record release date.
21154
211552013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21156
21157	regen
21158
211592013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21160
21161	news: prepare 3.0
21162	* NEWS (3.0): Reorder.
21163
211642013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21165
21166	tests: fix invalid assignment when using variants in C++11
21167	* tests/c++.at (Exception safety): In variant mode $$ is an instance
21168	of Object.  Assigning YY_NULL in C++98 is incorrect, but behaves ok,
21169	as it assigns YY_NULL=0 using Object::operator= (char v).  It is wrong
21170	in C++11 as there is operator for "$$ = nullptr".
21171
211722013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21173
21174	yacc: beware of "uninitialized uses" warnings
21175	Again some issues with the fact that yylval is reported by GCC as
21176	possibly not initialized in some cases.  Here, the case at hand is the
21177	%destructor.
21178
21179	I am still not convinced that it is worth going all the trouble of
21180	using pragmas to disable temporarily some warnings, instead of just
21181	initializing the looking symbol once for all, but that's what Paul
21182	voted for, see
21183	<http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00050.html>.
21184
21185	* data/c.m4 (b4_attribute_define): Define
21186	YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END,
21187	YY_INITIAL_VALUE here, as we will need them in the generation of the
21188	destructor function, which is defined in yacc.c before yyparse, which
21189	was in charge of defining these macros.
21190	* data/yacc.c (b4_declare_scanner_communication_variables): Simplify:
21191	trying to factor the definitions of the case pure and impure is
21192	too complex.
21193	Actually, it is not even clear that this macro should really exist,
21194	as even the calls are complex.
21195	Be careful not to issue a lone ";", as this is a statement, and C90
21196	forbids declarations after statements ; so write
21197	"YY_INITIAL_VALUE(Decl;)", not "YY_INITIAL_VALUE(Decl);".
21198
211992013-07-25  Akim Demaille  <akim@lrde.epita.fr>
21200
21201	gnulib: update
21202
212032013-07-03  Akim Demaille  <akim@lrde.epita.fr>
21204
21205	tests: skip C++ tests if we can't compile a simple program
21206	There are possible conflicts between gnulib replacement functions (in
21207	<stdio.h>) and their C++ wrappers (in <stream>).  Trying to address
21208	these in configure seems too hard, and I don't know how to fix the issue
21209	in gnulib.  Cowardly avoid the problem by skipping C++ tests when this
21210	happens.
21211	Reported by Stefano Lattarini.
21212	http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00001.html
21213
21214	* tests/atlocal.in (BISON_CXX_WORKS): Also set it to "skip" if we can't
21215	compile a simple program using <stream>.
21216	* tests/local.at: Comment changes.
21217
212182013-07-03  Akim Demaille  <akim@lrde.epita.fr>
21219
21220	tests: fix 'find' portability issues
21221	Reported by Stefano Lattarini.
21222	http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00000.html
21223
21224	* tests/output.at (AT_CHECK_OUTPUT): Use Perl instead.
21225
212262013-06-24  Akim Demaille  <akim@lrde.epita.fr>
21227
21228	maint: post-release administrivia
21229	* NEWS: Add header line for next release.
21230	* .prev-version: Record previous version.
21231	* cfg.mk (old_NEWS_hash): Auto-update.
21232
212332013-06-24  Akim Demaille  <akim@lrde.epita.fr>
21234
21235	version 2.7.91
21236	* NEWS: Record release date.
21237
212382013-06-24  Akim Demaille  <akim@lrde.epita.fr>
21239
21240	NEWS: prepare for 2.7.91
21241	* NEWS (2.7.91): Java push parsers.
21242
212432013-06-24  Akim Demaille  <akim@lrde.epita.fr>
21244
21245	java: rename YYMORE as YYPUSH_MORE for consistency with C
21246	http://lists.gnu.org/archive/html/bison-patches/2013-06/msg00008.html
21247
21248	* data/lalr1.java, doc/bison.texi, tests/javapush.at:
21249	s/YYMORE/YYPUSH_MORE.
21250
212512013-06-21  Akim Demaille  <akim@lrde.epita.fr>
21252
21253	tests: fix Java push failure when running with BISON_USE_PUSH_FOR_PULL
21254	* tests/javapush.at (Trivial Push Parser with api.push-pull verification):
21255	When push for pull is enabled, there is one such function generated.
21256
212572013-06-21  Akim Demaille  <akim@lrde.epita.fr>
21258
21259	style: minor changes in the Java tests
21260	* tests/java.at (AT_CHECK_JAVA_GREP): Ignore the exit status.
21261	* tests/javapush.at (AT_CHECK_JAVA_GREP): Be more alike the previous
21262	one.
21263	Formating changes.
21264	Remove stray debugging "jj" file.
21265
212662013-06-21  Akim Demaille  <akim@lrde.epita.fr>
21267
21268	java: push: do not reset the error counter
21269	* data/lalr1.java (parse): here, when in push-pull is in "both" mode.
21270	This breaks the test suite, for instance
21271	make check TESTSUITEFLAGS='-d 388 BISON_USE_PUSH_FOR_PULL=1'.
21272	More generally make maintainer-push-check.
21273
212742013-06-14  Akim Demaille  <akim@lrde.epita.fr>
21275
21276	build: add Valgrind suppression file for GNU/Linux
21277	* build-aux/linux-gnu.valgrind: New.
21278	* build-aux/local.mk: Ship it.
21279	* configure.ac: Use it.
21280
212812013-06-13  Dennis Heimbigner  <dmh@unidata.ucar.edu>
21282
21283	java: add push-parser support
21284	* data/lalr1.java: Capture the declarations as m4 macros to avoid
21285	duplication.  When push parsing, the declarations occur at the class
21286	instance level rather than within the parse() function.
21287
21288	Change the way that the parser state is initialized.  For
21289	push-parsing, the parse state declarations are moved to
21290	"push_parse_initialize()", which is called on the first invocation of
21291	"push_parse()". The %initial-action code is also inserted after the
21292	invocation of "push_parse_initialize()".
21293
21294	The body of the parse loop is modified to return values at appropriate
21295	points when doing push parsing.  In order to make push parsing work,
21296	it is necessary to divide YYNEWSTATE into two states: YYNEWSTATE and
21297	YYGETTOKEN. On the first call to push_parse(), the state is
21298	YYNEWSTATE. On all later entries, the state is set to YYGETTOKEN. The
21299	YYNEWSTATE switch arm falls through into YYGETTOKEN. YYGETTOKEN
21300	indicates that a new token is potentially needed.  Normally, with a
21301	pull parser, this new token would be obtained by calling "yylex()". In
21302	the push parser, the value YYMORE is returned to the caller. On the
21303	next call to push_parse(), the parser will return to the YYGETTOKEN
21304	state and continue operation.
21305
21306	* tests/javapush.at: New test file for java push parsing.
21307	* tests/testsuite.at: Use it.
21308	* tests/local.mk: Adjust.
21309	* doc/bison.texi (Java Push Parser Interface): New.
21310
213112013-06-11  Akim Demaille  <akim@lrde.epita.fr>
21312
21313	build: ship all the files, even if the C++ compiler is broken
21314	* examples/calc++/local.mk: Be sure to ship calc++.test even if
21315	the current C++ compiler is not sufficient to run the tests.
21316
213172013-06-05  Dennis Heimbigner  <dmh@unidata.ucar.edu>
21318
21319	style: comment changes in Java skeleton
21320	* data/lalr1.java: Here.
21321
213222013-06-03  Akim Demaille  <akim@lrde.epita.fr>
21323
21324	tests: fix a G++ warning
21325	* tests/c++.at: Use YY_NULL instead of 0 for the null pointer.
21326	And formatting changes.
21327
213282013-06-03  Akim Demaille  <akim@lrde.epita.fr>
21329
21330	build: fix a warning from clang
21331	* src/muscle-tab.c: Declare local functions static.
21332
213332013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21334
21335	maint: post-release administrivia
21336	* NEWS: Add header line for next release.
21337	* .prev-version: Record previous version.
21338	* cfg.mk (old_NEWS_hash): Auto-update.
21339
213402013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21341
21342	version 2.7.90
21343	* NEWS: Record release date.
21344
213452013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21346
21347	style: syntax-check fixes
21348	* data/yacc.c, src/Sbitset.c, src/Sbitset.h, src/muscle-tab.h,
21349	* src/output.c, src/parse-gram.y, src/reader.c, src/symtab.c,
21350	* src/uniqstr.c, src/uniqstr.h: Fix space before parens.
21351	* cfg.mk (_space_before_paren_exempt): Add needed exceptions.
21352
213532013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21354
21355	xml: use %empty in the text output
21356	* data/xslt/xml2text.xsl: here.
21357
213582013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21359
21360	build: locally disable new GCC warnings that fail on Flex generated code
21361	* configure.ac: here.
21362
213632013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21364
21365	fix a memory leak
21366	* src/print-xml.c (num_escape_bufs): New.
21367	(print_xml): Be sure to release all the escape_bufs.
21368
213692013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21370
21371	regen
21372
213732013-05-30  Akim Demaille  <akim@lrde.epita.fr>
21374
21375	build: be sure to include config.h first in the generated parser
21376	Using %code for config.h is wrong, as some headers will already have
21377	been included by Bison.  In some cases, e.g., glibc's string.h, this
21378	results in some declaration not being made for lack of definition of
21379	_GNU_SOURCE, which is performed by config.h.
21380
21381	* src/parse-gram.y: here.
21382
213832013-05-29  Akim Demaille  <akim@lrde.epita.fr>
21384
21385	Merge remote-tracking branch 'origin/maint'
21386	* origin/maint:
21387	  maint: post-release administrivia
21388	  version 2.7.1
21389	  regen
21390
213912013-05-29  Petr Machata  <pmachata@redhat.com>
21392
21393	drop unused options --raw, -n, -e, --include and -I
21394	* --raw appears to be ignored.  It was marked as obsolete in the
21395	  commit ec3bc39, and documented as no longer supported as of 1.29
21396	  (2001-09-07).  Support for %raw appears to have been dropped in
21397	  e9955c83 on 2002-06-11, but --raw was kept around.  Maybe it's time
21398	  to drop it as well?
21399
21400	* Commit e9955c83 dropped support for %no-parser as well, and
21401	  converted it to option.  --no-parser was later dropped in 728c4be2
21402	  on 2007-08-12, but -n was kept around, probably as an omission.  All
21403	  three are documented as removed since 2.3b (2008-05-27).
21404
21405	* -e existed for a single day in 2001.  It was introduced in eeeb962b
21406	  on 2001-11-27.  The handling was removed in c7925b99 on 2001-11-28,
21407	  but "e" was kept in the list of short options.  Probably an
21408	  omission.
21409
21410	* --include appears to be dead code.  The option sets a variable, but
21411	  that variable is not used anywhere.  It was added in f6bd5427 on
21412	  2001-11-26 as a %-directive, with comments that it's not yet
21413	  implemented.  It was converted to a command-line option later, but
21414	  doesn't seem to ever have been actually implemented.
21415
214162013-05-28  Akim Demaille  <akim@lrde.epita.fr>
21417
21418	gnulib: update
21419
214202013-04-22  Akim Demaille  <akim@lrde.epita.fr>
21421
21422	diagnostics: always point to the first directive
21423	Some directives cannot be used several times (e.g., a given symbol may
21424	only have a single printer).  In case of repeated definitions, an
21425	error is issued for the second definition, yet it is not discarded,
21426	and becomes the definition used for the rest of the file.
21427
21428	This is not consistent with the idea that multiple definitions are not
21429	allowed: discard any repeated directive.
21430
21431	* src/symtab.c (symbol_type_set, symbol_code_props_set)
21432	(semantic_type_code_props_set, symbol_class_set, symbol_translation):
21433	Discard repeated directives.
21434	* tests/input.at (Default %printer and %destructor redeclared)
21435	(Per-type %printer and %destructor redeclared): Update expectations.
21436
214372013-04-22  Akim Demaille  <akim@lrde.epita.fr>
21438
21439	tests: factor test for printer/desctructor redefined
21440	* tests/input.at (Default %printer and %destructor redeclared):
21441	Introduce AT_TEST to factor.
21442
214432013-04-22  Akim Demaille  <akim@lrde.epita.fr>
21444
21445	diagnostics: use appropriate location for useless precedence/associativity
21446	* src/symtab.c (symbol_precedence_set): Use prec_location, not
21447	location (which is the first occurrence of the symbol, possibly just
21448	%token).
21449	Also, as redefinitions are not allowed, keep the first values, not
21450	the subsequent ones.
21451	* tests/conflicts.at, tests/existing.at, tests/regression.at: Adjust.
21452
214532013-04-22  Akim Demaille  <akim@lrde.epita.fr>
21454
21455	tests: factor duplicate expected warnings
21456	* tests/existing.at: Instead of "t ? abc : aBc", write "a(t?b:B)c".
21457
214582013-04-19  Akim Demaille  <akim@lrde.epita.fr>
21459
21460	tests: enable -Wsign-compare and fix corresponding warnings
21461	-Wsign-compare was disabled for bison's own code, following gnulib's
21462	approach.  However, the generated parsers should not trigger such
21463	warnings.
21464
21465	Reported by Efi Fogel.
21466	http://lists.gnu.org/archive/html/help-bison/2013-04/msg00018.html
21467
21468	See also http://stackoverflow.com/questions/16101062 for the weird
21469	"-(unsigned)i" piece of code.
21470
21471	* configure.ac (warn_tests): Enable -Wsign-compare.
21472	* data/location.cc (position::add_): New.
21473	(position::lines, position::columns): Use it.
21474	* tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Fix signedness issues.
21475
214762013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21477
21478	muscle: check more cases of %define variables with code values
21479	* data/bison.m4 (b4_percent_define_check_kind): Fix overquotation.
21480	(api.location.type, api.position.type): Check they have code values here.
21481	* data/c++.m4 (api.location.type): No longer checked here.
21482	(parser_class_name): Check it here.
21483	* data/java.m4 (api.value.type, init_throws, lex_throws, parser_class_name)
21484	(throws, annotations, extends, implements): Check they have code values.
21485	* doc/bison.texi: Fix every incorrect occurrence of %define.
21486	Document the additional syntax for %define: code values.
21487	Document the additional syntax for -D/-F: string and code values.
21488	* tests/calc.at, tests/headers.at, tests/input.at, tests/java.at,
21489	* tests/local.at: Fix dependencies.
21490
214912013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21492
21493	regen
21494
214952013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21496
21497	parser: do not convert $ and @ in code values of %define variables
21498	* src/parse-gram.y (value: "{...}"): Just strip the braces, but pass
21499	the value as is.
21500
215012013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21502
21503	parser: no longer use the "braceless" non-terminal
21504	The purpose of this symbol was only to factor function calls.  As a
21505	result the actions were indeed simpler, but the grammar was somewhat
21506	uselessly obfuscated.  Get rid of this symbol, but introduce functions
21507	to simplify dependencies.
21508
21509	There is no (intended) changes of behavior here.
21510
21511	* src/parse-gram.y (strip_braces, translate_code(
21512	(translate_code_braceless): New.
21513	(braceless): Remove, use "{...}" instead, and one of the previous
21514	functions depending on the context.
21515	(STRING, "%{...%}", EPILOGUE): Declare as <code>, instead of <chars>,
21516	the difference between both is useless (well, I couldn't make sense of
21517	it, even after having read the initial commit that introduced them).
21518	(%union): Remove the now useless "chars" type.
21519	Adjust the printers.
21520	* src/scan-gram.l: Adjust.
21521
215222013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21523
21524	regen
21525
215262013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21527
21528	style: avoid %{...%} in our parser
21529	* src/parse-gram.y (%{...%}): Split in %code and %code requires.
21530	* src/location.h: Add missing includes for self containedness.
21531
215322013-04-18  Akim Demaille  <akim@lrde.epita.fr>
21533
21534	style: use %code for local function declarations in our parser
21535	* src/parse-gram.y (version_check, gram_error, char_name, lloc_default):
21536	Move their prototypes from %{...%} to %code.
21537	(YYLLOC_DEFAULT, YY_LOCATION_PRINT): Move from %{...%} to %code.
21538	(current_lhs): Move its implementation to the epilogue.
21539
215402013-04-16  Akim Demaille  <akim@lrde.epita.fr>
21541
21542	regen
21543
215442013-04-16  Akim Demaille  <akim@lrde.epita.fr>
21545
21546	muscle: check the kind of api.prefix, api.location.type
21547	* data/bison.m4: Check api.prefix.
21548	* data/c++.m4: Check api.location.type.
21549	* doc/bison.texi: Fix uses of api.value.type, api.prefix, api.location.type.
21550	Document {...} values for %define.
21551	* src/parse-gram.y: Fix use of api.prefix.
21552	* tests/calc.at: Fix uses of api.location.type.
21553	* tests/input.at: Check api.prefix, and api.location.type.
21554
215552013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21556
21557	maint: post-release administrivia
21558	* NEWS: Add header line for next release.
21559	* .prev-version: Record previous version.
21560	* cfg.mk (old_NEWS_hash): Auto-update.
21561
215622013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21563
21564	version 2.7.1
21565	* NEWS: Record release date.
21566
215672013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21568
21569	regen
21570
215712013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21572
21573	muscle: enforce definition syntax for keyword variables
21574	* src/muscle-tab.c (muscle_percent_define_get_kind)
21575	(muscle_percent_define_check_kind): New.
21576	(muscle_percent_define_default): Variables with a default value are
21577	of "keyword" kind.
21578	(muscle_percent_define_flag_if, muscle_percent_define_check_values):
21579	Check that the variable is of keyword kind.
21580	* data/bison.m4: Likewise, but in M4.  That is to say...
21581	(b4_percent_define_default): Define the kind when the variable is undefined.
21582	(b4_percent_define_check_kind): Use a better error message.
21583	(_b4_percent_define_check_values, _b4_percent_define_check_values):
21584	Former "enum" variables should be defined using the keyword syntax.
21585	* doc/bison.texi: Update.
21586	A couple of fixes.
21587	* tests/input.at (%define keyword variables): New.
21588
215892013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21590
21591	muscle: let -D/-F support the three kinds of %define variable values
21592	See http://lists.gnu.org/archive/html/bison-patches/2013-04/msg00012.html
21593
21594	* src/getargs.c (getargs): Recognize {value} and "value" for -D and -F.
21595
215962013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21597
21598	muscle: minor refactoring
21599	* src/muscle-tab.c (muscle_percent_define_default): Reduce the scopes.
21600
216012013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21602
21603	muscle: minor simplification which uncovers a missing warning
21604	* src/muscle-tab.c (muscle_percent_define_ensure): Discover the virtues
21605	of || to factor conditionals.
21606	* NEWS: As api.pure is no longer flagged as "used" by accident,
21607	we now have warnings for useless definitions.
21608	* tests/calc.at: So remove api.pure settings when running C++ tests,
21609	since C++ skeletons use a pure interface.
21610
216112013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21612
21613	muscle: factor the field retrieval
21614	* src/muscle-tab.c (muscle_percent_define_get_raw): New.
21615	Use it where appropriate.
21616	(location_decode): No longer fetch the value from the table,
21617	take the value as argument.
21618
216192013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21620
21621	muscle: factor the handling of used variables
21622	* src/muscle-tab.c (muscle_percent_define_use): New, corresponding
21623	to b4_percent_define_use.
21624	Use it where appropriate.
21625
216262013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21627
21628	muscle: factor the computation of variable names
21629	* src/muscle-tab.c (muscle_name): New.
21630	Use it.
21631	Propagate "uniqstr" as value type instead of plain "char const *".
21632
216332013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21634
21635	muscle: factor the kind check in M4
21636	* data/bison.m4 (b4_percent_define_check_kind): New.
21637	Use it to check api.token.prefix.
21638	* data/c++.m4: Check the kind of api.namespace.
21639	* doc/bison.texi: Update a reference to former 'namespace' variable.
21640	* tests/input.at ("%define" code variables): Check api.namespace.
21641
216422013-04-15  Akim Demaille  <akim@lrde.epita.fr>
21643
21644	muscle: factor conditionals on defined %define variables
21645	* data/bison.m4 (b4_percent_define_ifdef_): New.
21646	Use it where appropriate.
21647
216482013-04-11  Akim Demaille  <akim@lrde.epita.fr>
21649
21650	api.token.prefix: use code values
21651	* data/bison.m4: Remove useless (and incorrect: m4_* instead of b4_*)
21652	default assignment to api.token.prefix.
21653	Check that api.token.prefix is assigned code.
21654	* tests/input.at (%define code variables): New test.
21655	* NEWS, doc/bison.texi, tests/c++.at, tests/calc.at,
21656	* tests/java.at, tests/local.at: Adjust to use braces.
21657
216582013-04-11  Akim Demaille  <akim@lrde.epita.fr>
21659
21660	c++: fix several issues with locations
21661	Reported by Daniel Frużyński.
21662	http://lists.gnu.org/archive/html/bug-bison/2013-02/msg00000.html
21663
21664	* data/location.cc (position::columns, position::lines): Check for
21665	underflow.
21666	Fix some weird function signatures.
21667	(location): Accept signed integers as arguments where appropriate.
21668	Add operator- and operator+=.
21669	* doc/bison.texi (C++ position, C++ location): Various fixes
21670	and completion.
21671	* tests/c++.at (C++ Locations): New tests.
21672
216732013-04-11  Akim Demaille  <akim@lrde.epita.fr>
21674
21675	muscles: be sure that %code snippets are not glue together on a single line
21676	Recently "braceless" in the parser was changed so that an eol was no
21677	longer added to the value.  This is not correct when a %code is used
21678	multiple times, because the syncline of the next snippet might be
21679	appended to the last (and not ended) line of the previous snippet.
21680
21681	* src/muscle-tab.h (muscle_grow): Make it private.
21682	* src/muscle-tab.c (muscle_grow): Accept a fourth argument: a required
21683	terminator.
21684	Adjust callers.
21685	* tests/input.at (Multiple %code): New.
21686
216872013-04-11  Akim Demaille  <akim@lrde.epita.fr>
21688
21689	style: fix comments
21690	* tests/actions.at: Fix incorrect "prototype".
21691
216922013-04-10  Akim Demaille  <akim@lrde.epita.fr>
21693
21694	Merge remote-tracking branch 'origin/maint'
21695	* origin/maint:
21696	  glr.cc: fix a clang warning
21697	  maint: update copyright years
21698	  build: fix VPATH issue
21699	  build: avoid clang's colored diagnostics in the test suite
21700	  tests: please clang and use ".cc", not ".c", for C++ input
21701	  gnulib: update
21702	  skeletons: avoid empty switch constructs
21703	  lalr1.cc: fix compiler warnings
21704	  yacc.c: do not use __attribute__ unprotected
21705	  tests: style changes
21706
217072013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21708
21709	api.value.type: use keyword/brace values
21710	Suggested by Joel E. Denny.
21711	http://lists.gnu.org/archive/html/bison-patches/2013-03/msg00016.html
21712
21713	* data/bison.m4 (b4_percent_define_get_kind): New.
21714	(b4_variant_flag): Check that api.value.type is defined as the 'variant'
21715	keyword value.
21716	* data/c.m4 (_b4_value_type_setup_keyword): New.
21717	(b4_value_type_setup): Use it to simplify reading.
21718	Use b4_define_silent.
21719	Decode api.value.type, including its type.
21720	(b4_value_type_define): Likewise.
21721	* data/c++.m4 (b4_value_type_declare): Adjust the decoding of api.value.type,
21722	taking its kind into account.
21723	* doc/bison.texi: Adjust all the examples to the new syntax.
21724	* NEWS: Ditto.
21725	* tests/types.at: Adjust
21726
217272013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21728
21729	api.value.type: diagnose guaranteed failure with --yacc
21730	Instead of generating invalid C code, generate an error when --yacc and
21731	'%define api.value.type union' are used together.
21732
21733	* data/bison.m4: Issue an error in this case.
21734	* tests/types.at (%yacc vs. %define api.value.type union): New, check this
21735	error.
21736	* doc/bison.texi (Type Generation): Document it.
21737	* tests/output.at: Check that '-o y.tab.c' and '-y' behave equally
21738	wrt generated file names.
21739	* NEWS (Use of YACC='bison -y'): New.
21740	Promote the use of 'bison -o y.tab.c'.
21741
217422013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21743
21744	doc: style changes
21745	* doc/bison.texi (Destructor Decl, Printer Decl): Group series of %token
21746	and %type together.
21747
217482013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21749
21750	doc: display locations in error as recommended by GNU Coding Standards
21751	* doc/bison.texi (Actions and Locations): here.
21752
217532013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21754
21755	doc: api.value.type union
21756	* doc/bison.texi (Type Generation): New section.
21757	(Multi-function Calc): Convert to use api.value.type=union.
21758
217592013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21760
21761	doc: move the section about "%union" where types are discussed
21762	* doc/bison.texi (Union Decl): Move to...
21763	(Defining Language Semantics): here.
21764
217652013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21766
21767	doc: deprecate #define YYSTYPE in favor of %define api.value.type
21768	* doc/bison.texi: Convert examples with YYSTYPE to use api.value.type.
21769	Deprecate YYSTYPE.
21770
217712013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21772
21773	value type: accept "->" in type tags
21774	Provide a means to dereference pointers when defining tags.  One
21775	example could be:
21776
21777	  %code requires
21778	  {
21779	    typedef struct ListElementType
21780	    {
21781	      union value
21782	      {
21783	        int intVal;
21784	        float floatVal;
21785	        char* charptrVal;
21786	      } value;
21787
21788	      struct ListElementType* next;
21789	    } ListElementType;
21790	  }
21791
21792	  %union
21793	  {
21794	    ListElementType* list;
21795	  }
21796
21797	  %token <list->value.charptrVal> STRING
21798	  %token <list->value.intVal> INTEGER
21799	  %token <list->value.floatVal> REAL
21800	  %type <list> ElementList LiteralType
21801
21802	* src/scan-code.l, src/scan-gram.l: Accept "->" in tags.
21803	* tests/types.at: Add more test cases to cover this case.
21804
218052013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21806
21807	style: simplify the scanning of type tags
21808	* src/scan-gram.l: Remove the rule for simple tags: the "complex" case
21809	subsumes it.  It was more efficient, but duplicated the code for a
21810	negligible benefit.
21811
218122013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21813
21814	api.value.type: implement proper support, check, and document
21815	* data/c.m4 (b4_symbol_type_register, b4_type_define_tag)
21816	(b4_symbol_value_union, b4_value_type_setup_union)
21817	(b4_value_type_setup_variant, b4_value_type_setup):
21818	New.
21819	(b4_value_type_define): Use it to set up properly the type.
21820	Handle the various possible values of api.value.type.
21821	* data/c++.m4 (b4_value_type_declare): Likewise.
21822	* data/lalr1.cc (b4_value_type_setup_variant): Redefine.
21823
21824	* tests/types.at: New.
21825	Exercise all the C/C++ skeletons with different types of
21826	api.value.type values.
21827	* tests/local.mk, tests/testsuite.at: Use it.
21828
21829	* doc/bison.texi (%define Summary): Document api.value.type.
21830	* NEWS: Advertise it, together with api.token.constructor.
21831
218322013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21833
21834	m4: allow the definition of side-effect only macros
21835	* data/bison.m4 (b4_divert_kill, b4_define_silent): New.
21836	* data/c.m4: Comment change.
21837
218382013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21839
21840	variant: fix inconsistent quotation
21841	* data/variant.hh (b4_char_sizeof): De-overquote.
21842	(b4_value_type_declare): De-underquote.
21843
218442013-04-09  Akim Demaille  <akim@lrde.epita.fr>
21845
21846	m4: style changes in error messages
21847	* data/bison.m4: Use $0 to denote the current macro's name.
21848
218492013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21850
21851	glr.cc: fix a clang warning
21852	* data/glr.cc (b4_epilogue): Be sure to end with an end-of-line,
21853	so that the file does end with one.
21854
218552013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21856
21857	maint: update copyright years
21858	Run "make update-copyright".
21859
218602013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21861
21862	build: fix VPATH issue
21863	* Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
21864	path to build-aux.
21865
218662013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21867
21868	build: avoid clang's colored diagnostics in the test suite
21869	The syncline tests, which try to recognize compiler diagnostics,
21870	are confused by escapes for colors.
21871
21872	* configure.ac (warn_tests): New, to factor the warnings for both
21873	C and C++ tests.
21874	Add -fno-color-diagnostics to it.
21875	* tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
21876	together compiler flags.
21877
218782013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21879
21880	tests: please clang and use ".cc", not ".c", for C++ input
21881	When fed with foo.c, clang++ 3.2 answers:
21882
21883	  clang: error: treating 'c' input as 'c++' when in C++ mode,
21884	                this behavior is deprecated
21885
21886	* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
21887	for C++.
21888
218892013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21890
21891	gnulib: update
21892
218932013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21894
21895	skeletons: avoid empty switch constructs
21896	Reported by Rob Conde.
21897	http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html
21898
21899	* data/c.m4 (b4_symbol_actions): Rename as...
21900	(_b4_symbol_actions): this.
21901	(b4_symbol_actions): New wrapper.
21902	Do not emit empty switches.
21903	Adjust all b4_symbol_actions callers.
21904
219052013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21906
21907	lalr1.cc: fix compiler warnings
21908	Reported by Rob Conde.
21909	http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html
21910
21911	* data/stack.hh (operator=, stack(const stack&)): Make this class
21912	uncopyable, i.e., "undefine" these operators: make them private and
21913	don't implement them.
21914	(clear): New.
21915	* data/lalr1.cc: Use it instead of an assignment.
21916	(parser): Make this class uncopyable.
21917
219182013-04-08  Akim Demaille  <akim@lrde.epita.fr>
21919
21920	yacc.c: do not use __attribute__ unprotected
21921	Reported by Victor Khomenko.
21922	http://lists.gnu.org/archive/html/bug-bison/2013-04/msg00001.html
21923
21924	* data/glr.c (YYUSE, __attribute__): Fuse their definition into...
21925	* data/c.m4 (b4_attribute_define): this new macro.
21926	* data/yacc.c, data/glr.c: Use it.
21927
219282013-04-05  Akim Demaille  <akim@lrde.epita.fr>
21929
21930	api.namespace: demonstrate and use {...} values instead of "..." values
21931	* tests/c++.at, tests/input.at: Use "%define api.namespace {foo}" instead
21932	of using quotes.
21933	* tests/local.at (AT_SETUP_STRIP, AT_NAME_PREFIX): Recognize uses of
21934	braces instead of quotes.
21935	* doc/bison.texi: Use braces for api.namespace's values.
21936
219372013-04-05  Akim Demaille  <akim@lrde.epita.fr>
21938
21939	grammar: do not add a \n at the end of blocks of code
21940	Now that we use "braceless" (which is {...} blocks of code with
21941	initial and final braces stripped) to denote "short" values (such as
21942	api.namespaces), the added end-of-line is a nuisance.  As a matter of
21943	fact, this extra-safety was useless, as every expansion of "braceless"
21944	(aka, "user code") is followed by an end of line.
21945
21946	* src/parse-gram.y, src/parse-gram.c (braceless): Instead of replacing
21947	the final brace by \n, just delete the brace.
21948
219492013-04-04  Akim Demaille  <akim@lrde.epita.fr>
21950
21951	regen
21952
219532013-04-04  Akim Demaille  <akim@lrde.epita.fr>
21954
21955	grammar: record the kind of %define variable values
21956	Provide a means to tell the difference between "keyword" values (e.g.,
21957	%define api.pull both), "string" values (e.g., %define file.name
21958	"foo"), and "code" values (e.g., %define api.namespace {calc}).
21959
21960	Suggested by Joel E. Denny.
21961	http://lists.gnu.org/archive/html/bison-patches/2013-03/msg00016.html
21962
21963	* src/muscle-tab.h, src/muscle-tab.c (muscle_kind, muscle_kind_new)
21964	(muscle_kind_string): New.
21965	(muscle_percent_define_insert): Take the kind as new argument.
21966	Insert it in the muscle table.
21967	Adjust callers.
21968	* src/getargs.c: Adjust callers.
21969	* src/parse-gram.y: Ditto.
21970	(content.opt): Remove, replaced by...
21971	(value): this new non-terminal, whose semantics value is stored
21972	in the new "value" union member.
21973	Provide a printer.
21974	Support values in braces in additions to keyword and string values.
21975
21976	fuse me
21977
219782013-04-04  Akim Demaille  <akim@lrde.epita.fr>
21979
21980	style: fix comments
21981	* src/muscle-tab.c (muscle_percent_define_ensure): Update obsolete
21982	comments.
21983
219842013-04-04  Akim Demaille  <akim@lrde.epita.fr>
21985
21986	regen
21987
219882013-04-04  Akim Demaille  <akim@lrde.epita.fr>
21989
21990	grammar: style changes
21991	* src/parse-gram.y (PARAM_TYPE): Remove useless typedef guard.
21992	There's a header guard.
21993	Use 'yyo' with %printer.
21994	Use a consistent style for %union one-liners.
21995
219962013-04-04  Akim Demaille  <akim@lrde.epita.fr>
21997
21998	grammar: split %union to group together related aspects
21999	* src/parse-gram.y (INT): Fuse the %type and %token declaration.
22000	Move its %union right before its introduction.
22001	(%union): Split in several %unions, right before their use.
22002
220032013-04-04  Akim Demaille  <akim@lrde.epita.fr>
22004
22005	muscle: refactor
22006	* src/muscle-tab.c (muscle_lookup, muscle_entry_new): New.
22007	(muscle_insert, muscle_grow, muscle_find_const, muscle_find): Use them.
22008
220092013-04-03  Akim Demaille  <akim@lrde.epita.fr>
22010
22011	style: comment changes
22012	* src/muscle-tab.c: Move the documentation of public functions to...
22013	* src/muscle-tab.h: here.
22014	Fix comment consistency issues.
22015
220162013-04-03  Akim Demaille  <akim@lrde.epita.fr>
22017
22018	muscle: minor refactoring
22019	* src/muscle-tab.h (MUSCLE_INSERT_C_STRING): Use MUSCLE_INSERT_STRING.
22020
220212013-03-06  Akim Demaille  <akim@lrde.epita.fr>
22022
22023	regen
22024
220252013-03-06  Valentin Tolmer  <nitnelave1@gmail.com>
22026
22027	gram: correct token numbering in precedence declarations
22028	In a precedence declaration, when tokens are declared with a litteral
22029	character (e.g., 'a') or with a identifier (e.g., B), Bison behaved
22030	differently: the litteral tokens would be numbered first, and then the
22031	other ones, leading to the following grammar:
22032
22033	  %right A B 'c' 'd'
22034
22035	being numbered as such: 'c' 'd' A B.
22036
22037	* src/parse-gram.y (symbol.prec): Set the symbol number when reading the
22038	symbols.
22039	* tests/conflicts.at (Token declaration order: literals vs. identifiers):
22040	New.
22041
220422013-03-04  Akim Demaille  <akim@lrde.epita.fr>
22043
22044	maint: update autoconf submodule
22045	* submodules/autoconf: Up to master.
22046	No significant changes in the files we use (m4sugar.m4 and foreach.m4).
22047
220482013-03-04  Akim Demaille  <akim@lrde.epita.fr>
22049
22050	diagnostics: no longer include the yacc category in -Wall
22051	It would be a pity to warn the users against Bison features...
22052	http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00107.html
22053
22054	* src/complain.h, src/complain.c (Wall): Disable Wyacc.
22055	(Weverything): New (hidden so far) category which really denotes all
22056	the categories (what used to be Wall).
22057	(warnings_args, warnings_types): Adjust.
22058	(warning_argmatch): Now !none = Weverything and conversely, no longer Wall.
22059	* NEWS, doc/bison.texi, src/getargs.c: Adjust the documentation.
22060	* tests/input.at (-Werror is not affected by -Wnone and -Wall): Adjust
22061	by not using a -Wyacc type of warning.
22062
220632013-03-04  Akim Demaille  <akim@lrde.epita.fr>
22064
22065	grammar: no longer detect and cure missing semicolon at end of actions
22066	Bison 3.0 is already breaking backward compatibility with other
22067	features.  It is an appropriate time to drop this feature.  Note that
22068	it was disabled when --yacc is passed.  See
22069	http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00102.html
22070
22071	Basically, revert e8cd1ad655bcc704b06fb2f191dc3ac1df32b796.
22072
22073	* src/scan-code.l (braces_level, need_semicolon, in_cpp): Remove.
22074	Remove every rule needed to detect and add missing semicolon.
22075	* tests/actions.at (Fix user actions without a trailing semicolon):
22076	Remove.
22077	* NEWS: Adjust.
22078
220792013-03-04  Akim Demaille  <akim@lrde.epita.fr>
22080
22081	build: stop using bison -y
22082	* Makefile.am (YACC): Pass -o y.tab.c, so that ylwrap is happy, and
22083	yet we don't pass --yacc to bison.
22084	(AM_YFLAGS): Disable Yacc warnings.
22085
220862013-02-23  Akim Demaille  <akim@lrde.epita.fr>
22087
22088	c++: rename b4_semantic_type_declare as b4_value_type_declare
22089	This is to match the names used in C and api.value.type, even if the
22090	parser actually defines semantic_type.
22091
22092	* data/c++.m4 (b4_semantic_type_declare): Rename as...
22093	(b4_value_type_declare): this.
22094	* data/variant.hh: Likewise.
22095
220962013-02-23  Akim Demaille  <akim@lrde.epita.fr>
22097
22098	news: typo
22099	* NEWS: here.
22100
221012013-02-23  Akim Demaille  <akim@lrde.epita.fr>
22102
22103	style: space changes in the tests
22104	* tests/local.at: here.
22105
221062013-02-22  Akim Demaille  <akim@lrde.epita.fr>
22107
22108	style: formatting changes in the doc
22109	* doc/bison.texi: Use @file where appropriate.
22110
221112013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22112
22113	tests: fix invalid C++11 code
22114	* tests/c++.at (Object): Somehow instances of Object were assigned
22115	YY_NULL, which is 0 most of the time (that case passes), but is
22116	nullptr in C++11, and there is nothing in Object to support such an
22117	assignment (failure).  Use 0 as value, and provide the needed
22118	assignment operator.
22119	Also, use a more natural order within the class definition.
22120
221212013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22122
22123	tests: fix failures with G++ 4.8 in Flex scanner
22124	* configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Rename as...
22125	(FLEX_SCANNER_CXXFLAGS): this.
22126	Pass -Wno-zero-as-null-pointer-constant to G++ if it supports it.
22127	* examples/calc++/local.mk: Adjust.
22128
221292013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22130
22131	regen
22132
221332013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22134
22135	gnulib: update
22136
221372013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22138
22139	style: rename variant private members
22140	* data/variant.hh (buffer, tname, as_, raw, align_me): Rename as...
22141	(yybuffer_, yytname_,yyas_, yyraw, yyalign_me): these.
22142
221432013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22144
22145	style: space changes
22146	* data/variant.hh: Be sure to leave a space before arguments in function
22147	calls.
22148
221492013-02-19  Akim Demaille  <akim@lrde.epita.fr>
22150
22151	variant: fix G++ 4.4 warnings
22152	The changes by Théophile Ranquet about type punning issues need
22153	to be extend to in-place new to please G++ 4.4.7.
22154
22155	* data/variant.hh (variant::as_): New, factors the casts that avoid
22156	compiler warnings.
22157	(as, build): Use them.
22158
221592013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22160
22161	news: spell fixes
22162	* NEWS: here.
22163
221642013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22165
22166	diagnostics: factor and enhance messages about duplicate rule directives
22167	When reporting a duplicate directive on a rule, point to its first
22168	occurrence:
22169
22170	one.y:11.10-15: error: only one %empty allowed per rule
22171	   %empty {} %empty
22172	             ^^^^^^
22173	one.y:11.3-8: previous declaration
22174	   %empty {} %empty
22175	   ^^^^^^
22176
22177	And consistently discard the second one.
22178
22179	* src/complain.h, src/complain.c (duplicate_directive): New.
22180	* src/reader.c: Use it where appropriate.
22181	* src/symlist.h, src/symlist.c (symbol_list): Add a dprec_location member.
22182	* tests/actions.at: Adjust expected output.
22183
221842013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22185
22186	style: no longer use backquotes
22187	* tests/actions.at, tests/atlocal.in, tests/c++.at, tests/calc.at,
22188	* tests/conflicts.at, tests/existing.at, tests/glr-regression.at,
22189	* tests/input.at, tests/java.at, tests/local.at, tests/sets.at,
22190	* tests/synclines.at, doc/bison.texi, lib/libiberty.h, lib/timevar.h:
22191	Use single quotes.
22192
221932013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22194
22195	style: no longer use backquotes
22196	* README, REFERENCES, TODO, configure.ac, data/README, data/bison.m4,
22197	* data/c++.m4, data/c.m4, data/java.m4, data/lalr1.cc,
22198	* data/lalr1.java, data/yacc.c, doc/local.mk, etc/bench.pl.in,
22199	* src/conflicts.c, src/files.c, src/getargs.c, src/gram.h, src/lalr.c,
22200	* src/location.c, src/location.h, src/muscle-tab.c, src/muscle-tab.h,
22201	* src/output.c, src/parse-gram.c, src/parse-gram.y, src/print-xml.c,
22202	* src/print.c, src/reader.c, src/reduce.c, src/scan-skel.l,
22203	* src/symtab.h, src/system.h, src/tables.c:
22204	Use single quotes, as currently recommended by the GNU Coding Standards.
22205
222062013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22207
22208	style: no longer use backquotes in messages
22209	* src/getargs.c (usage): Use single quotes.
22210
222112013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22212
22213	doc: use %empty instead of /* empty */
22214	* doc/bison.texi: Change the comments into explicit %empty.
22215
222162013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22217
22218	doc: introduce %empty and -Wempty-rule
22219	* doc/bison.texi (Grammar Rules): Make it a @section which
22220	contains...
22221	(Rules Syntax): this new subsection (with the previous contents of
22222	"Grammar Rules".
22223	(Empty Rules): New subsection, extracted from the former
22224	"Grammar Rules".
22225	Document %empty.
22226	(Recursion): New a subsection of "Grammar Rules".
22227	Complete a few index entries.
22228	(Bison Options): Document -Wempty-rule.
22229
222302013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22231
22232	report: use %empty to denote empty rules
22233	* src/gram.c (rule_rhs_print): Use %empty for empty rules.
22234	* tests/conflicts.at, tests/regression.at, tests/sets.at: Adjust.
22235
222362013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22237
22238	diagnostics: %empty enables -Wempty-rule
22239	* src/complain.h, src/complain.c (warning_is_unset): New.
22240	* src/reader.c (grammar_current_rule_empty_set): If enabled -Wempty-rule,
22241	if not disabled.
22242	* tests/actions.at (Implicitly empty rule): Check this feature.
22243	Also check that -Wno-empty-rule does disable this warning.
22244
222452013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22246
22247	-Wempty-rule: diagnose empty rules without %empty
22248	* src/complain.h, src/complain.c (warning_empty_rule, Wempty_rule):
22249	New warning category.
22250	(warnings_args, warnings_types): Adjust.
22251	* src/reader.c (grammar_rule_check): Check the empty rules are
22252	flagged by %empty.
22253	* tests/actions.at (Implicitly empty rule): New.
22254	* tests/existing.at: Add expected warnings.
22255
222562013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22257
22258	tests: use %empty
22259	* tests/actions.at, tests/input.at, tests/reduce.at,
22260	* tests/regression.at:
22261	here.
22262
222632013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22264
22265	regen
22266
222672013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22268
22269	parser: use %empty
22270	Avoid that Bison's own use of "bison -Wall" trigger warnings.
22271
22272	* src/parse-gram.y: Use %empty for every empty rule.
22273
222742013-02-18  Akim Demaille  <akim@lrde.epita.fr>
22275
22276	grammar: introduce %empty
22277	Provide a means to explicitly denote empty right-hand sides of rules:
22278	instead of
22279
22280	  exp:  { ... }
22281
22282	allow
22283
22284	  exp: %empty { ... }
22285
22286	Make sure that %empty is properly used.
22287
22288	With help from Joel E. Denny and Gabriel Rassoul.
22289	http://lists.gnu.org/archive/html/bison-patches/2013-01/msg00142.html
22290
22291	* src/reader.h, src/reader.c (grammar_current_rule_empty_set): New.
22292	* src/parse-gram.y (%empty): New token.
22293	Use it.
22294	* src/scan-gram.l (%empty): Scan it.
22295	* src/reader.c (grammar_rule_check): Check that %empty is properly used.
22296	* tests/actions.at (Invalid uses of %empty, Valid uses of %empty): New.
22297
222982013-02-16  Akim Demaille  <akim@lrde.epita.fr>
22299
22300	getargs: minor simplification
22301	* src/getargs.c (flag_argmatch): Simplify the handling of "none".
22302
223032013-02-16  Akim Demaille  <akim@lrde.epita.fr>
22304
22305	style: move argument handling of -W into the diagnostics module
22306	This allows to reduce the number of public interfaces.
22307
22308	* src/getargs.c (--yacc): Use warning_argmatch instead of tweaking
22309	directly warnings_flag (which will be private).
22310	(warning_argmatch, warnings_argmatch): Move to...
22311	* src/complain.h, src/complain.c: here.
22312
22313	* src/getargs.h, src/getargs.c (warnings_args, warnings_types): Move to...
22314	* src/complain.c: here, now private.
22315
22316	* src/complain.h (severity, warnings_flag): Move to...
22317	* src/complain.c: here, now private.
22318
223192013-02-16  Akim Demaille  <akim@lrde.epita.fr>
22320
22321	diagnostics: revamp the handling of -Werror
22322	Recent discussions with Joel E. Denny
22323	(http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00026.html)
22324	show that it is desirable to tell the difference between an option
22325	that was explicitly disabled with -Wno-foo, as opposed to be left
22326	unset.  The current framework does not allow this.
22327
22328	Instead of having a first int to store which options are enabled, and
22329	another to store which are turned into errors, use an array that for
22330	each warning category tells its status: disabled, unset, warning,
22331	error.
22332
22333	* src/complain.h, src/complain.c (warning_bit): New enum.
22334	(warnings): Use it.
22335	(severity): New enum.
22336	(warnings_flag): Now an array of severity.
22337	(errors_flag): Remove, now done by warnings_flag.
22338	(complain_init): New function, to initialie warnings_flag.
22339	(warnings_are_errors): New Boolean, for -Werror.
22340	* src/complain.c (warning_severity): New.
22341	(warnings_print_categories, complains): Use it.
22342	* src/getargs.c (warning_argmatch): Adjust to use warnings_flag.
22343	(warnings_argmatch): Ditto.
22344	Handle -Werror and -Wno-error here.
22345	(getargs): Adjust.
22346	* src/main.c (main): Call complain_init.
22347	* tests/input.at (Invalid options): Add more corner cases.
22348
223492013-02-14  Akim Demaille  <akim@lrde.epita.fr>
22350
22351	options: simplify the handling of -W
22352	* src/getargs.c (warnings_argmatch, warning_argmatch): Simplify by
22353	replacing function arguments with their actual values.
22354	(WARNING_ARGMATCH): Remove, useless.
22355	Adjust callers.
22356
223572013-02-14  Akim Demaille  <akim@lrde.epita.fr>
22358
22359	options: don't accept "error=" for -f and -r
22360	* src/getargs.c (warning_argmatch, warnings_argmatch, WARNINGS_ARGMATCH):
22361	New.
22362	Use them for -W/--warning.
22363	They are copied from...
22364	(flag_argmatch, flags_argmatch, FLAGS_ARGMATCH): these.
22365	Simplify by removing the support for "error".
22366	* tests/input.at (Invalid options): New.
22367	* TODO (Laxism in Bison invocation arguments): Remove.
22368
223692013-02-14  Akim Demaille  <akim@lrde.epita.fr>
22370
22371	diagnostics: factor the list of warning names
22372	* src/getargs.h, src/getargs.c (warnings_args, warnings_types): Make
22373	them public.
22374	* src/complain.h, src/complain.c (warnings_print_categories): Its
22375	only use outside complain.c was removed in a recent commit, so
22376	make it static.
22377	Simplify its implementation.
22378	Use warnings_args and warnings_types.
22379	* src/muscle-tab.c (muscle_percent_define_check_values): Make it
22380	silent.
22381
223822013-02-14  Akim Demaille  <akim@lrde.epita.fr>
22383
22384	diagnostics: no longer pretty-print rules in error messages, carets suffice
22385	* src/gram.c (grammar_rules_useless_report): Let -fcaret handle the
22386	pretty-printing of the guilty rules.
22387	(rule_print): Inline in its only use.
22388	* tests/conflicts.at, tests/existing.at, tests/reduce.at,
22389	* tests/regression.at: Adjust.
22390	* NEWS: Document.
22391
223922013-02-14  Akim Demaille  <akim@lrde.epita.fr>
22393
22394	options: no longer document warnings when diagnosing an invalid -W
22395	The argmatch functions accept prefixes of the alternatives (like
22396	getopt does for long options).  Bison uses this to document the
22397	warning categories.  This is troublesome: it duplicates the --help
22398	documentation, it is not gettextized, it is displayed with ugly quotes
22399	(because argmatch uses it to display the list of possible answers),
22400	and it prevents straighforward uses of the tables of valid warning
22401	categories (for instance so that warning diagnostics end with the name
22402	of the warning).
22403
22404	The "hidden" option --trace uses the same trick, but it does not need
22405	to be translated, nor to be described in --help.
22406
22407	* src/getargs.c (warnings_args): Remove pseudo documentation.
22408	Comment changes.
22409
224102013-02-11  Akim Demaille  <akim@lrde.epita.fr>
22411
22412	tests: enlarge the allowed duration for calc tests
22413	Hydra "often" fails on this test:
22414
22415	252. calc.at:658: 252. Calculator %glr-parser api.pure
22416	parse.error=verbose %debug %locations %defines api.prefix="calc"
22417	%verbose %yacc %parse-param {semantic_value *result}
22418	%parse-param {int *count} (calc.at:658): FAILED
22419
22420	* tests/calc.at: Give 200s instead of 100s.
22421	Use AT_DEBUG_IF.
22422
224232013-02-11  Akim Demaille  <akim@lrde.epita.fr>
22424
22425	debug: improve the display of symbol lists
22426	* src/symtab.c (symbol_print): Remove useless quotes (the symbol already
22427	has quotes).
22428	Prefer fputs.
22429	* src/symlist.c (symbol_list_syms_print): Likewise.
22430	Fix separators.
22431
224322013-02-09  Akim Demaille  <akim@lrde.epita.fr>
22433
22434	style: minor changes
22435	* src/complain.c: Space changes.
22436	* src/reader.c: Comment changes.
22437	Avoid && in assertions.
22438	* src/location.c: Move comments to...
22439	* src/location.h: here.
22440	* src/symlist.h, src/symlist.c: Create a pseudo section for members
22441	that apply to the rule.
22442
224432013-02-08  Akim Demaille  <akim@lrde.epita.fr>
22444
22445	news: restructure, document variants for C++
22446	* NEWS: here.
22447
224482013-02-08  Akim Demaille  <akim@lrde.epita.fr>
22449
22450	c++: api.token.constructor requires api.value.type=variant
22451	Eventually it should also support "union".
22452
22453	* data/glr.cc: Move this check to...
22454	* data/c++.m4: here, as lalr1.cc is affected too.
22455
224562013-02-05  Akim Demaille  <akim@lrde.epita.fr>
22457
22458	build: restore C90 compatibility
22459	* src/parse-gram.y, src/parse-gram.c: Don't use // comments.
22460
224612013-02-05  Akim Demaille  <akim@lrde.epita.fr>
22462
22463	doc: use @group to improve page breaking
22464	* doc/bison.texi: here.
22465
224662013-02-04  Akim Demaille  <akim@lrde.epita.fr>
22467
22468	style: rename internal "stype" as "union_members" for clarity
22469	"stype" is quite unclear, and it also collides with the former %define
22470	variable that had the same name (replaced by api.value.type).
22471
22472	* src/parse-gram.y (stype): Rename as...
22473	(union_members): this.
22474	* data/bison.m4: Adjust.
22475	(b4_user_stype): Rename as...
22476	(b4_user_union_members): this.
22477	* data/c++.m4, data/c.m4: Adjust.
22478	* src/parse-gram.c: regen.
22479
224802013-02-04  Akim Demaille  <akim@lrde.epita.fr>
22481
22482	tests: improve the language independance layer
22483	* tests/local.at (_AT_LANG_DISPATCH): New, shamelessly stolen from
22484	Autoconf's _AT_LANG_DISPATCH.
22485	(AT_LANG_DISPATCH): New.
22486	(AT_YYERROR_FORMALS, AT_YYERROR_PROTOTYPE, AT_YYERROR_DECLARE_EXTERN)
22487	(AT_YYERROR_DECLARE, AT_YYERROR_DEFINE, AT_MAIN_DEFINE, AT_COMPILE)
22488	(AT_FULL_COMPILE):
22489	Use AT_LANG_DISPATCH instead of an ad hoc m4_case.
22490
224912013-02-04  Akim Demaille  <akim@lrde.epita.fr>
22492
22493	regen
22494
224952013-02-04  Akim Demaille  <akim@lrde.epita.fr>
22496
22497	style: space changes in the parser
22498	* src/parse-gram.y: Fix spaces.
22499
225002013-02-04  Akim Demaille  <akim@lrde.epita.fr>
22501
22502	parser: use api.pure full
22503	* src/parse-gram.y: Use api.pure full instead of silly macro tricks.
22504
225052013-02-04  Akim Demaille  <akim@lrde.epita.fr>
22506
22507	style: use a for loop instead of a while loop, and scope reduction
22508	* src/reader.c (packgram): Improve readability.
22509	The parser calls grammar_current_rule_end at the end of every rhs,
22510	which adds a NULL to separate the rules.  So there is no need to
22511	check whether "p" is non-null before proceeding.
22512
225132013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
22514
22515	variants: stylistic change
22516	* data/variant.hh (tname): Respect the GNU Coding Standards for this
22517	pointer's declaration.
22518
225192013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
22520
22521	grammar: free the association tracking graph
22522	The graph introduced by Valentin wasn't free'd after use.
22523
22524	* src/symtab.c (assoc_free): New, clear the array of linked lists with...
22525	(linkedlist_free): This, new.
22526	(print_precedence_warnings): Call assoc_free when done.
22527	(print_assoc_warnings): Free used_assoc after use.
22528
225292013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
22530
22531	tests: use AT_FULL_COMPILE where possible
22532	* tests/c++.at (C++ Variant-based Symbol, Variants): Here.  Rename the
22533	generated input files to use .y instead of .yy, as a requirement for using
22534	AT_FULL_COMPILE instead of a combination of AT_BISON_CHECK and
22535	AT_BISON_COMPILE_CXX.
22536
225372013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
22538
22539	variants: avoid type punning issue
22540	This is based on what is recommended by both Scott Meyers, in 'Effective
22541	C++', and Andrei Alexandrescu and Herb Sutter in 'C++ Coding Standards'.
22542
22543	Use a static_cast on void* rather than directly use a reinterpret_cast,
22544	which can have nefarious effects on objects.  However, even though following
22545	this guideline is good practice in general, I am not quite sure how relevant
22546	it is when applied to conversions from POD to objects.  Actually, it might
22547	very well be the opposite: isn't this exactly what reinterpret_cast is for?
22548	What we really want *is* to transmit the memory map as a series of bytes,
22549	which, if I am correct, falls into the kind of "low level" hack for which
22550	this cast is meant.
22551
22552	In any case, this silences the warning, which will be greatly appreciated by
22553	anyone using variants with a compiler supporting -fstrict-aliasing.
22554
22555	* data/variant.hh (as): Here.
22556	* tests/c++.at (Exception safety, C++ Variant-based Symbols, Variants):
22557	Don't use NO_STRICT_ALIAS_CXXFLAGS (revert commit ddb9db15), as type punning
22558	is no longer an issue.
22559	* tests/atlocal.in, configure.ac (NO_STRICT_ALIAS_CXXFLAGS): Remove
22560	definition.
22561	* examples/local.mk (NO_STRICT_ALIAS_CXXFLAGS): Remove from AM_CXXFLAGS.
22562	* doc/bison.texi: Don't mention type punning issues.
22563
225642013-02-01  Theophile Ranquet  <ranquet@lrde.epita.fr>
22565
22566	todo: update
22567	Reformulate and give more details on my thoughts concerning the graphical
22568	visualization, and add an entry about a bug in the options processing for
22569	warnings as errors.
22570
22571	* TODO: Here.
22572
225732013-02-01  Akim Demaille  <akim@lrde.epita.fr>
22574
22575	regen
22576
225772013-02-01  Akim Demaille  <akim@lrde.epita.fr>
22578
22579	location: pass the location first
22580	* src/location.h, src/location.c (location_print): For consistency
22581	with other data structures and other location_* routines, pass the
22582	location argument first.
22583	* src/complain.c: Adjust.
22584	(location_caret): Likewise.
22585	* src/parse-gram.y: Adjust.
22586
225872013-02-01  Akim Demaille  <akim@lrde.epita.fr>
22588
22589	symlist: use the right stream
22590	* src/symlist.c (symbol_list_syms_print): Use "f", not stderr.
22591
225922013-01-30  Akim Demaille  <akim@lrde.epita.fr>
22593
22594	tests: put two related tests together
22595	* tests/conflicts.at (Useless associativity warning): Move next
22596	to "Useless precedence warning".
22597
225982013-01-30  Akim Demaille  <akim@lrde.epita.fr>
22599
22600	news: name contributors
22601	* NEWS: here.
22602
226032013-01-30  Valentin Tolmer  <nitnelave1@gmail.com>
22604
22605	warnings: introduce -Wprecedence
22606	The new warning category "precedence" flags useless precedence and
22607	associativity.  -Wprecedence can now be used, it is disabled by default.
22608	The warnings about precedence and associativity are grouped into one, and
22609	the testsuite was corrected accordingly.
22610
22611	* src/complain.h (warnings): Introduce "precedence".
22612	* src/complain.c (warnings_print_categories): Adjust.
22613	* src/getargs.c (warnings_args, warning_types): Likewise.
22614	* src/symtab.h, src/symtab.c (print_associativity_warnings): Remove.
22615	* src/symtab.h (register_assoc): Correct arguments.
22616	* src/symtab.c (print_precedence_warnings): Print both warnings together.
22617	* doc/bison.texi (Bison options): Document the warnings and provide an
22618	example.
22619	* tests/conflicts.at, tests/existing.at, tests/local.at,
22620	* tests/regression.at: Adapt the testsuite for the new category
22621	(-Wprecedence instead of -Wother where appropriate).
22622
226232013-01-30  Akim Demaille  <akim@lrde.epita.fr>
22624
22625	build: avoid clang's colored diagnostics in the test suite
22626	The syncline tests, which try to recognize compiler diagnostics,
22627	are confused by escapes for colors.
22628
22629	* configure.ac (warn_tests): New, to factor the warnings for both
22630	C and C++ tests.
22631	Add -fno-color-diagnostics to it.
22632	* tests/local.at (AT_TEST_TABLES_AND_PARSE): Do not remove glue
22633	together compiler flags.
22634
226352013-01-30  Akim Demaille  <akim@lrde.epita.fr>
22636
22637	build: please Clang++ 3.2+ on Flex scanners
22638	Clang++, with -Wall, rejects code generated by Flex (for C scanners):
22639
22640	  CXX      examples/calc++/examples_calc___calc__-calc++-scanner.o
22641	  In file included from examples/calc++/calc++-scanner.cc:1:
22642	  error: implicit conversion of NULL constant to 'bool' [-Werror,-Wnull-conversion]
22643	  if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ) {
22644	       ~                                                                  ^~~~~~
22645	                                                                          false
22646	* configure.ac (WARN_NO_NULL_CONVERSION_CXXFLAGS): Compute it.
22647	* examples/calc++/local.mk (examples_calc___calc___CXXFLAGS): Use it.
22648
226492013-01-30  Valentin Tolmer  <nitnelave1@gmail.com>
22650
22651	grammar: record used associativity and print useless ones
22652	Record which symbol associativity is used, and display useless ones.
22653
22654	* src/symtab.h, src/symtab.c (register_assoc, print_assoc_warnings): New
22655	* src/symtab.c (init_assoc, is_assoc_used): New
22656	* src/main.c: Use print_assoc_warnings
22657	* src/conflicts.c: Use register_assoc
22658	* tests/conflicts.at (Useless associativity warning): New.
22659
22660	Due to the new warning, many tests had to be updated.
22661
22662	* tests/conflicts.at tests/existing.at tests/regression.at:
22663	Add the associativity warning in the expected results.
22664	* tests/java.at: Fix the java calculator's grammar to remove a useless
22665	associativity.
22666	* doc/bison.texi (mfcalc example): Fix associativity to remove
22667	warning.
22668
226692013-01-29  Valentin Tolmer  <nitnelave1@gmail.com>
22670
22671	grammar: warn about unused precedence for symbols
22672	Symbols with precedence but no associativity, and whose precedence is
22673	never used, can be declared with %token instead.  The used precedence
22674	relationships are recorded and a warning about useless ones is issued.
22675
22676	* src/conflicts.c (resolve_sr_conflict): Record precedence relation.
22677	* src/symtab.c, src/symtab.h (prec_nodes, init_prec_nodes)
22678	(symgraphlink_new, register_precedence_second_symbol)
22679	(print_precedence_warnings): New.
22680	Record relationships in a graph and warn about useless ones.
22681	* src/main.c (main): Print precedence warnings.
22682	* tests/conflicts.at: New.
22683
226842013-01-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
22685
22686	variants: remove the 'built' assertions
22687	When using %define parse.assert, the variants come with additional variables
22688	that are useful for development purposes. One is a Boolean indicating if the
22689	variant is built (to make sure we don't read a non-built variant), and the
22690	other is a string describing the stored type. There is no need to have both of
22691	these, the string is enough.
22692
22693	* data/variant.hh (built): Remove.
22694
226952013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22696
22697	style: indentation fixes
22698	* src/parse-gram.y: here.
22699
227002013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22701
22702	maint: be sure to neutralize out-of-tree paths from our parser
22703	* tests/bison.in: Adjust to support fixed versions of ylwrap.
22704
227052013-01-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
22706
22707	m4: generate a basic_symbol constructor for each symbol type
22708	Recently, there was a slightly vicious bug hidden in the make_ functions:
22709
22710	  parser::symbol_type
22711	  parser::make_TEXT (const ::std::string& v)
22712	  {
22713	    return symbol_type (token::TOK_TEXT, v);
22714	  }
22715
22716	The constructor for symbol_type doesn't take an ::std::string& as
22717	argument, but a constant variant.  However, because there is a variant
22718	constructor which takes an ::std::string&, this caused the implicit
22719	construction of a built variant.  Considering that the variant argument
22720	for the symbol_type constructor was cv-qualified, this temporary variant
22721	was never destroyed.
22722
22723	As a temporary solution, the symbol was built in two stages:
22724
22725	  symbol_type res (token::TOK_TEXT);
22726	  res.value.build< ::std::string&> (v);
22727	  return res;
22728
22729	However, the solution introduced in this patch contributes to letting
22730	the symbols handle themselves, by supplying them with constructors that
22731	take a non-variant value and build the symbol's own variant with that
22732	value.
22733
22734	* data/variant.hh (b4_symbol_constructor_define_): Use the new
22735	constructors rather than building in a temporary symbol.
22736	(b4_basic_symbol_constructor_declare,
22737	b4_basic_symbol_constructor_define): New macros generating the
22738	constructors.
22739	* data/c++.m4 (basic_symbol): Invoke the macros here.
22740
227412013-01-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
22742
22743	c++: minor stylistic changes
22744	* data/c++m4: Remove useless comment lines.
22745	* data/variant.hh (self_type): Use this typedef instead of variant<S>.
22746	(b4_symbol_constructor_define_): Remove commented-out line, and stylistic
22747	change (avoid blank line).
22748
227492013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22750
22751	c++: please G++ 4.8 with -O3: type puning issue
22752	* tests/c++.at (Exception safety): Now that this test covers
22753	variants, pass -fno-strict-aliasing to g++.
22754
227552013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22756
22757	c++: please G++ 4.8 with -O3: array bounds
22758	* data/c++.m4, data/lalr1.cc (by_state, by_type): Do not use -1 to
22759	denote the absence of value, as GCC then fears that this -1 might
22760	be used to dereference arrays (such as yytname).
22761	Use 0, which corresponds to $accept, which is valueless (the needed
22762	property: the symbol destructor must not try to reclaim the memory
22763	associated with the symbol).
22764
227652013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22766
22767	c++: use more explicit types than int
22768	* data/c++.m4 (b4_public_types_declare): Declare token_number_type soon.
22769	Introduce symbol_number_type (wider than token_number_type).
22770	Clarify the requirement that kind_type from by_state and by_type
22771	denote the _input_ type (required by the constructor), not the stored type.
22772	Use symbol_number_type and token_number_type where appropriate, instead
22773	of int.
22774	* data/lalr1.cc: Adjust to these changes.
22775	Propagate "symbol_number_type".
22776	Invoke "type_get ()" instead of read "type" directly.
22777
227782013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22779
22780	c++: value_type -> kind_type
22781	* data/c++.m4, data/lalr1.cc (by_type, by_state): Rename 'value_type'
22782	as 'kind_type', as it is clearer.
22783
227842013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22785
22786	c++: improve the signature of yysyntax_error_
22787	* data/lalr1.cc: This function is const.
22788	It takes a symbol_number_type.
22789
227902013-01-29  Akim Demaille  <akim@lrde.epita.fr>
22791
22792	c++: style changes
22793	* data/lalr1.cc: Formatting changes.
22794	And name changes.
22795
227962013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22797
22798	doxygen: upgrade Doxyfile, and complete it
22799	* doc/Doxyfile.in: Let doxygen upgrade it.
22800	(INCLUDE_PATH): Point to lib too.
22801	(PROJECT_BRIEF): New.
22802	(EXCLUDE): Update to reflect the current file hierarchy.
22803
228042013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22805
22806	maint: fix syntax-check issues
22807	* cfg.mk: Ignore strcmp in local.at.
22808	* tests/conflicts.at: Use AT_PARSER_CHECK.
22809	* tests/regression.at: Preserve the exit status of the generated parsers.
22810
22811	* tests/local.mk ($(TESTSUITE)): Map @tb@ to a tabulation.
22812	* tests/c++.at, tests/input.at, tests/regression.at: Use @tb@.
22813	* cfg.mk: (space-tab): There are no longer exceptions.
22814
228152013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22816
22817	tests: please C90 compilers
22818	* tests/actions.at, tests/conflicts.at: Use /* ... */ comments.
22819	Let "main" return a value.
22820
228212013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22822
22823	maint: update todo
22824	* TODO: Remove fixed items.
22825
228262013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22827
22828	news: minor improvements
22829	* NEWS: Name some more contributors.
22830	Restructure slightly.
22831
228322013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22833
22834	tests: please clang and use ".cc", not ".c", for C++ input
22835	When fed with foo.c, clang++ 3.2 answers:
22836
22837	  clang: error: treating 'c' input as 'c++' when in C++ mode,
22838	                this behavior is deprecated
22839
22840	* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use *.cc and *.hh
22841	for C++.
22842
228432013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22844
22845	tests: formatting changes
22846	* tests/local.at: Restore proper indentation.
22847
228482013-01-28  Theophile Ranquet  <ranquet@lrde.epita.fr>
22849
22850	c++: better inline expansion
22851	Many 'inline' keywords were in the declarations.  They rather belong in
22852	definitions, so move them.
22853
22854	* data/c++.m4 (basic_symbol, by_type): Many inlines here.
22855	* data/lalr1.cc (yytranslate_, yy_destroy_, by_state, yypush_, yypop_): Inline
22856	these as well.
22857	(move): Move the definition outside the struct, where it belongs.
22858
228592013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22860
22861	tests: check that using variants is exception safe
22862	* tests/local.at: (Slightly) improve the regexp by escaping '.'
22863	when it denotes a point.
22864	(AT_VARIANT_IF): New.
22865	* tests/c++.at (Exception Safety): Run it for variants too.
22866
228672013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22868
22869	tests: remove useless %defines
22870	Many tests were using %defines because C++ skeletons used to require
22871	it.
22872
22873	* tests/actions.at, tests/c++.at, tests/input.at, tests/regression.at:
22874	Remove useless %defines.
22875
228762013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22877
22878	c++: remove now-useless operators
22879	Now that symbols behaves properly, we can eliminate special routines
22880	that are no longer needed.
22881
22882	* data/c++.m4, data/glr.cc, data/lalr1.cc, data/variant.hh:
22883	Remove useless assignment operators and copy constructors.
22884	As a consequence, remove useless includes for "abort".
22885
228862013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22887
22888	tests: enable support for --debug
22889	* tests/c++.at (Variants): Here.
22890	And remove useless clutter when api.token.constructor is enabled.
22891
228922013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22893
22894	c++: revamp the support for variants
22895	The current approach was too adhoc: the symbols were not sufficiently
22896	self-contained, in particular wrt memory management.  The "new"
22897	guideline is the one that should have been followed from the start:
22898	let the symbols handle themslves, instead of leaving their users to
22899	it.  It was justified by the will to avoid gratuitious moves and
22900	copies, but the current approach does not seem to be slower, yet it
22901	will probably be simpler to adjust to support move semantics from
22902	C++11.
22903
22904	The documentation says that the %parse-param are available from the
22905	%destructor.  In retrospect, that was a silly design decision, which
22906	we can break for variants, as its a new feature.  It should be phased
22907	out for non-variants too.
22908
22909	* data/variant.hh: A variant never knows if it stores something or
22910	not, it is up to its users to store this information.
22911	Yet, in parse.assert mode, make sure the empty/filled variants
22912	are properly used.
22913	(b4_symbol_constructor_define_): Don't call directly the symbol
22914	constructor, to save a useless temporary.
22915	* data/stack.hh (push): Steal the pushed value instead of duplicating
22916	it.
22917	This will simplify the callers of push, who handled this "move"
22918	approach themselves.
22919	* data/c++.m4 (basic_symbol): Let -1, as kind, denote the fact that
22920	a symbol is empty.
22921	This is needed for instance when shifting the lookahead: yyla
22922	is given as argument to "push", and its value is then moved on
22923	the stack.  But then yyla must be declared "empty" so that its
22924	destructor won't be called.
22925	(basic_symbol::move): New.
22926	Move the responsibility of calling the destructor from yy_destroy
22927	to ~basic_symbol in the case of variants.
22928	* data/lalr1.cc (stack_symbol_type): Now a derived class from its
22929	previous value, so that we can add a constructor from a symbol_type.
22930	(by_state): State -1 means empty.
22931	(yypush_): Factor, by calling one overload from the other one, and
22932	using the new semantics of stack::push.
22933	No longer reclaim by hand the memory from rhs symbols, since now
22934	that we store objects with proper destructors, they will be reclaimed
22935	automatically.
22936	Conversely, be sure to delete yylhs.
22937	* tests/c++.at (C++ Variant-based Symbols): New "unit" test for
22938	symbols.
22939
229402013-01-28  Akim Demaille  <akim@lrde.epita.fr>
22941
22942	c++: formatting and comment changes
22943	* data/c++.m4, data/lalr1.cc, data/stack.hh, data/variant.hh:
22944	Fix indentation.
22945	Fix some comments.
22946
229472013-01-27  Valentin Tolmer  <nitnelave1@gmail.com>
22948
22949	tests: add token declaration order test
22950	* tests/conflicts.at: New test.
22951
229522013-01-27  Akim Demaille  <akim@lrde.epita.fr>
22953
22954	regen
22955
229562013-01-27  Valentin Tolmer  <nitnelave1@gmail.com>
22957
22958	grammar: preserve token declaration order
22959	In a declaration %token A B, the token A is declared before B, but in %left
22960	A B (or with %precedence or %nonassoc or %right), the token B was declared
22961	before A (tokens were declared in reverse order).
22962
22963	* src/symlist.h, src/symlist.c (symbol_list_append): New.
22964	* src/parse-gram.y: Use it instead of symbol_list_prepend.
22965	* tests/input.at: Adjust expectations.
22966
229672013-01-25  Akim Demaille  <akim@lrde.epita.fr>
22968
22969	tests: improve test group titles
22970	* tests/local.at (AT_SETUP_STRIP): AT_SETUP does not behave properly
22971	with new-lines in its argument.
22972	Remove them.
22973	Fix the handling of %define with quotes.
22974
229752013-01-25  Akim Demaille  <akim@lrde.epita.fr>
22976
22977	c: no longer require stdio.h when locations are enabled
22978	Recent changes (in 2.7) introduced a dependency on both FILE and
22979	fprintf, which are "available" only in %debug mode.  This was to
22980	define yy_location_print_, which is used only in %debug mode by the
22981	parser, but massively used by the test suite to output the locations
22982	in yyerror.
22983
22984	Break this dependency: the test suite should define its own routines
22985	to display the locations.  Eventually Bison will provide the user with
22986	a means to display locations, but not yet.
22987
22988	* data/c.m4 (b4_yy_location_print_define): Use YYFPRINTF instead of
22989	fprintf directly.
22990	* data/yacc.c (b4_yy_location_print_define): Invoke it only in %debug
22991	mode, so that stdio.h is included (needed for FILE*), and YYFPRINTF
22992	is defined.
22993
22994	* tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DEFINE): Declare
22995	and define location_print and LOCATION_PRINT.
22996
22997	* tests/actions.at, tests/existing.at, tests/glr-regression.at,
22998	* tests/input.at, tests/named-refs.at, tests/regression.at: Adjust
22999	to use them.
23000	Fix the expected line numbers (as the prologue's length has changed).
23001
230022013-01-25  Akim Demaille  <akim@lrde.epita.fr>
23003
23004	c: minor simplification in the debug code
23005	* data/c.m4 (yy_symbol_print): Minor factoring.
23006
230072013-01-25  Akim Demaille  <akim@lrde.epita.fr>
23008
23009	c++: display locations as C does
23010	See commit 3804aa260b956dd012adde3894767254422a5fcf.
23011
23012	* data/location.cc (operator<<): Display location exactly as is
23013	done in C skeletons.
23014	* tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): Also define
23015	AT_FIRST_LINE, AT_LAST_LINE, AT_FIRST_COLUMN, AT_LAST_COLUMN.
23016	* tests/actions.at (Location Print): Also check C++ skeletons.
23017
230182013-01-25  Akim Demaille  <akim@lrde.epita.fr>
23019
23020	tests: highlight empty right-hand sides
23021	* tests/actions.at, tests/c++.at, tests/headers.at,
23022	* tests/input.at: here.
23023
230242013-01-25  Akim Demaille  <akim@lrde.epita.fr>
23025
23026	news: prepare for 2.8
23027	* NEWS: Restructure.
23028	Name contributors.
23029
230302013-01-21  Akim Demaille  <akim@lrde.epita.fr>
23031
23032	tests: generalize default main for api.namespace
23033	* tests/local.at (AT_NAME_PREFIX): Also match api.namespace.
23034	(AT_MAIN_DEFINE): Take it into account.
23035	* tests/c++.at, tests/headers.at: Use AT_NAME_PREFIX.
23036	(AT_CHECK_NAMESPACE): Rename as...
23037	(AT_TEST): this.
23038
230392013-01-21  Akim Demaille  <akim@lrde.epita.fr>
23040
23041	tests: improve factoring of the main function
23042	* tests/local.at (AT_MAIN_DEFINE): If %debug is used, check if
23043	-d/--debug is passed to the generated parser, and enable the traces.
23044	Return exactly the result of yyparse, so that we can check exit code
23045	2 too.
23046	* tests/actions.at, tests/glr-regression.at, tests/regression.at:
23047	Use AT_MAIN_DEFINE, helping AT_BISON_OPTION_PUSHDEFS where needed,
23048	preferably to option -t.
23049
230502013-01-21  Akim Demaille  <akim@lrde.epita.fr>
23051
23052	tests: factor the definition of main
23053	With Théophile Ranquet.
23054
23055	* tests/local.at (AT_MAIN_DEFINE): New.
23056	(AT_YYERROR_DEFINE): Improve formatting.
23057	* tests/actions.at, tests/c++.at, tests/conflicts.at,
23058	* tests/glr-regression.at, tests/input.at, tests/regression.at,
23059	* tests/skeletons.at, tests/torture.at: Adjust.
23060	* tests/c++.at: Add missing %skeleton for a PUSHDEFS, and a missing
23061	PUSH/POPDEFS for another test.
23062
230632013-01-21  Akim Demaille  <akim@lrde.epita.fr>
23064
23065	tests: minor refactoring
23066	* tests/named-refs.at: Use AT_FULL_COMPILE where applicable.
23067
230682013-01-21  Akim Demaille  <akim@lrde.epita.fr>
23069
23070	diagnostics: avoid useless caret stuttering
23071	* src/scan-code.l: When reporting a missing ending ';', don't display
23072	the guilty action twice.
23073
230742013-01-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
23075
23076	examples: please clang
23077	* doc/bison.texi (calc++-scanner.ll): Don't output useless yyinput function.
23078
230792013-01-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
23080
23081	tests: better silencing of unused argument warnings
23082	input.yy:35:44: error: unused parameter 'msg' [-Werror,-Wunused-parameter]
23083	void yy::parser::error (std::string const& msg)
23084	                                           ^
23085
23086	* tests/c++.at (C++ GLR parser identifier shadowing): Don't name unused
23087	argument, use YYUSE instead of a direct cast to void.
23088
230892013-01-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
23090
23091	bench: compatibility for Bison <= 2.7
23092	There used to be a bug in some skeletons, which caused the expansion of
23093	'yylval' and 'yylloc', generating these errors:
23094
23095	input.cc:547:16: error: expected ',' or '...' before '(' token
23096	 #define yylval (yystackp->yyval)
23097	                ^
23098	input.yy:29:39: note: in expansion of macro 'yylval'
23099	 int yylex (yy::parser::semantic_type *yylval)
23100	                                       ^
23101
23102	This bug is fixed by 'skel: better aliasing of identifiers', but a workaround
23103	is useful when benchmarking against older versions of Bison, which are still
23104	affected by the bug.
23105
23106	* etc/bench.pl.in: Rename yylval to yylvalp and yylloc to yyllocp in base
23107	grammar 'list'.
23108
231092013-01-15  Theophile Ranquet  <ranquet@lrde.epita.fr>
23110
23111	c++: remove useless inlines
23112	* data/c++.m4 (basic_symbol): Keep 'inline' in the prototypes, but don't
23113	duplicate it in the implementation.
23114	* data/variant.hh (variant): 'inline' is not needed when the implementation is
23115	provided in the class definition.
23116
231172013-01-15  Theophile Ranquet  <ranquet@lrde.epita.fr>
23118
23119	c++: m4 stylistic change
23120	* data/c++.m4 (syntax_error): Fix the indentation of 'inline'.
23121
231222013-01-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
23123
23124	c++: silence warnings
23125	* data/c++.m4 (basic_symbol<Base>::operator=): Unused parameter.
23126	* tests/c++.at (C++ GLR parser identifier shadowing): Here too.
23127	-
23128
231292013-01-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
23130
23131	news: typos
23132	* NEWS: Fix a typo, use YYSTYPE rather than semantic_type.
23133
231342013-01-12  Akim Demaille  <akim@lrde.epita.fr>
23135
23136	regen
23137
231382013-01-12  Akim Demaille  <akim@lrde.epita.fr>
23139
23140	maint: update copyright years
23141	Suggested by Stefano Lattarini.
23142	Run "make update-copyright".
23143
231442013-01-12  Akim Demaille  <akim@lrde.epita.fr>
23145
23146	build: fix VPATH issue
23147	* Makefile.am (update-b4-copyright, update-package-copyright-year): Fix
23148	path to build-aux.
23149
231502013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23151
23152	carets: document default activation
23153	* NEWS: Announce it.
23154	* doc/bison.texi: Adjust.
23155
231562013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23157
23158	carets: show them in more tests
23159	* tests/input.at, tests/named-refs.at: Here.
23160
231612013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23162
23163	carets: activate by default
23164	* src/getargs.c (feature_flag): Here.
23165	* tests/local.at (AT_BISON_CHECK_, AT_BISON_CHECK_NO_XML): Deactivate carets
23166	for the testsuite, by default.
23167	* tests/input.at: Adjust the locations for command line definitions.
23168
231692013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23170
23171	variants: document move and swap
23172	* data/variant.hh (swap): Doc.
23173	(build): Rename as...
23174	(move): This, more coherent naming with clearer meaning.
23175	* data/c++.m4 (move): Adjust.
23176
231772013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23178
23179	c++: privatize variant blind copies
23180	* data/variant.hh (variant, operator=): Make private.
23181	* data/c++.m4 (operator=): New, to avoid needing a definition of that operator
23182	for each class member (such as a possible variant).
23183	* data/glr.cc, data/lalr.cc: Add the necessary include for the abort.
23184
231852013-01-11  Akim Demaille  <akim@lrde.epita.fr>
23186
23187	glr.c: fix an unused argument issue
23188	* data/glr.c (yyuserAction): "Use" yyrhslen, as in variant mode, we might
23189	not use it.
23190
231912013-01-11  Akim Demaille  <akim@lrde.epita.fr>
23192
23193	glr.c: style changes
23194	* data/glr.c (yyuserAction): Use a size_t for sizes.
23195
231962013-01-11  Akim Demaille  <akim@lrde.epita.fr>
23197
23198	c.m4: style fix
23199	* data/c.m4 (b4_parse_param_use): Add missing space before paren.
23200
232012013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23202
23203	skel: better aliasing of identifiers
23204	* data/glr.c, data/yacc.c: Avoid emitting useless defines.
23205	* data/glr.cc: Restore prefixes for epilogue.
23206
232072013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23208
23209	glr.cc: fatal if using api.token.ctor without variants
23210	* data/glr.cc: Here.
23211
232122013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23213
23214	skel: correctly indent switch cases
23215	* data/bison.m4 (b4_type_action_): Here.
23216
232172013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23218
23219	variants: assert changes
23220	* data/variant.hh (swap): More asserts can't hurt. Don't perform useless swaps.
23221	(build): Deactivate problematic asserts, pending further investigation.
23222	(variant): Prohibit copy construction.
23223
232242013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23225
23226	lalr1.cc: use a vector for the symbol stack
23227	* data/lalr1.cc: Adjust includes.
23228	* data/stack.hh (push, pop): Use push_back and pop_back.
23229	(operator []): Access vector from the end.
23230
232312013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23232
23233	lalr1.cc: change symbols implementation
23234	A "symbol" groups together the symbol type (INT, PLUS, etc.), its
23235	possible semantic value, and its optional location.  The type is
23236	needed to access the value, as it is stored as a variant/union.
23237
23238	There are two kinds of symbols. "symbol_type" are "external symbols":
23239	they have type, value and location, and are returned by yylex.
23240	"stack_symbol_type" are "internal symbols", they group state number,
23241	value and location, and are stored in the parser stack.  The type of
23242	the symbol is computed from the state number.
23243
23244	The class template symbol_base_type<Exact> factors the code common to
23245	stack_symbol_type and symbol_type.  It uses the Curiously Recurring
23246	Template pattern so that we can always (static_) downcast to the exact
23247	type.  symbol_base_type features value and location, and delegates the
23248	handling of the type to its parameter.
23249
23250	When trying to generalize the support for variant, a significant issue
23251	was revealed: because stack_symbol_type and symbol_type _derive_ from
23252	symbol_base_type, the type/state member is defined _after_ the value
23253	and location.  In C++ the order of the definition of the members
23254	defines the order in which they are initialized, things go backward:
23255	the value is initialized _before_ the type.  This is wrong, since the
23256	type is needed to access the value.
23257
23258	Therefore, we need another means to factor the common code, one that
23259	ensures the order of the members.
23260
23261	The idea is simple: define two (base) classes that code the symbol
23262	type ("by_type" codes it by its type, and "by_state" by the state
23263	number).  Define basic_symbol<Base> as the class template that
23264	provides value and location support.  Make it _derive_ from its
23265	parameter, by_type or by_state.  Then define stack_symbol_type and
23266	symbol_type as basic_symbol<by_state>, basic_symbol<by_type>.  The
23267	name basic_symbol was chosen by similarity with basic_string and
23268	basic_ostream.
23269
23270	* data/c++.m4 (symbol_base_type<Exact>): Remove, replace by...
23271	(basic_symbol<Base>): which derives from its parameter, one of...
23272	(by_state, by_type): which provide means to retrieve the actual type of
23273	symbol.
23274	(symbol_type): Is now basic_symbol<by_type>.
23275	(stack_symbol_type): Is now basic_symbol<by_state>.
23276	* data/lalr1.cc: Many adjustments.
23277
232782013-01-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
23279
23280	bench: add %b directive to use a specific Bison
23281	For example,
23282	  $ bench.pl -v '%s lalr1.cc & %d variant & ( %b ~/old-bison/bin/bison
23283	    | %b ~/new-bison/bin/bison )' -g list -i 10000
23284
23285	* etc/bench.pl.in: Here.
23286
232872013-01-09  Akim Demaille  <akim@lrde.epita.fr>
23288
23289	regen
23290
232912013-01-04  Akim Demaille  <akim@lrde.epita.fr>
23292
23293	gnulib: update
23294
232952012-12-31  Akim Demaille  <akim@lrde.epita.fr>
23296
23297	doc: use deffn to declare the list of %define variables
23298	* doc/bison.texi (%define Summary): Use @deffn instead of @table, it
23299	spares a lot of width, especially in PDF, and looks nicer in the other
23300	formats too.
23301	It is also more consistent with the rest of the document.
23302
233032012-12-31  Akim Demaille  <akim@lrde.epita.fr>
23304
23305	doc: minor completion and fixes
23306	* doc/bison.texi (%define Summary): Provide more history to some
23307	variables.
23308
233092012-12-31  Akim Demaille  <akim@lrde.epita.fr>
23310
23311	java: stype is obsoleted by api.value.type
23312	This is consistent with the other %define variable names.
23313
23314	* data/java.m4: Use api.value.type instead of stype.
23315	* doc/bison.texi, NEWS: Document that change.
23316	* src/muscle-tab.c (muscle_percent_variable_update): Provide backward
23317	compatibility.
23318	* tests/java.at: Adjust.
23319
233202012-12-31  Akim Demaille  <akim@lrde.epita.fr>
23321
23322	doc: fix html build
23323	* doc/local.mk (bison.html): Fix dependencies.
23324
233252012-12-31  Akim Demaille  <akim@lrde.epita.fr>
23326
23327	todo: remove erroneous task
23328	* tests/input.at: Check that there are no warnings about stray $ and @
23329	in the epilogue.
23330	* TODO: Remove the correponding task.
23331
233322012-12-31  Akim Demaille  <akim@lrde.epita.fr>
23333
23334	gnulib: update
23335
233362012-12-28  Akim Demaille  <akim@lrde.epita.fr>
23337
23338	regen
23339
233402012-12-28  Akim Demaille  <akim@lrde.epita.fr>
23341
23342	syncline: one line is enough
23343	So far we were issuing two lines for each syncline change:
23344
23345	  /* Line 356 of yacc.c  */
23346	  #line 1 "src/parse-gram.y"
23347
23348	This is a lot of clutter, especially when reading diffs, as these
23349	lines change often.  Fuse them into a single, shorter, line:
23350
23351	  #line 1 "src/parse-gram.y" /* yacc.c:356  */
23352
23353	* data/bison.m4 (b4_syncline): Issue a single line.
23354	Comment improvements.
23355	(b4_sync_start, b4_sync_end): Issue a shorter comment.
23356	* data/c++.m4 (b4_semantic_type_declare): b4_user_code must be
23357	on its own line as it might start with a "#line" directive.
23358
233592012-12-28  Akim Demaille  <akim@lrde.epita.fr>
23360
23361	regen
23362
233632012-12-28  Akim Demaille  <akim@lrde.epita.fr>
23364
23365	maint: restore ANSI 89 compliance
23366	* data/bison.m4, src/conflicts.c, src/files.c, src/output.c,
23367	* src/symtab.c: Use /* ... */ comments only.
23368	Declare variables before statements.
23369
233702012-12-28  Akim Demaille  <akim@lrde.epita.fr>
23371
23372	graph: minor simplification
23373	* src/gram.c (print_lhs): Use %*s to indent.
23374	* src/print_graph.c (print_lhs): Use obstack_printf.
23375	Became simple enough to be inlined in...
23376	(print_core): here.
23377	Use a "rule*" instead of an index in "rules[]".
23378
233792012-12-28  Akim Demaille  <akim@lrde.epita.fr>
23380
23381	closure, gram: add missing const
23382	* src/closure.h, src/closure.c, src/gram.h, src/gram.c: Add some missing
23383	const where appropriate.
23384
233852012-12-27  Theophile Ranquet  <ranquet@lrde.epita.fr>
23386
23387	carets: properly display when no line feed is present
23388	* src/location.c (location_caret): finish the line with one whether or not it
23389	is present in input. Rewrite code without getline.
23390	(cleanup_caret): Reset the caret_info global.
23391	* bootstrap.conf: No longer require getline.
23392
233932012-12-27  Theophile Ranquet  <ranquet@lrde.epita.fr>
23394
23395	scanner: reintroduce unput for missing end tokens
23396	Unput was no longer used since a POSIX-compatiblity issue with Flex 2.5.31,
23397	which has been adressed in newer versions of Flex.  See this discussion:
23398	<http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00029.html>
23399
23400	This partially reverts commit aa4180418fff518198e1b0f2c43fec6432210dc7.
23401
23402	* src/scan-gram.l (unexpected_end): Here.
23403	* tests/input.at: Adjust for new order of error reports.
23404
234052012-12-27  Akim Demaille  <akim@lrde.epita.fr>
23406
23407	tables: scope reduction
23408	* src/tables.c (default_goto): Make it easier to understand.
23409
234102012-12-27  Akim Demaille  <akim@lrde.epita.fr>
23411
23412	regen
23413
234142012-12-27  Akim Demaille  <akim@lrde.epita.fr>
23415
23416	skeletons: fix comments
23417	The commit 38de4e570fdc7c8db9633c3b2054e565d8c1c6b9 underquoted the
23418	content of the comments, which resulted in losing square brackets in
23419	the comments.  Besides, some other invocations were underquoting the
23420	effective arguments.
23421
23422	* data/c.m4 (b4_comment_): Properly quote the comment.
23423	(b4_comment_, b4_comment): Move to...
23424	* data/c-like.m4: here, so that...
23425	* data/java.m4: can use it instead of its own copy.
23426	* data/bison.m4 (b4_integral_parser_tables_map): Fix some comments.
23427
23428	* data/lalr1.cc, data/lalr1.java, data/yacc.c: Comment fixes.
23429
23430	* data/lalr1.cc: Reorder a bit to factor some CPP directives.
23431
234322012-12-27  Akim Demaille  <akim@lrde.epita.fr>
23433
23434	maint: which -> whose
23435	Apparently, I was confusing both.
23436
23437	* data/bison.m4, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c:
23438	Use "whose" where appropriate.
23439
234402012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23441
23442	tables: scope reduction
23443	* src/tables.c (matching_state): here.
23444
234452012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23446
23447	tables: scope reduction
23448	* src/tables.c (token_actions): here.
23449
234502012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23451
23452	tables: scope reduction
23453	* src/tables.c (save_row): here.
23454
234552012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23456
23457	tables: scope reduction
23458	* src/tables.c (save_column, pack_vector): Reduce the scope to
23459	emphasize the structure of the code.
23460	Rename the returned value "res" to make understanding easier.
23461
234622012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23463
23464	tables: use size_t where appropriate
23465	These changes aim at making the code easier to understand.
23466
23467	* src/tables.c (tally): This is a size, always >= 0, so make it
23468	a size_t.
23469
234702012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23471
23472	tables: style changes
23473	* src/tables.c: Prefer < to >.
23474	Fix/complete some comments.
23475	Remove useless parens.
23476
234772012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23478
23479	skeletons: no longer call yylex via a CPP macro
23480	The YYLEX existed only to support YYLEX_PARAM, which is now removed.
23481	This macro was a nuisance, since incorrect yylex calls where pointed
23482	the macro _use_, instead of its definition.
23483
23484	* data/c.m4 (b4_lex_formals, b4_lex): New.
23485	* data/glr.c, data/yacc.c: Use it.
23486	* data/lalr1.cc (b4_lex): New.
23487	Use it.
23488
23489	squash! skeletons: no longer call yylex via a CPP macro
23490
234912012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23492
23493	YYLEX_PARAM: drop support
23494	* data/yacc.c, doc/bison.texi: Remove YYLEX_PARAM support.
23495	* NEWS: Document it.
23496
234972012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23498
23499	examples: minor improvements
23500	* examples/variant.yy: Don't use debug_stream(), obsoleted.
23501	Use <*>.
23502
235032012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23504
23505	skeletons: factor comments about symbols
23506	* data/variant.hh (b4_char_sizeof_): Rename as...
23507	* data/bison.m4 (b4_symbol_tag_comment): this.
23508	Provide more documentation about b4_symbol_*.
23509
235102012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23511
23512	c: improve the definition of public types
23513	* data/c.m4 (b4_token_enum): Improve comments.
23514	(b4_value_type_define, b4_location_type_define): New, extracted
23515	from...
23516	(b4_declare_yylstype): here.
23517	Separate the typedefs from the union/struct definitions.
23518
235192012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23520
23521	doc: update variant usage
23522	* doc/bison.texi, examples/variant.yy: Use "%define api.value.type variant",
23523	instead of "%define variant".
23524
235252012-12-26  Akim Demaille  <akim@lrde.epita.fr>
23526
23527	tests: check the "%define variant" is deprecated.
23528	* tests/input.at: Rename some AT_SETUP to avoid that
23529	AT_SETUP_STRIP thinks they contain %define directives.
23530	("%define" backward compatibility): Merge tests together
23531	to speed up the test suite, and to make maintenance easier
23532	(multiple AT_CHECK means multiple runs of the test suite to
23533	be sure to have updated all the error messages).
23534	Check the "%define variant" is properly obsoleted.
23535
235362012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23537
23538	%define variables: support value changes in deprecation
23539	* src/muscle-tab.c (define_directive): Be robust to "assignment"
23540	containing '='.
23541	(muscle_percent_variable_update): Upgrade "variant" to "api.value.type".
23542	Support such upgrade patterns.
23543	Adjust callers.
23544
23545	* data/bison.m4: Use api.value.type for variants.
23546	* tests/c++.at: Adjust tests.
23547
235482012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23549
23550	diagnostics: treat obsolete %define variable names as obsolete directives
23551	Instead of
23552
23553	  warning: deprecated %define variable name: 'namespace', use 'api.namespace' [-Wdeprecated]
23554
23555	display (in -fno-caret mode):
23556
23557	  warning: deprecated directive: '%define namespace foo', use '%define api.namespace foo' [-Wdeprecated]
23558
23559	and (in -fcaret mode):
23560
23561	  warning: deprecated directive, use '%define api.namespace toto' [-Wdeprecated]
23562	   %define namespace toto
23563	           ^^^^^^^^^
23564
23565	This is in preparation of cases where not only the variable is
23566	renamed, but the values are too:
23567
23568	  warning: deprecated directive: '%define variant', use '%define api.value.type variant' [-Wdeprecated]
23569
23570	* src/muscle-tab.c (define_directive): New.
23571	(muscle_percent_variable_update): Take the value as argument, and use it
23572	in the diagnostics.
23573	Loop with a pointer instead of an index.
23574	* tests/input.at (%define backward compatibility): Adjust.
23575
235762012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23577
23578	diagnostics: factor the deprecated directive message
23579	* src/complain.h, src/complain.c (deprecated_directive): New.
23580	* src/muscle-tab.c: Use it.
23581
235822012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23583
23584	variant: produce stable results
23585	Improve the output by ensuring a well defined order for type switches.
23586
23587	* src/uniqstr.h: Style changes for macro arguments.
23588	(UNIQSTR_CMP): Replace by...
23589	(uniqstr_cmp): this.
23590	* src/uniqstr.c (uniqstr_cmp): New.
23591	Produce well defined results.
23592	* src/output.c: Use it.
23593
235942012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23595
23596	uniqstr: formatting changes
23597	* src/uniqstr.h: Sort functions by object type.
23598
235992012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23600
23601	skeletons: fix an error message
23602	* data/bison.m4 (b4_flag_if): Display the invalid value.
23603
236042012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23605
23606	tests: improve titles
23607	* tests/local.at (AT_SETUP_STRIP): New.
23608	(AT_SETUP): Use it to shorten the test titles: remove %defines, %language
23609	and %skeleton whose arguments suffice.
23610	* tests/synclines.at: Use more precise AT_SETUP.
23611
236122012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23613
23614	c++: comment changes
23615	* data/c++.m4, data/glr.cc, data/lalr1.cc: Convert some /* ... */
23616	comments to //.
23617
236182012-12-23  Akim Demaille  <akim@lrde.epita.fr>
23619
23620	c++: use // comments in the output
23621	This is mostly used for the license header, the synclines, and the
23622	generated tables:
23623
23624	-  /* STOS_[STATE-NUM] -- The (internal number of the) accessing
23625	-     symbol of state STATE-NUM.    */
23626	+  // STOS_[STATE-NUM] -- The (internal number of the) accessing
23627	+  // symbol of state STATE-NUM.
23628	   static const unsigned char yystos_[];
23629
23630	* data/c.m4: Comment changes.
23631	(b4_comment_): Expand the text argument.
23632	Before this change, we were actually formatting M4 code as a
23633	C comment, and then expand it.
23634	(b4_comment): Fix the closing of comments: there is no reason to
23635	add the (line) prefix before the closing "*/".
23636	* data/c++.m4 (b4_comment): New.
23637
236382012-12-21  Akim Demaille  <akim@lrde.epita.fr>
23639
23640	maint: disable sc_prohibit_test_backticks
23641	* cfg.mk: here.
23642	And fix typos.
23643	Reported by Stefano Lattarini.
23644
236452012-12-21  Akim Demaille  <akim@lrde.epita.fr>
23646
23647	maint: more syntax-checks
23648	* cfg.mk (sc_prohibit_tab_based_indentation, sc_prohibit_test_backticks)
23649	(sc_preprocessor_indentation, sc_space_before_open_paren): New,
23650	stolen from Coreutils (2e9f5ca4ebbbdb6a9fa2dd3d5add3f7720a172d7).
23651
236522012-12-21  Akim Demaille  <akim@lrde.epita.fr>
23653
23654	debug: no longer generate tabs
23655	* src/closure.c, src/derives.c, src/nullable.c, tests/sets.at: Use
23656	spaces.
23657
236582012-12-21  Akim Demaille  <akim@lrde.epita.fr>
23659
23660	style changes: run cppi
23661	Run it in src/ for a start.
23662
23663	* src/AnnotationList.h, src/InadequacyList.h, src/Sbitset.h,
23664	* src/closure.c, src/complain.h, src/flex-scanner.h, src/getargs.h,
23665	* src/gram.h, src/graphviz.h, src/ielr.h, src/location.h,
23666	* src/muscle-tab.h, src/named-ref.h, src/relation.h, src/scan-code.h,
23667	* src/state.h, src/symtab.h, src/system.h, src/uniqstr.h:
23668	Reindent preprocessor directives.
23669
236702012-12-21  Akim Demaille  <akim@lrde.epita.fr>
23671
23672	style changes: untabify
23673	* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl, m4/flex.m4,
23674	* tests/glr-regression.at, tests/torture.at: here.
23675
236762012-12-21  Akim Demaille  <akim@lrde.epita.fr>
23677
23678	tests: be robust to set -e.
23679	* examples/test (run): here.
23680
236812012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23682
23683	variants: prohibit simple copies
23684	The "variant" structure provides a means to store, in a typeless way,
23685	C++ objects.  Manipulating it without provide the type of the stored
23686	content is doomed to failure.  So provide a means to copy in a type
23687	safe way, and prohibit typeless assignments.
23688
23689	* data/c++.m4 (symbol_type::move): New.
23690	* data/lalr1.cc: Use it.
23691	* data/variant.hh (b4_variant_define): Provide variant::copy.
23692	Let variant::operator= abort.
23693	We cannot undefine it, yet, as it is still uses by the implicit
23694	assigment in symbols, which must also be disabled.
23695
236962012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23697
23698	variant: more assertions
23699	Equip variants with more checking code.  Provide a means to request
23700	includes.
23701
23702	* data/variant.hh (b4_variant_includes): New.
23703	* data/lalr1.cc: Use it.
23704	* data/variant.hh (variant::built): Define at the end, as a private member.
23705	(variant::tname): New.
23706	Somewhat makes "built" useless, but let's keep both for a start, in
23707	case using "typeinfo" is considered unacceptable in some environments.
23708	Fix some formatting issues.
23709
237102012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23711
23712	gnulib: update
23713
237142012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23715
23716	skeletons: fix output directives
23717	* data/lalr1.cc, data/location.cc, data/glr.cc: Use b4_output_begin.
23718	Broken during a merge.
23719
237202012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23721
23722	yacc.c: style changes
23723	* data/yacc.c (b4_lex_param): Provide arguments with a name.
23724
237252012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23726
23727	glr.cc: simplifying the handling of parse/lex params
23728	The fact that glr.cc uses glr.c makes the handling of parse params
23729	more complex, as the parser object of glr.cc must be passed to the
23730	parse function of glr.c.  Yet not all the functions need access to
23731	the parser object.
23732
23733	* data/glr.cc (b4_parse_param_wrap): New.
23734	Use them.
23735
237362012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23737
23738	glr: rename lex params
23739	* data/glr.c (b4_lex_param): Rename as...
23740	(b4_lex_formals): this, for consistency.
23741	Provide arguments a name.
23742	(LEX): Adjust.
23743
237442012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23745
23746	glr.c: move function declaration earlier
23747	* data/glr.c (yypstack, yypdumpstack): Declare earlier, to make
23748	it easier to call them from other functions.
23749
237502012-12-19  Akim Demaille  <akim@lrde.epita.fr>
23751
23752	%define variables: backward compatibility
23753	* src/muscle-tab.c (muscle_percent_variable_update): Accept lex_symbol.
23754	Reported by Roland Levillain.
23755
237562012-12-16  Akim Demaille  <akim@lrde.epita.fr>
23757
23758	diagnostics: improve -fcaret for list of accepted values
23759	Instead of
23760
23761	  input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
23762	   %define api.push_pull "neither"
23763	           ^^^^^^^^^^^^^
23764	  input.y:1.9-21:     accepted value: 'pull'
23765	   %define api.push_pull "neither"
23766	           ^^^^^^^^^^^^^
23767	  input.y:1.9-21:     accepted value: 'push'
23768	   %define api.push_pull "neither"
23769	           ^^^^^^^^^^^^^
23770	  input.y:1.9-21:     accepted value: 'both'
23771	   %define api.push_pull "neither"
23772	           ^^^^^^^^^^^^^
23773
23774	report
23775
23776	  input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
23777	   %define api.push_pull "neither"
23778	           ^^^^^^^^^^^^^
23779	  input.y:1.9-21:     accepted value: 'pull'
23780	  input.y:1.9-21:     accepted value: 'push'
23781	  input.y:1.9-21:     accepted value: 'both'
23782
23783	* src/complain.h (no_caret): New.
23784	* src/complain.c (error_message): Use it.
23785	* src/muscle-tab.c (muscle_percent_define_check_values): Use it.
23786	* src/scan-skel.l (flag): Ditto.
23787	* tests/input.at: Adjust and check.
23788
237892012-12-16  Akim Demaille  <akim@lrde.epita.fr>
23790
23791	skeletons: simplify the handling of default api.location.type
23792	* data/bison.m4 (b4_bison_locations_if): New.
23793	* data/glr.cc, data/lalr1.cc: Use it.
23794
237952012-12-16  Akim Demaille  <akim@lrde.epita.fr>
23796
23797	tests: address syntax-check failures
23798	* cfg.mk: Ignore failures in timevar (uses GCC style configuration,
23799	not gnulib's).
23800	* doc/local.mk: Space changes.
23801	* lib/main.c, tests/calc.at: Remove useless HAVE_ tests.
23802
238032012-12-15  Akim Demaille  <akim@lrde.epita.fr>
23804
23805	remove duplicate definitions
23806	* src/system.h: here, inherited from a merge.
23807
238082012-12-15  Akim Demaille  <akim@lrde.epita.fr>
23809
23810	tests: style changes
23811	* tests/glr-regression.at: Issue yyerror before yylex.
23812
238132012-12-15  Akim Demaille  <akim@lrde.epita.fr>
23814
23815	doc: fix dependencies
23816	* doc/local.mk: here.
23817
238182012-12-14  Akim Demaille  <akim@lrde.epita.fr>
23819
23820	doc: style fixes
23821	* doc/bison.texi: Add a couple of missing @var and @code.
23822
238232012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
23824
23825	doc: fix build dependencies
23826	Suggested by Nick Bowler
23827	<http://lists.gnu.org/archive/html/bug-automake/2012-12/msg00001.html>
23828
23829	* doc/local.mk: Avoid overwriting Automake's rules.
23830
238312012-12-14  Akim Demaille  <akim@lrde.epita.fr>
23832
23833	Merge branch 'origin/maint'
23834	* origin/maint:
23835	  maint: credit Wojciech Polak
23836	  maint: post-release administrivia
23837	  version 2.7
23838	  yacc.c: scope reduction
23839	  tests: C90 compliance
23840	  fix C90 compliance
23841	  glr.c: scope reduction
23842	  gnulib: update
23843
238442012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
23845
23846	symtab: add missing initializations
23847	* src/symtab.c (semantic_type_new): Here.
23848
238492012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
23850
23851	symtab: fix some leaks
23852	* src/symlist.c (symbol_list_free): Deep free it.
23853	* src/symtab.c (symbols_free, semantic_types_sorted): Free it too.
23854	(symbols_do, sorted): Call by address.
23855
238562012-12-14  Theophile Ranquet  <ranquet@lrde.epita.fr>
23857
23858	tests: remove use of PARSE_PARAM
23859	* tests/header.at: Here.
23860
238612012-12-13  Akim Demaille  <akim@lrde.epita.fr>
23862
23863	maint: credit Wojciech Polak
23864	* NEWS, THANKS: He is the author of XML support (including XSLTs).
23865
238662012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23867
23868	maint: post-release administrivia
23869	* NEWS: Add header line for next release.
23870	* .prev-version: Record previous version.
23871	* cfg.mk (old_NEWS_hash): Auto-update.
23872
238732012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23874
23875	version 2.7
23876	* NEWS: Record release date.
23877
238782012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23879
23880	yacc.c: scope reduction
23881	* data/yacc.c (yysyntax_error): here.
23882
238832012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23884
23885	tests: C90 compliance
23886	* tests/synclines.at: here.
23887
238882012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23889
23890	fix C90 compliance
23891	* data/glr.c, src/graphviz.h, src/ielr.c, src/scan-gram.l,
23892	* src/system.h, tests/actions.at, tests/glr-regression.at: Do not
23893	use // comments.
23894	Do not introduce variables after statements.
23895	Provide "main" with a return value.
23896
238972012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23898
23899	glr.c: scope reduction
23900	* data/glr.c (yyreportSyntaxError): Reduce the scope of yysize1 (now
23901	yysz).
23902
239032012-12-12  Akim Demaille  <akim@lrde.epita.fr>
23904
23905	gnulib: update
23906
239072012-12-10  Theophile Ranquet  <ranquet@lrde.epita.fr>
23908
23909	Merge remote-tracking branch 'origin/maint'
23910	* origin/maint:
23911	  news: prepare for forthcoming release
23912	  doc: explain how mid-rule actions are translated
23913	  error: use better locations for unused midrule values
23914	  doc: various minor improvements and fixes
23915	  tests: ignore more useless compiler warnings
23916	  tests: be robust to C being compiled with a C++11 compiler
23917	  build: beware of Clang++ not supporting POSIXLY_CORRECT
23918	  maint: post-release administrivia
23919	  version 2.6.90
23920	  build: fix syntax-check error.
23921	  cpp: simplify the Flex version checking macro
23922	  news: improve the carets example and fix a typo
23923	  cpp: improve the Flex version checking macro
23924	  carets: improve the code
23925	  maint: update news
23926	  build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
23927	  build: drop -Wcast-qual
23928	  gnulib: update
23929
239302012-12-09  Akim Demaille  <akim@lrde.epita.fr>
23931
23932	news: prepare for forthcoming release
23933	* NEWS: Fill paragraph.
23934	Reorder.
23935	Update examples.
23936	Remove line for 2.6.90.
23937
239382012-12-09  Akim Demaille  <akim@lrde.epita.fr>
23939
23940	doc: explain how mid-rule actions are translated
23941	* doc/bison.texi (Actions in Mid-Rule): Mention and use named references.
23942	Split into three subsections, among which...
23943	(Mid-Rule Action Translation): this new section.
23944
239452012-12-09  Akim Demaille  <akim@lrde.epita.fr>
23946
23947	error: use better locations for unused midrule values
23948	On
23949
23950	  %%
23951	  exp: {;} {$$;} { $$ = $1; }
23952
23953	instead of reporting (with -fcaret -Wmidrule-value)
23954
23955	  midrule.y:2.6-8: warning: unset value: $$ [-Wmidrule-values]
23956	   exp: {;} {$$;} { $$ = $1; }
23957	        ^^^
23958	  midrule.y:2.6-27: warning: unused value: $2 [-Wmidrule-values]
23959	   exp: {;} {$$;} { $$ = $1; }
23960	        ^^^^^^^^^^^^^^^^^^^^^^
23961
23962	report
23963
23964	  midrule.y:2.6-8: warning: unset value: $$
23965	   exp: {;} {$$;} { $$ = $1; }
23966	        ^^^
23967	  midrule.y:2.10-14: warning: unused value: $2
23968	   exp: {;} {$$;} { $$ = $1; }
23969	            ^^^^^
23970
23971	* src/reader.c (grammar_rule_check): When warning about the value of a
23972	midrule action, use the location of the midrule action instead of the
23973	location of the rule.
23974	the location of the part of the rule.
23975	* tests/actions.at (Default %printer and %destructor for mid-rule values):
23976	Adjust expectations
23977	* tests/input.at (Unused values with default %destructor): Ditto.
23978	(AT_CHECK_UNUSED_VALUES): Ditto.
23979	And use -fcaret.
23980
239812012-12-09  Akim Demaille  <akim@lrde.epita.fr>
23982
23983	doc: various minor improvements and fixes
23984	* doc/figs/example.dot, doc/figs/example.y: New.
23985	* doc/bison.texi: Prefer "token" to TOKEN.
23986	Use @group where appropriate.
23987	Adjust with style changes in the output (State 0, not state 0).
23988	Fix some @ref that were missing the third argument.
23989	Fix some incorrect line numbers.
23990	Use "nonterminal", not "non-terminal".
23991	Fix overfull and underfull TeX hboxes.
23992	Put the comments in the index.
23993	Remove duplicate index entries.
23994	Fuse glossary entries where appropriate.
23995	(Understanding): Improve the continuity between sections.
23996	Use example.dot to show the whole graph.
23997	* doc/Makefile.am: Adjust.
23998
239992012-12-09  Akim Demaille  <akim@lrde.epita.fr>
24000
24001	tests: ignore more useless compiler warnings
24002	* tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore complains about
24003	using c++ to compile C.
24004
240052012-12-09  Akim Demaille  <akim@lrde.epita.fr>
24006
24007	tests: be robust to C being compiled with a C++11 compiler
24008	* tests/glr-regression.at: Use YY_NULL instead of NULL.
24009	Comment changes.
24010
240112012-12-09  Akim Demaille  <akim@lrde.epita.fr>
24012
24013	build: beware of Clang++ not supporting POSIXLY_CORRECT
24014	* m4/c-working.m4 (BISON_LANG_COMPILER_POSIXLY_CORRECT): New.
24015	(BISON_C_COMPILER_POSIXLY_CORRECT): Use it.
24016	For consistency with C++, also define BISON_C_WORKS.
24017	* m4/cxx.m4 (BISON_CXX_COMPILER_POSIXLY_CORRECT): New.
24018	* configure.ac: Use it.
24019	* tests/atlocal.in: Get its result.
24020	Propagate properly CXX values when used to compile C.
24021	When POSIXLY_CORRECT, adjust BISON_C_WORKS and BISON_CXX_WORKS.
24022	* tests/local.at (AT_COMPILE): Use BISON_C_WORKS.
24023
240242012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24025
24026	maint: post-release administrivia
24027	* NEWS: Add header line for next release.
24028	* .prev-version: Record previous version.
24029	* cfg.mk (old_NEWS_hash): Auto-update.
24030
240312012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24032
24033	version 2.6.90
24034	* NEWS: Record release date.
24035
240362012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24037
24038	build: fix syntax-check error.
24039	* cfg.mk: Exclude names-refs, it includes a "double" if (end of first
24040	line, first of second line below).
24041
24042	test.y:43.12-44.59:  symbol not found in production: if
24043	 if-stmt-a: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
24044	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24045
240462012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
24047
24048	cpp: simplify the Flex version checking macro
24049	* src/flex-scanner,h (FLEX_VERSION): Consider YY_FLEX_SUBMINOR_VERSION
24050	defined.
24051
240522012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
24053
24054	news: improve the carets example and fix a typo
24055	* NEWS: Here.
24056
240572012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
24058
24059	cpp: improve the Flex version checking macro
24060	* src/flex-scanner.h (FLEX_VERSION): Here.
24061
240622012-12-07  Theophile Ranquet  <ranquet@lrde.epita.fr>
24063
24064	carets: improve the code
24065	* src/location.c: Remove duplicate documentations.
24066	(caret_info): Stylistic change.
24067	(location_caret): Many reworks.
24068
240692012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24070
24071	maint: update news
24072	* NEWS: There is no 2.6.6, remove its stub.
24073
240742012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24075
24076	build: keep -Wmissing-declarations and -Wmissing-prototypes for modern GCCs
24077	Fixes a -Werror failure of xalloc.h used in src.
24078	From Eric Blake.
24079	http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00006.html
24080
24081	* configure.ac: Check whether GCC pragma diagnostic push/pop works.
24082	Enable these warnings for bison if it does.
24083	Enable these warnings for the test suite anyway.
24084
240852012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24086
24087	build: drop -Wcast-qual
24088	Suggested by Jim Meyering.
24089	http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00017.html
24090	* configure.ac (warn_common): Remove -Wcast-qual.
24091
240922012-12-07  Akim Demaille  <akim@lrde.epita.fr>
24093
24094	gnulib: update
24095
240962012-12-06  Theophile Ranquet  <ranquet@lrde.epita.fr>
24097
24098	Merge remote-tracking branch 'origin/maint'
24099	* origin/maint:
24100	  misc: pacify the Tiny C Compiler
24101	  cpp: make the check of Flex version portable
24102	  misc: require getline
24103	  c++: support wide strings for file names
24104	  doc: document carets
24105	  tests: enhance existing tests with carets
24106	  errors: show carets
24107	  getargs: add support for --flags/-f
24108
241092012-12-06  Theophile Ranquet  <ranquet@lrde.epita.fr>
24110
24111	misc: pacify the Tiny C Compiler
24112	* src/graphviz.c (conclude_red): Remove a useless return.
24113
241142012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
24115
24116	cpp: make the check of Flex version portable
24117	This was problematic with tcc 0.9.25
24118
24119	* src/flex-scanner.h (FLEX_VERSION_GT): Rewrite and rename as...
24120	(FLEX_VERSION): This.
24121
241222012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
24123
24124	misc: require getline
24125	* bootstrap.conf: Here, used by src/location.c.
24126	* src/getargs.c (long_options): Rename --flags to --feature.
24127
241282012-12-05  Akim Demaille  <akim@lrde.epita.fr>
24129
24130	c++: support wide strings for file names
24131	Reported by Mark Boyall.
24132	http://lists.gnu.org/archive/html/help-bison/2011-08/msg00002.html
24133
24134	* data/location.cc (operator<<): Be templated on the type of
24135	output stream.
24136	* tests/headers.at (Several parsers): Adjust.
24137
241382012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
24139
24140	doc: document carets
24141	* NEWS: Announce it.
24142	* doc/bison.texi (Bison Options):  Here.
24143
241442012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
24145
24146	tests: enhance existing tests with carets
24147	* tests/actions.at: Unset value.
24148	* tests/conflicts.at: Rule useless due to conflicts.
24149	* tests/input.at: Missing terminator, unexpected end of file, command line
24150	redefinition of variable.
24151	* tests/named-refs.at: Many errors.
24152	* tests/reduce.at: Useless nonterminals and rules.
24153	* tests/regression.at: Large token.
24154
241552012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
24156
24157	errors: show carets
24158	* src/locations.c (caret_info): New, persistant information useful
24159	for...
24160	(location_caret): New, print a caret.
24161	(cleanup_caret): Release caret_info cleanly, call it...
24162	* src/main.c (main): Here.
24163	* src/complain.c (error_message): Call location_caret here.
24164
241652012-12-05  Theophile Ranquet  <ranquet@lrde.epita.fr>
24166
24167	getargs: add support for --feature/-f
24168	Introduce -fdiagnostics-show-caret
24169
24170	* src/getargs.c (feature_flag): New global.
24171	* src/getargs.h (feature): New enum.
24172
241732012-12-05  Akim Demaille  <akim@lrde.epita.fr>
24174
24175	Merge remote-tracking branch 'origin/maint'
24176	* origin/maint:
24177	  getargs: don't label --language/-l as experimental
24178	  getargs: fix the locations of command-line input
24179	  errors: indent missing action code semicolon warning
24180
241812012-12-04  Theophile Ranquet  <ranquet@lrde.epita.fr>
24182
24183	getargs: don't label --language/-l as experimental
24184	* NEWS: Announce it.
24185	* doc/bison.texi, src/getargs.c (usage): Here.
24186
241872012-12-03  Akim Demaille  <akim@lrde.epita.fr>
24188
24189	tests: minor improvements
24190	* tests/calc.at (AT_CHECK_SPACES): To speed up, accept several files
24191	at once, and factor some calls.
24192
241932012-12-03  Theophile Ranquet  <ranquet@lrde.epita.fr>
24194
24195	getargs: fix the locations of command-line input
24196	* src/getargs.c (command_line_location): Here.
24197	* tests/input.at: Adjust.
24198
241992012-12-03  Theophile Ranquet  <ranquet@lrde.epita.fr>
24200
24201	errors: indent missing action code semicolon warning
24202	Also, remove a duplicate #define.
24203
24204	* src/scan-code.l (SC_RULE_ACTION): Here.
24205	* tests/actions.at: Adjust.
24206
242072012-12-03  Akim Demaille  <akim@lrde.epita.fr>
24208
24209	Merge remote-tracking branch 'origin/maint'
24210	* origin/maint:
24211	  parser: accept #line NUM
24212	  m4: use a safer pattern to enable/disable output
24213	  tests: beware of gnulib's need for config.h
24214	  gnulib: update
24215	  yacc.c, glr.c: check and fix the display of locations
24216	  formatting changes
24217	  glr.c: remove stray macro
24218
242192012-12-03  Akim Demaille  <akim@lrde.epita.fr>
24220
24221	parser: accept #line NUM
24222	* src/scan-gram.l (scanner): Accept '#line NUM'.
24223	(handle_syncline): Adjust to the possible missing file name.
24224
242252012-12-03  Akim Demaille  <akim@lrde.epita.fr>
24226
24227	m4: use a safer pattern to enable/disable output
24228	Work on some other areas of Bison revealed that some macros expanded
24229	to be expanded only once were actually expanded several times.  This
24230	was due to the fact that changecom was not properly restored each
24231	time, and macro names appearing in comments were then expanded.
24232
24233	Introduce begin/end macros which are easier to match that
24234	changecom()/changecom(#).
24235
24236	* data/bison.m4 (b4_output_begin, b4_output_end): New.
24237	* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
24238	* data/location.cc, data/stack.hh, data/yacc.c:
24239	Use them.
24240
242412012-12-03  Akim Demaille  <akim@lrde.epita.fr>
24242
24243	tests: beware of gnulib's need for config.h
24244	* tests/skeletons.at, tests/torture.at: Be sure to include config.h
24245	where appropriate.
24246
242472012-11-30  Akim Demaille  <akim@lrde.epita.fr>
24248
24249	gnulib: update
24250	* lib/yyerror.c: Include config.h since the following stdio.h might be
24251	from gnulib.
24252
242532012-11-30  Akim Demaille  <akim@lrde.epita.fr>
24254
24255	yacc.c, glr.c: check and fix the display of locations
24256	In some case, negative column number could be displayed.
24257	Make YY_LOCATION_PRINT similar to bison's own implementation of
24258	locations.  Since the macro is getting fat, make it a static
24259	function.
24260	Reported by Jonathan Fabrizio.
24261
24262	* data/c.m4 (yy_location_print_define): Improve the implementation,
24263	and generate the yy_location_print_ function.
24264	Adjust YY_LOCATION_PRINT.
24265	* tests/actions.at (Location Print): New tests.
24266
242672012-11-30  Akim Demaille  <akim@lrde.epita.fr>
24268
24269	formatting changes
24270	* data/c.m4: Fix comments, put macros in a more natural order.
24271	Space changes (from M-x whitespace-cleanup).
24272	* src/location.c: Fix spaces.
24273	* tests/actions.at: Space changes.
24274
242752012-11-30  Akim Demaille  <akim@lrde.epita.fr>
24276
24277	glr.c: remove stray macro
24278	* data/glr.c (YYOPTIONAL_LOC): Remove, unused since commit
24279	769a8ef9bcb5e14d0be9d0869f5dca20ab093930.
24280
242812012-11-29  Akim Demaille  <akim@lrde.epita.fr>
24282
24283	Merge remote-tracking branch 'origin/maint'
24284	* origin/maint:
24285	  doc: minor fixes
24286	  doc: improve the index
24287	  doc: introduce api.pure full, rearrange some examples
24288	  yacc.c: support "%define api.pure full"
24289	  local.at: improvements
24290
242912012-11-29  Akim Demaille  <akim@lrde.epita.fr>
24292
24293	doc: minor fixes
24294	* doc/bison.texi: Use stderr for error messages.
24295	Meta-variables are usually spelled in lower case.
24296	Use @code for function names.
24297
242982012-11-29  Akim Demaille  <akim@lrde.epita.fr>
24299
24300	doc: improve the index
24301	* doc/bison.texi: Fix uses of "deffn" so that the arguments of the
24302	directives do not show in the index.
24303	Remove a duplicate entry for api.pure.
24304
243052012-11-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
24306
24307	doc: introduce api.pure full, rearrange some examples
24308	* NEWS: Add entry.
24309	* doc/bison.texi (%define Summary): Show the old Yacc behaviour.
24310	(Parser Function): Move parse-param examples here.
24311	(Pure Calling): Remove parse-param examples.
24312	(Error Reporting): Don't show the old behavior, stick to 'full'.
24313
243142012-11-29  Theophile Ranquet  <ranquet@lrde.epita.fr>
24315
24316	yacc.c: support "%define api.pure full"
24317	This makes the interface for yyerror() pure without the need for a spurious
24318	parse_param.
24319
24320	* data/yacc.c (b4_pure_if, b4_pure_flag): New definition, accept three states.
24321	(b4_yacc_pure_if): Rename as...
24322	(b4_yyerror_arg_loc_if): This, and use b4_pure_flag.
24323	* tests/actions.at (%define api.pure): Modernize.
24324	* test/calc.at (Simple LALR Calculator): Modernize.
24325	* tests/local.at (AT_YYERROR_ARG_LOC_IF): Adjust.
24326
243272012-11-28  Akim Demaille  <akim@lrde.epita.fr>
24328
24329	tests: check variants without locations
24330	* tests/c++.at (Variants): Support non-use of locations, and
24331	check its support.
24332
243332012-11-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24334
24335	local.at: improvements
24336	* tests/local.at (AT_YYERROR_FORMALS): Make llocp const.
24337	(AT_PURE_AND_LOC_IF, AT_GLR_OR_PARAM_IF): Remove, expand...
24338	(AT_YYERROR_ARG_LOC_IF): Here, and use m4_join for readability.
24339
243402012-11-26  Akim Demaille  <akim@lrde.epita.fr>
24341
24342	tests: use -fno-strict-aliasing with variants
24343	Reported by Théophile Ranquet.
24344
24345	* configure.ac (NO_STRICT_ALIAS_CXXFLAGS): New.
24346	* tests/c++.at, tests/atlocal.in, examples/local.mk: Use it.
24347
243482012-11-26  Akim Demaille  <akim@lrde.epita.fr>
24349
24350	tests: remove leftover
24351	* tests/atlocal.in: Remove duplicate handling of --compile-c-with-cxx.
24352
243532012-11-26  Akim Demaille  <akim@lrde.epita.fr>
24354
24355	doc: use %precedence instead of nonassoc when associativity is not wanted
24356	* doc/bison.texi: here.
24357	Formatting changes in some grammars.
24358	Fix a %prec into %precedence.
24359
243602012-11-26  Akim Demaille  <akim@lrde.epita.fr>
24361
24362	Merge remote-tracking branch 'origin/maint'
24363	* origin/maint:
24364	  yacc.c: always initialize yylloc
24365	  scanner: issue a single error for groups of invalid characters
24366	  tests: formatting changes
24367	  doc: one of the fixes for an ambiguous grammar was ambiguous too
24368	  doc: fix the dangling else with precedence directives
24369	  doc: prefer "token" to TOKEN
24370	  doc: formatting changes
24371	  scanner: use explicit "ignore" statements
24372
243732012-11-26  Akim Demaille  <akim@lrde.epita.fr>
24374
24375	Merge remote-tracking branch 'origin/branch-2.6' into maint
24376	* origin/branch-2.6:
24377	  yacc.c: always initialize yylloc
24378	  doc: one of the fixes for an ambiguous grammar was ambiguous too
24379	  doc: fix the dangling else with precedence directives
24380	  doc: prefer "token" to TOKEN
24381	  doc: formatting changes
24382
243832012-11-23  Theophile Ranquet  <ranquet@lrde.epita.fr>
24384
24385	yacc.c: always initialize yylloc
24386	The initial location might be used if the parser starts by an empty
24387	reduction, so really ensure proper initialization of the initial
24388	location.  The previous approach fails for PostgreSQL, which uses
24389	Reported by Peter Eisentraut.
24390	http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00023.html
24391	With help from Théophile Ranquet.
24392
24393	* data/yacc.c (b4_declare_scanner_communication_variables): Be sure
24394	to initialize yylloc, even when its structure is unknown.
24395	(yyparse): Simplify the call to b4_dollar_pushdef.
24396	* tests/actions.at (Initial location): Check of similar pattern
24397	as in the case of PostgreSQL.
24398
243992012-11-23  Akim Demaille  <akim@lrde.epita.fr>
24400
24401	scanner: issue a single error for groups of invalid characters
24402	* src/scan-gram.l: Scan groups of invalid characters together.
24403	* tests/input.at, tests/named-refs.at: Adjust.
24404
244052012-11-23  Akim Demaille  <akim@lrde.epita.fr>
24406
24407	tests: formatting changes
24408	* tests/named-refs.at: Here.
24409
244102012-11-23  Akim Demaille  <akim@lrde.epita.fr>
24411
24412	doc: one of the fixes for an ambiguous grammar was ambiguous too
24413	Reported by Аскар Сафин.
24414	http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00024.html
24415
24416	* doc/bison.texi (Reduce/Reduce): Fix the resulting ambiguity using
24417	precedence/associativity directives.
24418
244192012-11-22  Akim Demaille  <akim@lrde.epita.fr>
24420
24421	doc: fix the dangling else with precedence directives
24422	* doc/bison.texi (Non Operators): New node.
24423	(Shift/Reduce): Point to it.
24424	Don't promote "%expect n" too much.
24425
244262012-11-22  Akim Demaille  <akim@lrde.epita.fr>
24427
24428	doc: prefer "token" to TOKEN
24429	This is more readable in short examples.
24430
24431	* doc/bison.texi (Shift/Reduce): here.
24432	Make "win" and "lose" action more alike.
24433
244342012-11-22  Akim Demaille  <akim@lrde.epita.fr>
24435
24436	doc: formatting changes
24437	* doc/bison.texi: Use @group.
24438
244392012-11-14  Akim Demaille  <akim@lrde.epita.fr>
24440
24441	scanner: use explicit "ignore" statements
24442	* src/scan-gram.l: here.
24443
244442012-11-13  Akim Demaille  <akim@lrde.epita.fr>
24445
24446	Merge remote-tracking branch 'origin/maint'
24447	* origin/maint:
24448	  tests: close files in glr-regression
24449	  xml: match DOT output and xml2dot.xsl processing
24450	  xml: factor xslt space template
24451	  graph: fix a memory leak
24452	  xml: documentation
24453	  output: capitalize State
24454
244552012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
24456
24457	tests: close files in glr-regression
24458	* tests/glr-regression.at: Here.
24459
244602012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
24461
24462	xml: match DOT output and xml2dot.xsl processing
24463	Make the DOT produced by XSLT processing equivalent to the one made with the
24464	--graph option.
24465
24466	* data/xslt/xml2dot.xsl: Stylistic changes, and add support for reductions.
24467	* doc/bison.texi (Xml): Update.
24468	* src/graphviz.c (conclude_red): Minor stylistic changes to DOT internals.
24469	(output_red): Swap enabled and disabled reductions output, for coherence
24470	with XSLT output.
24471	* src/print_graph.c (print_core): Minor stylistic change to States' output.
24472	(print_actions): Swap order of output for reductions and transitions.
24473	* tests/local.at (AT_BISON_CHECK_XML): Ignore differences in order.
24474	* tests/output.at: Adjust to changes in DOT internals.
24475
244762012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
24477
24478	xml: factor xslt space template
24479	* data/xslt/bison.xsl (space): New, import from...
24480	* data/xslt/xml2text.xsl: Here.
24481
244822012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
24483
24484	graph: fix a memory leak
24485	* src/graphviz.c (output_red): Here.
24486
244872012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
24488
24489	xml: documentation
24490	The XML output combined with the XSL Transformations provided in data/ are
24491	incredibly useful, they should be documented.
24492
24493	* doc/bison.texi (Xml): New node.
24494
244952012-11-12  Theophile Ranquet  <ranquet@lrde.epita.fr>
24496
24497	output: capitalize State
24498	* src/print.c (print_state): Here.
24499	* tests/conflicts.at, tests/existing.at, tests/local.at, tests/reduce.at,
24500	tests/regression.at, tests/sets.at: Adjust.
24501
245022012-11-12  Akim Demaille  <akim@lrde.epita.fr>
24503
24504	tests: fix syntax-check errors
24505	Reported by Théophile Ranquet.
24506
24507	* tests/c++.at: Use AT_PARSER_CHECK.
24508	Avoid using "strcmp", which triggers an error from syntax-check.
24509
245102012-11-12  Akim Demaille  <akim@lrde.epita.fr>
24511
24512	Merge remote-tracking branch 'origin/maint'
24513	* origin/maint:
24514	  maint: address syntax-check errors.
24515	  tests: use valgrind where appropriate
24516	  tests: use valgrind where appropriate
24517	  tests: don't expect $EGREP to support -w
24518	  tests: more possible error compiler messages for "#error"
24519
245202012-11-12  Akim Demaille  <akim@lrde.epita.fr>
24521
24522	maint: address syntax-check errors.
24523	* cfg.mk: Ignore the "error" call in tests/c++.at, it is not to be
24524	translated.
24525	* doc/bison.texi: Fix incorrect @pxref use.
24526	* po/POTFILES.in: Add missing file.
24527	* src/print_graph.c: Remove useless include.
24528
245292012-11-12  Akim Demaille  <akim@lrde.epita.fr>
24530
24531	tests: use valgrind where appropriate
24532	Reported by Théophile Ranquet.
24533
24534	* cfg.mk (sc_at_parser_check): New.
24535	* tests/c++.at: Fix use of AT_CHECK vs. AT_PARSER_CHECK.
24536
245372012-11-12  Akim Demaille  <akim@lrde.epita.fr>
24538
24539	Merge remote-tracking branch 'origin/branch-2.6' into maint
24540	* origin/branch-2.6:
24541	  tests: use valgrind where appropriate
24542	  tests: don't expect $EGREP to support -w
24543
245442012-11-10  Akim Demaille  <akim@lrde.epita.fr>
24545
24546	tests: use valgrind where appropriate
24547	Reported by Théophile Ranquet.
24548
24549	* tests/glr-regression.at: Rewrite some test cases so that AT_PARSER_CHECK,
24550	which runs valgrind, is exposed with the parser, not with "echo".
24551	* tests/local.at, tests/regression.at, tests/headers.at:
24552	Use AT_PARSER_CHECK for generated parsers.
24553
245542012-11-08  Akim Demaille  <akim@lrde.epita.fr>
24555
24556	tests: don't expect $EGREP to support -w
24557	Does not work on Solaris 10.  Reported by Dennis Clarke.
24558	http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00009.html
24559	* tests/headers.at (Several parsers): Use Perl instead.
24560	While at it, run it only once, on all the generated headers.
24561	Adjust to YY_NULL be defined in position.hh.
24562
245632012-11-08  Akim Demaille  <akim@lrde.epita.fr>
24564
24565	tests: more possible error compiler messages for "#error"
24566	* tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust for Clang.
24567	Verified with GCC 4.0, 4.2 to 4.8, and Clang 2.9, 3.2: none skip.
24568
245692012-11-08  Akim Demaille  <akim@lrde.epita.fr>
24570
24571	regen
24572
245732012-11-08  Akim Demaille  <akim@lrde.epita.fr>
24574
24575	Merge branch 'maint'
24576	* origin/maint:
24577	  regen
24578	  maint: post-release administrivia
24579	  version 2.6.5
24580	  regen
24581	  tests: syntax-check
24582	  tests: beware of compilers that do not support POSIXLY_CORRECT
24583	  gnulib: update
24584
245852012-11-08  Akim Demaille  <akim@lrde.epita.fr>
24586
24587	regen
24588
245892012-11-08  Akim Demaille  <akim@lrde.epita.fr>
24590
24591	Merge branch 'branch-2.6' into maint
24592	* origin/branch-2.6:
24593	  maint: post-release administrivia
24594	  version 2.6.5
24595	  regen
24596	  tests: syntax-check
24597	  tests: beware of compilers that do not support POSIXLY_CORRECT
24598	  gnulib: update
24599
246002012-11-07  Akim Demaille  <akim@lrde.epita.fr>
24601
24602	maint: post-release administrivia
24603	* NEWS: Add header line for next release.
24604	* .prev-version: Record previous version.
24605	* cfg.mk (old_NEWS_hash): Auto-update.
24606
246072012-11-07  Akim Demaille  <akim@lrde.epita.fr>
24608
24609	version 2.6.5
24610	* NEWS: Record release date.
24611
246122012-11-07  Akim Demaille  <akim@lrde.epita.fr>
24613
24614	regen
24615
246162012-11-07  Akim Demaille  <akim@lrde.epita.fr>
24617
24618	tests: syntax-check
24619	* tests/actions.at: Fix typo.
24620
246212012-11-07  Akim Demaille  <akim@lrde.epita.fr>
24622
24623	tests: beware of compilers that do not support POSIXLY_CORRECT
24624	Running "maintainer-release-check" on OS X with Clang 2.9 fails,
24625	because "clang-mp-2.9 -o test -g test.c" launches "/usr/bin/dsymutil
24626	test -o test.dSYM" which fails with "error: unable to open executable
24627	'-o'".
24628
24629	* m4/c-working.m4 (BISON_CHECK_WITH_POSIXLY_CORRECT)
24630	(BISON_C_COMPILER_POSIXLY_CORRECT): New.
24631	* configure.ac: Use the latter.
24632	* tests/atlocal.in (POSIXLY_CORRECT_IS_EXPORTED): New.
24633	* tests/local.at (AT_BISON_CHECK_WARNINGS_): Use it instead of computing its
24634	value each time.
24635	(AT_QUELL_VALGRIND): Skip tests that cannot work because of compilers
24636	that do not support POSIXLY_CORRECT.
24637
246382012-11-07  Akim Demaille  <akim@lrde.epita.fr>
24639
24640	gnulib: update
24641
246422012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24643
24644	Merge remote-tracking branch 'origin/maint'
24645	* origin/maint: (24 commits)
24646	  tests: calc: modernize the use of locations
24647	  tests: remove useless location initializations
24648	  lalr1.cc: always initialize yylval.
24649	  tests: check that C and C++ objects can be linked together.
24650	  yacc.c: also disable -Wuninitialized.
24651	  glr.cc, yacc.c: initialize yylloc properly
24652	  yacc.c, glr.c: a better YY_LOCATION_PRINT
24653	  yacc.c: simplify initialization
24654	  doc: formatting changes
24655	  c++: fix position operator signatures
24656	  tests: remove useless location initialization.
24657	  tests: fix locations in C
24658	  tests: handle %parse-param in the generated yyerror
24659	  tests: simplifications
24660	  grammars: fix display of nul character in error message
24661	  tests: sort
24662	  tests: cosmetic changes
24663	  comment changes
24664	  autoconf: update
24665	  gnulib: update
24666	  ...
24667
246682012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24669
24670	Merge branch 'branch-2.6' into maint
24671	* origin/branch-2.6: (24 commits)
24672	  tests: calc: modernize the use of locations
24673	  tests: remove useless location initializations
24674	  lalr1.cc: always initialize yylval.
24675	  tests: check that C and C++ objects can be linked together.
24676	  yacc.c: also disable -Wuninitialized.
24677	  glr.cc, yacc.c: initialize yylloc properly
24678	  yacc.c, glr.c: a better YY_LOCATION_PRINT
24679	  yacc.c: simplify initialization
24680	  doc: formatting changes
24681	  c++: fix position operator signatures
24682	  tests: remove useless location initialization.
24683	  tests: fix locations in C
24684	  tests: handle %parse-param in the generated yyerror
24685	  tests: simplifications
24686	  grammars: fix display of nul character in error message
24687	  tests: sort
24688	  tests: cosmetic changes
24689	  comment changes
24690	  autoconf: update
24691	  gnulib: update
24692	  ...
24693
246942012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24695
24696	tests: calc: modernize the use of locations
24697	* tests/calc.at: Don't initialize the location, let the parser
24698	do it.
24699	Use a $printer.
24700	Change some testing input to be easier to distinguish (instead of always
24701	"0 0" for instance).
24702
247032012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24704
24705	tests: remove useless location initializations
24706	* tests/actions.at, tests/calc.at: here.
24707
247082012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24709
24710	lalr1.cc: always initialize yylval.
24711	* data/lalr1.cc: here.
24712
247132012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24714
24715	tests: check that C and C++ objects can be linked together.
24716	* tests/local.at (AT_SKIP_IF_CANNOT_LINK_C_AND_CXX): New.
24717	* tests/headers.at (Several parsers): Use it.
24718
247192012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24720
24721	yacc.c: also disable -Wuninitialized.
24722	* data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN): For some versions
24723	of GCC, -Wmaybe-uninitialized alone does not suffice.
24724
247252012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24726
24727	glr.cc, yacc.c: initialize yylloc properly
24728	There are several issues to address here.  One is that yylloc should
24729	be initialized when possible.  Another is that the push parser needs
24730	to update yypushed_loc when the user modified it.  And if the parser
24731	starts by a reduction of an empty, it uses the first location on the
24732	stack, which, therefore, must also be initialized to this initial
24733	location.
24734
24735	This is getting complex, especially since because initializing a
24736	global (impure interface) is different from initializing a local
24737	variable.  To simplify, the local yylloc is not initialized during its
24738	definition.
24739
24740	* data/c.m4 (b4_yyloc_default_define): Replace by...
24741	(b4_yyloc_default): this.
24742	Adjust dependencies.
24743	* data/glr.cc: Initialize yylloc.
24744	* data/yacc.c (b4_declare_scanner_communication_variables):
24745	Initialize yylloc during its definition.
24746	Don't define yyloc_default.
24747	(yypush_parse): The location formal is not const, as we might
24748	initialize it.
24749	(yyparse): Define yyloc_default.
24750	Use it before running the user initial action.
24751	Possibly update the first location on the stack, and the pushed
24752	location after the user initial action.
24753	* tests/actions.at (Initial locations): Check that the initial
24754	location is correct.
24755
247562012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24757
24758	yacc.c, glr.c: a better YY_LOCATION_PRINT
24759	* data/c.m4 (b4_yy_location_print_define): New.
24760	Now issues "short" locations, e.g., "1.1" instead of "1.1-1.1".
24761	Was initially a function, but then we face "static but unused"
24762	warnings.
24763	Simpler as a macro.
24764	* tests/local.at, data/glr.c, data/yacc.c: Use it instead of duplicating.
24765	* tests/actions.at: Adjust expectations.
24766
247672012-11-06  Akim Demaille  <akim@lrde.epita.fr>
24768
24769	yacc.c: simplify initialization
24770	* data/yacc.c: Fuse the initializations of yyssp, yyss and the like.
24771	Remove an obsolete comment: we do initialize these initial stack
24772	members (in some cases).
24773
247742012-11-05  Akim Demaille  <akim@lrde.epita.fr>
24775
24776	doc: formatting changes
24777	* doc/bison.texi: In a pointer type.
24778
247792012-11-05  Akim Demaille  <akim@lrde.epita.fr>
24780
24781	c++: fix position operator signatures
24782	* data/location.cc (operator+=, operator-=): Remove const from return
24783	type.
24784
247852012-11-05  Akim Demaille  <akim@lrde.epita.fr>
24786
24787	tests: remove useless location initialization.
24788	* tests/glr-regression.at: here.
24789	glr.c does initialize yylloc.
24790
247912012-11-05  Akim Demaille  <akim@lrde.epita.fr>
24792
24793	tests: fix locations in C
24794	* tests/local.at (AT_YYERROR_DEFINE): Don't display the end of the location
24795	if it is not after its beginning.
24796	* tests/actions.at, tests/cxx-type.at: Adjust the expected output.
24797
247982012-11-05  Akim Demaille  <akim@lrde.epita.fr>
24799
24800	tests: handle %parse-param in the generated yyerror
24801	* tests/local.at (AT_PARSE_PARAMS): New.
24802	(AT_YYERROR_FORMALS, AT_YYERROR_DEFINE): Use it to add the parse-param
24803	to yyerror.
24804	* tests/calc.at, tests/regression.at: Use AT_YYERROR_DEFINE and
24805	AT_YYERROR_DECLARE, now that they handle properly the parse-params.
24806	Be sure to let AT_BISON_OPTION_PUSHDEFS now what parse-params are used.
24807
248082012-11-05  Akim Demaille  <akim@lrde.epita.fr>
24809
24810	tests: simplifications
24811	* tests/actions.at (Exotic Dollars): Formatting changes.
24812	Use AT_FULL_COMPILE.
24813	(AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove useless initialization of @$.
24814
248152012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24816
24817	lalr1.cc: rename lex_symbol as api.token.constructor
24818	* data/bison.m4 (b4_lex_symbol_if): Rename as...
24819	(b4_token_ctor_if): this.
24820	Depend upon api.token.constructor.
24821	* data/c++.m4, data/lalr1.cc: Adjust.
24822	* doc/bison.texi: Fix all the occurrences of lex_symbol.
24823	* etc/bench.pl.in: Adjust.
24824	* examples/variant.yy: Likewise.
24825
24826	* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
24827	Handle AT_TOKEN_CTOR_IF.
24828	* tests/c++.at: Adjust to using api.token.constructor and AT_TOKEN_CTOR_IF.
24829	Simplify the test of both build call styles.
24830	(AT_CHECK_VARIANTS): Rename as...
24831	(AT_TEST): this.
24832	And undef when done.
24833
248342012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24835
24836	examples: simplify/improve
24837	* examples/variant.yy: Put yylex in yy::, and simplify accordingly.
24838	Minor formatting changes.
24839
248402012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24841
24842	bison.m4: support b4_*_if macros whose name differ from their variable
24843	* data/bison.m4 (b4_percent_define_if_define_, b4_percent_define_if_define):
24844	Accept a second argument.
24845
248462012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24847
24848	grammars: fix display of nul character in error message
24849	Reported by Marc Mendiola.
24850	http://lists.gnu.org/archive/html/help-bison/2012-10/msg00017.html
24851
24852	* gnulib: Update to get quote_mem.
24853	* src/scan-gram.l: Use it.
24854	* tests/input.at (Invalid inputs): Additional checks.
24855	* tests/named-refs.at: Likewise.
24856
248572012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24858
24859	tests: sort
24860	* tests/regression.at (Invalid inputs, Invalid inputs with {}): Move to...
24861	* tests/input.at: here, for consistency.
24862
248632012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24864
24865	tests: cosmetic changes
24866	* tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Improve the
24867	displayed title.
24868
248692012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24870
24871	comment changes
24872	* data/lalr1.cc: here.
24873
248742012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24875
24876	autoconf: update
24877	There are comment changes only in the files we use.
24878
248792012-11-01  Akim Demaille  <akim@lrde.epita.fr>
24880
24881	gnulib: update
24882
248832012-10-28  Akim Demaille  <akim@lrde.epita.fr>
24884
24885	regen
24886
248872012-10-28  Akim Demaille  <akim@lrde.epita.fr>
24888
24889	yacc.c: initialize yylval and yylloc.
24890	When generating a pure push parser, the initialization of yylval and
24891	yylloc may not be visible to the compiler.  With warnings enabled, GCC
24892	4.3.6, 4.4.7, 4.5.4, and 4.6.3 report uninitialized uses of
24893	yylval/yylloc.  Using local pragmas to disable these warnings is not
24894	supported before 4.6, and 4.6 does not support it properly.  So
24895	initialize yylval and yylloc at their definition.  Reported by Peter
24896	Simons.  See
24897	http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00133.html
24898
24899	* data/c.m4 (b4_yyloc_default_define): New.
24900	* data/yacc.c: Use it when locations are requested.
24901	(YYLVAL_INITIALIZE): Replace by...
24902	(YY_INITIAL_VALUE): this.
24903	(yyparse): Initialize yylloc and yylval.
24904	Therefore, remove the initialization of yylloc's field.
24905	* data/glr.c: Likewise.
24906
249072012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24908
24909	graphs: fix spacing refactoring
24910	* src/print_graph.c (print_lhs, print_core): Here.
24911
249122012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24913
24914	tests: make deprecation tests more specific
24915	* tests/input.at (Deprecated directives): Here, don't generate unrelated errors
24916	or warnings.
24917
249182012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24919
24920	tests: fix AT_BISON_CHECK_WARNINGS_ stderr rewriting
24921	* tests/input.at (Deprecated directives): Avoid spurious error.
24922	* tests/locat.at (AT_BISON_CHECK_WARNINGS): Adjust for recent changes.
24923
249242012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24925
24926	scan-skel.l: consider m4 notes as related to "complaint" errors
24927	* src/scan-skel.l (flag): Here.
24928
249292012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24930
24931	warnings: distinguish context information based on warning type
24932	* src/scan-code.l (show_sub_message, show_sub_messages): Take a new warnings
24933	argument.
24934
249352012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24936
24937	warnings: fix early exit of warnings treated as errors
24938	Treating warnings as errors caused Bison to exit earlier than needed, making it
24939	hide warnings that would have been printed had -Werror not been set.
24940
24941	Also, fix a bug that caused some context information of errors to not be
24942	shown.
24943
24944	* src/complain.c (complaint_issued): Rename as...
24945	(complaint_status): This, and change its type from boolean to
24946	* src/complain.h (err_status): This, new enumeration.
24947	* src/main.c (main): Adjust (only finish early if an actual complaint was
24948	risen, not a mere warning treated an error).
24949	* src/reader.c: Adjust.
24950
249512012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
24952
24953	tests: reindent for legibility
24954	* tests/local.at (AT_BISON_CHECK_WARNINGS_): Here.
24955
249562012-10-26  Akim Demaille  <akim@lrde.epita.fr>
24957
24958	build: fix Texinfo compilation
24959	* doc/local.mk: fix dependencies.
24960
249612012-10-26  Akim Demaille  <akim@lrde.epita.fr>
24962
24963	regen
24964
249652012-10-26  Akim Demaille  <akim@lrde.epita.fr>
24966
24967	Merge remote-tracking branch 'origin/maint'
24968	* origin/maint: (46 commits)
24969	  doc: minor style change
24970	  maint: use gendocs's new -I option
24971	  regen
24972	  yacc.c: do not define location support when not using locations
24973	  maint: be compilable with GCC 4.0
24974	  tests: address a warning from GCC 4.4
24975	  tests: don't use options that Clang does not support
24976	  tests: restore the tests on -Werror
24977	  regen
24978	  parse-gram: update the Bison interface
24979	  fix comment
24980	  maint: post-release administrivia
24981	  version 2.6.4
24982	  regen
24983	  2.6.4: botched 2.6.3
24984	  maint: post-release administrivia
24985	  version 2.6.3
24986	  gnulib: update
24987	  tests: check %no-lines
24988	  NEWS: warnings with clang
24989	  ...
24990
249912012-10-26  Akim Demaille  <akim@lrde.epita.fr>
24992
24993	Merge branch 'branch-2.6' into maint
24994	* origin/branch-2.6:
24995	  regen
24996	  yacc.c: do not define location support when not using locations
24997	  maint: be compilable with GCC 4.0
24998	  tests: address a warning from GCC 4.4
24999	  tests: don't use options that Clang does not support
25000	  tests: restore the tests on -Werror
25001	  regen
25002	  parse-gram: update the Bison interface
25003	  fix comment
25004
250052012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25006
25007	doc: minor style change
25008	* doc/figs/example-reduce.txt: here.
25009
250102012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25011
25012	maint: use gendocs's new -I option
25013	* gnulib: Update gendocs.
25014	* cfg.mk (gendocs_options_): New.
25015
250162012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25017
25018	regen
25019
250202012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25021
25022	yacc.c: don't use _Pragma GCC diagnostic with 4.6
25023	Reported by Peter Simons.
25024	http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00033.html
25025
25026	* data/yacc.c (b4_declare_scanner_communication_variables): 4.7
25027	seems fine though.
25028
250292012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25030
25031	regen
25032
250332012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25034
25035	yacc.c: do not define location support when not using locations
25036	* data/yacc.c (YYLLOC_DEFAULT, YYRHSLOC): Don't define when not
25037	using locations.
25038
250392012-10-26  Akim Demaille  <akim@lrde.epita.fr>
25040
25041	maint: be compilable with GCC 4.0
25042	The "shadows a global declaration" warning in GCC 4.0 was a bit
25043	annoying.  It does not like that a type name be used in a prototype of
25044	a function (not the implementation, just the declaration):
25045
25046	  In file included from src/LR0.c:38:
25047	  src/reader.h:56: warning: declaration of 'named_ref' shadows a
25048	                            global declaration
25049	  src/named-ref.h:35: warning: shadowed declaration is here
25050
25051	It does not like either when a global variable name is used in a
25052	prototype.  Flex 2.5.37 generates this prototype:
25053
25054	  void gram_set_debug (int debug_flag  );
25055
25056	* src/getargs.h, src/getargs.c (debug_flag): Rename as...
25057	(debug): this.
25058	Adjust dependencies.
25059	* src/reader.h: Don't use "named_ref" as a formal argument name.
25060
250612012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
25062
25063	misc: document TESTSUITEFLAGS in README-hacking
25064	* README-hacking: Document -j and -k flags.
25065
250662012-10-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
25067
25068	deprecation: add tests
25069	* tests/input.at (Deprecated directives warn, Non-deprecated
25070	directives don't, Unput doesn't mess up locations): New tests.
25071
250722012-10-25  Akim Demaille  <akim@lrde.epita.fr>
25073
25074	tests: address a warning from GCC 4.4
25075	236. torture.at:465: testing Exploding the Stack Size with Alloca ...
25076	../../../tests/torture.at:474: bison -o input.c input.y
25077	../../../tests/torture.at:474: $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
25078	stderr:
25079	cc1: warnings being treated as errors
25080	input.y: In function 'main':
25081	input.y:60: error: 'status' may be used uninitialized in this function
25082
25083	* tests/torture.at (AT_DATA_STACK_TORTURE): Initial status to avoid
25084	the previous error.
25085
250862012-10-25  Akim Demaille  <akim@lrde.epita.fr>
25087
25088	tests: don't use options that Clang does not support
25089	* configure.ac (WARN_CFLAGS, WARN_CXXFLAGS): Do not include options
25090	that Clang does not support.
25091
250922012-10-25  Akim Demaille  <akim@lrde.epita.fr>
25093
25094	tests: restore the tests on -Werror
25095	When run as /bin/sh, Bash sets the shell variable POSIXLY_CORRECT to
25096	y.  The test suite checks for the envvar POSIXLY_CORRECT to turn of
25097	some tests not supported in POSIX mode.  Restore these tests.
25098
25099	Reported by the Hydra build farm, from Rob Vermaas.
25100
25101	* tests/local.at (AT_BISON_CHECK_WARNINGS_): Check the envvar
25102	POSIXLY_CORRECT, not the shell variable.
25103
251042012-10-25  Akim Demaille  <akim@lrde.epita.fr>
25105
25106	regen
25107
251082012-10-25  Akim Demaille  <akim@lrde.epita.fr>
25109
25110	parse-gram: update the Bison interface
25111	* src/parse-gram.y (%pure-parser, %name-prefix): Replace with...
25112	(%define api.pure, %define api.prefix)
25113	* src/location.h, src/scan-gram.h: Adjust to api.prefix.
25114
251152012-10-25  Akim Demaille  <akim@lrde.epita.fr>
25116
25117	fix comment
25118	* data/c.m4 (b4_YYDEBUG_define): here.
25119
251202012-10-24  Theophile Ranquet  <ranquet@lrde.epita.fr>
25121
25122	regen
25123
251242012-10-24  Theophile Ranquet  <ranquet@lrde.epita.fr>
25125
25126	deprecation: issue warnings in scanner
25127	* src/parse-gram.y: Move the handling of (three) deprecated constructs ...
25128	* src/scan-gram.l: ...Here, and issue warnings.
25129	(DEPRECATED): New.
25130
251312012-10-23  Akim Demaille  <akim@lrde.epita.fr>
25132
25133	Merge branch 'branch-2.6' into maint
25134	* origin/branch-2.6:
25135	  maint: post-release administrivia
25136	  version 2.6.4
25137	  regen
25138	  2.6.4: botched 2.6.3
25139
251402012-10-23  Akim Demaille  <akim@lrde.epita.fr>
25141
25142	maint: post-release administrivia
25143	* NEWS: Add header line for next release.
25144	* .prev-version: Record previous version.
25145	* cfg.mk (old_NEWS_hash): Auto-update.
25146
251472012-10-23  Akim Demaille  <akim@lrde.epita.fr>
25148
25149	version 2.6.4
25150	* NEWS: Record release date.
25151
251522012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25153
25154	regen
25155
251562012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25157
25158	2.6.4: botched 2.6.3
25159	* NEWS: here.
25160
251612012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25162
25163	Merge branch '2.6.3' into maint
25164	* 2.6.3: (22 commits)
25165	  maint: post-release administrivia
25166	  version 2.6.3
25167	  gnulib: update
25168	  tests: check %no-lines
25169	  NEWS: warnings with clang
25170	  warnings: avoid warnings from clang
25171	  tests: no longer disable -O compiler options
25172	  yacc.c: initialize yylval in pure-parser mode
25173	  skeletons: style changes
25174	  tests: minor improvements
25175	  tests: use $PERL instead of perl
25176	  build: look for Perl in configure.
25177	  tests: fix sed portability issues
25178	  tests: diff -u is not portable
25179	  maint: word changes
25180	  lalr1.cc: fix test suite portability
25181	  maint: fix an erroneous include
25182	  tests: check that headers are self contained
25183	  doc: add missing documentation for --report
25184	  headers: move CPP guards into YY_*_INCLUDED to avoid collisions
25185	  ...
25186
251872012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25188
25189	maint: post-release administrivia
25190	* NEWS: Add header line for next release.
25191	* .prev-version: Record previous version.
25192	* cfg.mk (old_NEWS_hash): Auto-update.
25193
251942012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25195
25196	version 2.6.3
25197	* NEWS: Record release date.
25198
251992012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25200
25201	gnulib: update
25202
252032012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25204
25205	tests: check %no-lines
25206	* tests/synclines.at: here.
25207
252082012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25209
25210	NEWS: warnings with clang
25211	* NEWS: here.
25212
252132012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25214
25215	warnings: avoid warnings from clang
25216	Fix the following warning
25217
25218	  parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
25219	                        [-Werror,-Wparentheses-equality]
25220	    if (((yyn) == (-91)))
25221	         ~~~~~~^~~~~~~~
25222	  parse-gram.c:2078:14: note: remove extraneous parentheses around the
25223	                        comparison to silence this warning
25224	    if (((yyn) == (-91)))
25225	        ~      ^       ~
25226	  parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
25227	                        an assignment
25228	    if (((yyn) == (-91)))
25229	               ^~
25230	               =
25231	  1 error generated.
25232
25233	and the following one:
25234
25235	  input.cc:740:1: error: function declared 'noreturn' should not return
25236	                         [-Werror,-Winvalid-noreturn]
25237	  static void yyMemoryExhausted (yyGLRStack* yystackp)
25238	    __attribute__ ((__noreturn__));
25239	  static void
25240	  yyMemoryExhausted (yyGLRStack* yystackp)
25241	  {
25242	    YYLONGJMP (yystackp->yyexception_buffer, 2);
25243	  }
25244	  ^
25245	  1 warning and 1 error generated.
25246
25247	This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).
25248
25249	* data/c.m4 (b4_table_value_equals): Use (!!(A == B)) instead of (A == B)
25250	to avoid this warning.
25251	Any reasonable compiler should generate the same code.
25252	* src/uniqstr.h (UNIQSTR_EQ): Likewise.
25253	* data/glr.c (LONGJMP): abort after longjmp to pacify clang.
25254
252552012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25256
25257	tests: no longer disable -O compiler options
25258	Tests are running without -O since
25259	f377f69fec28013c79db4efe12bbb9d48987fb2c because some warnings (about
25260	yylval not being initialized) show only when GCC is given -O2.  The
25261	previous patch fixes the warnings. Run the test suite with compiler
25262	options unmodified.
25263
25264	* tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
25265	CXXFLAGS.
25266
252672012-10-22  Paul Eggert  <eggert@cs.ucla.edu>
25268
25269	yacc.c: initialize yylval in pure-parser mode
25270	See http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00024.html
25271	(spreading over September and October).
25272
25273	* data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN)
25274	(YY_IGNORE_MAYBE_UNINITIALIZED_END, YYLVAL_INITIALIZE):
25275	New macros.  Use them to suppress an unwanted GCC diagnostic.
25276
252772012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25278
25279	skeletons: style changes
25280	* data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
25281
252822012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25283
25284	tests: minor improvements
25285	* tests/c++.at: Space changes.
25286	Use AT_YYERROR_DEFINE.
25287	* tests/local.at (AT_YYERROR_DEFINE): Issue errors on unknown languages.
25288
252892012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25290
25291	tests: use $PERL instead of perl
25292	* tests/atlocal.in (PERL): New.
25293	Sort.
25294	* tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
25295	* tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
25296
252972012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25298
25299	build: look for Perl in configure.
25300	Bison uses "/usr/bin/perl" or "perl" in several places, and it does
25301	not appear to be a problem.  But, at least to make it simpler to
25302	change PERL on the make command line, check for perl in configure.
25303
25304	* configure.ac (PERL): New.
25305	* doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
25306
253072012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25308
25309	tests: fix sed portability issues
25310	Reported by Didier Godefroy,
25311	<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.
25312
25313	* tests/calc.at (AT_CHECK_SPACES): Use Perl.
25314
253152012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25316
25317	tests: diff -u is not portable
25318	Reported by Didier Godefroy
25319	<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>.
25320
25321	* tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
25322	work.
25323
253242012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25325
25326	maint: word changes
25327	* README-hacking (Typical errors): Improve wording.
25328
253292012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25330
25331	lalr1.cc: fix test suite portability
25332	Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
25333	G++ 4.6.3.
25334
25335	* tests/headers.at (Several parsers): Include AT_DATA_SOURCE_PROLOGUE
25336	in the files to compile.
25337	* data/location.cc: Do not include twice string and iostream (once
25338	by position.hh, and then by location.hh).
25339	* README-hacking (Typical errors): Some hints for other maintainers.
25340
253412012-10-22  Theophile Ranquet  <theophile.ranquet@gmail.com>
25342
25343	maint: fix an erroneous include
25344	This fixes test 130 (Several parsers).
25345
25346	* data/location.cc: Include <iostream> rather than <iosfwd> since
25347	we really need << on strings for instance.
25348	* NEWS: Document this.
25349
253502012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25351
25352	tests: check that headers are self contained
25353	Reported by Alexandre Duret-Lutz.
25354
25355	* tests/headers.at (Several parsers): here.
25356
253572012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25358
25359	doc: add missing documentation for --report
25360	* doc/bison.texi (Bison Options): Document --report's "solved", "all",
25361	and "none".
25362
253632012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25364
25365	headers: move CPP guards into YY_*_INCLUDED to avoid collisions
25366	See <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00016.html>.
25367
25368	* data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
25369	* tests/headers.at: Adjust.
25370	* NEWS, doc/bison.texi: Document.
25371
253722012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25373
25374	minor changes.
25375	* NEWS: Word changes.
25376	* doc/bison.texi: Spell check.
25377	Fix minor issues.
25378	* tests/headers.at: Comment and formatting changes.
25379
253802012-10-22  Akim Demaille  <akim@lrde.epita.fr>
25381
25382	gnulib: update
25383
253842012-10-19  Akim Demaille  <akim@lrde.epita.fr>
25385
25386	gnulib: update
25387
253882012-10-19  Akim Demaille  <akim@lrde.epita.fr>
25389
25390	xml: slight improvement of the DOT output
25391	This was completely forgotten...  Nothing about XML is actually
25392	documented...
25393
25394	* data/xslt/xml2dot.xsl: Use boxes, and Courier font.
25395
253962012-10-19  Akim Demaille  <akim@lrde.epita.fr>
25397
25398	maint: check for dot before using it
25399	* configure.ac: here.
25400	* doc/Makefile.am: Use $(DOT).
25401	Ship the generated files, to spare the user the need for Graphviz.
25402
254032012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
25404
25405	graphs: documentation
25406	Note that 'make web-manual' fails.
25407
25408	* NEWS: Document these changes.
25409	* doc/Makefile.am: Adjust to generate example files.
25410	* doc/bison.texi: Add a Graphviz section after "Understanding::", the section
25411	describing the .output file, because these are similar.
25412	* doc/figs/example-reduce.dot, doc/figs/example-reduce.txt,
25413	doc/figs/example-shift.dot, doc/figs/example-shift.txt: New, minimal
25414	examples to illustrate the documentation.
25415
254162012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
25417
25418	graphs: add tests, introducing -k graph
25419	* tests/output.at (AT_TEST): New.
25420	Use it to add 6 --graph tests.
25421
254222012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
25423
25424	graphs: change the output format of the rules
25425	Use something similar to the report file.
25426
25427	* src/print_graph.c (print_lhs): New, obstack equivalent of rule_lhs_print.
25428	(print_core): Use here.
25429
254302012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
25431
25432	graphs: style changes
25433	* src/graphviz.c (start_graph): Use courier font.
25434	(conclude_red): Use commas to separate attributes. Show the acceptation
25435	as a special reduction, with a blue color and an "Acc" label. Show the
25436	lookahead tokens between square brackets.
25437	(output_red): No longer label default reductions.
25438	* src/print_graph.c (print_core): Refactor spacing, and print an
25439	additional space between a rule's rhs and its lookahead tokens. Also,
25440	capitalize "State".
25441	(print_actions): Style, move a declaration.
25442
254432012-10-18  Theophile Ranquet  <theophile.ranquet@gmail.com>
25444
25445	graphs: address an issue with R/R conflicts
25446	All disabled reductions should now be shown as such.
25447
25448	* src/graphviz.c (output_red): Here.
25449	(conclude_red): New.
25450
254512012-10-16  Akim Demaille  <akim@lrde.epita.fr>
25452
25453	news: spell check
25454	* NEWS: here.
25455
254562012-10-16  Akim Demaille  <akim@lrde.epita.fr>
25457
25458	Merge branch 'maint'
25459	* origin/maint:
25460	  java: use api.location.type and api.position.type
25461
254622012-10-16  Akim Demaille  <akim@lrde.epita.fr>
25463
25464	variables: use singular in %define variable names
25465	See http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
25466
25467	* doc/bison.texi, src/lalr.c, src/main.c, src/muscle-tab.c,
25468	* src/print.c, src/reader.c, src/tables.c, tests/conflicts.at,
25469	* tests/input.at, tests/reduce.at:
25470	s/lr.default-reductions/lr.default-reduction/
25471	s/lr.keep-unreachable-states/lr.keep-unreachable-state/.
25472	* NEWS: Document.
25473
254742012-10-16  Akim Demaille  <akim@lrde.epita.fr>
25475
25476	java: fixes
25477	* data/java.m4: Remove stray M4 characters.
25478
254792012-10-16  Akim Demaille  <akim@lrde.epita.fr>
25480
25481	api.tokens.prefix -> api.token.prefix
25482	See
25483	http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html
25484	Note that api.tokens.prefix has not been released, yet.
25485
25486	* NEWS, data/bison.m4, doc/bison.texi, tests/c++.at,
25487	* tests/calc.at, tests/java.at, tests/local.at: Do it.
25488	* src/muscle-tab.c (muscle_percent_variable_update): Ensure
25489	backward compatibility.
25490
254912012-10-15  Theophile Ranquet  <theophile.ranquet@gmail.com>
25492
25493	scan-skel.l: shift complain_args arguments
25494	Because argv[0] is never used, shift it out from the argument list.
25495
25496	* src/complain.c (complain_args): Here.
25497	* src/scan-skel.l (at_complain): Adjust argv and argc.
25498
254992012-10-15  Theophile Ranquet  <theophile.ranquet@gmail.com>
25500
25501	scan-skel.l: formatting changes
25502	* src/scan-skel.l (fail_for_at_directive_too_few_args): Here.
25503
255042012-10-12  Akim Demaille  <akim@lrde.epita.fr>
25505
25506	java: use api.location.type and api.position.type
25507	* data/java.m4: here.
25508	* NEWS, doc/bison.texi, tests/java.at: Adjust.
25509
255102012-10-12  Akim Demaille  <akim@lrde.epita.fr>
25511
25512	Merge branch 'maint'
25513	* origin/maint:
25514	  tests: check %no-lines
25515	  tests: minor simplification
25516	  graphs: stylistic changes.
25517	  graphs: minor style changes
25518	  graphs: show reductions
25519	  graphs: style: prefix state number with "state"
25520	  graphs: style: use left justification for states
25521	  graphs: style: prefix rules and change shapes
25522	  obstack: import obstack_finish0 from master
25523	  c++: api.location.type
25524	  muscles: a function for backward compatibility
25525	  maint: more macros
25526
255272012-10-12  Akim Demaille  <akim@lrde.epita.fr>
25528
25529	tests: check %no-lines
25530	* tests/synclines.at: here.
25531
255322012-10-12  Akim Demaille  <akim@lrde.epita.fr>
25533
25534	tests: minor simplification
25535	* tests/headers.at (Several parsers): Use *.y even for C++.
25536
255372012-10-11  Akim Demaille  <akim@lrde.epita.fr>
25538
25539	graphs: stylistic changes.
25540	* src/graphviz.c (output_red): Comment and formatting changes.
25541
255422012-10-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
25543
25544	graphs: minor style changes
25545	* src/graphviz.c (output_red): Fix C90 issues.
25546	Reduce variable scopes.
25547
255482012-10-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
25549
25550	graphs: show reductions
25551	* src/graphviz.c (output_red): New, show reductions on the graph.
25552	(no_reduce_bitset_init): New, initialize a bitset.
25553	(print_token): New, print a lookahead token.
25554	(escape): New, print "foo" as \"foo\" because Dot doesn't like quotes within
25555	a label.
25556
25557	* src/graphviz.h : Adjust.
25558	* src/print_graph.c (print_actions): Call output_red here.
25559
255602012-10-11  Theophile Ranquet  <theophile.ranquet@gmail.com>
25561
25562	graphs: style: prefix state number with "state"
25563	* src/print_graph.c (print_core): Here.
25564
255652012-10-11  Theophile Ranquet  <ranquet@lrde.epita.fr>
25566
25567	graphs: style: use left justification for states
25568	The label text of nodes is centered "by default" (by the use of '\n' as
25569	a line feed). This gives bad readability to the grammar rules shown in
25570	state nodes, a left justification is much nicer. This is done by using '\l'
25571	as the line feed.
25572
25573	In order to allow \l in the DOT file, changes to the quoting system seem
25574	necessary.
25575
25576	* src/print_graph.c (print_core): Escape tokens here, instead of...
25577	* src/graphviz.c (output_node): Here...
25578	(escape): Using this, new.
25579
255802012-10-11  Theophile Ranquet  <theophile.ranquet@gmail.com>
25581
25582	graphs: style: prefix rules and change shapes
25583	* src/graphviz.c (start_graph): Use box rather than ellipsis.
25584	* src/print_graph.c (print_core): Prefix rules with their number.
25585
255862012-10-11  Theophile Ranquet  <theophile.ranquet@gmail.com>
25587
25588	obstack: import obstack_finish0 from master
25589	* src/system.h (obstack_finish0): New.
25590
255912012-10-11  Akim Demaille  <akim@lrde.epita.fr>
25592
25593	Merge branch 'maint'
25594	* origin/maint:
25595	  NEWS: warnings with clang
25596	  warnings: avoid warnings from clang
25597	  tests: no longer disable -O compiler options
25598	  yacc.c: initialize yylval in pure-parser mode
25599	  skeletons: style changes
25600	  lalr1.cc: document exception safety
25601	  lalr1.cc: check exception safety of error handling
25602	  lalr1.cc: check (and fix) %printer exception safety
25603	  lalr1.cc: check (and fix) %initial-action exception safety
25604	  lalr1.cc: fix exception safety
25605	  lalr1.cc: check exception safety.
25606	  lalr1.cc: indentation fixes.
25607	  lalr1.cc: don't leave macros define to nothing
25608	  tests: minor improvements
25609	  tests: use $PERL instead of perl
25610	  build: look for Perl in configure.
25611	  tests: fix sed portability issues
25612	  tests: diff -u is not portable
25613
256142012-10-09  Akim Demaille  <akim@lrde.epita.fr>
25615
25616	c++: api.location.type
25617	This feature was introduced in 95a2de5695670ae0df98cb3c42141cad549f0204
25618	(which is part of 2.5), but not documented.  Give it a proper name, and
25619	make it public.
25620
25621	* data/c++.m4, data/lalr1.cc, data/glr.cc, data/java.m4: Use
25622	api.location.type instead of location_type.
25623	* src/muscle-tab.c (muscle_percent_variable_update): Map the latter to
25624	the former.
25625	* tests/local.at: Adjust.
25626	* tests/calc.at: Use api.location.type.
25627	Leave tests/java.at with location_type, at least for the time being,
25628	to cover both names.
25629	* doc/bison.texi: Document api.location.type.
25630	(User Defined Location Type): New.
25631	* NEWS: Update.
25632
256332012-10-09  Akim Demaille  <akim@lrde.epita.fr>
25634
25635	muscles: a function for backward compatibility
25636	Based on commit 171ad99d6421935a278656be6dc7161591835d00 from master.
25637
25638	* src/muscle-tab.c (muscle_percent_variable_update): New.
25639	(muscle_percent_define_insert): Use it.
25640	Define the variables with their initial value.
25641
256422012-10-09  Akim Demaille  <akim@lrde.epita.fr>
25643
25644	maint: more macros
25645	* src/output.c (ARRAY_CARDINALITY): Move to...
25646	* src/system.h: here.
25647	(STREQ, STRNEQ): new.
25648
256492012-10-08  Akim Demaille  <akim@lrde.epita.fr>
25650
25651	NEWS: warnings with clang
25652	* NEWS: here.
25653
256542012-10-08  Akim Demaille  <akim@lrde.epita.fr>
25655
25656	warnings: avoid warnings from clang
25657	Fix the following warning
25658
25659	  parse-gram.c:2078:14: error: equality comparison with extraneous parentheses
25660	                        [-Werror,-Wparentheses-equality]
25661	    if (((yyn) == (-91)))
25662	         ~~~~~~^~~~~~~~
25663	  parse-gram.c:2078:14: note: remove extraneous parentheses around the
25664	                        comparison to silence this warning
25665	    if (((yyn) == (-91)))
25666	        ~      ^       ~
25667	  parse-gram.c:2078:14: note: use '=' to turn this equality comparison into
25668	                        an assignment
25669	    if (((yyn) == (-91)))
25670	               ^~
25671	               =
25672	  1 error generated.
25673
25674	and the following one:
25675
25676	  input.cc:740:1: error: function declared 'noreturn' should not return
25677	                         [-Werror,-Winvalid-noreturn]
25678	  static void yyMemoryExhausted (yyGLRStack* yystackp)
25679	    __attribute__ ((__noreturn__));
25680	  static void
25681	  yyMemoryExhausted (yyGLRStack* yystackp)
25682	  {
25683	    YYLONGJMP (yystackp->yyexception_buffer, 2);
25684	  }
25685	  ^
25686	  1 warning and 1 error generated.
25687
25688	This is Apple clang version 3.1 (tags/Apple/clang-318.0.61).
25689
25690	* data/c.m4 (b4_table_value_equals): Use (!!(A == B)) instead of (A == B)
25691	to avoid this warning.
25692	Any reasonable compiler should generate the same code.
25693	* src/uniqstr.h (UNIQSTR_EQ): Likewise.
25694	* data/glr.c (LONGJMP): abort after longjmp to pacify clang.
25695
256962012-10-08  Akim Demaille  <akim@lrde.epita.fr>
25697
25698	tests: no longer disable -O compiler options
25699	Tests are running without -O since
25700	f377f69fec28013c79db4efe12bbb9d48987fb2c because some warnings (about
25701	yylval not being initialized) show only when GCC is given -O2.  The
25702	previous patch fixes the warnings. Run the test suite with compiler
25703	options unmodified.
25704
25705	* tests/atlocal.in (O0CFLAGS, O0CXXFLAGS): Remove, use CFLAGS and
25706	CXXFLAGS.
25707
257082012-10-08  Paul Eggert  <eggert@cs.ucla.edu>
25709
25710	yacc.c: initialize yylval in pure-parser mode
25711	See http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00024.html
25712	(spreading over September and October).
25713
25714	* data/yacc.c (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN)
25715	(YY_IGNORE_MAYBE_UNINITIALIZED_END, YYLVAL_INITIALIZE):
25716	New macros.  Use them to suppress an unwanted GCC diagnostic.
25717
257182012-10-08  Akim Demaille  <akim@lrde.epita.fr>
25719
25720	skeletons: style changes
25721	* data/yacc.c, data/glr.c: Prefer Title case for (CPP) macro arguments.
25722
257232012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25724
25725	lalr1.cc: document exception safety
25726	* NEWS: here.
25727	* doc/bison.texi (Destructor Decl, C++ Parser Interface): and there.
25728
257292012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25730
25731	lalr1.cc: check exception safety of error handling
25732	* tests/c++.at (Exception safety): Don't use swap here, it
25733	is useless.
25734	Cover more test cases: yyerror, YYERROR, YYABORT, and
25735	error recovery.
25736	(Object): Instead of just keeping a counter of instances, keep
25737	a list of them.
25738
257392012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25740
25741	lalr1.cc: check (and fix) %printer exception safety
25742	* tests/c++.at (Exception safety): Let the parser support the --debug
25743	option.
25744	On 'p', throw an exception from the %printer.
25745	* data/lalr1.cc (yyparse): Do not display the values we discard, as it
25746	uses %printer, which might have thrown the exception.
25747
257482012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25749
25750	lalr1.cc: check (and fix) %initial-action exception safety
25751	* data/lalr1.cc: Check size > 1, rather than size != 1, when cleaning
25752	the stack, as at the beginning, size is 0.
25753	* tests/c++.at (Exception safety): Check exception safety in
25754	%initial-action.
25755
257562012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25757
25758	lalr1.cc: fix exception safety
25759	lalr1.cc does not reclaim its memory when ended by an exception.
25760
25761	Reported by Oleksii Taran:
25762	http://lists.gnu.org/archive/html/help-bison/2012-09/msg00000.html
25763
25764	* data/lalr1.cc (yyparse): Protect the whole yyparse by a try-catch
25765	block that cleans the stack and the lookahead.
25766
257672012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25768
25769	lalr1.cc: check exception safety.
25770	* tests/c++.at (Exception safety): New.
25771
257722012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25773
25774	lalr1.cc: indentation fixes.
25775	* data/lalr1.cc (yyparse): here.
25776	Untabify a block of code.
25777
257782012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25779
25780	lalr1.cc: don't leave macros define to nothing
25781	* data/lalr1.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT, YY_STACK_PRINT):
25782	Define to something so that, for instance, "if (foo) YY_SYMBOL_PRINT"
25783	is valid even when !YYDEBUG.
25784
257852012-10-06  Akim Demaille  <akim@lrde.epita.fr>
25786
25787	tests: minor improvements
25788	* tests/c++.at: Space changes.
25789	Use AT_YYERROR_DEFINE.
25790	* tests/local.at (AT_YYERROR_DEFINE): Issue errors on unknown languages.
25791
257922012-10-05  Akim Demaille  <akim@lrde.epita.fr>
25793
25794	tests: use $PERL instead of perl
25795	* tests/atlocal.in (PERL): New.
25796	Sort.
25797	* tests/calc.at, tests/input.at, tests/local.at, tests/regression.at,
25798	* tests/skeletons.at, tests/synclines.at, tests/torture.at: here.
25799
258002012-10-05  Akim Demaille  <akim@lrde.epita.fr>
25801
25802	build: look for Perl in configure.
25803	Bison uses "/usr/bin/perl" or "perl" in several places, and it does
25804	not appear to be a problem.  But, at least to make it simpler to
25805	change PERL on the make command line, check for perl in configure.
25806
25807	* configure.ac (PERL): New.
25808	* doc/Doxyfile.in, doc/Makefile.am, tests/bison.in: Use it.
25809
258102012-10-05  Akim Demaille  <akim@lrde.epita.fr>
25811
25812	tests: fix sed portability issues
25813	Reported by Didier Godefroy,
25814	<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00005.html>.
25815
25816	* tests/calc.at (AT_CHECK_SPACES): Use Perl.
25817
258182012-10-05  Akim Demaille  <akim@lrde.epita.fr>
25819
25820	tests: diff -u is not portable
25821	Reported by Didier Godefroy
25822	<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>.
25823
25824	* tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
25825	work.
25826
258272012-10-04  Akim Demaille  <akim@lrde.epita.fr>
25828
25829	Merge branch 'maint'
25830	* origin/maint:
25831	  maint: word changes
25832	  lalr1.cc: fix test suite portability
25833	  maint: fix an erroneous include
25834	  tests: check that headers are self contained
25835	  doc: add missing documentation for --report
25836
258372012-10-04  Akim Demaille  <akim@lrde.epita.fr>
25838
25839	scan-skel: use the scanner to reject all invalid directives
25840	* src/scan-skel.l: Use a simpler and more consistent pattern escaping
25841	scheme.
25842	Catch all the invalid directives here by just removing the previous
25843	catch-all-but-alphabetical rule.
25844
258452012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
25846
25847	scan-skel: recognize the @directives directly in scanner
25848	* src/scan-skel.l (at_directive, at_init): New.
25849	(at_ptr): New, function pointer used to call the right at_directive
25850	function (at_basename, etc.).
25851	(outname): Rename as...
25852	(out_name): this, for consistency with out_lineno.
25853
258542012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
25855
25856	scan-skel: split @directive functions
25857	* src/scan-skel.l (at_directive_perform): Split as...
25858	(at_basename, at_complain, at_output): these.
25859
258602012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
25861
25862	errors: support indented context info in m4 macros
25863	* TODO: Address the issue, so remove it.
25864	* data/bison.m4: Use b4_error with [[note]] rather than a complain_at
25865	for context information.
25866	* src/complain.c (complain_args): Take an additional argument, an
25867	indentation pointer, to allow the dispatching of context information.
25868	* src/complain.h (complain_args): Adjust prototype.
25869	* src/scan-skel.l (at_directive_perform): Recognize the new @note mark.
25870	* tests/input.at: Adjust.
25871
258722012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
25873
25874	errors: factor b4_error @directives
25875	Instead of @complain, @warn, and @fatal, use a unique @complain
25876	directive. This directive's first argument is "complain", "warn", etc.
25877
25878	* data/bison.m4 (m4_error): Here.
25879	* src/scan-skel.l (at_directive_perform): Adjust.
25880	(flag): Replace the switch by safer and more explicit if branches.
25881
258822012-10-04  Theophile Ranquet  <theophile.ranquet@gmail.com>
25883
25884	errors: pointerize complain_at_indent
25885	* src/complain.c (complain_at_indent): Rename as...
25886	(complaint_indent): This, and take the location as a pointer.
25887	* src/complain.h, src/muscle-tab.c, src/reader.c, src/scan-code.l,
25888	src/symtab.c: Adjust.
25889
258902012-10-04  Akim Demaille  <akim@lrde.epita.fr>
25891
25892	maint: word changes
25893	* README-hacking (Typical errors): Improve wording.
25894
258952012-10-04  Akim Demaille  <akim@lrde.epita.fr>
25896
25897	lalr1.cc: fix test suite portability
25898	Reported by Rob Vermaas' Hydra build farm on x86_64-darwin 10.2.0 with
25899	G++ 4.6.3.
25900
25901	* tests/headers.at (Several parsers): Include AT_DATA_SOURCE_PROLOGUE
25902	in the files to compile.
25903	* data/location.cc: Do not include twice string and iostream (once
25904	by position.hh, and then by location.hh).
25905	* README-hacking (Typical errors): Some hints for other maintainers.
25906
259072012-10-03  Theophile Ranquet  <theophile.ranquet@gmail.com>
25908
25909	maint: fix an erroneous include
25910	This fixes test 130 (Several parsers).
25911
25912	* data/location.cc: Include <iostream> rather than <iosfwd> since
25913	we really need << on strings for instance.
25914	* NEWS: Document this.
25915
259162012-10-03  Akim Demaille  <akim@lrde.epita.fr>
25917
25918	tests: check that headers are self contained
25919	Reported by Alexandre Duret-Lutz.
25920
25921	* tests/headers.at (Several parsers): here.
25922
259232012-10-03  Akim Demaille  <akim@lrde.epita.fr>
25924
25925	doc: add missing documentation for --report
25926	* doc/bison.texi (Bison Options): Document --report's "solved", "all",
25927	and "none".
25928
259292012-10-01  Akim Demaille  <akim@lrde.epita.fr>
25930
25931	build: use gnulib's non-recursive-gnulib-prefix-hack
25932	Suggested by Jim Meyering.
25933
25934	* etc/prefix-gnulib-mk: Remove, as it is now provided by...
25935	* bootstrap.conf (modules): the non-recursive-gnulib-prefix-hack module.
25936	* build-aux/.gitignore, configure.ac, m4/.gitignore: Adjust.
25937
259382012-10-01  Akim Demaille  <akim@lrde.epita.fr>
25939
25940	warnings: simplify the m4 interface
25941	* data/bison.m4 (error_at): Replace...
25942	(error): this.
25943	(b4_warn, b4_complain, b4_fatal): Bounce to their _at equivalent,
25944	with empty location.
25945	* src/scan-skel.l (at_directive_perform): Simplify accordingly.
25946
259472012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
25948
25949	warnings: separate flags_argmatch
25950	This function is now a mere iterator that calls flag_argmatch,
25951	a new function, that matches a single option parameter.
25952
25953	* src/getargs.c (flag_argmatch): New, taken from...
25954	(flags_argmatch): Here.
25955
259562012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
25957
25958	warnings: refactoring
25959	The code here was too confusing, this seems more natural.
25960
25961	* src/complain.c (error_message): Move the indentation check and the category
25962	output to complains. Also, no longer take a 'warnings' argument.
25963	(complains): Factor calls to error_message.
25964
259652012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
25966
25967	formatting changes
25968	* src/complain.c: Here.
25969
259702012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
25971
25972	warnings: organize variadic complaints call
25973	Move the dispatch of variadic complains to complain.c, rather than do
25974	it in a scanner.
25975
25976	* src/complain.h, src/complain.c (complain_args): New.
25977	* src/scan-skel.l (at_directive_perform): Use it.
25978
259792012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
25980
25981	warnings: fusion of complain and complain_at
25982	These functions are very similar, and keeping them seperate makes
25983	future improvements difficult, so merge them.
25984
25985	This impacts 89 calls.
25986
25987	* src/bootstrap.conf: Adjust.
25988	* src/complain.c (complain, complain_at): Merge into...
25989	(complain): this.
25990	(complain_args): Adjust.
25991	* src/complain.h, src/conflicts.c, src/files.c, src/getargs.c,
25992	* src/gram.c, src/location.c, src/muscle-tab.c, src/parse-gram.y,
25993	* src/reader.c, src/reduce.c, src/scan-code.l, src/scan-gram.l,
25994	* src/scan-skel.l, src/symlist.c, src/symtab.c:
25995	Adjust.
25996
259972012-10-01  Theophile Ranquet  <theophile.ranquet@gmail.com>
25998
25999	warnings: remove spurious suffixes on context
26000	Rectify a bug that introduced suffixes out of place.
26001
26002	* src/complainc.c (complains): Handle all three special warning bits.
26003	* src/scan-code.l (show_sub_message): Remove useless argument.
26004	* tests/named-refs.at: Adjust.
26005
260062012-10-01  Akim Demaille  <akim@lrde.epita.fr>
26007
26008	Merge remote-tracking branch 'origin/maint'
26009	* origin/maint:
26010	  headers: move CPP guards into YY_*_INCLUDED to avoid collisions
26011	  minor changes.
26012
260132012-10-01  Akim Demaille  <akim@lrde.epita.fr>
26014
26015	Merge remote-tracking branch 'origin/maint'
26016	* origin/maint:
26017	  gnulib: update
26018	  errors: indent "user token number redeclaration" context
26019
260202012-10-01  Akim Demaille  <akim@lrde.epita.fr>
26021
26022	headers: move CPP guards into YY_*_INCLUDED to avoid collisions
26023	See <http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00016.html>.
26024
26025	* data/c.m4 (b4_cpp_guard): Prepend YY_ and append _INCLUDED.
26026	* tests/headers.at: Adjust.
26027	* NEWS, doc/bison.texi: Document.
26028
260292012-10-01  Akim Demaille  <akim@lrde.epita.fr>
26030
26031	minor changes.
26032	* NEWS: Word changes.
26033	* doc/bison.texi: Spell check.
26034	Fix minor issues.
26035	* tests/headers.at: Comment and formatting changes.
26036
260372012-09-28  Akim Demaille  <akim@lrde.epita.fr>
26038
26039	gnulib: update
26040
260412012-09-28  Theophile Ranquet  <theophile.ranquet@gmail.com>
26042
26043	errors: indent "user token number redeclaration" context
26044	This is the continuation of the work on the readability of errors
26045	context.
26046
26047	* src/symtab.c (user_token_number_redeclaration): Use
26048	complain_at_indent to output with increased indentation level.
26049	* tests/input:at: Apply this change.
26050
260512012-09-27  Theophile Ranquet  <theophile.ranquet@gmail.com>
26052
26053	errors: don't display "warnings treated as errors"
26054	This line doesn't add any meaningful information anymore, the appended
26055	[-Werror=CATEGORY] is enough.  It is actually more insightful, as it
26056	allows to distinguish warnings treated as errors from those that
26057	aren't.  This line is also removed by gcc 4.8.
26058
26059	* src/complain.c (set_warnings_issued): The only action left was
26060	checking if the error bit corresponding to the warning issued was set,
26061	and that function was only called once. Therefore, remove it, and do
26062	its job directly in the caller...
26063	(complains): here.
26064	* src/complains.h: Adjust.
26065	* tests/input.at: Adjust.
26066	* NEWS: Document this change.
26067
260682012-09-27  Akim Demaille  <akim@lrde.epita.fr>
26069
26070	errors: change output, and improve -y coherence
26071	The prefix of warnings treated as errors is now "error: ". Also, their
26072	suffix now reflects the changes in the Werror option format.
26073
26074	An output for -Werror=other used to be:
26075	  bison: warnings being treated as errors
26076	  input.y:1.1: warning: stray ',' treated as white space [-Wother]
26077
26078	It is now:
26079	  bison: warnings being treated as errors
26080	  input.y:1.1: error: stray ',' treated as white space [-Werror=other]
26081
26082	The line "warnings being treated as errors" no longer adds any info,
26083	it will be removed in a forthcoming change.
26084
26085	* NEWS: Add entry "Enhancement of the -Werror"
26086	* doc/bison.texi: Move the warnings-as-error to a new bullet.
26087	* src/complain.c (complains): Refactor, change the prefix of warnings
26088	that are treated as errors.
26089	(warnings_print_categories): Support for [-Werror=CATEGORY] display
26090	* src/getargc.c (getargs): -y implies -Werror=yacc
26091	* tests/input.at: Update expected --yacc output for coherence.
26092
260932012-09-27  Theophile Ranquet  <theophile.ranquet@gmail.com>
26094
26095	errors: introduce the -Werror=CATEGORY option
26096	This new option is a lot more flexible than the previous one. Its
26097	details will be discussed in the NEWS and info file, in a forthcoming
26098	change.
26099
26100	If no category is specified (ie: used as simply "-Werror"), the
26101	functionality is the same as before.
26102
26103	* src/complain.c (errors_flag): New variable.
26104	(set_warning_issued): Accept warning categories as an argument.
26105	* src/complain.h (Wall): Better definition.
26106	* src/getargs.c (flags_argmatch): Support for the new format.
26107	(usage): Update -Werror to -Werror[=CATEGORY] format.
26108
26109	* src/complain.c (errors_flag): New variable.
26110	(set_warning_issued): Accept warning categories as an argument.
26111	* src/complain.h (Wall): Better definition.
26112	* src/getargs.c (flags_argmatch): Support for the new format.
26113	(usage): Update -Werror to -Werror=[CATEGORY] format.
26114
261152012-09-26  Akim Demaille  <akim@lrde.epita.fr>
26116
26117	Merge branch 'maint'
26118	* maint:
26119	  warnings: introduce -Wdeprecated in the usage info
26120	  errors: prefix the output with "error: "
26121	  errors: indent "invalid value for %define" context
26122	  errors: indent "%define var" redefinition context
26123	  errors: indent "symbol redeclaration" context
26124	  errors: indent "result type clash" error context
26125
261262012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
26127
26128	warnings: introduce -Wdeprecated in the usage info
26129	The deprecated warning, introduced some time ago, was not displayed in
26130	the usage message. This patch addresses the issue.
26131
26132	* src/getargs.c (usage): Insert here.
26133
261342012-09-26  Akim Demaille  <akim@lrde.epita.fr>
26135
26136	regen
26137
261382012-09-26  Akim Demaille  <akim@lrde.epita.fr>
26139
26140	Merge remote-tracking branch 'origin/maint'
26141	* origin/maint:
26142	  regen
26143	  yacc: fix handling of CPP guards when no header is generated
26144	  gnulib: update
26145
261462012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
26147
26148	errors: prefix the output with "error: "
26149	This improves readability. This is also what gcc does.
26150
26151	* NEWS: Document this change.
26152	* src/complain.c (complain_at): Prefix all errors with "error: ".
26153	(complain_at_indent, warn_at_indent): Do not prefix the context
26154	information of errors, which are basically just indented errors.
26155	* tests/conflicts.at, tests/glr-regression.at, tests/input.at,
26156	tests/named-refs.at, tests/output.at, tests/push.at,
26157	tests/regression.at, tests/skeletons.at: Apply this change.
26158
261592012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
26160
26161	errors: indent "invalid value for %define" context
26162	This is the continuation of the work on the readability of errors
26163	    context.
26164
26165	For example, what used to be:
26166	  input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
26167	  input.y:1.9-29: accepted value: 'most'
26168
26169	is now:
26170	  input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
26171	  input.y:1.9-29:     accepted value: 'most'
26172
26173	* src/muscle-tab.c (muscle_percent_define_check_values): Use
26174	complain_at_indent to output with increased indentation level.
26175	* tests/input:at: Apply this change.
26176
261772012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
26178
26179	errors: indent "%define var" redefinition context
26180	This is the continuation of the work on the readability of errors
26181	context.
26182
26183	For example, what used to be:
26184	  input.y:2.9-11: %define variable 'var' redefined
26185	  input.y:1.9-11: previous definition
26186
26187	is now:
26188	  input.y:2.9-11: %define variable 'var' redefined
26189	  input.y:1.9-11:     previous definition
26190
26191	* src/muscle-tab.c (muscle_percent_define_insert): Use
26192	complain_at_indent to output with increased indentation level.
26193	* tests/input.at: Apply this change.
26194
261952012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
26196
26197	errors: indent "symbol redeclaration" context
26198	This is the continuation of the work on the readability of errors
26199	context.
26200
26201	For example, what used to be:
26202	  input.y:5.10-24: %printer redeclaration for <field2>
26203	  input.y:3.11-25: previous declaration
26204
26205	is now:
26206	  input.y:5.10-24: %printer redeclaration for <field2>
26207	  input.y:3.11-25:     previous declaration
26208
26209	* NEWS: Document this change.
26210	* src/symtab.c (symbol_redeclaration, semantic_type_redeclaration,
26211	user_token_number_redeclaration, default_tagged_destructor_set,
26212	default_tagless_destructor_set, default_tagged_printer_set,
26213	default_tagless_printer_set): Use complain_at_indent to
26214	output with increased indentation level.
26215	* tests/input.at: Apply this change.
26216
262172012-09-26  Theophile Ranquet  <ranquet@lrde.epita.fr>
26218
26219	errors: indent "result type clash" error context
26220	This used to be the format of the error report:
26221
26222	  input.y:6.5-10: result type clash on merge function 'merge': [...]
26223	  input.y:2.4-9: previous declaration
26224
26225	In order to distinguish the actual error from the context provided, we
26226	rather this new output:
26227
26228	  input.y:6.5-10: result type clash on merge function 'merge': [...]
26229	  input.y:2.4-9:     previous declaration
26230
26231	Another patch will introduce an "error: " prefix to all non-indented
26232	lines, giving yet better readability to the reports.
26233
26234	* src/complain.h (SUB_INDENT): Move to here.
26235	* src/reader.c (record_merge_function_type): Use complain_at_indent to
26236	output with increased indentation level.
26237	* src/scan-code.l (SUB_INDENT): Remove from here.
26238	* tests/glr-regression.at: Apply this change.
26239
262402012-09-25  Akim Demaille  <akim@lrde.epita.fr>
26241
26242	warnings: use the regular interface for s/r and r/r conflicts
26243	The current routines used to display s/r and r/r conflicts are both
26244	inconvenient from the programmer point of view (they do not use the
26245	warning infrastructure) and for the user (the messages are rather
26246	terse, not necessarily pleasant to read, and because they don't use
26247	the same routines, they look different).
26248
26249	It was due to the belief (dating back to the initial checked-in
26250	version of Bison) that, at some point, POSIX Yacc mandated the format
26251	for these messages.  Today, the Open Group's manual page for Yacc,
26252	<http://pubs.opengroup.org/onlinepubs/009695399/utilities/yacc.html>,
26253	explicitly states that the format of these messages is unspecified.
26254	See commit be7280480c175bed203883f524c7dcd6cf37c13d and
26255	<http://lists.gnu.org/archive/html/bison-patches/2002-12/msg00027.html>.
26256
26257	For a discussion on the chosen warning format, see
26258	http://lists.gnu.org/archive/html/bison-patches/2012-09/msg00039.html
26259
26260	In an effort to factor the handling of errors and warnings, use the
26261	Bison warning routines to report these messages.
26262
26263	* src/conflicts.c (conflicts_print): Rewrite with clearer sections
26264	about S/R and then R/R conflicts.
26265	(conflict_report): Remove, inlined in its sole
26266	caller...
26267	(conflicts_output): here.
26268	* tests/conflicts.at, tests/existing.at, tests/glr-regression.at,
26269	* tests/reduce.at, tests/regression.at: Adjust the expected results.
26270	* NEWS: Update.
26271
262722012-09-25  Akim Demaille  <akim@lrde.epita.fr>
26273
26274	regen
26275
262762012-09-25  Akim Demaille  <akim@lrde.epita.fr>
26277
26278	yacc: fix handling of CPP guards when no header is generated
26279	When no header was to be generated, Bison would issue:
26280
26281	  /* In a future release of Bison, this section will be replaced
26282	     by #include "".  */
26283	  #ifndef YY_
26284	  # define YY_
26285
26286	It now properly generates nothing.
26287
26288	* data/c.m4 (b4_cpp_guard_open, b4_cpp_guard_close): Issue nothing when
26289	the file name is empty.
26290	* data/yacc.c: Do not generate the above comment when there is no header
26291	to generate.
26292	* NEWS: Update.
26293
262942012-09-25  Akim Demaille  <akim@lrde.epita.fr>
26295
26296	gnulib: update
26297
262982012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26299
26300	conflicts: refactor the counting routines
26301	* src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Rename as...
26302	(count_sr_conflicts, count_rr_conflicts): these.
26303	Use size_t for counts.
26304	(count_sr_conflicts, count_rr_conflicts): New.
26305	Use them.
26306
263072012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26308
26309	%expect-rr is for GLR only
26310	* src/conflicts.c (conflicts_print): Complain about %expect-rr if not
26311	in GLR mode, regardless of the number of reduce/reduce conflicts.
26312	* tests/conflicts.at (%expect-rr non GLR): New test.
26313	* NEWS: Update.
26314
263152012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26316
26317	TODO: lalr1.cc master vs maint
26318	* TODO: here.
26319
263202012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26321
26322	c++: coding style fixes
26323	* data/lalr1.cc, tests/c++.at: Formatting changes.
26324
263252012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26326
26327	Revert "introduced a GCC-like -Werror=type"
26328	This reverts commit 981c53e257f1974854edc4f6ad0e88c7f18e2bea.
26329
263302012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26331
26332	Revert "made previous commit less hairy"
26333	This reverts commit fd01e1d05ea3e627033d148b5400b99a18ac7ba3.
26334
263352012-09-21  Akim Demaille  <akim@lrde.epita.fr>
26336
26337	Revert "new Werror report format fixed in a test"
26338	This reverts commit 41511178a71ebaf81bde7ffc682c575537af45cb.
26339
263402012-09-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
26341
26342	new Werror report format fixed in a test
26343	* tests/input.at : replaced [-Wyacc] with [-Werror=yacc]
26344
26345	todo: fix the other failed test of the suite, tests/conflicts.at:1554
26346
263472012-09-21  Theophile Ranquet  <ranquet@lrde.epita.fr>
26348
26349	made previous commit less hairy
26350	* src/getargs.c : here
26351
263522012-09-20  Theophile Ranquet  <ranquet@lrde.epita.fr>
26353
26354	introduced a GCC-like -Werror=type
26355	* src/complain.h : errors_flag variable
26356	* src/complain.c : actual stuff happens here
26357	* src/conflits.c : differentiated SR and RR conflicts
26358	* src/getargs.c : flags_argmatch recognizes the new -Werror format
26359
263602012-09-04  Akim Demaille  <akim@lrde.epita.fr>
26361
26362	regen
26363
263642012-09-04  Akim Demaille  <akim@lrde.epita.fr>
26365
26366	Merge remote-tracking branch 'origin/maint'
26367	* origin/maint:
26368	  maint: remove useless file
26369	  update files to ignore
26370	  remove useless include
26371	  use locale-indep. c_is* functions for parsing, not isspace, isprint etc
26372	  gnulib: update
26373	  --help: include a place to report translation issues
26374	  tests: style changes
26375	  tests: fix push-pull test
26376	  yacc.c: style changes
26377
263782012-09-04  Akim Demaille  <akim@lrde.epita.fr>
26379
26380	maint: remove useless file
26381	* externals/bootstrap.cfg: Remove.
26382	This file was used by a specific build system.
26383	It was added to the master repository by accident.
26384
263852012-09-04  Akim Demaille  <akim@lrde.epita.fr>
26386
26387	update files to ignore
26388	* doc/.gitignore: Don't ignore split info files as we don't split our
26389	info file.
26390	See <http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00006.html>.
26391
263922012-09-04  Akim Demaille  <akim@lrde.epita.fr>
26393
26394	remove useless include
26395	* src/system.h: Don't include sys/types.h.
26396	Reported by Eric Blake,
26397	<http://lists.gnu.org/archive/html/bug-bison/2012-09/msg00002.html>.
26398	(FUNCTION_PRINT): Remove, unused.
26399
264002012-09-03  Jim Meyering  <meyering@redhat.com>
26401
26402	use locale-indep. c_is* functions for parsing, not isspace, isprint etc
26403	* src/parse-gram.y: Include "c-ctype.h".
26404	(add_param): Parse with c_isspace, not isspace.
26405	* src/parse-gram.c: Likewise.
26406	* src/scan-gram.l: Include c-ctype.h, not ctype.h.
26407	(SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER): Use c_isspace and c_isprint,
26408	not ctype.h's locale-dependent functions.
26409
264102012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26411
26412	gnulib: update
26413
264142012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26415
26416	--help: include a place to report translation issues
26417	http://lists.gnu.org/archive/html/bug-bison/2012-08/msg00007.html
26418	shows that it is useful to help users report translation issues.
26419	While at it, include other informative bits that the coreutils shows.
26420
26421	* src/getargs.c (usage): Report more URLs where the user can
26422	refer to.
26423	Mostly copied/pasted from coreutils' emit_ancillary_info function.
26424
264252012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26426
26427	news: style changes
26428	* NEWS: Minor improvements.
26429
264302012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26431
26432	use -Wdeprecated for obsolete %define variable names
26433	* src/muscle-tab.c (muscle_percent_variable_update): Here.
26434	* tests/input.at (%define backward compatibility): Update expectations.
26435
264362012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26437
26438	introduce -Wdeprecated
26439	GCC seems to be using "deprecated" consistently over "obsoleted", so
26440	use -Wdeprecated rather than -Wobsolete.
26441
26442	* src/complain.h (warnings): Add Wdeprecated.
26443	* src/complain.c (warnings_print_categories): Adjust.
26444	* src/getargs.c: Likewise.
26445	* doc/bison.texi: Document it.
26446
26447	* src/scan-code.l: Use this category for the trailing ';' support.
26448	* tests/actions.at: Adjust expected output.
26449
264502012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26451
26452	undefined but unused is a warning
26453	* src/symtab.c (symbol_check_defined): Undeclared symbols are only
26454	a warning.
26455	* tests/input.at (Undeclared symbols used for a printer or destructor):
26456	Rename as...
26457	(Undefined symbols): this, and check this case.
26458	* NEWS: Doc it.
26459
264602012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26461
26462	glr.cc: %defines is no longer mandatory
26463	* data/glr.cc: No longer require %defines.
26464	When it is not given, define the position and location classes instead
26465	of including their headers.
26466	(b4_shared_declarations): Use the original parse-params.
26467	* data/glr.c (b4_shared_declarations): Define only if undefined.
26468	* tests/actions.at, tests/calc.at: No longer force the use of %defines
26469	for glr.cc.
26470	* NEWS: Doc it.
26471
264722012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26473
26474	todo: check push parsers
26475
264762012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26477
26478	style: remove useless C++ provisio
26479	* src/complain.h: here.
26480
264812012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26482
26483	parser: style changes
26484	* src/parse-gram.y: Avoid deprecated directives.
26485
264862012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26487
26488	doc: address a fixme
26489	* doc/bison.texi (Calc++ Parser): Add a cross-reference.
26490
264912012-09-03  Akim Demaille  <akim@lrde.epita.fr>
26492
26493	style changes
26494	* data/glr.cc, tests/actions.at: Fix comments.
26495	* src/symtab.h, src/symtab.c: Fix indentation/comments.
26496	* src/symlist.c: Fix indentation.
26497
264982012-08-31  Akim Demaille  <akim@lrde.epita.fr>
26499
26500	tests: style changes
26501	* tests/torture.at (AT_DATA_STACK_TORTURE): M4 style changes to
26502	improve readability.
26503	Fix an assertion which, because of a <= instead of ==, did not check
26504	new_status as visibly meant.
26505	(get_args): New.
26506
265072012-08-31  Akim Demaille  <akim@lrde.epita.fr>
26508
26509	tests: fix push-pull test
26510	* tests/torture.at: %push-pull-parser is no longer supported.
26511
265122012-08-31  Akim Demaille  <akim@lrde.epita.fr>
26513
26514	yacc.c: style changes
26515	* data/yacc.c: (yytoken): Define with initial value.
26516
265172012-08-12  Akim Demaille  <akim@lrde.epita.fr>
26518
26519	refactoring: define variables with a value
26520	* src/muscle-tab.c: Where possible, fuse definition and initial assignment.
26521
265222012-08-12  Akim Demaille  <akim@lrde.epita.fr>
26523
26524	minor refactoring: shorten variable names
26525	* src/scan-skel.l (at_directive_argc, at_directive_argv)
26526	(AT_DIRECTIVE_ARGC_MAX): Rename as...
26527	(argc, argv, ARGC_MAX): these, as there is no possible confusion.
26528	(flags): New.
26529	(QPUTS): Remove, inline its only use.
26530
265312012-08-12  Akim Demaille  <akim@lrde.epita.fr>
26532
26533	obstacks: simplifications
26534	* src/system.h (obstack_finish0): New.
26535	Use it to simplify several uses.
26536	* src/muscle-tab.h (MUSCLE_INSERTF): New.
26537	* src/muscle-tab.c: Use obstack_printf where simpler.
26538
265392012-08-12  Akim Demaille  <akim@lrde.epita.fr>
26540
26541	minor refactoring in user code scanning
26542	* src/scan-code.l (show_sub_message, show_sub_messages): Instead of a
26543	Boolean, take a "warnings" argument.
26544	Avoid storing printf-like format strings in a variable, so that GCC
26545	can check them.
26546
265472012-08-12  Akim Demaille  <akim@lrde.epita.fr>
26548
26549	minor refactoring in user code scanning
26550	* src/scan-code.l (show_sub_message): New, extracted from...
26551	(show_sub_messages): here.
26552
265532012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26554
26555	tests: strengthen the trailing spaces check
26556	* tests/calc.at: here.
26557	* data/glr.c: Fix accordingly.
26558
265592012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26560
26561	regen
26562
265632012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26564
26565	Merge branch 'maint'
26566	* origin/maint:
26567	  maint: post-release administrivia
26568	  version 2.6.2
26569	  NEWS: update.
26570	  yacc: remove trailing end of line at end of file
26571	  thanks: fix a contributor name
26572	  gnulib: update
26573	  tests: synch line -> syncline, for consistency
26574	  tests: synclines: style changes
26575	  tests: synclines: fix perl invocation
26576	  regen
26577	  c++: trailing end-of-lines in %parse-param
26578	  tests: simplify
26579
265802012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26581
26582	regen
26583
265842012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26585
26586	remove support for lint
26587	Basically revert commit 12ce2df60d16961eaa03a5aa009eeaa645e4e1cb.
26588	http://lists.gnu.org/archive/html/bison-patches/2012-08/msg00004.html
26589
26590	* data/c.m4, data/glr.c, data/yacc.c (YYID): Remove.
26591	No longer use ARGSUSED.
26592	* src/getargs.c: Restore simpler inclusion of getopt.h (anyway, since
26593	then we now use gnulib which certainly protects us from such issues).
26594
265952012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26596
26597	skeletons: renamings after knr removal
26598	* data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
26599	Rename as...
26600	(b4_yydestruct_define, b4_yy_symbol_print_define): these, for consistency.
26601	* data/glr.c, data/glr.cc, data/yacc.c: Adjust.
26602
266032012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26604
26605	maint: post-release administrivia
26606	* NEWS: Add header line for next release.
26607	* .prev-version: Record previous version.
26608	* cfg.mk (old_NEWS_hash): Auto-update.
26609
266102012-08-03  Akim Demaille  <akim@lrde.epita.fr>
26611
26612	version 2.6.2
26613	* NEWS: Record release date.
26614
266152012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26616
26617	c++: fix a comment
26618	* data/c++.m4: Be sure to attach a ';' to its declaration, otherwise
26619	it appears in the preceding comment.
26620
266212012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26622
26623	skeletons: simplify after knr removal
26624	* data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate):
26625	They no longer need an argument, it has a single possible value.
26626	* data/glr.c, data/yacc.c: Adjust.
26627
266282012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26629
26630	skeletons: renamings after knr removal
26631	* data/c.m4 (b4_c_comment_, b4_c_args, b4_c_function_def)
26632	(b4_c_function_decl, b4_c_formals, b4_c_call, b4_c_arg): Rename as...
26633	(b4_comment, b4_args, b4_function_define, b4_function_declare,
26634	b4_formals, b4_function_call, b4_arg): these.
26635	* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Adjust.
26636
266372012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26638
26639	skeletons: b4_args -> b4_join to prepare forthcoming changes
26640	* data/bison.m4 (b4_args, _b4_args): Rename as...
26641	(b4_join, _b4_join): these.
26642	* data/c++.m4, data/lalr1.cc, data/variant.hh: Adjust.
26643
266442012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26645
26646	regen
26647
266482012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26649
26650	YYPARSE_PARAM: drop support
26651	* data/yacc.c: No longer support it.
26652	* doc/bison.texi, tests/headers.at: Adjust.
26653	* NEWS: Document.
26654
266552012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26656
26657	skeletons: remove K&R C support
26658	* data/c.m4 (b4_c_modern, b4_c_knr_formal_names, b4_c_knr_formal_decls)
26659	(b4_c_knr_formal_decl, b4_c_formal_names, b4_c_formal_decls)
26660	(b4_c_formal_decl): Remove.
26661	(b4_c_ansi_formal_names, b4_c_ansi_formal_decls, b4_c_ansi_formal_decl):
26662	Rename as...
26663	(b4_c_formal_names, b4_c_formal_decls, b4_c_formal_decl):
26664	these.
26665	* data/glr.c, data/glr.cc, data/yacc.c: Adjust.
26666
266672012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26668
26669	NEWS: update.
26670	* NEWS: Catch up with the other changes from 2.6.1.
26671
266722012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26673
26674	yacc: remove trailing end of line at end of file
26675	There are still spurious spaces at the end of some lines.  But this is
26676	addressed in the master branch, and I am reluctant to try to backport
26677	this.
26678
26679	* data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: here.
26680	* tests/calc.at (AT_CHECK_SPACES): New.
26681	Use it.
26682	Be sure not to introduce trailing empty lines in the *.y files.
26683	* NEWS: Doc it.
26684	* cfg.mk (syntax-check): Remove the exception.
26685
266862012-08-02  Akim Demaille  <akim@lrde.epita.fr>
26687
26688	thanks: fix a contributor name
26689	* THANKS: On his request.
26690
266912012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26692
26693	gnulib: update
26694
266952012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26696
26697	tests: synch line -> syncline, for consistency
26698	* tests/synclines.at: Do it, as "syncline" is used consistently
26699	everywhere else in Bison.
26700
267012012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26702
26703	tests: synclines: style changes
26704	* tests/synclines.at (AT_TEST_SYNCLINE): Rename as...
26705	(AT_TEST): this.
26706	Use pushdef/popdef.
26707	Formatting changes.
26708	Use '+' instead of '*' where appropriate.
26709
267102012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26711
26712	tests: synclines: fix perl invocation
26713	Reported by Summum Bonum.
26714
26715	* tests/synclines.at: Fix Perl invocation: its -f is not like sed's.
26716
267172012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26718
26719	regen
26720
267212012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26722
26723	c++: trailing end-of-lines in %parse-param
26724	* src/parse-gram.y (add_param): No only skip ' ' and '\t', skip all
26725	leading and trailing spaces.
26726	* tests/regression.at (Lex and parse params): Check it.
26727	* NEWS: Document it.
26728
267292012-08-01  Akim Demaille  <akim@lrde.epita.fr>
26730
26731	tests: simplify
26732	* tests/regression.at: Remove useless compilations: AT_FULL_COMPILE
26733	includes the compilation by bison.
26734
267352012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26736
26737	todo: more items
26738	* TODO: $ in the epilogue, and obstack_copy.
26739
267402012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26741
26742	Merge branch 'maint'
26743	* maint:
26744	  use obstack_printf
26745	  scanner: restore a missing start condition
26746	  gnulib: update
26747	  maint: post-release administrivia
26748	  version 2.6.1
26749	  gnulib: update
26750	  maint: fix some syntax-check issues
26751	  tests: do not depend on __cplusplus to decide for C++ or C output
26752
267532012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26754
26755	tests: comment changes
26756	* tests/actions.at, tests/input.at: here.
26757
267582012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26759
26760	tests: really check the set of generated files
26761	* tests/output.at (AT_CHECK_OUTPUT): It used to check that the
26762	expected files are indeed generated, but it did not check that
26763	there are no additional ones.
26764	Do that, and adjust expectations (in particular alphabetical order).
26765
267662012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26767
26768	lalr1.cc: do not create stack.hh without %defines
26769	* data/stack.hh (b4_stack_define): New.
26770	* data/lalr1.cc: Use it when %defines is not passed.
26771	* tests/output.at: Adjust expected output.
26772
267732012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26774
26775	lalr1.cc: location.hh and position.hh are not generated without %defines
26776	* data/location.cc (b4_position_define, b4_location_define): New.
26777	(location.hh, position.hh): Generate only if %defines.
26778	* data/lalr1.cc: therefore, define these classes when locations are
26779	needed, but headers are not generated.
26780	* tests/output.at: Check that these files are not generated.
26781	* NEWS: Document.
26782
267832012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26784
26785	lalr1.cc: no longer require %defines.
26786	* data/lalr1.cc: Generate the parser header only when %defines is
26787	passed.
26788	* tests/calc.at: Check it.
26789
267902012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26791
26792	skeletons: style changes
26793	* data/glr.c, data/lalr1.cc: Use more consistent comments,
26794	and YY_NULL declaration.
26795
267962012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26797
26798	glr.cc, lalr1.cc: define b4_shared_declarations
26799	* data/glr.cc, data/lalr1.cc: here.
26800	The name is no longer right, but at least it is consistent with
26801	the other skeletons.
26802
268032012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26804
26805	glr.cc: no longer require location support
26806	* data/glr.cc: Use b4_locations_if where appropriate.
26807	* data/lalr1.cc: M4 quotation changes to highlight code duplication
26808	with glr.cc.
26809	* tests/calc.at: Check glr.cc with and without %location.
26810	While at it, fuse multiple %parse-params into one.
26811	* tests/actions.at: Simplify.
26812	* NEWS: Doc this.
26813	Some other wording changes.
26814
268152012-07-31  Akim Demaille  <akim@lrde.epita.fr>
26816
26817	use obstack_printf
26818	This is not just nicer, it is also much safer, since we were
26819	using sprintf...
26820
26821	* bootstrap.conf: Require it.
26822	* src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3)
26823	(obstack_fgrow4): Remove.
26824	Adjust dependencies.
26825
268262012-07-30  Akim Demaille  <akim@lrde.epita.fr>
26827
26828	scanner: restore a missing start condition
26829	$ flex src/scan-skel.l
26830	src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_ARGS
26831	src/scan-skel.l:145: multiple <<EOF>> rules for start condition SC_AT_DIRECTIVE_SKIP_WS
26832	This is warning, and it seems there are no means to make it an error.
26833
26834	* src/scan-skel.l: Restore the start-condition INITIAL for an <<EOF>>
26835	clause.
26836
268372012-07-30  Akim Demaille  <akim@lrde.epita.fr>
26838
26839	gnulib: update
26840
268412012-07-30  Akim Demaille  <akim@lrde.epita.fr>
26842
26843	maint: post-release administrivia
26844	* NEWS: Add header line for next release.
26845	* .prev-version: Record previous version.
26846	* cfg.mk (old_NEWS_hash): Auto-update.
26847
268482012-07-30  Akim Demaille  <akim@lrde.epita.fr>
26849
26850	version 2.6.1
26851	* NEWS: Record release date.
26852
268532012-07-30  Akim Demaille  <akim@lrde.epita.fr>
26854
26855	gnulib: update
26856
268572012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26858
26859	maint: fix some syntax-check issues
26860	* cfg.mk: Nuke the following warnings which are confused by our
26861	text reports (that state that the error token is number 256).
26862	  prohibit_magic_number_exit
26863	  ../../doc/bison.texi:8170:error (256)
26864	  ../../tests/conflicts.at:570:error (256)
26865	  ../../tests/conflicts.at:673:error (256)
26866	  ../../tests/conflicts.at:811:error (256)
26867	  ../../tests/conflicts.at:1154:error (256)
26868	  ../../tests/regression.at:281:error (256)
26869	  ../../tests/regression.at:582:error (256)
26870	  maint.mk: use EXIT_* values rather than magic number
26871
268722012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26873
26874	regen
26875
268762012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26877
26878	tests: do not depend on __cplusplus to decide for C++ or C output
26879	Since we do support compiling C code with a C++ compiler.
26880
26881	* tests/actions.at (Qualified $$ in actions): Use AT_SKEL_CC_IF.
26882
268832012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26884
26885	Merge remote-tracking branch 'origin/maint'
26886	* origin/maint: (29 commits)
26887	  regen
26888	  synclines: remove spurious empty line
26889	  also support $<foo>$ in the %initial-action
26890	  skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
26891	  regen
26892	  printer/destructor: translate only once
26893	  factor the handling of m4 escaping
26894	  news: schedule the removal of the ";" hack
26895	  style changes in the scanners
26896	  regen
26897	  support $<tag>$ in printers and destructors
26898	  scan-code: factor the handling of the type in $<TYPE>$
26899	  muscles: fix another occurrence of unescaped type name
26900	  glr.cc: fix the handling of yydebug
26901	  gnulib: update
26902	  formatting changes
26903	  tests: fix an assertion
26904	  tests: adjust to GCC 4.8, which displays caret errors
26905	  be sure to properly escape type names
26906	  obstack_quote: escape and quote for M4
26907	  muscles: shuffle responsabilities
26908	  muscles: make private functions static
26909	  muscles: rename private functions/macros
26910	  obstack_escape: escape M4 characters
26911	  remove dead macro
26912	  maint: style changes
26913	  doc: avoid problems with case insensitive file systems
26914	  configure: fix botched quoting
26915	  news: fix typo.
26916
269172012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26918
26919	regen
26920
269212012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26922
26923	synclines: remove spurious empty line
26924	* data/bison.m4 (b4_syncline): Do not start with an empty line.
26925
269262012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26927
26928	also support $<foo>$ in the %initial-action
26929	scan-code.l is already passing argument to b4_dollar_dollar for the
26930	initial acton, but its definition (of b4_dollar_dollar) does not use
26931	this argument.
26932
26933	Generalize this definition, and use it for the %initial-action too.
26934
26935	* data/c.m4 (b4_dollar_dollar_, b4_dollar_pushdef, b4_dollar_popdef):
26936	Instead of expecting a pointer, require a value, and use ".".
26937	Since they are now generic enough, move to...
26938	* data/c-like.m4: this new file.
26939	* data/c.m4, data/java.m4: Load it.
26940	* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Use
26941	b4_dollar_pushdef for the %initial-action.
26942	* tests/actions.at: Check that.
26943	* data/Makefile.am: Adjust.
26944	* NEWS, doc/bison.texi: Document.
26945
269462012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26947
26948	skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
26949	M4 is really making it uselessly hard to define macros that define
26950	macros.
26951	* data/c.m4 (b4_dollar_pushdef, b4_dollar_popdef): New.
26952	Use it.
26953
269542012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26955
26956	regen
26957
269582012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26959
26960	printer/destructor: translate only once
26961	Currently "%printer {...} a b c d e f" translates the {...} six times.
26962	Not only is this bad for time and space, it also issues six times the
26963	same warnings.
26964
26965	* src/symlist.h, src/symlist.c (symbol_list_destructor_set)
26966	(symbol_list_printer_set): Take the action as code_props instead of
26967	const char *.
26968	* src/parse-gram.y: Translate these actions here.
26969	* src/scan-code.h: Comment change.
26970	* tests/input.at: Check that warnings are issued only once.
26971
269722012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26973
26974	factor the handling of m4 escaping
26975	The conversion from @ to @@ and so forth is coded is too many
26976	different places.  Factor, a bit.
26977
26978	* src/scan-code.l: Instead of duplicating the logic of obstack_escape,
26979	use it.
26980	It sure is less efficient, but the cost is negligible.
26981	This allows to factor rules that are alike.
26982	And to factor some start-condition clauses.
26983	* tests/input.at (Stray $ or @): New.
26984	* NEWS: Document it.
26985
269862012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26987
26988	news: schedule the removal of the ";" hack
26989	scan-code.l is significantly more complex because of this.
26990
26991	* NEWS: Doc it.
26992
269932012-07-27  Akim Demaille  <akim@lrde.epita.fr>
26994
26995	style changes in the scanners
26996	* src/scan-code.l, src/scan-skel.l: Use a more traditional indentation
26997	style for start-conditions.
26998	Prefer "continue" to a comment, for empty actions.
26999	Strip useless {}.
27000	Remove useless start-condition clauses.
27001
270022012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27003
27004	regen
27005
270062012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27007
27008	support $<tag>$ in printers and destructors
27009	* src/scan-code.l (SC_SYMBOL_ACTION): Accept $<tag>$, not just $$.
27010	* data/c.m4 (b4_dollar_dollar_): New.
27011	(b4_symbol_actions): Let b4_dollar_dollar use b4_dollar_dollar_.
27012	* NEWS, doc/bison.texi: Document it.
27013	* tests/actions.at: Check this for C and C++.
27014
270152012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27016
27017	scan-code: factor the handling of the type in $<TYPE>$
27018	* src/scan-code.l (fetch_type_name): New.
27019	(handle_action_dollar): Use it.
27020	(gt_ptr): Remove, useless.
27021
270222012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27023
27024	muscles: fix another occurrence of unescaped type name
27025	* src/output.c (quoted_output): Split into...
27026	(quoted_output, string_output): these.
27027	Use the former when outputting a type_name.
27028	* tests/input.at: Check this case.
27029	* src/symtab.h: Comment changes.
27030
270312012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27032
27033	glr.cc: fix the handling of yydebug
27034	* data/glr.cc (yydebug_): Remove, unused.
27035	(set_debug_level, debug_level): Work on yydebug instead.
27036	* doc/bison.texi, NEWS: Document this.
27037
270382012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27039
27040	gnulib: update
27041
270422012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27043
27044	formatting changes
27045	* src/symtab.h: here.
27046
270472012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27048
27049	tests: fix an assertion
27050	* tests/local.at (AT_YYLEX_DEFINE): Be sure to check the array
27051	against its length, not its size in bytes.
27052
270532012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27054
27055	tests: adjust to GCC 4.8, which displays caret errors
27056	With GCC 4.8, the tests on synclines are skipped.  Transform
27057
27058	  input.y:1:2: error: #error "1"
27059	   #error "1"
27060	    ^
27061
27062	into
27063
27064	  input.y:1: #error "1"
27065
27066	* tests/synclines.at (AT_SYNCLINES_COMPILE): Do it, using Perl instead of
27067	sed.
27068
270692012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27070
27071	be sure to properly escape type names
27072	* src/scan-code.l: Use obstack_quote when passing type_name to m4.
27073	* tests/input.at (Code injection): New.
27074	* NEWS: Document it.
27075	Thanks to Paul Eggert for the wording.
27076
270772012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27078
27079	obstack_quote: escape and quote for M4
27080	* src/system.h (obstack_quote): New.
27081	* src/muscle-tab.c: Use it instead of obstack_escape where applicable.
27082	* src/scan-code.l: Since obstack_quote supports NULL, leave type_name
27083	as NULL instead of defaulting to "".
27084
270852012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27086
27087	muscles: shuffle responsabilities
27088	* src/muscle-tab.c (muscle_boundary_grow): Be in charge of quotation,
27089	instead of leaving this to the caller.
27090
270912012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27092
27093	muscles: make private functions static
27094	* src/muscle-tab.h, src/muscle-tab.c (muscle_boundary_grow)
27095	(muscle_location_grow): Now static.
27096
270972012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27098
27099	muscles: rename private functions/macros
27100	* src/muscle-tab.c (MUSCLE_COMMON_DECODE, muscle_string_decode)
27101	(muscle_location_decode): Not related to muscles, rename as...
27102	(COMMON_DECODE, string_decode, location_decode): these.
27103
271042012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27105
27106	obstack_escape: escape M4 characters
27107	* src/muscle-tab.h (MUSCLE_OBSTACK_SGROW): This is not related to
27108	muscles, so move to, and rename as...
27109	* src/system.h (obstack_escape): this.
27110	Adjust dependencies.
27111
271122012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27113
27114	remove dead macro
27115	* src/system.h (DEFAULT_TMPDIR): Remove, unused.
27116
271172012-07-26  Akim Demaille  <akim@lrde.epita.fr>
27118
27119	maint: style changes
27120	* src/scan-code.l: Remove useless braces.
27121	Formatting changes.
27122	Prefer NULL to 0.
27123	* src/muscle-tab.c, src/system.h: Formatting changes.
27124
271252012-07-24  Akim Demaille  <akim@lrde.epita.fr>
27126
27127	doc: avoid problems with case insensitive file systems
27128	makeinfo --html generates index.html, and the node "Index" will result
27129	in Index.html.  On case insensitive file systems, such as on Mac OS X
27130	by default, this results in a single, invalid, file (Texinfo 4.13).
27131	See http://lists.gnu.org/archive/html/bug-texinfo/2012-07/msg00032.html
27132
27133	* doc/bison.texi (Index): Rename as...
27134	(Index of Terms): this.
27135
271362012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
27137
27138	configure: fix botched quoting
27139	* configure.ac: In the AC_SUBST call on 'VALGRIND_PREBISON'.  Without
27140	this change, when running ./configure, I see:
27141
27142	    ...
27143	    checking for valgrind... valgrind
27144	    ./configure: line 35221: -q: command not found
27145	    checking for Java compiler... gcj -C -fsource=1.3 -ftarget=1.4
27146	    ...
27147
271482012-07-24  Akim Demaille  <akim@lrde.epita.fr>
27149
27150	regen
27151
271522012-07-24  Akim Demaille  <akim@lrde.epita.fr>
27153
27154	yystype, yyltype: remove.
27155	* data/c.m4: here.
27156	* NEWS: Doc it.
27157
271582012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27159
27160	regen
27161
271622012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27163
27164	YYFAIL: remove.
27165	* data/lalr1.java, data/yacc.c, src/scan-code.l: Remove YYFAIL support.
27166	* NEWS, TODO: Update.
27167
271682012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27169
27170	todo: update.
27171	* TODO: obsolete items.
27172
271732012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27174
27175	regen.
27176
271772012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27178
27179	space changes.
27180	* data/bison.m4 (b4_symbol_action): Remove spurious eol in the output.
27181
271822012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27183
27184	parser: fix %printer usage.
27185	* src/parse-gram.y: Instead of stderr, using yyo.
27186
271872012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27188
27189	parser: factor the handling of code_props
27190	* src/parse-gram.y: Now that %printer and %destructor are treated
27191	equally, let...
27192	(code_props_type): handle them.
27193
271942012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27195
27196	parser: factor handling of type tags
27197	* src/parse-gram.y: Now that <*> and <> are processed like regular
27198	tags, let...
27199	(tag): handle them.
27200
272012012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27202
27203	regen.
27204
272052012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27206
27207	simplify the handling of <> and <*>'s code_props.
27208	Currently they are treated in separated variables, contrary to other
27209	<TYPE> code_props.  This duplicates code (and messages for translators)
27210	uselessly, as demonstrated by the fact that thanks to this patch, now
27211	useless <*> and <> code_props are reported like the others.
27212
27213	* src/parse-gram.y (generic_symlist_item): Treat "<*>" and "<>" as regular
27214	type tags.
27215	* src/symlist.h, src/symlist.c (symbol_list_default_tagged_new)
27216	(symbol_list_default_tagless_new,SYMLIST_DEFAULT_TAGGED)
27217	(SYMLIST_DEFAULT_TAGLESS): Remove.
27218	* src/symtab.h, src/symtab.c (default_tagged_code_props)
27219	(default_tagless_code_props, default_tagged_code_props_set)
27220	(default_tagless_code_props_set): Remove.
27221	(symbol_code_props_get): Default to <*> or <>'s code_props.
27222
27223	* tests/actions.at: Complete expected errors: there are new warnings.
27224	* tests/input.at: Likewise.
27225	(Useless printers or destructors): Extend.
27226
272272012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27228
27229	allow modification on retrieved code_props.
27230	The logic to compute the %printer or %destructor to used (i.e., a
27231	code_props) is implemented twice: one, of course, in
27232	symbol_code_props_get, and another time in symbol_check_defined to
27233	record the fact that a code_props is used (so that we can reported
27234	unused ones).  Let the former use the latter.
27235
27236	I would probably use "mutable" in C++ and keep these guys const,
27237	but this is C.  And casting away constness triggers warnings.
27238
27239	* src/scan-code.h, src/scan-code.l (code_props_none): Is not const.
27240	* src/symtab.h, src/symtab.c (symbol_code_props_get): The symbol
27241	is not const.
27242	(symbol_check_defined): Use it.
27243
272442012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27245
27246	maint: regen.
27247
272482012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27249
27250	maint: fix bison's own header guards.
27251	Because I'm using a VPATH build with an absolute srcdir, I have
27252	GRAM__USERS_AKIM_SRC_GNU_BISON_SRC_PARSE_GRAM_H.  Before, I was using
27253	a relative srcdir, and had GRAM_______SRC_PARSE_GRAM_H (coming from
27254	../../).  Let it be GRAM_SRC_PARSE_GRAM_H.
27255
27256	* tests/bison.in: Do not depend on the value of $top_srcdir for
27257	Bison itself.
27258	If we were to use relative paths from .c to .y, we would not have
27259	this problem.
27260
272612012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27262
27263	maint: add missing const.
27264	* src/symtab.h, src/symtab.c (symbol_print): here.
27265
272662012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27267
27268	style changes.
27269	* src/parse-gram.y, src/symtab.c: Space changes.
27270	* src/symtab.h: Comment changes.
27271
272722012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27273
27274	autoconf: update.
27275	* submodules/autoconf: here.
27276	No significant changes for our use of m4sugar.m4.
27277
272782012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27279
27280	output: no longer use b4_tokens.
27281	* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java, data/yacc.c:
27282	Since the previous commit, b4_tokens_define and the like no longer need
27283	b4_tokens.
27284	* src/output.c (token_definitions_output): Remove.
27285
272862012-07-22  Akim Demaille  <akim@lrde.epita.fr>
27287
27288	output: use the token list to define the yytokentype
27289	There are currently two systems used to pass information about tokens to
27290	m4: the original one, and another, which is used for instance for
27291	printers and destructors, variants etc.  Move to using only the latter.
27292
27293	* data/bison.m4 (b4_symbol_map, b4_token_visible_if)
27294	(b4_token_has_definition, b4_any_token_visible_if, b4_token_format): New.
27295	* data/c++.m4, data/c.m4, data/glr.c, data/java.m4: Adjust to use them.
27296
272972012-07-20  Akim Demaille  <akim@lrde.epita.fr>
27298
27299	tests: fix VPATH issue
27300	* examples/test: With an absolute VPATH build, "../" is incorrect.
27301
273022012-07-20  Akim Demaille  <akim@lrde.epita.fr>
27303
27304	news: fix typo.
27305	* NEWS: here.
27306	Reported by Ben Pfaff.
27307
273082012-07-19  Akim Demaille  <akim@lrde.epita.fr>
27309
27310	Merge remote-tracking branch 'origin/maint'
27311	* origin/maint:
27312	  maint: update gnu-web-doc-update.
27313	  maint: post-release administrivia
27314	  version 2.6
27315	  maint: prepare for release 2.6
27316	  maint: post-release administrivia
27317	  version 2.5.91
27318	  maint: prepare NEWS.
27319	  maint: fix spaces.
27320	  tests: adjust to case where the C compiler is actually a C++ compiler
27321	  tests: fix dependencies
27322	  doc: fix Texinfo command
27323	  maint: Valgrind on OS X.
27324	  tests: be sure that backups are safe.
27325	  maint: dead comment.
27326	  tests: refactor for legibility.
27327	  tests: refactor the bison invocations.
27328	  maint: fix syntax-check ignore patterns.
27329	  gnulib: update
27330	  gnulib: update.
27331	  gnulib: update
27332
273332012-07-19  Akim Demaille  <akim@lrde.epita.fr>
27334
27335	maint: update gnu-web-doc-update.
27336	* gnulib: here.
27337
273382012-07-19  Akim Demaille  <akim@lrde.epita.fr>
27339
27340	maint: post-release administrivia
27341	* NEWS: Add header line for next release.
27342	* .prev-version: Record previous version.
27343	* cfg.mk (old_NEWS_hash): Auto-update.
27344
273452012-07-19  Akim Demaille  <akim@lrde.epita.fr>
27346
27347	version 2.6
27348	* NEWS: Record release date.
27349
273502012-07-19  Akim Demaille  <akim@lrde.epita.fr>
27351
27352	maint: prepare for release 2.6
27353	* NEWS: here.
27354
273552012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27356
27357	maint: post-release administrivia
27358	* NEWS: Add header line for next release.
27359	* .prev-version: Record previous version.
27360	* cfg.mk (old_NEWS_hash): Auto-update.
27361
273622012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27363
27364	version 2.5.91
27365	* NEWS: Record release date.
27366
273672012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27368
27369	maint: prepare NEWS.
27370
273712012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27372
27373	maint: fix spaces.
27374	* build-aux/Makefile.am: here.
27375
273762012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27377
27378	tests: adjust to case where the C compiler is actually a C++ compiler
27379	* tests/atlocal.in (CC_IS_CXX): New.
27380	* tests/headers.at (Several parsers): Use it.
27381
273822012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27383
27384	tests: fix dependencies
27385	* tests/Makefile.am: we need atconfig and atlocal to be up to date
27386	when calling testsuite.
27387
273882012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27389
27390	doc: fix Texinfo command
27391	* doc/bison.texi: In parens, use @pxref.
27392
273932012-07-18  Akim Demaille  <akim@lrde.epita.fr>
27394
27395	maint: Valgrind on OS X.
27396	* configure.ac (VALGRIND_PREBISON): New.
27397	* tests/Makefile.am (maintainer-check-valgrind): Use it.
27398	* etc/darwin11.4.0.supp: New.
27399	* configure.ac, etc/Makefile.am: Use it.
27400	* configure.ac: Disable Valgrind on Mac OS X.
27401	* README-hacking: Explain why.
27402
274032012-07-17  Akim Demaille  <akim@lrde.epita.fr>
27404
27405	tests: be sure that backups are safe.
27406	* tests/local.at (at_save_special_files): here.
27407
274082012-07-17  Akim Demaille  <akim@lrde.epita.fr>
27409
27410	maint: dead comment.
27411	* etc/README: here.
27412
274132012-07-17  Akim Demaille  <akim@lrde.epita.fr>
27414
27415	tests: refactor for legibility.
27416	* tests/local.at (AT_BISON_CHECK_WARNINGS, AT_BISON_CHECK_WARNINGS_):
27417	New.
27418
274192012-07-17  Akim Demaille  <akim@lrde.epita.fr>
27420
27421	tests: refactor the bison invocations.
27422	* tests/local.at (m4_null_if, AT_BISON_CHECK_): New.
27423
274242012-07-17  Akim Demaille  <akim@lrde.epita.fr>
27425
27426	maint: fix syntax-check ignore patterns.
27427	* cfg.mk: here.
27428
274292012-07-17  Akim Demaille  <akim@lrde.epita.fr>
27430
27431	gnulib: update
27432
274332012-07-16  Akim Demaille  <akim@lrde.epita.fr>
27434
27435	gnulib: update.
27436	* gnulib: Update so that gitlog-to-changelog support --srcdir.
27437	* Makefile.am: Use it.
27438
274392012-07-10  Akim Demaille  <akim@lrde.epita.fr>
27440
27441	gnulib: update
27442	* bootstrap, build-aux/.gitignore, gnulib, m4/.gitignore: update.
27443
274442012-07-06  Akim Demaille  <akim@lrde.epita.fr>
27445
27446	maint: minor fixes
27447	* NEWS: restore missing entry.
27448	* cfg.mk: Adjust to *.texinfo -> *.texi.
27449	* src/symtab.c: Spaces fixes.
27450
274512012-07-06  Akim Demaille  <akim@lrde.epita.fr>
27452
27453	tests: address g++-4.8 warnings.
27454	list.yy: In function 'yy::parser::symbol_type yylex()':
27455	list.yy:107:29: error: typedef 'token' locally defined but not used
27456	  [-Werror=unused-local-typedefs]
27457	   typedef yy::parser::token token;
27458	                             ^
27459
27460	* tests/c++.at (AT_CHECK_VARIANTS): here.
27461
274622012-07-06  Akim Demaille  <akim@lrde.epita.fr>
27463
27464	Merge remote-tracking branch 'origin/maint'
27465	* origin/maint:
27466	  maint: update release instructions
27467	  maint: post-release administrivia
27468	  version 2.5.90
27469	  build: fix gen-ChangeLog call.
27470	  gnulib: update.
27471	  tests: fix SKIP_IF for Java.
27472	  api.prefix: incompatible with %name-prefix.
27473	  api.prefix: strengthen the tests and fix push-parsers.
27474	  skeletons: style changes.
27475	  NEWS: minor changes.
27476	  api.prefix: improve the documentation for YYDEBUG.
27477	  gnulib: update.
27478
274792012-07-06  Akim Demaille  <akim@lrde.epita.fr>
27480
27481	maint: update release instructions
27482	* README-hacking: here.
27483
274842012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27485
27486	maint: post-release administrivia
27487	* NEWS: Add header line for next release.
27488	* .prev-version: Record previous version.
27489	* cfg.mk (old_NEWS_hash): Auto-update.
27490
274912012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27492
27493	version 2.5.90
27494	* NEWS: Record release date.
27495
274962012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27497
27498	build: fix gen-ChangeLog call.
27499	* Makefile.am: Be sure to catch errors, and fix option name
27500
275012012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27502
27503	gnulib: update.
27504	* gnulib/build-aux/do-release-commit-and-tag: Fix.
27505
275062012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27507
27508	tests: fix SKIP_IF for Java.
27509	* tests/local.at (AT_JAVA_COMPILE): here.
27510
275112012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27512
27513	api.prefix: incompatible with %name-prefix.
27514	* data/bison.m4: Make it incompatible.
27515	* tests/input.at: Check that it is.
27516
275172012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27518
27519	api.prefix: strengthen the tests and fix push-parsers.
27520	* tests/calc.at: Check api.prefix in addition to %name-prefix.
27521	* tests/headers.at: Check push parsers and pure interface.
27522	* tests/local.at: Use YYLTYPE renamed.
27523	* data/yacc.c (b4_declare_yyparse_push_): Handle api.prefix.
27524	* doc/bison.texi: Style changes.
27525
275262012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27527
27528	skeletons: style changes.
27529	* data/bison.m4: Define default values after having defined
27530	the support macros.
27531	Kill a dead comment.
27532
275332012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27534
27535	NEWS: minor changes.
27536	* NEWS: style changes.
27537
275382012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27539
27540	api.prefix: improve the documentation for YYDEBUG.
27541	* doc/bison.texi: Explain how api.prefix is applied to YYDEBUG.
27542
275432012-07-05  Akim Demaille  <akim@lrde.epita.fr>
27544
27545	gnulib: update.
27546	* bootstrap, gnulib: Update.
27547	* cfg.mk (syntax-check): Don't check "error" usage in bison.texi.
27548
275492012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27550
27551	Merge remote-tracking branch 'origin/maint'
27552	* origin/maint:
27553	  tests: headers.at: strengthen.
27554	  glr.cc: do not override C++ definitions by C macros.
27555	  YYLLOC_DEFAULT: factor, and don't export it in headers.
27556	  api.prefix: do not use #define to handle YYSTYPE_IS_TRIVIAL etc.
27557	  tests: portability fixes.
27558	  c++: fewer #includes in the headers.
27559	  glr.cc: formatting changes.
27560	  tests: more logs.
27561	  api.prefix: also rename YYDEBUG.
27562
275632012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27564
27565	tests: headers.at: strengthen.
27566	* tests/headers.at (Several headers): Be stricter when checking
27567	the exported macros.
27568
275692012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27570
27571	glr.cc: do not override C++ definitions by C macros.
27572	* data/glr.c: here.
27573	* data/glr.cc: Fix overquotation.
27574	* tests/headers.at: Comment changes.
27575
275762012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27577
27578	YYLLOC_DEFAULT: factor, and don't export it in headers.
27579	* data/c++.m4, data/c.m4 (b4_yylloc_default_define): New.
27580	* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
27581	* data/glr.cc: Do not define YYLLOC_DEFAULT in the header file,
27582	but in the implementation one.
27583
275842012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27585
27586	api.prefix: do not use #define to handle YYSTYPE_IS_TRIVIAL etc.
27587	The following mixture is insane:
27588
27589	  #define YYSTYPE_IS_TRIVIAL PREFIX_STYPE_IS_TRIVIAL
27590	  #if (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)
27591
27592	since, of course YYSTYPE_IS_TRIVIAL is defined.  Instead we could
27593	define YYSTYPE_IS_TRIVIAL as PREFIX_STYPE_IS_TRIVIAL only when the
27594	later is defined, but let's avoid stacking CPP on top of M4: rather, use
27595
27596	  #if (defined PREFIX_STYPE_IS_TRIVIAL && PREFIX_STYPE_IS_TRIVIAL)
27597
27598	* data/glr.c, data/yacc.c: Use YYSTYPE_IS_TRIVIAL, YYSTYPE_IS_DECLARED,
27599	YYLTYPE_IS_TRIVIAL and YYLTYPE_IS_DECLARED under their api.prefix-renamed
27600	name.
27601
276022012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27603
27604	tests: portability fixes.
27605	Reported by Hydra.
27606
27607	* tests/headers.at (Several headers): Be sure to include config.h
27608	in the files to compile.
27609
276102012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27611
27612	c++: fewer #includes in the headers.
27613	* data/lalr1.cc: Define YY_NULL in the *.cc file, it is not needed
27614	in the header.
27615	* data/location.cc: iosfwd suffices.
27616
276172012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27618
27619	glr.cc: formatting changes.
27620	* data/glr.cc: here.
27621
276222012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27623
27624	tests: more logs.
27625	* tests/headers.at (Several parsers): Here.
27626
276272012-07-04  Akim Demaille  <akim@lrde.epita.fr>
27628
27629	api.prefix: also rename YYDEBUG.
27630	The testsuite in master has shown weird errors for the "Mulitple
27631	Parsers" tests: the caller of p5.parse() received some apparently
27632	random value, while tracing p5.parse() showed that the function was
27633	consistently returning 0.
27634
27635	It happens when mixing several parser headers, some generated without
27636	%debug, others with.  In particular the C++ parser was generated with
27637	%debug, i.e., with:
27638
27639	  #ifndef YYDEBUG
27640	  # define YYDEBUG 1
27641	  #endif
27642
27643	and compiled separatedly.  Yet, its header was included after the one
27644	of another parser, this time without %debug, i.e., with
27645
27646	  #ifndef YYDEBUG
27647	  # define YYDEBUG 0
27648	  #endif
27649
27650	in its header.  As a result, the parser was compiled with YYDEBUG set,
27651	but its header was used without.  Since the layout of the objects are
27652	then completely different, boom.
27653
27654	Therefore, do not change the value of YYDEBUG.  Rather, use it as a
27655	default value for <API.PREFIX>DEBUG.
27656
27657	* data/c.m4 (b4_YYDEBUG_define): New.
27658	(b4_declare_yydebug): Rename as...
27659	(b4_yydebug_declare): this, for consistency.
27660	* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
27661	* NEWS: Document it.
27662
276632012-07-02  Akim Demaille  <akim@lrde.epita.fr>
27664
27665	formatting changes.
27666	* data/lalr1.cc: here.
27667
276682012-07-02  Akim Demaille  <akim@lrde.epita.fr>
27669
27670	NEWS: spell fixes.
27671	* NEWS: here.
27672	Reported by Stefano Lattarini.
27673
276742012-07-02  Akim Demaille  <akim@lrde.epita.fr>
27675
27676	Merge remote-tracking branch 'origin/maint'
27677	* origin/maint:
27678	  NEWS: spell check.
27679	  api.prefix.
27680
276812012-07-02  Akim Demaille  <akim@lrde.epita.fr>
27682
27683	NEWS: spell check.
27684	* NEWS: here.
27685
276862012-06-29  Akim Demaille  <akim@lrde.epita.fr>
27687
27688	api.prefix.
27689	* data/c.m4 (b4_api_prefix, b4_api_PREFIX): New.
27690	(b4_prefix, b4_union_name, b4_token_enums, b4_declare_yylstype): Use them.
27691	* data/glr.c, data/yacc.c, data/glr.cc, data/lalr1.cc: Use them to change
27692	the prefix of exported preprocessor symbols.
27693	* src/getargs.c (usage): Ditto.
27694	* tests/headers.at (Several parsers): New.
27695	* tests/local.at (AT_API_PREFIX): New.
27696	AT_YYSTYPE, AT_YYLTYPE): Adjust.
27697	* doc/bison.texi (Multiple Parsers): Move documentation of %name-prefix to...
27698	(Table of Symbols): here.
27699	(Multiple Parsers): Document api.prefix.
27700	(%define Summary): Point to it.
27701	Use @code for variable names.
27702	(Bison Options): -p/--name-prefix are obsoleted.
27703	* NEWS: Announce api.prefix.
27704
277052012-06-29  Victor Santet  <victor.santet@epita.fr>
27706
27707	warnings: display warnings categories
27708	* src/complain.c (error_message): Call 'warnings_print_categories'.
27709	* src/gram.c (grammar_rules_useless_report): Display itself warning
27710	category.
27711	* tests/actions.at, tests/conflicts.at, tests/existing.at,
27712	tests/input.at, tests/named-refs.at, tests/output.at, tests/reduce.at,
27713	tests/regression.at, tests/skeletons.at: Adjust.
27714	* NEWS: Document this.
27715
277162012-06-29  Victor Santet  <victor.santet@epita.fr>
27717
27718	warnings: be ready to print warnings categories
27719	A function to print warnings categories, like -Wyacc, -Wother, etc.
27720
27721	* src/complain.h, src/complain.c (print_warning_categories): New function.
27722	* src/output.c (ARRAY_CARDINALITY): Move it to file 'src/system.h'.
27723	* src/complain.h (enum warnings): New value, 'silent', "complain"
27724	must not display the warning type.
27725
277262012-06-29  Akim Demaille  <akim@lrde.epita.fr>
27727
27728	maint: prepare forthcoming changes
27729	* src/gram.c (rule_rhs_print): Do not print new line anymore.
27730	(rule_print): Make it static.
27731	* src/closure.c, src/derives.c, src/gram.c: Adjust.
27732
277332012-06-29  Victor Santet  <victor.santet@epita.fr>
27734
27735	style changes
27736	* src/complain.c, src/reader.c, src/reduce.c, src/main.c:
27737	Fix indentation.
27738	Simplify a bit.
27739
277402012-06-28  Akim Demaille  <akim@lrde.epita.fr>
27741
27742	regen.
27743
277442012-06-28  Victor Santet  <victor.santet@epita.fr>
27745
27746	warnings: factoring: complaints
27747	* src/complain.c (error_message): Accept warning categories (an integer) as
27748	argument.
27749	Location is a 'const location *' instead of 'location *'.
27750	(ERROR_MESSAGE): Delete it.
27751	* src/complain.c, src/complain.h (complains): New function.
27752	(complain, complain_at, complain_at_indent): Generic functions for
27753	complaints. Call 'complains'.
27754	(warn_at, warn_at_indent, warn, yacc_at, midrule_value_at)
27755	(fatal_at, fatal): Delete them. Adjust dependencies.
27756	* src/complain.h (enum warnings): New fields 'complaint' and 'fatal'.
27757	* bootstrap.conf (XGETTEXT_OPTIONS): Adjust.
27758
277592012-06-28  Victor Santet  <victor.santet@epita.fr>
27760
27761	warnings: move them to complain.c.
27762	* src/getargs.h, src/getargs.c (warnings, warnings_flags): Move to...
27763	* src/complain.h, src/complain.c: Here.
27764
277652012-06-28  Victor Santet  <victor.santet@epita.fr>
27766
27767	warnings: rename the categories
27768	Forthcoming changes will use the warning categories much more often,
27769	so shortening them will improve readability.
27770
27771	* src/complain.c, src/complain.h, src/conflicts.c,
27772	* src/getargs.c, src/getargs.h, src/gram.c (enum warnings):
27773	s/warnings_/W/g.
27774
277752012-06-28  Akim Demaille  <akim@lrde.epita.fr>
27776
27777	fix merge.
27778	* data/bison.m4: Use b4_error_verbose_if after it was defined.
27779
277802012-06-28  Akim Demaille  <akim@lrde.epita.fr>
27781
27782	Merge remote-tracking branch 'origin/maint'
27783	* origin/maint:
27784	  tests: use the generalized default yylex.
27785	  tests: AT_YYERROR_DEFINE: prepare for list of ints.
27786	  skeletons: no longer define YYLSP_NEEDED.
27787	  c++: do not export YYTOKEN_TABLE and YYERROR_VERBOSE.
27788
277892012-06-28  Akim Demaille  <akim@lrde.epita.fr>
27790
27791	tests: use the generalized default yylex.
27792	* tests/actions.at, tests/glr-regression.at, tests/regression.at: here.
27793
277942012-06-28  Akim Demaille  <akim@lrde.epita.fr>
27795
27796	tests: AT_YYERROR_DEFINE: prepare for list of ints.
27797	* tests/local.at (AT_YYERROR_DEFINE): Don't add quotes, check their
27798	presence to detect char/int types.
27799	* tests/actions.at, tests/conflicts.at, tests/glr-regression.at,
27800	* tests/push.at, tests/regression.at: Adjust.
27801
278022012-06-27  Akim Demaille  <akim@lrde.epita.fr>
27803
27804	skeletons: no longer define YYLSP_NEEDED.
27805	* data/c.m4, data/glr.cc: here.
27806	* NEWS, TODO: Adjust.
27807
278082012-06-27  Akim Demaille  <akim@lrde.epita.fr>
27809
27810	c++: do not export YYTOKEN_TABLE and YYERROR_VERBOSE.
27811	* src/output.c (prepare_symbols): Do not define b4_token_table.
27812	(prepare): Define b4_token_table_flag.
27813	* data/bison.m4 (b4_token_table_if): New.
27814	Arm it when error-verbose.
27815	* data/glr.c, data/yacc.c (YYTOKEN_TABLE): Remove.
27816	Use m4.
27817	* data/lalr1.cc: Likewise.
27818	(YYERROR_VERBOSE): Remove.
27819	* NEWS, doc/bison.texi: Document this.
27820
278212012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27822
27823	Merge remote-tracking branch 'origin/maint'
27824	* origin/maint:
27825	  maint: use *.texi.
27826
278272012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27828
27829	maint: use *.texi.
27830	This is more consistent with the other packages, and Automake-NG
27831	supports only *.texi.
27832
27833	* doc/bison.texinfo: Rename as...
27834	* doc/bison.texi: this.
27835	* doc/Makefile.am, examples/calc++/Makefile.am: Adjust.
27836
278372012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27838
27839	Merge remote-tracking branch 'origin/maint'
27840	* origin/maint:
27841	  tests: do not output m4 set up.
27842	  tests: use the generic yyerror function.
27843	  tests: use assert instead of plain abort.
27844	  tests: improve the generic yylex implementation.
27845	  tests: generalize the compilation macros.
27846	  tests: fix confusion between api.prefix and name-prefix.
27847	  maint: gitignores.
27848	  yacc: work around the ylwrap limitation.
27849
278502012-06-26  Victor Santet  <victor.santet@epita.fr>
27851
27852	warnings: raise warning for useless printers or destructors
27853	* src/scan-code.h (code_props): Add field 'is_used'.
27854	(CODE_PROPS_NONE_INIT): Adjust.
27855	* src/scan-code.l (code_props_plain_init, code_props_symbol_action_init)
27856	(code_props_rule_action_init): Instead of implementing several
27857	times the initialization of the code_props structures,
27858	use code_props_none_init.
27859	* src/symtab.c (symbol_check_defined): If a symbol does not have a
27860	destructor (resp. printer) but has a type which has a destructor (resp.
27861	printer), then set field 'is_used' to true.
27862	(semantic_type_check_defined): If a type has a destructor (resp. printer)
27863	but all symbols of this type have already a destructor (resp. printer),
27864	then raise a warning.
27865	* tests/input.at (Useless printers or destructors): New.
27866
278672012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27868
27869	tests: do not output m4 set up.
27870	* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
27871	Use a diversion to avoid outputting comments etc.
27872	Removes 17k lines from testsuite (10% of the number of lines).
27873
278742012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27875
27876	tests: use the generic yyerror function.
27877	* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Factor.
27878	Use AT_YYERROR_DEFINE.
27879	Therefore, instead of using stdout, use and check stderr.
27880	* tests/glr-regression.at (Uninitialized location when reporting ambiguity):
27881	Use AT_YYERROR_DEFINE.
27882
278832012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27884
27885	tests: use assert instead of plain abort.
27886	* tests/actions.at, tests/calc.at, tests/conflicts.at,
27887	* tests/cxx-type.at, tests/glr-regression.at, tests/input.at,
27888	* tests/named-refs.at, tests/regression.at, tests/torture.at,
27889	* tests/local.at:
27890	Prefer assert to abort.
27891
278922012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27893
27894	tests: improve the generic yylex implementation.
27895	* tests/local.at (AT_YYSTYPE, AT_YYLTYPE): New.
27896	(AT_YYLEX_FORMALS): Use them.
27897	(AT_YYLEX_DEFINE): Be independent of the location implementation.
27898
278992012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27900
27901	tests: generalize the compilation macros.
27902	* tests/local.at (AT_COMPILE, AT_COMPILE_CXX): If OUTPUT ends with ".o",
27903	then append the "natural" extension for the input file (.c or .cc).
27904	If there is no source, pass -c.
27905	* tests/headers.at, tests/input.at, tests/regression.at: Adjust.
27906
279072012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27908
27909	tests: fix confusion between api.prefix and name-prefix.
27910	* tests/local.at (AT_NAME_PREFIX): Take api.prefix into account.
27911	(AT_API_PREFIX): Rename as...
27912	(AT_API_prefix): this.
27913	Do not take %name-prefix into account.
27914	Fix misuses.
27915
279162012-06-26  Akim Demaille  <akim@lrde.epita.fr>
27917
27918	maint: gitignores.
27919
279202012-06-25  Victor Santet  <victor.santet@epita.fr>
27921
27922	warnings: useless semantic types
27923	* src/symtab.h (symbol_list): Represent semantic types as structure
27924	'semantic_type'.
27925	* src/symlist.c (symbol_list_type_new): Allocate this structure.
27926	(symbol_list_code_props_set): Set this semantic type's status to used if it
27927	was not declared.
27928	* src/symtab.c (semantic_types_sorted): New.
27929	(semantic_type_new): Set the new semantic type's location appropriately.
27930	(symbol_check_defined): If a symbol has a type, then set this type's status
27931	to "declared".
27932	(semantic_type_check_defined, semantic_type_check_defined_processor): Same
27933	as symbol_check_defined and symbol_check_defined_processor, but for semantic
27934	types.
27935	(symbol_check_defined): Check semantic types usefulness.
27936	* src/symtab.h (semantic_type): New fields 'location' and 'status'.
27937	* src/symtab.h, src/symtab.c (semantic_type_new)
27938	(semantic_type_from_uniqstr, semantic_type_get): Accept a location as a
27939	supplementary argument.
27940	* tests/input.at (Unassociated types used for printer of destructor): New.
27941	* tests/c++.at (AT_CHECK_VARIANTS): Fix an error caught by this commit.
27942
279432012-06-25  Akim Demaille  <akim@lrde.epita.fr>
27944
27945	yacc: work around the ylwrap limitation.
27946	* data/yacc.c (b4_shared_declarations): Include the header guards.
27947	Do not include the header in the *.c file, duplicate it.
27948	* NEWS (Future Changes): Extend, and announce the forthcoming change
27949	about the use of the parser header.
27950
279512012-06-25  Akim Demaille  <akim@lrde.epita.fr>
27952
27953	fix for printers and destructors.
27954	The previous "code_props: factor more" patch sends has_%printer
27955	etc. to m4, instead of has_printer.
27956
27957	* src/output.c (prepare_symbol_definitions): Fix value of pname.
27958
279592012-06-25  Akim Demaille  <akim@lrde.epita.fr>
27960
27961	Merge remote-tracking branch 'origin/maint'
27962	* origin/maint:
27963	  tests: more uniformity.
27964	  tests: handle locations in a more generic way.
27965	  tests: handle locations in the generic yyerror functions.
27966	  tests: fix AT_CHECK_CALC.
27967	  tests: improve infrastructure
27968	  tests: factor.
27969	  skeletons: minor style changes
27970	  tests: AT_LANG.
27971	  c skeletons: factor the declaration of yylloc and yylval.
27972	  news: condemn YYPARSE_PARAM and YYLEX_PARAM.
27973	  maint: regen.
27974
279752012-06-22  Akim Demaille  <akim@lrde.epita.fr>
27976
27977	code_props: factor more.
27978	* src/symtab.h, src/symtab.c (code_props_type_string): No longer static.
27979	* src/output.c (CODE_PROPS): Remove, we can now iterate on both the
27980	destructor and the printer.
27981	(SET_KEY2): New.
27982
279832012-06-22  Victor Santet  <victor.santet@epita.fr>
27984
27985	maint: factor the handling of %printer and %destructor
27986	There is too much code duplication between %printer and %destructor.
27987	We used to have two functions for each action: the first one for
27988	destructors, the second one for printers. Factor using a
27989	'code_props_type', and an array of code_props instead of two
27990	members.
27991
27992	* src/symlist.h, src/symlist.c (symbol_list_destructor_set)
27993	(symbol_list_printer_set): Fuse into...
27994	(symbol_list_code_props_set): this.
27995	* src/symtab.h, src/symtab.c (default_tagged_destructor)
27996	(default_tagged_printer): Fuse into...
27997	(default_tagged_code_props): this.
27998	(default_tagless_destructor, default_tagless_printer)
27999	(default_tagless_code_props): Likewise.
28000	(code_props_type_string): new.
28001	(symbol_destructor_set, symbol_destructor_get, semantic_type_destructor_set)
28002	(default_tagged_destructor_set, default_tagless_destructor_set)
28003	(symbol_printer_set, symbol_printer_get, semantic_type_printer_set)
28004	(default_tagged_printer_set, default_tagless_printer_set): Replace by...
28005	(symbol_code_props_set, symbol_code_props_get, semantic_type_code_props_set)
28006	(default_tagged_code_props_set, default_tagless_code_props_set): these.
28007	* src/parse-gram.y (grammar_declaration): Adjust.
28008	* src/output.c (CODE_PROP, grammar_declaration): Ditto.
28009	* src/reader.c (symbol_should_be_used): Ditto.
28010
280112012-06-22  Akim Demaille  <akim@lrde.epita.fr>
28012
28013	tests: more uniformity.
28014	* tests/local.at (AT_LEX_FORMALS, AT_LEX_ARGS, AT_LEX_PRE_FORMALS)
28015	(AT_LEX_PRE_ARGS): Rename as...
28016	(AT_YYLEX_FORMALS, AT_YYLEX_ARGS, AT_YYLEX_PRE_FORMALS)
28017	(AT_YYLEX_PRE_ARGS): these, for consistency.
28018	(AT_API_PREFIX): Take %name-prefix into account.
28019	(AT_YYLEX_PROTOTYPE): New.
28020	Use it.
28021	* tests/actions.at, tests/calc.at, tests/cxx-type.at: Adjust to
28022	use them.
28023
280242012-06-22  Akim Demaille  <akim@lrde.epita.fr>
28025
28026	tests: handle locations in a more generic way.
28027	* tests/local.at (AT_YYERROR_PROTOTYPE): New.
28028	Use it.
28029	* tests/cxx-type.at: Extensive revamp to use a more traditional
28030	quotation scheme, and to use the generic yyerror implementation.
28031	Prefer Autotest macros to CPP macros.
28032	* tests/java.at: .
28033
280342012-06-22  Akim Demaille  <akim@lrde.epita.fr>
28035
28036	tests: handle locations in the generic yyerror functions.
28037	* tests/local.at (AT_YYERROR_DECLARE_EXTERN, AT_YYERROR_DECLARE)
28038	(AT_YYERROR_DEFINE): Handle locations for C and C++.
28039	* tests/calc.at: Use it for C++ (as C has extra arguments which
28040	are not yet handled by AT_BISON_OPTION_PUSHDEFS).
28041	* tests/actions.at: Adjust.
28042
280432012-06-22  Akim Demaille  <akim@lrde.epita.fr>
28044
28045	tests: fix AT_CHECK_CALC.
28046	* tests/calc.at (AT_CHECK_CALC): Contrary to its documentation,
28047	the test was skipped if given a second argument.
28048	Unused feature, remove it.
28049
280502012-06-22  Akim Demaille  <akim@lrde.epita.fr>
28051
28052	tests: improve infrastructure
28053	* tests/local.at (AT_LANG): Use c++ instead of cxx for C++.
28054	Adjust dependencies.
28055	(AT_YYERROR_DECLARE_EXTERN, AT_YYERROR_DECLARE): Issue nothing
28056	for C++/Java.
28057	(AT_YYERROR_DEFINE): Use m4_case.
28058	(AT_JAVA_COMPILE): Use AT_SKIP_IF.
28059
280602012-06-21  Akim Demaille  <akim@lrde.epita.fr>
28061
28062	tests: factor.
28063	* tests/glr-regression.at, tests/output.at, tests/push.at,
28064	* tests/regression.at, tests/torture.at, tests/actions.at:
28065	Use AT_YYLEX_* and AT_YYERROR_*.
28066
280672012-06-21  Akim Demaille  <akim@lrde.epita.fr>
28068
28069	skeletons: minor style changes
28070	* data/glr.c, data/yacc.c: here.
28071
280722012-06-21  Akim Demaille  <akim@lrde.epita.fr>
28073
28074	tests: AT_LANG.
28075	* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
28076	Define/undefine AT_LANGE
28077	(AT_LANG_COMPILE): New.
28078	(AT_FULL_COMPILE): Use AT_LANG.
28079
280802012-06-21  Victor Santet  <victor.santet@epita.fr>
28081
28082	symtab: refactoring
28083	Prepares forthcoming changes.
28084
28085	* src/symtab.c (symbols_do): Accept the hash table and the sorted
28086	list as arguments. Adjust dependencies.
28087
280882012-06-21  Akim Demaille  <akim@lrde.epita.fr>
28089
28090	maint: address syntax-check issues.
28091	* examples/calc++/local.mk: Space changes.
28092	* src/files.c: Avoid unmarked_diagnostics.
28093	* src/output.c: Remove useless include.
28094
280952012-06-21  Akim Demaille  <akim@lrde.epita.fr>
28096
28097	c skeletons: factor the declaration of yylloc and yylval.
28098	There is one difference: now, even without --defines, we generate
28099	extern declarations for these variables.  The factoring is worth it.
28100	* data/c.m4 (b4_declare_yylstype): Declare them.
28101	* data/glr.c, data/yacc.c: Adjust.
28102
281032012-06-21  Akim Demaille  <akim@lrde.epita.fr>
28104
28105	news: condemn YYPARSE_PARAM and YYLEX_PARAM.
28106	* NEWS: here.
28107	(Bison 1.875): Add %parse-param and %lex-param.
28108	* doc/bison.texinfo: Spello.
28109
281102012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28111
28112	fix warnings for useless %printer/%destructor
28113	The previous commit, which turns into a warning what used to be an
28114	error:
28115
28116	    %printer {} foo;
28117	    %%
28118	    exp: '0';
28119
28120	has two shortcomings: the warning is way too long (foo is reported
28121	to be useless later), and besides, it also turns into a warning much
28122	more serious errors:
28123
28124	   %printer {} foo;
28125	   %%
28126	   exp: foo;
28127
28128	Reduce the amount to warnings in the first case, restore the error in
28129	the second.
28130
28131	* src/symtab.h (status): Add a new inital state: undeclared.
28132	* src/symtab.c (symbol_new): Initialize to undeclared.
28133	(symbol_class_set): Simplify the logic of the code that neutralize
28134	the "redeclared" warning after the "redefined" one.
28135	(symbol_check_defined): "undeclared" is also an error.
28136	* src/reader.c (grammar_current_rule_symbol_append): Symbols appearing
28137	in a rule are "needed".
28138	* src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
28139	An unknown symbol appearing in a %printer/%destructor is "used".
28140	* src/reduce.c (nonterminals_reduce): Do not report as "useless" symbols
28141	that are not used (e.g., those that for instance appeared only in a
28142	%printer).
28143	* tests/input.at (Undeclared symbols used for a printer or destructor):
28144	Improve the cover the cases described above.
28145
281462012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28147
28148	gitignore: test-driver.
28149
281502012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28151
28152	maint: style changes.
28153	* src/reduce.c (reduce_grammar_tables): Define variables with their
28154	initial value.
28155
281562012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28157
28158	news: fixes.
28159	* NEWS: Fix spelling.
28160
281612012-06-20  Victor Santet  <victor.santet@epita.fr>
28162
28163	warnings: used but undeclared symbols are warnings
28164	We used to raise an error if a symbol appears only in a %printer or
28165	%destructor.  Make it a warning.
28166
28167	* src/symtab.h (status): New enum.
28168	(symbol): Replace the binary "declared" with the three-state "status".
28169	Adjust dependencies.
28170	* src/symtab.c (symbol_check_defined): Needed symbols are an error,
28171	whereas "used" are simply warnings.
28172	* src/symlist.c (symbol_list_destructor_set, symbol_list_printer): Set
28173	symbol status to 'used' when associated to destructors or printers.
28174	* input.at (Undeclared symbols used for a printer or destructor): New.
28175
281762012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28177
28178	maint: regen.
28179	* Makefile.am (regen): New target.
28180
281812012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28182
28183	regen.
28184
281852012-06-20  Akim Demaille  <akim@lrde.epita.fr>
28186
28187	maint: regen.
28188	* Makefile.am (regen): New target.
28189
281902012-06-19  Akim Demaille  <akim@lrde.epita.fr>
28191
28192	tests: enhance AT_YYERROR_DEFINE.
28193	* tests/local.at: Handle the fact that locations are no longer
28194	needed with lalr1.cc.
28195
281962012-06-19  Akim Demaille  <akim@lrde.epita.fr>
28197
28198	Merge remote-tracking branch 'origin/maint'
28199	* origin/maint:
28200	  maint: formatting changes.
28201	  tests: support api.prefix.
28202	  tests: pacify font-lock-mode.
28203	  tests: remove test covered elsewhere.
28204	  tests: factor the declaration/definition of yyerror and yylex.
28205	  regen.
28206	  tests: portability issues.
28207	  tests: call the parser from another compilation unit.
28208	  glr.c, yacc.c: declare yydebug in the header.
28209	  skeletons: use header guards.
28210	  tests: improve AT_FULL_COMPILE.
28211	  tests: reorder.
28212	  tests: strengthen the test on generated headers inclusion
28213	  yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
28214	  yacc.c: factor.
28215
282162012-06-19  Akim Demaille  <akim@lrde.epita.fr>
28217
28218	maint: formatting changes.
28219	* NEWS: Fix indentation of code snippets.
28220	Untabify.
28221
282222012-06-17  Akim Demaille  <akim@lrde.epita.fr>
28223
28224	tests: support api.prefix.
28225	* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
28226	Define AT_API_PREFIX.
28227	(AT_YYERROR_DEFINE, AT_YYERROR_DECLARE_EXTERN, AT_YYLEX_DECLARE_EXTERN)
28228	(AT_YYLEX_DEFINE): Use it.
28229	* tests/input.at, tests/regression.at, tests/torture.at: Add
28230	AT_BISON_OPTION_PUSHDEFS/POPDEFS.
28231
282322012-06-17  Akim Demaille  <akim@lrde.epita.fr>
28233
28234	tests: pacify font-lock-mode.
28235	* tests/local.at: here.
28236
282372012-06-17  Akim Demaille  <akim@lrde.epita.fr>
28238
28239	tests: remove test covered elsewhere.
28240	* tests/headers.at (%union and --defines): Remove, pretty useless and
28241	insignificant.
28242
282432012-06-17  Akim Demaille  <akim@lrde.epita.fr>
28244
28245	tests: factor the declaration/definition of yyerror and yylex.
28246	* tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DECLARE_EXTERN)
28247	(AT_YYERROR_DEFINE, AT_YYLEX_DECLARE, AT_YYLEX_DECLARE_EXTERN)
28248	(AT_YYLEX_DEFINE): New.
28249	Must be used inside AT_BISON_OPTION_PUSHDEFS/POPDEFS pair.
28250	* tests/actions.at, tests/conflicts.at, tests/glr-regression.at,
28251	* tests/headers.at, tests/input.at, tests/named-refs.at,
28252	* tests/regression.at, tests/skeletons.at, tests/synclines.at,
28253	* tests/torture.at: Use them.
28254
282552012-06-17  Akim Demaille  <akim@lrde.epita.fr>
28256
28257	regen.
28258
282592012-06-17  Akim Demaille  <akim@lrde.epita.fr>
28260
28261	tests: portability issues.
28262	* tests/calc.at (AT_CALC_MAIN): Missing include reported by Hydra.
28263
282642012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28265
28266	tests: call the parser from another compilation unit.
28267	In order to improve the testing of %defines, which exports the
28268	interface of the generated parser, change the calc.at tests so that
28269	when %defines is passed, main will be in another compilation unit.  It
28270	loads the generated header.
28271
28272	* tests/calc.at (AT_CALC_MAIN): New.
28273	Includes the definition of the global variables.
28274	Therefore, now declare them from the %requires section of the parser.
28275	Adjust to yydebug and yyparse being renamed by %name-prefix.
28276
282772012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28278
28279	glr.c, yacc.c: declare yydebug in the header.
28280	* data/c.m4 (b4_declare_yydebug): New.
28281	* data/glr.c, data/yacc.c (b4_shared_declarations): Use it.
28282	Remove the corresponding code from the parser body.
28283	* NEWS: Doc this.
28284
282852012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28286
28287	skeletons: use header guards.
28288	* data/glr.c, data/glr.cc, data/yacc.c: here.
28289	* NEWS: Document it.
28290
282912012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28292
28293	tests: improve AT_FULL_COMPILE.
28294	* tests/local.at: Accept a third argument.
28295	Simplify quotation pattern.
28296	Calls for better refactoring, but will suffice for a while.
28297
282982012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28299
28300	tests: reorder.
28301	* tests/calc.at (power): Move its definition, as a preparation for
28302	forthcoming changes.
28303	And space changes.
28304
283052012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28306
28307	tests: strengthen the test on generated headers inclusion
28308	* tests/headers.at (AT_TEST_CPP_GUARD_H): Accept Bison directives.
28309	(Invalid CPP headers): Check glr.
28310
283112012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28312
28313	yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
28314	This is already what glr.c and lalr1.cc do.
28315
28316	* data/yacc.c: here.
28317
283182012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28319
28320	maint: xfdopen, and scope reduction.
28321	* src/files.h, src/files.c (xfdopen): New.
28322	* src/output.c (output_skeleton): Use it.
28323	Reduce the scope of argv.
28324
283252012-06-15  Akim Demaille  <akim@lrde.epita.fr>
28326
28327	maint: space changes
28328	* configure.ac, src/complain.c: space changes.
28329
283302012-06-13  Akim Demaille  <akim@lrde.epita.fr>
28331
28332	yacc.c: factor.
28333	yacc.c used to include two almost identical sections: one for the *.h
28334	file, and another for the *.c file.  The main difference is that in
28335	the *.c file we used the yy* names (as %name-prefix is handled by
28336	"#define yy* <prefix>*" before), while the *.hh used <prefix>* names.
28337	Keep only the later.  If this is troublesome, b4_shared_declarations
28338	can easily take the desired prefix as argument.
28339
28340	* data/yacc.c (b4_shared_declarations): New.
28341	Use it to factor duplicated declarations.
28342
283432012-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
28344
28345	cosmetics: prettify names for compiled object for bison
28346	* src/local.mk (src_bison_SHORTNAME): Define to "bison".
28347
283482012-06-13  Akim Demaille  <akim@lrde.epita.fr>
28349
28350	lalr1.cc: spello.
28351	* data/lalr1.cc: Reported by Gilles Espinasse.
28352
283532012-06-13  Akim Demaille  <akim@lrde.epita.fr>
28354
28355	Merge remote-tracking branch 'origin/maint'
28356	* origin/maint:
28357	  skeletons: factor yacc.c and glr.c.
28358	  glr.c: minor refactoring.
28359	  tests: remove all the -On flags.
28360	  maint: fix spello.
28361	  maint: improve release procedure instructions.
28362	  gnulib: update readme-release.
28363	  maint: cfg.mk: manual title.
28364	  maint: cfg.mk: simplify
28365	  maint: post-release administrivia
28366
283672012-06-12  Akim Demaille  <akim@lrde.epita.fr>
28368
28369	skeletons: factor yacc.c and glr.c.
28370	yacc.c and glr.c share common declarations.  Their YYLTYPE are exactly
28371	equal, and their YYSTYPE are sufficiently alike to be fused (its
28372	declaration was protected by YYSTYPE_IS_DECLARED in yacc.c, but not in
28373	glr.c).  Besides, yacc.c duplicated the definitions of YYLTYPE and
28374	YYSTYPE (*.h/*.c).
28375
28376	* data/c.m4 (b4_declare_yylstype): New.
28377	* data/yacc.c, data/glr.c: Use it.
28378
283792012-06-12  Akim Demaille  <akim@lrde.epita.fr>
28380
28381	glr.c: minor refactoring.
28382	* data/glr.c (b4_shared_declarations): Move from the generated file
28383	section, to the M4 prologue.
28384
283852012-06-12  Akim Demaille  <akim@lrde.epita.fr>
28386
28387	tests: remove all the -On flags.
28388	* tests/atlocal.in: Here.
28389	Reported by Gilles Espinasse.
28390
283912012-06-12  Akim Demaille  <akim@lrde.epita.fr>
28392
28393	maint: fix spello.
28394	* README-hacking: Here.
28395	* THANKS: Reported by Gilles Espinasse.
28396
283972012-06-12  Akim Demaille  <akim@lrde.epita.fr>
28398
28399	maint: improve release procedure instructions.
28400	* gnulib: Update, in particular (README-release).
28401	* bootstrap.conf: don't require gendocs, provided by gnu-web-doc-update,
28402	provided by readme-release.
28403	* README-hacking: Update accordingly.
28404
284052012-06-07  Akim Demaille  <akim@lrde.epita.fr>
28406
28407	gnulib: update readme-release.
28408	* gnulib (readme-release): Now includes the modules it promotes.
28409	* bootstrap.conf: Simplify accordingly.
28410
284112012-06-07  Akim Demaille  <akim@lrde.epita.fr>
28412
28413	maint: cfg.mk: manual title.
28414	* cfg.mk (manuel_title): New.
28415
284162012-06-07  Akim Demaille  <akim@lrde.epita.fr>
28417
28418	maint: cfg.mk: simplify
28419	* cfg.mk: Remove bits provided by maint.mk.
28420
284212012-06-07  Akim Demaille  <akim@lrde.epita.fr>
28422
28423	maint: post-release administrivia
28424	* NEWS: Add header line for next release.
28425	* .prev-version: Record previous version.
28426	* cfg.mk (old_NEWS_hash): Auto-update.
28427
284282012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28429
28430	maint: an envvar equal to "00" is 0.
28431	* src/output.c (prepare): here.
28432	Reported by Paul Eggert.
28433
284342012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28435
28436	maint: don't use mbsr?chr.
28437	Basically, revert ba60c39547a445dee3e07920931b4d7a81843868's move to
28438	mbs* functions, which was prompted by -DGNULIB_POSIXCHECK.  See
28439	<http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00052.html>
28440	and following.
28441
28442	* bootstrap.conf: No longer ask for them.
28443	* src/files.c, src/getargs.c, src/location.c,
28444	* src/parse-gram.c, src/parse-gram.y, src/scan-gram.l,
28445	* src/symtab.c: s/mbs(r?chr)/str$1/g.
28446
284472012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28448
28449	maint: use xconcat-filename.
28450	* bootstrap.conf (gnulib_modules): Request it.
28451	* src/output.h, src/output.c (compute_pkgdatadir): Rename as...
28452	(pkgdatadir): this.
28453	Adjust dependencies.
28454	* src/output.c (output_skeleton): Reduce the scope of "in".
28455	Use xconcatenated_filename to simplify the construction of the
28456	qualified paths to m4sugar.m4, bison.m4, and the selected skeleton.
28457	There are a few minor differences: the new code uses strchr instead of
28458	mbschr (but this was not really justified), and the new code does not
28459	garantee a single slash even if $BISON_PKGDATADIR ends with several
28460	(which was considered more accurate).  See the discussion at
28461	<http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00052.html>.
28462
284632012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28464
28465	maint: minor simplification
28466	* src/output.c (prepare): Assign use_push_for_pull_flag's value at its
28467	declaration.
28468
284692012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28470
28471	Merge remote-tracking branch 'origin/maint'
28472	* origin/maint:
28473	  version 2.5.1
28474	  NEWS: prepare for 2.5.1.
28475	  maint: update release procedure
28476	  maint: fix comment typos
28477	  maint: post-release administrivia
28478
284792012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28480
28481	version 2.5.1
28482	* NEWS: Record release date.
28483
284842012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28485
28486	NEWS: prepare for 2.5.1.
28487	* NEWS: Be compliant with do-release-commit-and-tag.
28488
284892012-06-05  Akim Demaille  <akim@lrde.epita.fr>
28490
28491	maint: update release procedure
28492	* bootstrap.conf: Request do-release-commit-and-tag and readme-release.
28493	* README-hacking: Adjust.
28494
284952012-06-05  Jim Meyering  <meyering@redhat.com>
28496
28497	maint: fix comment typos
28498	Using http://github.com/lyda/misspell-check, massage its
28499	output into sed commands to perform the suggested changes.
28500	Initially, I filtered out the THRU->Through changes, because
28501	that failed to retain capitalization in the grammar token.
28502	Instead, do this manually, beforehand:
28503
28504	sed -i s/THRU/THROUGH/ tests/existing.at
28505	git ls-files|misspellings -f -|perl -nl \
28506	  -e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \
28507	  -e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\
28508	  -e 'print "sed -i $q${n}s!$l!$r!$q $file"'|bash
28509
285102012-05-24  Akim Demaille  <akim@lrde.epita.fr>
28511
28512	build: regen.
28513
285142012-05-24  Akim Demaille  <akim@lrde.epita.fr>
28515
28516	Merge tag 'v2.5.1_rc2'
28517	Bison 2.5.1_rc2.
28518
28519	* tag 'v2.5.1_rc2': (34 commits)
28520	  Bison 2.5.1_rc2.
28521	  doc: fixes.
28522	  build: fix ChangeLog generation.
28523	  c++: compute the header guards.
28524	  skeletons: remove support for unused directive.
28525	  lalr1.cc: improve Doxygen documentation.
28526	  lalr1.cc: extract stack.hh.
28527	  news: convert to double quotes.
28528	  space changes.
28529	  build: do not prototype flex-generated functions.
28530	  build: fix ChangeLog generation.
28531	  Bison 2.5.1_rc1.
28532	  tests: save/restore Autotest special files when checking XML support.
28533	  tests: AT_SAVE_SPECIAL_FILES / AT_RESTORE_SPECIAL_FILES.
28534	  tests: honor TESTSUITEFLAGS in all the check targets.
28535	  build: do not enable c++ warnings on 0 when nullptr is not supported.
28536	  maint: update gnulib.
28537	  build: config.in.h.
28538	  build: move silent rules.
28539	  glr.c: reduce variable scopes.
28540	  maint: maintainer-release-check.
28541	  maint: shush a syntax-check.
28542	  maint: prefer "commit message" to "log entry".
28543	  command line: fix minor leaks.
28544	  maint: we no longer maintain the ChangeLog.
28545	  maint: fix the generation of the synclines for bison's parser.
28546	  maint: regen.
28547	  maint: import the xmemdup0 gnulib module.
28548	  maint: remove left-over gnulib modules.
28549	  maint: ignore files imported by autopoint.
28550	  build: AC_PROG_LEX: use more readable variable names.
28551	  maint: regen src/parse-gram.[ch]
28552	  maint: simplify parse-gram.y
28553	  maint: s/strncpy/memcpy/, when equivalent
28554
285552012-05-23  Akim Demaille  <akim@lrde.epita.fr>
28556
28557	maint: post-release administrivia
28558	* NEWS: Add header line for next release.
28559	* .prev-version: Record previous version.
28560	* cfg.mk (old_NEWS_hash): Auto-update.
28561
285622012-05-23  Akim Demaille  <akim@lrde.epita.fr>
28563
28564	Bison 2.5.1_rc2.
28565	* NEWS: Update.
28566
285672012-05-23  Akim Demaille  <akim@lrde.epita.fr>
28568
28569	doc: fixes.
28570	* doc/bison.texinfo: Fix errors spotted by syntax-check.
28571
285722012-05-23  Akim Demaille  <akim@lrde.epita.fr>
28573
28574	build: fix ChangeLog generation.
28575	* gnulib: Update to get newest gitlog-to-changelog.
28576	* bootstrap: Update.
28577	* Makefile.am (gen-ChangeLog): Fix for Bison's git log style.
28578
285792012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28580
28581	c++: compute the header guards.
28582	This is a frequent request.  Recently pointed out by Wei Song,
28583	<http://lists.gnu.org/archive/html/help-bison/2012-05/msg00002.html>.
28584
28585	* data/c.m4 (b4_tocpp, b4_cpp_guard, b4_cpp_guard_open)
28586	(b4_cpp_guard_close): New.
28587	* data/lalr1.cc, data/location.cc, data/stack.hh: Use them.
28588	* TODO (Header Guards): Move to...
28589	* NEWS: here.
28590	Formatting changes.
28591
285922012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28593
28594	skeletons: remove support for unused directive.
28595	* src/scan-skel.l (@dir_prefix@): Remove support, has never been
28596	used, not even in the commit that introduced it,
28597	2b81e969ea04c1a6502928ba7e847ec8ff7dcb2f.
28598
285992012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28600
28601	lalr1.cc: improve Doxygen documentation.
28602	* data/location.cc: Qualify file names with directory name.
28603
286042012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28605
28606	lalr1.cc: extract stack.hh.
28607	See commit 51bacae6b58fd5c6cce861f00440dc917384625e.
28608	* data/stack.hh: New, extracted from...
28609	* data/lalr1.cc: here.
28610	* data/Makefile.am: Adjust.
28611
286122012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28613
28614	news: convert to double quotes.
28615	* NEWS: Convert from `quoted' to "quoted".
28616	Reported by Stefano Lattarini.
28617	http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00039.html
28618
286192012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28620
28621	space changes.
28622	* src/flex-scanner.h: Indent nested cpp directives.
28623
286242012-05-21  Akim Demaille  <akim@lrde.epita.fr>
28625
28626	build: do not prototype flex-generated functions.
28627	Some versions of Flex, possibly modified by the distribution package
28628	maintainers, have incompatible signatures.  Since newer versions of
28629	Flex prototype their functions, avoid the conflicts in that case.
28630	Reported by Stefano Lattarini.
28631	<http://lists.gnu.org/archive/html/bug-bison/2012-05/msg00012.html>.
28632
28633	* src/flex-scanner.h (FLEX_VERSION_GT): New.
28634	Use it to issue prototypes for flex-generated functions only for
28635	versions up to 2.5.31, in accordance with the comment.
28636	See commit dc9701e848f27ae64b6ddcf809580998667d60f2.
28637	Use it to define yylex_destroy when needed.
28638
286392012-05-16  Akim Demaille  <akim@lrde.epita.fr>
28640
28641	build: fix ChangeLog generation.
28642	* Makefile.am (gen-ChangeLog): Fix for VPATH builds.
28643
286442012-05-14  Akim Demaille  <akim@lrde.epita.fr>
28645
28646	Bison 2.5.1_rc1.
28647	* NEWS: Update.
28648	* src/parse-gram.c, src/parse-gram.h: Regen.
28649
286502012-05-11  Akim Demaille  <akim@lrde.epita.fr>
28651
28652	tests: save/restore Autotest special files when checking XML support.
28653	Currently the test 248, "parse-gram.y: LALR = IELR", fails
28654	BISON_TEST_XML is set.
28655
28656	* tests/local.at (AT_BISON_CHECK_XML): Belt: Save/restore files.
28657	* tests/regression.at (parse-gram.y: LALR = IELR): Suspenders: Don't
28658	rely on expout.
28659	Each one of these changes suffices.
28660
286612012-05-11  Akim Demaille  <akim@lrde.epita.fr>
28662
28663	tests: AT_SAVE_SPECIAL_FILES / AT_RESTORE_SPECIAL_FILES.
28664	Some of our macros play with expout and other Autotest special files,
28665	which may break their callers (e.g., currently TESTSUITEFLAGS='248
28666	BISON_TEST_XML=1' fails).
28667
28668	There is already some support for this.  Expand it to be ready to use
28669	it elsewhere.
28670
28671	* tests/local.at (AT_RESTORE_SPECIAL_FILES, AT_SAVE_SPECIAL_FILES)
28672	(at_save_special_files, at_restore_special_files): New.
28673	(AT_BISON_CHECK_NO_XML): Use them.
28674
286752012-05-11  Akim Demaille  <akim@lrde.epita.fr>
28676
28677	tests: honor TESTSUITEFLAGS in all the check targets.
28678	* tests/Makefile.am (installcheck-local): Simplify.
28679	(maintainer-check-posix, maintainer-check-valgrind): Honor
28680	$(TESTSUITEFLAGS).
28681
286822012-05-11  Akim Demaille  <akim@lrde.epita.fr>
28683
28684	build: do not enable c++ warnings on 0 when nullptr is not supported.
28685	* configure.ac (WARN_CXXFLAGS): Enable -Wzero-as-null-pointer-constant
28686	only when nullptr is supported..
28687
286882012-05-11  Akim Demaille  <akim@lrde.epita.fr>
28689
28690	maint: update gnulib.
28691	* bootstrap, gnulib: Update.
28692
286932012-05-09  Akim Demaille  <akim@lrde.epita.fr>
28694
28695	build: config.in.h.
28696	Historically we used config.hin (where everybody else used
28697	config.h.in) to please DOS.  Now that we use gnulib, there are already
28698	tons of files with several dots, especially *.in.h.
28699
28700	* configure.ac: Rename config.hin as config.in.h.
28701
287022012-05-09  Akim Demaille  <akim@lrde.epita.fr>
28703
28704	build: move silent rules.
28705	* tests/Makefile.am: In the generation of the test suite.
28706
287072012-05-09  Akim Demaille  <demaille@gostai.com>
28708
28709	glr.c: reduce variable scopes.
28710	* data/glr.c: Where appropriate, fuse variable declarations followed
28711	by assignments by variable declarations with a value.
28712	Where appropriate, introduce new scopes to limit variable spans.
28713
287142012-05-08  Akim Demaille  <akim@lrde.epita.fr>
28715
28716	maint: maintainer-release-check.
28717	* tests/Makefile.am (maintainer-release-check): New.
28718	* Makefile.am (MAINTAINER_CHECKS): New.
28719	Support maintainer-release-check.
28720	* README-hacking: Document it, and syntax-check too.
28721
287222012-05-08  Akim Demaille  <akim@lrde.epita.fr>
28723
28724	maint: shush a syntax-check.
28725	* cfg.mk: lib/timevar is not planned to be gnulib'ed, as it comes
28726	from GCC.
28727
287282012-05-08  Akim Demaille  <akim@lrde.epita.fr>
28729
28730	maint: prefer "commit message" to "log entry".
28731	* README-hacking: here.
28732	Suggested by Stefano Lattarini.
28733
287342012-05-08  Akim Demaille  <akim@lrde.epita.fr>
28735
28736	command line: fix minor leaks.
28737	* src/getargs.c (getargs): Free pointers before allocating them new
28738	content.
28739
287402012-05-08  Akim Demaille  <akim@lrde.epita.fr>
28741
28742	maint: we no longer maintain the ChangeLog.
28743	* .gitattributes: No need to merge it.
28744	* README-hacking: Update release instructions.
28745
287462012-05-06  Akim Demaille  <akim@lrde.epita.fr>
28747
28748	maint: fix the generation of the synclines for bison's parser.
28749	* tests/bison.in: Import from master the changes that make
28750	this script generate synclines that are independant of the
28751	builddir/srcdir user's set up.
28752
287532012-05-06  Akim Demaille  <akim@lrde.epita.fr>
28754
28755	maint: regen.
28756	* src/parse-gram.c, src/parse-gram.h: Regen.
28757
287582012-05-06  Akim Demaille  <akim@lrde.epita.fr>
28759
28760	maint: import the xmemdup0 gnulib module.
28761	* bootstrap.conf: Require this module.
28762	* src/parse-gram.y: Include xmemdup0.h.
28763
287642012-05-06  Akim Demaille  <akim@lrde.epita.fr>
28765
28766	maint: remove left-over gnulib modules.
28767	* bootstrap.conf (gnulib_modules): Remove pipe-posix.
28768	* lib/.gitignore, m4/.gitignore: Remove files that we no longer use.
28769
287702012-05-06  Akim Demaille  <akim@lrde.epita.fr>
28771
28772	maint: ignore files imported by autopoint.
28773	* m4/.gitignore: here.
28774
287752012-05-06  Akim Demaille  <akim@lrde.epita.fr>
28776
28777	build: AC_PROG_LEX: use more readable variable names.
28778	* m4/flex.m4 (AC_PROG_LEX): Prefer LEX_IS_FLEX to FLEX.
28779	Prefer true/false to yes/no for such variables.
28780	* configure.ac: Adjust.
28781
287822012-05-06  Jim Meyering  <meyering@redhat.com>
28783
28784	maint: regen src/parse-gram.[ch]
28785
287862012-05-06  Jim Meyering  <meyering@redhat.com>
28787	    Akim Demaille  <akim@lrde.epita.fr>
28788
28789	maint: simplify parse-gram.y
28790	* src/parse-gram.y (add_param): Use xmemdup0 in place of
28791	xmalloc+memcpy, and strspn in place of an open-coded loop.
28792
287932012-05-06  Jim Meyering  <meyering@redhat.com>
28794
28795	maint: s/strncpy/memcpy/, when equivalent
28796	* src/output.c (output_skeleton): Use memcpy, not strncpy,
28797	since the source is known to fit in the destination buffer.
28798	* src/parse-gram.y (%skeleton): Likewise.
28799
288002012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28801
28802	glr.c: formatting changes.
28803	* data/glr.c: Fix indentation.
28804
288052012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28806
28807	Merge remote-tracking branch 'origin/master'
28808	* origin/master:
28809	  glr.c: untabify.
28810	  glr.cc: untabify.
28811	  glr.cc: formatting changes.
28812	  glr.cc: remove unused signature.
28813	  glr.cc: properly declare locations are const where appropriate.
28814	  doc: fix @xref.
28815
288162012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28817
28818	glr.c: untabify.
28819	* data/glr.c: here.
28820
288212012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28822
28823	glr.cc: untabify.
28824	* data/glr.cc: here.
28825
288262012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28827
28828	glr.cc: formatting changes.
28829	* data/glr.cc: Fit in 80 columns.
28830
288312012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28832
28833	glr.cc: remove unused signature.
28834	* data/glr.cc (yydestruct_): Not used, remove.
28835	It is yydestruct which is used.
28836
288372012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28838
28839	glr.cc: properly declare locations are const where appropriate.
28840	* data/glr.cc (yyerror): The location is const.
28841
288422012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28843
28844	doc: fix @xref.
28845	* doc/bison.texinfo: here.
28846
288472012-05-04  Akim Demaille  <akim@lrde.epita.fr>
28848
28849	Merge remote-tracking branch 'origin/maint'
28850	* origin/maint: (22 commits)
28851	  tests: ignore code coverage/profiling failure messages
28852	  doc: fix some invalid @ref.
28853	  build: fix previous commit.
28854	  install-pdf: fix.
28855	  NEWS: Update.
28856	  %printer: support both yyo and yyoutput.
28857	  doc: mfcalc: demonstrate %printer.
28858	  tests: style changes.
28859	  build: require Flex.
28860	  build: flex.m4: check for Flex.
28861	  build: flex.m4: quote properly.
28862	  build: flex.m4.
28863	  build: autoconf: update.
28864	  glr: eliminate last bits of unwanted locations.
28865	  NEWS: 2.6 will drop K&R.
28866	  TODO: remove dead items.
28867	  TODO: import from master.
28868	  gnulib: update.
28869	  maint: update NEWS.
28870	  doc: fix index.
28871	  doc: fix documentation of YYERROR.
28872	  c++: more YY_NULL
28873
288742012-05-02  Akim Demaille  <akim@lrde.epita.fr>
28875
28876	tests: ignore code coverage/profiling failure messages
28877	The Hydra buildfarm provides code coverage analysis.  For some reason,
28878	in some test cases, code coverage data seem to be incompatible, and
28879	generate error messages at parser run-time.  Ignore these messages so
28880	that (i) these tests do pass, (ii) coverage results be provided by
28881	Hydra.
28882
28883	* tests/local.at (AT_PARSER_CHECK): Ignore messages for failed merges
28884	of code coverage/profiling results.
28885
288862012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28887
28888	doc: fix some invalid @ref.
28889	* doc/bison.texinfo: Fix incorrect @ref uses.
28890
288912012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28892
28893	build: fix previous commit.
28894	* bootstrap: Update from gnulib.
28895
288962012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28897
28898	install-pdf: fix.
28899	* gnulib: Fix install-pdf in po/ and runtime-po/.
28900	Reported by Hans Aberg.
28901	Fixed by Joel E. Denny.
28902	http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html
28903
289042012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28905
28906	NEWS: Update.
28907	* NEWS: Spell check.
28908	(%printer): is now documented.
28909
289102012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28911
28912	%printer: support both yyo and yyoutput.
28913	lalr1.cc used to support yyo, but not yyoutput.  Support both,
28914	but document only yyoutput (at least until there is some consensus
28915	on this).
28916
28917	* data/c.m4 (yy_symbol_value_print): Also support yyo.
28918	* data/glr.cc  (yy_symbol_value_print_): Support both yyo and yyoutput.
28919	* data/lalr1.cc: Also support yyoutput.
28920	* doc/bison.texinfo: Explicitly use yyoutput in the examples.
28921	* examples/mfcalc/mfcalc.test: Test the -p option.
28922
289232012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28924
28925	doc: mfcalc: demonstrate %printer.
28926	* doc/bison.texinfo (Printer Decl): New.
28927	Number mfcalc.y snippets so that they are output in
28928	the proper order.
28929	(The mfcalc Main): Use yydebug.
28930	(Debugging): Simplify the text.
28931	(Enabling Traces, Mfcalc Traces, The YYPRINT Macro): New.
28932	(Table of Symbols): Document YYPRINT and YYFPRINTF.
28933
289342012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28935
28936	tests: style changes.
28937	* tests/input.at: Use "print" in %printer instead of "destroy".
28938	It is unused, so we don't care, yet it is less surprising.
28939	* tests/actions.at: Comment changes.
28940
289412012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28942
28943	%printer: support both yyo and yyoutput.
28944	lalr1.cc used to support yyo, but not yyoutput.  Support both,
28945	but document only yyoutput (at least until there is some consensus
28946	on this).
28947
28948	* data/c.m4 (yy_symbol_value_print): Also support yyo.
28949	* data/glr.cc  (yy_symbol_value_print_): Support both yyo and yyoutput.
28950	* data/lalr1.cc: Also support yyoutput.
28951	* doc/bison.texinfo: Explicitly use yyoutput in the examples.
28952	* examples/mfcalc/mfcalc.test: Test the -p option.
28953
289542012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28955
28956	doc: mfcalc: demonstrate %printer.
28957	* doc/bison.texinfo (Printer Decl): New.
28958	Number mfcalc.y snippets so that they are output in
28959	the proper order.
28960	(The mfcalc Main): Use yydebug.
28961	(Debugging): Simplify the text.
28962	(Enabling Traces, Mfcalc Traces, The YYPRINT Macro): New.
28963	(Table of Symbols): Document YYPRINT and YYFPRINTF.
28964
289652012-04-16  Akim Demaille  <akim@lrde.epita.fr>
28966
28967	tests: style changes.
28968	* tests/input.at: Use "print" in %printer instead of "destroy".
28969	It is unused, so we don't care, yet it is less surprising.
28970	* tests/actions.at: Comment changes.
28971
289722012-04-10  Akim Demaille  <akim@lrde.epita.fr>
28973
28974	build: require Flex.
28975	* configure.ac: Require Flex.
28976
289772012-04-10  Akim Demaille  <akim@lrde.epita.fr>
28978
28979	build: flex.m4: check for Flex.
28980	* m4/flex.m4 (_AC_PROG_LEX_YYTEXT_DECL): Check that $LEX
28981	supports some of the Flex options, and exclusive start conditions.
28982	Define FLEX to 'yes'/'', as AC_PROG_CC does for GCC.
28983
289842012-04-10  Akim Demaille  <akim@lrde.epita.fr>
28985
28986	build: flex.m4: quote properly.
28987	* m4/flex.m4: Use quotes more systematically.
28988
289892012-04-10  Akim Demaille  <akim@lrde.epita.fr>
28990
28991	build: flex.m4.
28992	* m4/flex.m4: New.
28993	An exact copy of what is in Autoconf currently.
28994
289952012-04-10  Akim Demaille  <akim@lrde.epita.fr>
28996
28997	build: autoconf: update.
28998	* submodules/autoconf: Update.
28999	There are no changes in data/m4sugar/foreach.m4, and the
29000	changes in data/m4sugar/m4sugar.m4 are minor.
29001
290022012-04-10  Akim Demaille  <akim@lrde.epita.fr>
29003
29004	glr: eliminate last bits of unwanted locations.
29005	* data/glr.c (YYLTYPE): Do not define when locations are
29006	not demanded.
29007	Adjust all dependencies.
29008
290092012-04-10  Akim Demaille  <akim@lrde.epita.fr>
29010
29011	NEWS: 2.6 will drop K&R.
29012	* NEWS: here.
29013	(glr.c): Fix a spello.
29014
290152012-04-09  Akim Demaille  <akim@lrde.epita.fr>
29016
29017	TODO: remove dead items.
29018	* TODO (Documentation, %printer, Java): Remove, already done (or just
29019	waiting for approval).
29020	(Fortran, BTYacc): Remove, there does not seem to be demand.
29021
290222012-04-09  Akim Demaille  <akim@lrde.epita.fr>
29023
29024	TODO: import from master.
29025	* TODO: Copy the current version.
29026
290272012-04-08  Akim Demaille  <akim@lrde.epita.fr>
29028
29029	tests: fix bison wrapper.
29030	* tests/bison.in (PERL): Fix.
29031
290322012-04-08  Akim Demaille  <akim@lrde.epita.fr>
29033
29034	doc: fix some invalid @ref.
29035	* doc/bison.texinfo: Fix incorrect @ref uses.
29036
290372012-04-08  Akim Demaille  <akim@lrde.epita.fr>
29038
29039	build: extexi: support out-of-order blocks.
29040	* examples/extexi (%file_output): Remove.
29041	(&process): Accept "FILE: BLOCK-NUM" requests.
29042
290432012-04-08  Akim Demaille  <akim@lrde.epita.fr>
29044
29045	build: look for Perl in configure.
29046	Bison uses "/usr/bin/perl" or "perl" in several places, and it does
29047	not appear to be a problem.  But, at least to make it simpler to
29048	change PERL on the make command line, check for perl in configure.
29049
29050	* configure.ac (PERL): New.
29051	* doc/Doxyfile.in, doc/local.mk, examples/local.mk,
29052	* tests/bison.in: Use it.
29053
290542012-04-08  Akim Demaille  <akim@lrde.epita.fr>
29055
29056	maint: rewrite extexi in Perl.
29057	* examples/extexi: Rewrite in Perl.
29058	* examples/local.mk (extract): Adjust.
29059
290602012-04-07  Akim Demaille  <akim@lrde.epita.fr>
29061
29062	build: simplify clean.
29063	* doc/local.mk (CLEANFILES): Since the previous commit,
29064	there a no longer such files.
29065	* Makefile.in (CLEANFILES): Initialize here.
29066
290672012-04-07  Akim Demaille  <akim@lrde.epita.fr>
29068
29069	gnulib: update.
29070	* bootstrap.conf (bootstrap_sync): True again.
29071	It was disabled while waiting for changes to be integrated
29072	in gnulib's bootstrap, which was done long ago.
29073	* bootstrap, gnulib: Update.
29074
290752012-04-04  Akim Demaille  <akim@lrde.epita.fr>
29076
29077	maint: update NEWS.
29078	* NEWS: Fix entry about __attribute__.
29079	Reorder by "decreasing" order of importance.
29080
290812012-04-04  Akim Demaille  <akim@lrde.epita.fr>
29082
29083	doc: fix index.
29084	http://lists.gnu.org/archive/html/bison-patches/2012-04/msg00006.html
29085
29086	* doc/bison.texinfo: Avoid using @def* variant with more
29087	than the defined entity as main entity, as it results in
29088	an incorrect index.  For instance, don't document
29089	{return YYERROR;}, which results in a single index entry
29090	"return YYERROR;", but rather as typed function whose
29091	return type is "type", and whose argument list is ";".
29092
290932012-04-04  Akim Demaille  <akim@lrde.epita.fr>
29094
29095	doc: fix documentation of YYERROR.
29096	* doc/bison.texinfo (Table of Symbols): Fix the documentation
29097	of YYERROR by copying that from "Action Features".
29098
290992012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29100
29101	build: fix distcheck issues.
29102	For some reason it seems that texi2dvi -o no longer forces --clean
29103	mode, so we have stray TeX compilation files staying in top_builddir
29104	since TeX is run from there.
29105
29106	While at it, upgrade the generation of the (completely obsolete)
29107	reference card.  Target PDF.
29108
29109	* doc/local.mk (TEXI2DVI): Pass --build-dir.
29110	(CLEANDIRS): More accurate.
29111	(doc/refcard.dvi): Replace with...
29112	(doc/refcard.pdf): this.
29113	Adjust dependencies.
29114
291152012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29116
29117	build: don't rely on $< in non-pattern rules.
29118	* doc/local.mk, tests/local.mk: here.
29119	Reported by Stefano Lattarini.
29120
291212012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29122
29123	doc: upgrade Doxyfile.
29124	* doc/Doxyfile.in: Run doxygen -u.
29125	Prompted by Tim Landscheidt.
29126
291272012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29128
29129	doc: help Doxygen find our files.
29130	* doc/Doxyfile.in (INCLUDE_PATH): here.
29131
291322012-04-01  Tim Landscheidt  <tim@tim-landscheidt.de>
29133
29134	Fix Doxygen generation and clean-up.
29135	* doc/Doxyfile.in: Amend OUTPUT_DIRECTORY.
29136	* doc/local.mk (html-local): Amend working directory.
29137	(CLEANDIRS): Fix "html", remove "latex".
29138
291392012-04-01  Tim Landscheidt  <tim@tim-landscheidt.de>
29140
29141	Fix Doxygen comment.
29142	* src/InadequacyList.h: s#</t>#</tt>#.
29143
291442012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29145
29146	c++: more YY_NULL
29147	Caught by maintainer-check-g++.
29148	* data/glr.c, data/lalr1.cc, data/yacc.c, tests/cxx-type.at,
29149	* tests/glr-regression.at, tests/push.at:
29150	When simple to do, avoid expliciting the null ptr.
29151	Otherwise use YY_NULL.
29152
291532012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29154
29155	c++: more YY_NULL
29156	Caught by maintainer-check-g++.
29157	* data/glr.c, data/lalr1.cc, data/yacc.c, tests/cxx-type.at,
29158	* tests/glr-regression.at, tests/push.at:
29159	When simple to do, avoid expliciting the null ptr.
29160	Otherwise use YY_NULL.
29161
291622012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29163
29164	Merge remote-tracking branch 'origin/maint'
29165	* origin/maint:
29166	  bump to 2012 in skeletons.
29167	  build: remove ancient Autoconf tests.
29168	  doc: c++: complete the location documentation.
29169	  c++: locations: provide convenience constructors.
29170	  c++: locations: remove useless "inline".
29171	  glr: do not use locations when they are not requested
29172	  c++: use nullptr for C++11.
29173	  build: simplify and improve the compiler warnings for tests.
29174	  gnulib: update.
29175	  maint: formatting changes.
29176	  NEWS: update.
29177	  Java: Fix syntax error handling without error token.
29178	  tests: beware of -pedantic on large #line numbers.
29179	  tests: when using the C++ compiler, use its flags too.
29180
291812012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29182
29183	bump to 2012 in skeletons.
29184	* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
29185	* data/location.cc, data/yacc.c: Bump copyright year ranges.
29186
291872012-04-01  Akim Demaille  <akim@lrde.epita.fr>
29188
29189	build: remove ancient Autoconf tests.
29190	lib/subpipe.c was removed in 47fa574761319b0a422691223c9b8a9a72f36aa2.
29191
29192	* m4/subpipe.m4: Remove.
29193	* configure.ac (BISON_PREREQ_SUBPIPE): Remove.
29194
291952012-03-31  Akim Demaille  <akim@lrde.epita.fr>
29196
29197	doc: c++: complete the location documentation.
29198	* data/location.cc (position::initialize, location::initialize):
29199	Also accept line and column, with default values.
29200	* doc/bison.texinfo (C++ position, C++ location): New nodes.
29201	Describe more thoroughly these classes.
29202	Fix several Texinfo misuses.
29203
292042012-03-31  Akim Demaille  <demaille@gostai.com>
29205
29206	c++: locations: provide convenience constructors.
29207	* data/location.cc (position::position): Accept file, line and
29208	column as arguments with default values.
29209	Always qualify initial line and column literals as unsigned.
29210	(location::location): Provide convenience constructors.
29211
292122012-03-31  Akim Demaille  <akim@lrde.epita.fr>
29213
29214	c++: locations: remove useless "inline".
29215	* data/location.cc: "inline" is implicit when defining
29216	methods in the class definition.
29217
292182012-03-31  Akim Demaille  <akim@lrde.epita.fr>
29219
29220	glr: do not use locations when they are not requested
29221	When the test suite runs with -O2 and warnings enabled, G++
29222	complains of locations being used, but not initialized.
29223	The simplest is to not use locations.
29224
29225	* data/glr.c (b4_locuser_formals, b4_locuser_args): New.
29226	Use them when locations should not be used.
29227	Use b4_locations_if where appropriate.
29228	(yyuserAction): Modify the order to the arguments to make
29229	it more alike the other routines, and to make use of
29230	b4_locuser_args simpler.
29231
292322012-03-31  Akim Demaille  <akim@lrde.epita.fr>
29233
29234	c++: use nullptr for C++11.
29235	C++11 introduces "nullptr" which plays the role of C's NULL, in
29236	replacement of "0".  Fix the C++ skeletons to avoid warnings about
29237	uses of "0" in place of "nullptr", and improve C skeletons to also use
29238	this "nullptr" when compiled with a C++11 compiler.
29239
29240	* configure.ac: More C++ warnings.
29241	* NEWS (2.5.1): Document this.
29242	* data/c++.m4, data/c.m4 (b4_null_define): New.
29243	(b4_null): Use YY_NULL instead of 0.
29244	* data/glr.c, data/lalr1.cc, data/location.cc, data/yacc.c:
29245	Call b4_null_define/b4_null where appropriate.
29246	Use YY_NULL instead of NULL.
29247	* data/location.cc (initialize): Accept a default argument,
29248	YY_NULL.
29249	* tests/actions.at, tests/calc.at: Adjust.
29250
29251	* data/glr.c, lib/libiberty.h, src/system.h (__attribute__):
29252	Do not disable it when __STRICT_ANSI__ is defined, as, for
29253	instance, it disables the __attribute__((unused)) which
29254	protects us from some compiler warnings.
29255	This was already done elsewhere in Bison, in 2001, see
29256	4a0d89369599a2cea01f4fbdf791f426a02cb5a3.
29257	* tests/regression.at: Adjust output.
29258
292592012-03-30  Akim Demaille  <akim@lrde.epita.fr>
29260
29261	build: simplify and improve the compiler warnings for tests.
29262	* configure.ac (warn_common, warn_c, warn_cxx): New.
29263	Use them to compute independently the options supported
29264	by the C and C++ compilers.
29265	Don't AC_SUBST the variables passed to gl_WARN_ADD: it
29266	does it for us.
29267	(WARN_CFLAGS_TEST, WARN_CXXFLAGS_TEST): Don't aggregate
29268	$WARN_CFLAGS and $WARN_CXXFLAGS in them now, leave it
29269	to atlocal.in.
29270	(O0CFLAGS, O0CXXFLAGS): Move their definition to...
29271	* tests/atlocal.in: here.
29272	Be more systematic between C and C++.
29273	Reorder to factor between variables.
29274	Propagate all of the variables when --compile-c-with-cxx.
29275
292762012-03-30  Akim Demaille  <akim@lrde.epita.fr>
29277
29278	gnulib: update.
29279
292802012-03-30  Akim Demaille  <akim@lrde.epita.fr>
29281
29282	maint: formatting changes.
29283	* src/system.h: Indent CPP directives using cppi.
29284
292852012-03-27  Akim Demaille  <akim@lrde.epita.fr>
29286
29287	NEWS: update.
29288	* NEWS: Java fixes, more about the doc changes, liby issues.
29289
292902012-03-27  Tim Landscheidt  <tim@tim-landscheidt.de>
29291
29292	Java: Fix syntax error handling without error token.
29293	* data/lalr1.java (YYParser::parse): Here.
29294	* tests/java.at: Add test case.
29295
292962012-03-24  Akim Demaille  <akim@lrde.epita.fr>
29297
29298	tests: beware of -pedantic on large #line numbers.
29299	* tests/local.at (AT_TEST_TABLES_AND_PARSE): Don't pass -pedantic
29300	when compiling large canonical-LR parsers.
29301	Reported by Tys Lefering.
29302	http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00025.html
29303
293042012-03-24  Akim Demaille  <akim@lrde.epita.fr>
29305
29306	tests: when using the C++ compiler, use its flags too.
29307	* tests/local.at: Go for colors.
29308	(--compile-c-with-cxx): New option.
29309	We used to pass "CC=$CXX" as command line argument,
29310	but it was not possible to adjust CFLAGS accordingly
29311	in atlocal, since it is loaded before assignments on
29312	the command line are honored (so that the command line
29313	takes precedence).
29314	* tests/atlocal.in: Implement it.
29315	* tests/local.mk: Use it.
29316
293172012-03-24  Akim Demaille  <akim@lrde.epita.fr>
29318
29319	tests: style changes in the Makefile.
29320	* tests/local.mk: Prefer passing variable assignment by
29321	the command line, instead of the environment, so that it
29322	is reported in the logs.
29323	Prefer single quotes for shell literal strings.
29324
293252012-03-24  Akim Demaille  <akim@lrde.epita.fr>
29326
29327	tests: beware of -pedantic on large #line numbers.
29328	* tests/local.at (AT_TEST_TABLES_AND_PARSE): Don't pass -pedantic
29329	when compiling large canonical-LR parsers.
29330	Reported by Tys Lefering.
29331	http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00025.html
29332
293332012-03-24  Akim Demaille  <akim@lrde.epita.fr>
29334
29335	tests: when using the C++ compiler, use its flags too.
29336	* tests/local.at: Go for colors.
29337	(--compile-c-with-cxx): New option.
29338	We used to pass "CC=$CXX" as command line argument,
29339	but it was not possible to adjust CFLAGS accordingly
29340	in atlocal, since it is loaded before assignments on
29341	the command line are honored (so that the command line
29342	takes precedence).
29343	* tests/atlocal.in: Implement it.
29344	* tests/local.mk: Use it.
29345
293462012-03-24  Akim Demaille  <akim@lrde.epita.fr>
29347
29348	tests: fix dependencies.
29349	* tests/local.mk (check_SCRIPTS): Add atlocal and atconfig so
29350	that they are properly updated before running tests.
29351	(RUN_TESTSUITE_deps): New.
29352	Use it to factor the dependencies of "*-check" targets,
29353	especially those that don't bounce to the regular
29354	"check-local" target, since then they don't benefit from the
29355	proper dependencies (such as atlocal).
29356
293572012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29358
29359	Merge remote-tracking branch 'fsf/maint'
29360	* fsf/maint: (404 commits)
29361	  doc: update the --verbose report format.
29362	  doc: spell check.
29363	  doc: stmt, not stmnt.
29364	  doc: save width.
29365	  doc: reformat grammar snippets.
29366	  doc: use only @example, not @smallexample.
29367	  doc: style changes.
29368	  doc: minor fixes to "Understanding" section
29369	  tests: minor fixes/simplifications
29370	  tests: be robust to quote style.
29371	  maint: update gnulib.
29372	  tests: be robust to POSIXLY_CORRECT being defined.
29373	  doc: fix environment issues.
29374	  regen.
29375	  tests: fix regressions.
29376	  glr: fix ambiguity reports.
29377	  doc: stylistic improvements.
29378	  maint: address sc_prohibit_doubled_word.
29379	  maint: address sc_prohibit_always-defined_macros.
29380	  maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
29381	  ...
29382
293832012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29384
29385	doc: spell fix.
29386	* doc/bison.texinfo: here.
29387	Reported by Tim Landscheidt.
29388
293892012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29390
29391	doc: update the --verbose report format.
29392	* doc/bison.texinfo (Understanding): Adjust to match the
29393	current format.
29394
293952012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29396
29397	doc: spell check.
29398	* doc/bison.texinfo: here.
29399
294002012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29401
29402	doc: stmt, not stmnt.
29403	* doc/bison.texinfo: s/stmnt/stmt/g.  This is a
29404	much more common abbreviation for "statement".
29405
294062012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29407
29408	doc: save width.
29409	* doc/bison.texinfo (Language and Grammar): Use the same
29410	layout for an example in all the versions, i.e., keep
29411	as general case what used to be used only for Info.
29412
294132012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29414
29415	doc: reformat grammar snippets.
29416	* doc/bison.texinfo: Convert the grammar examples to
29417	use a narrower style.  This helps fitting into the
29418	@smallbook constraints.
29419	http://lists.gnu.org/archive/html/bison-patches/2012-03/msg00011.html
29420
294212012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29422
29423	doc: use only @example, not @smallexample.
29424	* doc/bison.texinfo: Convert all @smallexamples into @examples.
29425	Adjust layout where needed.
29426
294272012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29428
29429	doc: style changes.
29430	* doc/bison.texinfo: Avoid line width issues with TeX.
29431	Upgrade ancient messages.
29432	Move some comments to better looking places.
29433	Add more @group.
29434	(Mfcalc Symbol Table): Reduce variable scopes.
29435	Prefer size_t for sizes.
29436	Prefer declarations with an initial value.
29437	Fix a @group environment.
29438
294392012-03-19  Paul Eggert  <eggert@cs.ucla.edu>
29440
29441	doc: minor fixes to "Understanding" section
29442	* doc/bison.texinfo (Understanding): Minor wording fixes and
29443	improvements.  Fixes problems reported in
29444	<https://savannah.gnu.org/patch/?4306>.
29445
294462012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29447
29448	doc: update the --verbose report format.
29449	* doc/bison.texinfo (Understanding): Adjust to match the
29450	current format.
29451
294522012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29453
29454	doc: spell check.
29455	* doc/bison.texinfo: here.
29456
294572012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29458
29459	doc: stmt, not stmnt.
29460	* doc/bison.texinfo: s/stmnt/stmt/g.  This is a
29461	much more common abbreviation for "statement".
29462
294632012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29464
29465	doc: save width.
29466	* doc/bison.texinfo (Language and Grammar): Use the same
29467	layout for an example in all the versions, i.e., keep
29468	as general case what used to be used only for Info.
29469
294702012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29471
29472	doc: reformat grammar snippets.
29473	* doc/bison.texinfo: Convert the grammar examples to
29474	use a narrower style.  This helps fitting into the
29475	@smallbook constraints.
29476	http://lists.gnu.org/archive/html/bison-patches/2012-03/msg00011.html
29477
294782012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29479
29480	doc: use only @example, not @smallexample.
29481	* doc/bison.texinfo: Convert all @smallexamples into @examples.
29482	Adjust layout where needed.
29483
294842012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29485
29486	doc: style changes.
29487	* doc/bison.texinfo: Avoid line width issues with TeX.
29488	Upgrade ancient messages.
29489	Move some comments to better looking places.
29490	Add more @group.
29491	(Mfcalc Symbol Table): Reduce variable scopes.
29492	Prefer size_t for sizes.
29493	Prefer declarations with an initial value.
29494	Fix a @group environment.
29495
294962012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29497
29498	c.m4: better newline control with b4_parse_param_use.
29499	* data/c.m4: Use m4_ifvaln instead of m4_ifval where
29500	applicable.
29501	(b4_parse_param_use): Switch order between two nested
29502	"if"s to avoid useless empty lines.
29503	Adjust callers to avoid useless lines.
29504
295052012-03-19  Akim Demaille  <akim@lrde.epita.fr>
29506
29507	glr.c: remove (broken) support for YYPRINT.
29508	YYPRINT uses yytoknum which glr does not define.  Since YYPRINT
29509	is considered obsolete, and did not work, don't fix its support,
29510	remove it from glr.c.
29511
29512	* data/c.m4 (yy_symbol_value_print): Use YYPRINT only for yacc.c.
29513	* TODO: Done.
29514
295152012-03-17  Paul Eggert  <eggert@cs.ucla.edu>
29516
29517	doc: minor fixes to "Understanding" section
29518	* doc/bison.texinfo (Understanding): Minor wording fixes and
29519	improvements.  Fixes problems reported in
29520	<https://savannah.gnu.org/patch/?4306>.
29521
295222012-03-15  Akim Demaille  <akim@lrde.epita.fr>
29523
29524	TODO: update.
29525
295262012-03-15  Akim Demaille  <akim@lrde.epita.fr>
29527
29528	gnulib: update.
29529
295302012-03-13  Akim Demaille  <demaille@gostai.com>
29531
29532	tests: minor fixes/simplifications
29533	* tests/local.at (AT_BISON_CHECK_NO_XML): Simplify sed programs,
29534	quotation, and default value assignments.
29535	Ensure a proper value to the numeric variables.
29536	Reported by Lie Yan.
29537	http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
29538
295392012-03-13  Akim Demaille  <akim@lrde.epita.fr>
29540
29541	maint: fix distcheck.
29542	* examples/local.mk (MAINTAINERCLEANFILES): Complete, and rename as...
29543	(CLEANFILES): this,
29544	* examples/calc++/local.mk, examples/mfcalc/local.mk,
29545	* examples/rpcalc/local.mk (CLEANFILES): Add the generated files.
29546
295472012-03-13  Akim Demaille  <demaille@gostai.com>
29548
29549	tests: minor fixes/simplifications
29550	* tests/local.at (AT_BISON_CHECK_NO_XML): Simplify sed programs,
29551	quotation, and default value assignments.
29552	Ensure a proper value to the numeric variables.
29553	Reported by Lie Yan.
29554	http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
29555
295562012-03-09  Akim Demaille  <demaille@gostai.com>
29557
29558	tests: be robust to POSIXLY_CORRECT being defined.
29559	* tests/local.at (AT_BISON_CHECK_NO_XML): Check if
29560	POSIXLY_CORRECT is defined, not if it is defined to 1.
29561	Reported by Lie Yan.
29562	http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
29563
295642012-03-09  Akim Demaille  <demaille@gostai.com>
29565
29566	tests: be robust to quote style.
29567	See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
29568
29569	* src/main.c (main): Define the quoting style we use.
29570	* tests/atlocal.in: Use ASCII style quotes during the tests.
29571
295722012-03-09  Akim Demaille  <demaille@gostai.com>
29573
29574	maint: update gnulib.
29575	* gnulib: update.
29576	* src/scan-gram.l: Don't use the (former version of) STREQ.
29577
295782012-03-09  Akim Demaille  <demaille@gostai.com>
29579
29580	tests: remove quote magic from the bison test wrapper.
29581	Basically, revert 4c4d35394d1bdb4dc3392482ab002bc111a3378f.
29582
29583	* tests/bison.in: Leave bison's stderr as is.
29584
295852012-03-09  Akim Demaille  <demaille@gostai.com>
29586
29587	tests: be robust to quote style.
29588	See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
29589
29590	* src/main.c (main): Define the quoting style we use.
29591	* tests/atlocal.in: Use ASCII style quotes during the tests.
29592
295932012-03-09  Akim Demaille  <demaille@gostai.com>
29594
29595	avoid direct strncmp calls.
29596	Before this change, bison would accept either .tab and _tab equivalently,
29597	whatever the current platform.  Besides, it was not obeying everywhere
29598	to the possible definition of TAB_EXT to something else than .tab.
29599
29600	For consistency, handle only TAB_EXT (".tab" on non DJGPP platforms).
29601	Support for "_tab" is neither documented, nor tested.
29602
29603	* src/system.h (STRNCMP_LIT): New.
29604	From Jim Meyering.
29605	(STRPREFIX_LIT): New.
29606	* src/files.c, src/getargs.c: Use it.
29607
296082012-03-06  Akim Demaille  <demaille@gostai.com>
29609
29610	tests: be robust to POSIXLY_CORRECT being defined.
29611	* tests/local.at (AT_BISON_CHECK_NO_XML): Check if
29612	POSIXLY_CORRECT is defined, not if it is defined to 1.
29613	Reported by Lie Yan.
29614	http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html
29615
296162012-02-24  Akim Demaille  <demaille@gostai.com>
29617
29618	build: comment changes.
29619	* Makefile.am, examples/calc++/local.mk, examples/local.mk,
29620	* examples/mfcalc/local.mk, examples/rpcalc/local.mk,
29621	* lib/local.mk, src/local.mk, tests/local.mk:
29622	Make the copyright licenses more uniform.
29623
296242012-02-24  Akim Demaille  <demaille@gostai.com>
29625
29626	build: fix more example extraction issues.
29627	* Makefile.am (dist_TESTS): New.
29628	(TESTS, EXTRA_DIST): Run and ship them.
29629	* examples/calc++/local.mk: examples/calc++/calc++.stamp no longer
29630	        exists, don't try to ship it.
29631	(.yy.stamp): New recipe.
29632	Use it.
29633	* examples/calc++/local.mk, examples/mfcalc/local.mk,
29634	* examples/rpcalc/local.mk:
29635	Don't ship the sources.
29636	Adjust the CPPFLAGS: there is nothing left in srcdir.
29637	(MAINTAINERCLEANFILES): Remove, now we are in builddir.
29638	(TESTS): Rename as...
29639	(dist_TESTS): this.
29640
296412012-02-24  Akim Demaille  <demaille@gostai.com>
29642
29643	maint: fix example extraction issues.
29644	calc++: don't rely on Automake to compile a C++ parser.
29645
29646	Basically, revert commit 609b3d8096fb0cc1fa4d908b6e1a860ced260bda,
29647	Automake 1.11.3 is not safe enough for C++ parser.
29648
29649	* examples/calc++/calc++-parser.hh: Remove.
29650	* examples/calc++/local.mk (examples/calc++/calc++-parser.stamp):
29651	New.
29652
29653	examples: factor the extractions into a single step
29654
29655	extexi had to be run in the extraction directory.  Now, it can be
29656	given the files with expected output directory.  This allows to
29657	use $(*_extracted) variables (before we had to list again their
29658	members, but limited to their base names).  In turn, this also
29659	allows fusing the extraction recipes into a single one.
29660
29661	Also, it is currently too hard (or requires too much duplication,
29662	since Make wants all the occurrences of the files to be prefixed with
29663	$(srcdir)/, which is something Automake cannot support for *_SOURCES)
29664	to work in the source tree.  So extract, and compile scanners and parsers
29665	in the build tree.
29666
29667	* examples/extexi (basename): New.
29668	(BEGIN): Now "file_wanted" maps base name to extracted file name.
29669	* examples/calc++/local.mk, examples/mfcalc/local.mk,
29670	* examples/rpcalc/local.mk: Fuse extraction rules into...
29671	* examples/local.mk: Here.
29672	(extract, extracted): New.
29673
296742012-02-23  Akim Demaille  <demaille@gostai.com>
29675
29676	maint: use STREQ/STRNEQ.
29677	* doc/bison.texinfo: Space change.
29678	* src/system.h (STREQ, STRNEQ): New.
29679	* src/files.c, src/ielr.c, src/lalr.c, src/muscle-tab.c,
29680	* src/output.c, src/print.c, src/print_graph.c,
29681	* src/reader.c, src/scan-skel.l, src/tables.c,
29682	* src/uniqstr.c:
29683	Use them.
29684	* src/scan-gram.l: Do not use streq.h, use system.h's STREQ.
29685	* cfg.mk: The documentation is an exception.
29686
296872012-02-23  Akim Demaille  <demaille@gostai.com>
29688
29689	doc: fix environment issues.
29690	* doc/bison.texinfo: Do not use @verbatim, in particular when
29691	we use @group inside.
29692	Use @quotation instead of @display for frequently asked questions,
29693	it looks much nicer.
29694
296952012-02-23  Akim Demaille  <demaille@gostai.com>
29696
29697	doc: fix environment issues.
29698	* doc/bison.texinfo: Do not use @verbatim, in particular when
29699	we use @group inside.
29700	Use @quotation instead of @display for frequently asked questions,
29701	it looks much nicer.
29702
297032012-02-23  Akim Demaille  <demaille@gostai.com>
29704
29705	regen.
29706	* src/parse-gram.h, src/parse-gram.c: regen.
29707
297082012-02-23  Akim Demaille  <demaille@gostai.com>
29709
29710	tests: fix regressions.
29711	Exit status 63 is documented for version-mismatch.
29712	* bootstrap.conf (gnulib_modules): Remove sysexits.
29713	* src/system.h (EX_MISMATCH): Define.
29714	* src/parse-gram.y (version_check): Use it instead of EX_CONFIG.
29715
29716	Missing includes.
29717	* tests/calc.at, tests/named-refs.at: Include assert.h.
29718
297192012-02-22  Akim Demaille  <demaille@gostai.com>
29720
29721	maint: gitignore.
29722	* examples/mfcalc/.gitignore, examples/rpcalc/.gitignore: Fix.
29723
297242012-02-21  Akim Demaille  <demaille@gostai.com>
29725
29726	regen.
29727	* src/parse-gram.c, src/parse-gram.h: regen.
29728
297292012-02-21  Akim Demaille  <demaille@gostai.com>
29730
29731	tests: fix regressions.
29732	Exit status 63 is documented for version-mismatch.
29733	* bootstrap.conf (gnulib_modules): Remove sysexits.
29734	* src/system.h (EX_MISMATCH): Define.
29735	* src/parse-gram.y (version_check): Use it instead of EX_CONFIG.
29736
29737	Missing includes.
29738	* tests/calc.at, tests/named-refs.at: Include assert.h.
29739
297402012-02-21  Akim Demaille  <demaille@gostai.com>
29741
29742	tests: post-process stderr to normalize quotes.
29743	* tests/bison.in: Save bison's stderr, and convert gettextized
29744	quotes to plain ASCII.
29745
297462012-02-21  Akim Demaille  <demaille@gostai.com>
29747
29748	glr: fix ambiguity reports.
29749	* tests/glr-regression.at (Ambiguity reports): New.
29750
297512012-02-21  Akim Demaille  <demaille@gostai.com>
29752
29753	glr: fix ambiguity reports.
29754	Fix a regression introduced in commit
29755	783aa653f4ca70a75919c8516b950494c612cbfe.
29756
29757	* tests/glr-regression.at (Ambiguity reports): New.
29758	* data/glr.c (yyreportTree): Fix an offset error.
29759
297602012-02-19  Akim Demaille  <demaille@gostai.com>
29761
29762	doc: stylistic improvements.
29763	* doc/bison.texinfo: Prefer "continue" to empty loop bodies.
29764	Add some @group/@end group to avoid poor page breaks.
29765
297662012-02-19  Akim Demaille  <demaille@gostai.com>
29767
29768	maint: address sc_prohibit_doubled_word.
29769	* data/yacc.c, doc/bison.texinfo: Reword to avoid having to
29770	disable that check.
29771	* cfg.mk: No longer skip this test.
29772
297732012-02-19  Akim Demaille  <demaille@gostai.com>
29774
29775	maint: address sc_prohibit_always-defined_macros.
29776	* cfg.mk: No longer skip it, except where EXIT_SUCCESS is used
29777	as a witness for stdlib.h.
29778	Skip this test when appropriate.
29779	* data/yacc.c: Drop a note about why EXIT_SUCCESS is defined here.
29780
297812012-02-19  Akim Demaille  <demaille@gostai.com>
29782
29783	maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
29784	* bootstrap.conf (gnulib_modules): Require progname.
29785	* src/complain.c, src/getargs.c, src/getargs.h, src/main.c: Use it.
29786	* cfg.mk (exclude): New.
29787	Use it.
29788	Skip lib/main.c for bindtextdomain and set_program_name.
29789
297902012-02-19  Akim Demaille  <demaille@gostai.com>
29791
29792	maint: remove stray file.
29793	* config.hin: Remove.
29794
297952012-02-19  Akim Demaille  <demaille@gostai.com>
29796
29797	doc: stylistic improvements.
29798	* doc/bison.texinfo: Prefer "continue" to empty loop bodies.
29799	Add some @group/@end group to avoid poor page breaks.
29800
298012012-02-19  Akim Demaille  <demaille@gostai.com>
29802
29803	doc: check the rpcalc.
29804	* doc/bison.texinfo: Tag rpcalc.y snippets.
29805	Add missing includes.
29806	(Rpcalc Rules): Don't issue leading tabs.
29807	Complete an Info menu.
29808	Use @result.
29809	* examples/rpcalc/local.mk: New.
29810	* examples/rpcalc/rpcalc.test: New.
29811	* examples/local.mk: Use them.
29812	* examples/mfcalc/mfcalc.test: Remove dup test.
29813	* examples/test: Disable debug traces.
29814
298152012-02-19  Akim Demaille  <demaille@gostai.com>
29816
29817	regen.
29818	* src/parse-gram.c, src/parse-gram.h: Regen.
29819
298202012-02-19  Akim Demaille  <demaille@gostai.com>
29821
29822	maint: address sc_prohibit_doubled_word.
29823	* data/yacc.c, doc/bison.texinfo: Reword to avoid having to
29824	disable that check.
29825	* cfg.mk: No longer skip this test.
29826
298272012-02-19  Akim Demaille  <demaille@gostai.com>
29828
29829	maint: address sc_prohibit_always-defined_macros.
29830	* cfg.mk: No longer skip it, except where EXIT_SUCCESS is used
29831	as a witness for stdlib.h.
29832	Skip this test when appropriate.
29833	* data/yacc.c: Drop a note about why EXIT_SUCCESS is defined here.
29834
298352012-02-19  Akim Demaille  <demaille@gostai.com>
29836
29837	maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
29838	* bootstrap.conf (gnulib_modules): Require progname.
29839	* src/complain.c, src/getargs.c, src/getargs.h, src/main.c: Use it.
29840	* cfg.mk (exclude): New.
29841	Use it.
29842	Skip lib/main.c for bindtextdomain and set_program_name.
29843
298442012-02-19  Akim Demaille  <demaille@gostai.com>
29845
29846	maint: remove stray file.
29847	* config.hin: Remove.
29848
298492012-02-19  Akim Demaille  <demaille@gostai.com>
29850
29851	bitset: fix an incorrect error message.
29852	* lib/bitset_stats.c: here.
29853	Reported by Stefano Lattarini.
29854
298552012-02-19  Akim Demaille  <demaille@gostai.com>
29856
29857	maint: address some syntax-issues remaining after cherry-picking from master.
29858	* cfg.mk: Skip bison generated files, 2.5 is generating trailing
29859	blanks.  This is already fixed in master.
29860	* tests/conflicts.at, tests/java.at: Fix white space issues.
29861
298622012-02-19  Akim Demaille  <demaille@gostai.com>
29863
29864	regen.
29865	* src/parse-gram.c, src/parse-gram.h: Regen.
29866
298672012-02-19  Akim Demaille  <demaille@gostai.com>
29868
29869	bitset: fix an incorrect error message.
29870	* lib/bitset_stats.c: here.
29871	Reported by Stefano Lattarini.
29872
298732012-02-19  Jim Meyering  <meyering@redhat.com>
29874
29875	maint: reenable sc_m4_quote_check
29876	* cfg.mk (local-checks-to-skip): Reenable sc_m4_quote_check.
29877	* m4/dmalloc.m4: Add quotes.
29878
298792012-02-19  Akim Demaille  <demaille@gostai.com>
29880
29881	maint: remove trailing empty lines.
29882	* cfg.mk: No longer skip sc_prohibit_empty_lines_at_EOF, except
29883	for parse-gram.h (generated).
29884	* examples/mfcalc/.gitignore, lib/.gitignore, m4/.gitignore,
29885	* po/.gitignore, runtime-po/.gitignore: Remove trailing/leading
29886	empty lines.
29887
298882012-02-19  Akim Demaille  <demaille@gostai.com>
29889
29890	maint: avoid "magic number exit".
29891	* cfg.mk (local-checks-to-skip): No longer skip it.
29892	* bootstrap.conf (gnulib_modules): Add sysexits.
29893	* doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y,
29894	* src/system.h, tests/calc.at, tests/named-refs.at: Use assert
29895	where appropriate instead of "if (...) exit".
29896	Use symbolic exit status elsewhere.
29897
298982012-02-19  Akim Demaille  <demaille@gostai.com>
29899
29900	maint: fix some syntax-check issues.
29901	* cfg.mk (local-checks-to-skip): Remove
29902	sc_prohibit_quotearg_without_use, sc_prohibit_strcmp,
29903	sc_unmarked_diagnostics, sc_useless_cpp_parens.
29904	(sc_unmarked_diagnostics): Skip DJGPP.
29905	* data/yacc.c, src/LR0.c, src/closure.c,
29906	* src/flex-scanner.h, src/gram.c, src/lalr.c,
29907	* src/print-xml.c, src/print.c, src/print_graph.c,
29908	* src/reader.c, src/reduce.c, src/tables.c:
29909	Don't use parens with cpp's defined.
29910	Remove useless includes.
29911
299122012-02-19  Akim Demaille  <demaille@gostai.com>
29913
29914	maint: address a couple of syntax-check errors.
29915	* cfg.mk (local-checks-to-skip): Remove sc_error_message_period
29916	and sc_error_message_uppercase.
29917	Address the uncovered issues.
29918	* po/POTFILES.in: Add missing files.
29919	* src/symtab.c: Remove useless includes.
29920	* lib/bitset_stats.c, src/files.c, tests/glr-regression.at: Use
29921	conformant error messages.
29922
299232012-02-19  Akim Demaille  <demaille@gostai.com>
29924
29925	maint: gnulib: upgrade.
29926
299272012-02-18  Akim Demaille  <demaille@gostai.com>
29928
29929	maint: remove trailing empty lines.
29930	* cfg.mk: No longer skip sc_prohibit_empty_lines_at_EOF, except
29931	for parse-gram.h (generated).
29932	* examples/mfcalc/.gitignore, lib/.gitignore, m4/.gitignore,
29933	* po/.gitignore, runtime-po/.gitignore: Remove trailing/leading
29934	empty lines.
29935
299362012-02-18  Akim Demaille  <demaille@gostai.com>
29937
29938	maint: regen.
29939	* src/parse-gram.c, src/parse-gram.h: regen.
29940
299412012-02-18  Akim Demaille  <demaille@gostai.com>
29942
29943	maint: avoid "magic number exit".
29944	* cfg.mk (local-checks-to-skip): No longer skip it.
29945	* bootstrap.conf (gnulib_modules): Add sysexits.
29946	* doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y,
29947	* src/system.h, tests/calc.at, tests/named-refs.at: Use assert
29948	where appropriate instead of "if (...) exit".
29949	Use symbolic exit status elsewhere.
29950
299512012-02-18  Akim Demaille  <demaille@gostai.com>
29952
29953	maint: fix some syntax-check issues.
29954	* cfg.mk (local-checks-to-skip): Remove
29955	sc_prohibit_quotearg_without_use, sc_prohibit_strcmp,
29956	sc_unmarked_diagnostics, sc_useless_cpp_parens.
29957	(sc_unmarked_diagnostics): Skip DJGPP.
29958	* data/yacc.c, src/LR0.c, src/closure.c,
29959	* src/flex-scanner.h, src/gram.c, src/lalr.c,
29960	* src/print-xml.c, src/print.c, src/print_graph.c,
29961	* src/reader.c, src/reduce.c, src/tables.c:
29962	Don't use parens with cpp's defined.
29963	Remove useless includes.
29964
299652012-02-18  Akim Demaille  <demaille@gostai.com>
29966
29967	maint: address a couple of syntax-check errors.
29968	* cfg.mk (local-checks-to-skip): Remove sc_error_message_period
29969	and sc_error_message_uppercase.
29970	Address the uncovered issues.
29971	* po/POTFILES.in: Add missing files.
29972	* src/symtab.c: Remove useless includes.
29973	* lib/bitset_stats.c, src/files.c, tests/glr-regression.at: Use
29974	conformant error messages.
29975
299762012-02-18  Akim Demaille  <demaille@gostai.com>
29977
29978	maint: gnulib: upgrade.
29979
299802012-02-17  Akim Demaille  <demaille@gostai.com>
29981
29982	doc: mfcalc: fix includes.
29983	* doc/bison.texinfo: math.h is needed early.
29984
299852012-02-17  Akim Demaille  <demaille@gostai.com>
29986
29987	examples: factor the test suite.
29988	* examples/mfcalc/test, examples/calc++/test: Extract the
29989	common bits into...
29990	* examples/test: here.
29991	(cwd): New.
29992	Use it to avoid a race on the temporary directory.
29993	Reported by Jim Meyering.
29994	* examples/mfcalc/test, examples/calc++/test: Rename into...
29995	* examples/mfcalc/mfcalc.test, examples/calc++/calc++.test: these.
29996	* examples/calc++/local.mk, examples/mfcalc/local.mk,
29997	* examples/local.mk: Adjust.
29998
299992012-02-17  Akim Demaille  <demaille@gostai.com>
30000
30001	examples: fix the test suites.
30002	* examples/calc++/test, examples/mfcalc/test (me): Be more
30003	meaningfull: include the example name.
30004	(prog): Factor.
30005	(run): Avoid printf, use echo.
30006	Add missing parens.
30007	(cleanup): New.
30008	Call it on trap.
30009	Remove the previous "rm" that did the cleanup.
30010	Move into a private directory to avoid concurrency issues.
30011	Reported by Jim Meyering.
30012
300132012-02-17  Jim Meyering  <meyering@redhat.com>
30014
30015	examples: link mfcalc with -lm for uses of pow, cos, atan, etc.
30016	* examples/mfcalc/local.mk (examples_mfcalc_mfcalc_LDADD): Define.
30017
300182012-02-16  Akim Demaille  <demaille@gostai.com>
30019
30020	mfcalc: extract and exercise.
30021	* examples/mfcalc/local.mk, examples/mfcalc/test: New,
30022	based on calc++'s ones.
30023	* examples/local.mk: Include mfcalc/local.mk.
30024
300252012-02-16  Akim Demaille  <demaille@gostai.com>
30026
30027	calc++: factor for other extracted tests.
30028	* Makefile.am (TESTS, check_PROGRAMS): Initialize here.
30029	* examples/local.mk (doc, extexi): Define here.
30030	* examples/calc++/local.mk: Adjust accordingly.
30031	* configure.ac: Ask for parallel-tests (for the way the logs
30032	are handled).
30033	* examples/calc++/test: As a consequence, always be verbose.
30034	($prog): New.
30035	(run): Use it.
30036	Sort the tests in a more natural order (simplest first).
30037
300382012-02-16  Akim Demaille  <demaille@gostai.com>
30039
30040	doc: mfcalc: send errors to stderr.
30041	* doc/bison.texinfo (Mfcalc Lexer): New.
30042	(Mfcalc Main): Move the definition of main and yyerror here, for
30043	clarity.
30044	Let yyerror report on stderr.
30045
300462012-02-16  Akim Demaille  <demaille@gostai.com>
30047
30048	doc: fix mfcalc code.
30049	* doc/bison.texinfo (Multi-function Calc): Add missing includes.
30050	Fix the rendering of the result: use @result and remove the
30051	initial tabulation in the actual code.
30052	Fix stylistic issues: avoid the , operator.
30053	Add extexi mark-up.
30054	* examples/extexi: Also support @smallexample.
30055
300562012-02-16  Akim Demaille  <demaille@gostai.com>
30057
30058	tests: c++: stylistic changes.
30059	* tests/c++.at: Don't use void for incoming arguments.
30060	Prefer cstdlib to stdlib.h.
30061
300622012-02-16  Jim Meyering  <meyering@redhat.com>
30063
30064	tests: avoid c++ failure due to lack of getenv decl
30065	* tests/c++.at (Syntax error as exception): Avoid spurious failure
30066	at least when compiling with g++-4.7.x due to lack of declaration
30067	of getenv.  Include <stdlib.h>.
30068
300692012-02-15  Akim Demaille  <demaille@gostai.com>
30070
30071	maint: rely on Automake for parsers.
30072	* Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
30073	Move other options in here.
30074	(BISON): New.
30075	(YACC): Use it.
30076	(bison_SOURCES): Now that automake can see `-d' in AM_YFLAGS,
30077	we can rely on it to compile and ship the parser header
30078	files.
30079
30080	Based on commit 737406a32c201471699bfa0843d1f432f3ec29ab and
30081	commit 3d6ca339083c278d907c9f030f4ba6bc5ecb07f2.
30082
300832012-02-15  Akim Demaille  <demaille@gostai.com>
30084
30085	maint: trust Automake for parser headers.
30086	* examples/calc++/local.mk, src/local.mk: Now that automake
30087	can see `-d' in AM_YFLAGS, we can rely on it to compile
30088	and ship the parser header files.
30089
300902012-02-15  Akim Demaille  <demaille@gostai.com>
30091
30092	maint: help Automake reading Yacc flags.
30093	* Makefile.am (AM_YFLAGS): Automake looks for "-d" alone.
30094
300952012-02-15  Akim Demaille  <demaille@gostai.com>
30096
30097	calc++: rely on Automake.
30098	Rely on $(YACC) being the bison being built, and let Automake do the
30099	rest.  It turned out to be much more difficult than anticipated, for
30100	various reasons, including some bad behavior from Automake 1.11.2
30101	which (i) generates calc++-parser.h instead of calc++-parser.hh, and
30102	(ii) leaves an #include "y.tab.h" in the generated parser instead
30103	of #include "calc++-parser.h".
30104
30105	The authors of Automake appear to be aware of the problem,
30106	http://lists.gnu.org/archive/html/automake/2011-05/msg00008.html
30107	so a simple work around will suffice for the time being.
30108
30109	* examples/calc++/y.tab.h, examples/calc++/calc++-parser.hh: New.
30110	To work around Automake 1.11.2 issues.
30111	* examples/calc++/local.mk: Remove all the rules for compilation
30112	with bison, leave them to Automake.
30113	So provide it with "calc++-parse.yy" as a source file.
30114	(calc_sources_generated, calc_sources_extracted): Rename as.
30115	(calc_generated, calc_extracted): these.
30116	(calc_sources): New.
30117	Fix them.
30118
301192012-02-14  Akim Demaille  <demaille@gostai.com>
30120
30121	maint: tidy the Makefile a bit.
30122	* src/local.mk: Put yacc related variables together.
30123	(AUTOMAKE_OPTIONS): Move to...
30124	* Makefile.am: here.
30125	Remove an old Emacs mode request which disables Automake support.
30126	* src/local.mk (YACC, AM_YFLAGS): Move to...
30127	* Makefile.am: here, as they will be used by other local.mks.
30128
301292012-02-14  Akim Demaille  <demaille@gostai.com>
30130
30131	maint: de-recurse the handling of examples
30132	The directory was still using a local Makefile.am because it provides
30133	"scoped" Make variables: these examples are not meant to use the same
30134	CPPFLAGS etc.  If we were to use the same -I set, we'd pick up
30135	gnulib's stdio.h for instance, which we do not want for these simple
30136	examples.
30137
30138	Yet, as a result, the dependencies are less accurate, there is code
30139	duplication, etc.  This is especially perceptible when trying to
30140	extract more examples from the documentation, as will be done in
30141	forthcoming changes.
30142
30143	In order to make the tuning of CPPFLAGS easier, discard the predefined
30144	-I from Automake.
30145
30146	* examples/calc++/Makefile.am: Rename as...
30147	* examples/calc++/local.mk: this.
30148	Adjust the paths which are now rooted in top_srcdir/top_builddir.
30149	Handle BISON_CXX_WORKS here, instead of the too crude previous
30150	approach that completely discarded the whole directory.
30151	($(BISON)): Remove now useless bouncing recipe.
30152	(calc___CPPFLAGS): New.
30153	Stay away from -Ilib.
30154	* Makefile.am, configure.ac, examples/local.mk,
30155	* examples/calc++/test: Adjust.
30156
30157	* configure.ac: Pass nostdinc to Automake.
30158	* src/local.mk, lib/local.mk (AM_CPPFLAGS): Move to...
30159	* Makefile.am: here.
30160
30161	* src/local.mk, examples/calc++/Makefile.am (BISON, BISON_IN): Factor
30162	to...
30163	* Makefile.am: here.
30164	* tests/local.mk: Use it.
30165
301662012-02-14  Akim Demaille  <demaille@gostai.com>
30167
30168	variant: fix the example.
30169	* examples/variant.yy: Adjust to "assert" being now
30170	"parse.assert".
30171
301722012-02-14  Akim Demaille  <demaille@gostai.com>
30173
30174	maint: more authors.
30175	* AUTHORS: here.
30176	Suggested by Tys Lefering.
30177
301782012-02-14  Akim Demaille  <demaille@gostai.com>
30179
30180	maint: add license headers.
30181	* examples/calc++/test, examples/variant.yy, AUTHORS, THANKS,
30182	* tests/atlocal.in, tests/bison.in: Add license headers.
30183	Reported by Tys Lefering.
30184
301852012-02-14  Akim Demaille  <demaille@gostai.com>
30186
30187	maint: remove obsolete file.
30188	* etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
30189	Reported by Tys Lefering.
30190
301912012-02-14  Akim Demaille  <demaille@gostai.com>
30192
30193	maint: more authors.
30194	* AUTHORS: here.
30195	Suggested by Tys Lefering.
30196
301972012-02-14  Akim Demaille  <demaille@gostai.com>
30198
30199	maint: add license headers.
30200	* examples/calc++/test, examples/variant.yy, AUTHORS, THANKS,
30201	* tests/atlocal.in, tests/bison.in: Add license headers.
30202	Reported by Tys Lefering.
30203
302042012-02-14  Akim Demaille  <demaille@gostai.com>
30205
30206	maint: remove obsolete file.
30207	* etc/make-ChangeLogs: Remove (used for rcs to cvs migration!).
30208	Reported by Tys Lefering.
30209
302102012-02-10  Akim Demaille  <demaille@gostai.com>
30211
30212	lalr1.cc: also handle syntax_error when calling yylex.
30213	* data/lalr1.cc (parse): Catch syntax_error around yylex and
30214	forward them to errlab1.
30215	* tests/c++.at (Syntax error as exception): Check support for
30216	syntax exceptions raised by the scanner.
30217	* NEWS, doc/bison.texinfo: Document it.
30218
302192012-02-10  Akim Demaille  <demaille@gostai.com>
30220
30221	tests: lalr1.cc: check syntax_error.
30222	* tests/c++.at (Syntax error as exception): New.
30223
302242012-02-10  Akim Demaille  <demaille@gostai.com>
30225
30226	tests: don't require locations uselessly.
30227	* tests/c++.at (Syntax error discarding no lookahead): Contrary to
30228	2.5, C++ parsers can work without locations.
30229
302302012-02-10  Akim Demaille  <demaille@gostai.com>
30231
30232	maint: more silent rules.
30233	* tests/local.mk (TESTSUITE_AT): Include plackage.m4.
30234	Adjust dependencies.
30235	Make testsuite.at its first argument.
30236	(package.m4): Be silent.
30237	(testsuite): Be silent.
30238	Use $<.
30239
302402012-02-10  Akim Demaille  <demaille@gostai.com>
30241
30242	skeletons: simplify the protections against "unused" warnings.
30243	* data/c.m4 (b4_parse_param_use): Also accept optional arguments
30244	to "use".
30245	Simplify callers.
30246	* data/glr.c (yyuserAction): Simplify use of b4_parse_param_use.
30247	(yy_reduce_print): Don't use b4_parse_param_use, as all the arguments
30248	_are_ used.
30249	* data/lalr1.cc (YY_SYMBOL_PRINT): Even when disabled, "use" the
30250	symbol argument.
30251	This neutralizes a warning in yypush_ when there are no symbols
30252	with a semantic values.
30253	(yy_destroy_): Remove useless "use" of yymsg.
30254
302552012-02-10  Akim Demaille  <demaille@gostai.com>
30256
30257	glr: formatting changes.
30258	* data/glr.c: Split long strings.
30259
302602012-02-08  Akim Demaille  <demaille@gostai.com>
30261
30262	use a more consistent quoting style.
30263	See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
30264	Use quotearg as often as possible instead of leaving the choice of
30265	the quotes to the translators.  Use shorter messages.  Factor similar
30266	messages to a single format, to make localization easier.
30267
30268	* src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c
30269	* src/scan-code.l, src/scan-gram.l, src/symtab.c:
30270	Use quote() or quotearg_colon() on printf arguments instead of
30271	quotes in the format string.
30272	* data/bison.m4: Keep sync with the changes in muscle-tab.c.
30273
30274	* tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
30275	expected messages.
30276
302772012-02-08  Akim Demaille  <demaille@gostai.com>
30278
30279	use a more consistent quoting style.
30280	See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.
30281	Use quotearg as often as possible instead of leaving the choice of
30282	the quotes to the translators.  Use shorter messages.  Factor similar
30283	messages to a single format, to make localization easier.
30284
30285	* src/files.c, src/getargs.c, src/muscle-tab.c, src/reader.c
30286	* src/scan-code.l, src/scan-gram.l, src/symtab.c:
30287	Use quote() or quotearg_colon() on printf arguments instead of
30288	quotes in the format string.
30289	* data/bison.m4: Keep sync with the changes in muscle-tab.c.
30290
30291	* tests/skeletons.at, tests/input.at, tests/regression.at: Adjust
30292	expected messages.
30293
302942012-01-31  Jim Meyering  <meyering@redhat.com>
30295
30296	maint: reenable sc_m4_quote_check
30297	* cfg.mk (local-checks-to-skip): Reenable sc_m4_quote_check.
30298	* m4/dmalloc.m4: Add quotes.
30299
303002012-01-31  Jim Meyering  <meyering@redhat.com>
30301
30302	maint: force "make syntax-check" to pass by skipping failing tests
30303	* cfg.mk (local-checks-to-skip): Skip all currently-failing tests.
30304	Remove changelog-check; it's long gone.
30305
303062012-01-31  Akim Demaille  <demaille@gostai.com>
30307
30308	maint: remove stray debug code.
30309	* src/Makefile.am (echo): Remove.
30310
303112012-01-31  Akim Demaille  <demaille@gostai.com>
30312
30313	maint: space changes.
30314	* src/Makefile.am: Use 2 leading spaces for variable definition
30315	spreading over several lines.
30316
303172012-01-31  Akim Demaille  <demaille@gostai.com>
30318
30319	maint: more silent-rules.
30320	* doc/local.mk, src/local.mk, examples/calc++/Makefile.am: Use
30321	$(AM_V_GEN) and $(AM_V_at) where appropriate.
30322
303232012-01-31  Jim Meyering  <meyering@redhat.com>
30324
30325	do not ignore errors like ENOSPC,EIO when writing to stdout
30326	Standard output was never explicitly closed, so we could not
30327	detect failure.  Thus, bison would ignore the errors of writing
30328	to a full file system and getting an I/O error on write, but only
30329	for standard output, e.g., for --print-localedir, --print-datadir,
30330	--help and some verbose output.
30331	Now, "bison --print-datadir > /dev/full" reports the write failure:
30332	bison: write error: No space left on device
30333	Before, it would exit 0 with no diagnostic, implying success.
30334	This is not an issue for "--output=-" or the other FILE-accepting
30335	command-line options, because unlike most other GNU programs,
30336	an output file argument of "-" is treated as the literal "./-",
30337	rather than standard output.
30338	* bootstrap.conf (gnulib_modules): Add closeout.
30339	* src/main.c: Include "closeout.h".
30340	Use atexit to ensure we close stdout.
30341	* .gitignore: Ignore new files pulled in via gnulib-tool.
30342
303432012-01-31  Akim Demaille  <demaille@gostai.com>
30344
30345	maint: more silent-rules.
30346	* doc/local.mk, src/local.mk, examples/calc++/Makefile.am: Use
30347	$(AM_V_GEN) and $(AM_V_at) where appropriate.
30348
303492012-01-29  Jim Meyering  <meyering@redhat.com>
30350
30351	do not ignore errors like ENOSPC,EIO when writing to stdout
30352	Standard output was never explicitly closed, so we could not
30353	detect failure.  Thus, bison would ignore the errors of writing
30354	to a full file system and getting an I/O error on write, but only
30355	for standard output, e.g., for --print-localedir, --print-datadir,
30356	--help and some verbose output.
30357	Now, "bison --print-datadir > /dev/full" reports the write failure:
30358	bison: write error: No space left on device
30359	Before, it would exit 0 with no diagnostic, implying success.
30360	This is not an issue for "--output=-" or the other FILE-accepting
30361	command-line options, because unlike most other GNU programs,
30362	an output file argument of "-" is treated as the literal "./-",
30363	rather than standard output.
30364	* bootstrap.conf (gnulib_modules): Add closeout.
30365	* src/main.c: Include "closeout.h".
30366	Use atexit to ensure we close stdout.
30367	* .gitignore: Ignore new files pulled in via gnulib-tool.
30368
303692012-01-26  Akim Demaille  <demaille@gostai.com>
30370
30371	tests: fix expected output.
30372	* tests/actions.at (YYBACKUP): here.
30373
303742012-01-26  Akim Demaille  <demaille@gostai.com>
30375
30376	tests: fix expected output.
30377	* tests/actions.at (YYBACKUP): here.
30378
303792012-01-26  Akim Demaille  <demaille@gostai.com>
30380
30381	maint: fix configure.ac
30382	Fix commit 1890a2a816dab86c23cc1d0af8fac3986335deb7.
30383
30384	* configure.ac: Fix variable assignment.
30385
303862012-01-26  Akim Demaille  <demaille@gostai.com>
30387
30388	yacc: fix YYBACKUP.
30389	Reported by David Kastrup:
30390	https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.
30391
30392	* data/yacc.c (YYBACKUP): Accept rhs size.
30393	Restore the proper state value.
30394	* TODO (YYBACKUP): Make it...
30395	* tests/actions.at: a new test case.
30396	* NEWS, THANKS: Update.
30397
303982012-01-26  Akim Demaille  <demaille@gostai.com>
30399
30400	maint: update TODO.
30401	* TODO (Labeling the symbols): Remove, it's done ("Name references").
30402
304032012-01-26  Akim Demaille  <demaille@gostai.com>
30404
30405	maint: update THANKS.
30406	* THANKS: Update Tys's address, on his request.
30407
304082012-01-26  Akim Demaille  <demaille@gostai.com>
30409
30410	maint: fix --gcc-warnings support.
30411	* configure.ac: Use enable_gcc_warnings instead of enableval,
30412	which is valid only with AC_ARG_ENABLE.
30413
304142012-01-26  Akim Demaille  <demaille@gostai.com>
30415
30416	maint: silent-rules.
30417	* configure.ac: Ask for silent-rules support.
30418	Enable it by default.
30419
304202012-01-26  Akim Demaille  <demaille@gostai.com>
30421
30422	maint: remove trailing blanks.
30423	* src/scan-code.l: Here.
30424
304252012-01-26  Akim Demaille  <demaille@gostai.com>
30426
30427	yacc: fix YYBACKUP.
30428	Reported by David Kastrup:
30429	https://lists.gnu.org/archive/html/bug-bison/2011-10/msg00002.html.
30430
30431	* data/yacc.c (YYBACKUP): Accept rhs size.
30432	Restore the proper state value.
30433	* TODO (YYBACKUP): Make it...
30434	* tests/actions.at: a new test case.
30435	* NEWS, THANKS: Update.
30436
304372012-01-25  Akim Demaille  <demaille@gostai.com>
30438
30439	maint: update TODO.
30440	* TODO (Labeling the symbols): Remove, it's done ("Name references").
30441
304422012-01-25  Akim Demaille  <demaille@gostai.com>
30443
30444	maint: update THANKS.
30445	* THANKS: Update Tys's address, on his request.
30446
304472012-01-25  Akim Demaille  <demaille@gostai.com>
30448
30449	maint: fix --gcc-warnings support.
30450	* configure.ac: Use enable_gcc_warnings instead of enableval,
30451	which is valid only with AC_ARG_ENABLE.
30452
304532012-01-25  Akim Demaille  <demaille@gostai.com>
30454
30455	maint: silent-rules.
30456	* configure.ac: Ask for silent-rules support.
30457	Enable it by default.
30458
304592012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
30460
30461	tests: port to Solaris 10 'diff -u'
30462	* tests/regression.at (parse-gram.y: LALR = IELR): Port to Solaris 10,
30463	where "diff -u X X" outputs "No differences encountered"
30464	instead of outputting nothing.  Reported by Tomohiro Suzuki in
30465	<http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00101.html>.
30466
304672012-01-25  Jim Meyering  <meyering@redhat.com>
30468
30469	build: avoid possibly-replaced fprintf in liby-source, yyerror.c
30470	* lib/yyerror.c (yyerror): Use fputs and fputc rather than fprintf
30471	with a mere "%s\n" format.  Always return 0 now, on the assumption
30472	that the return value was never used anyway.
30473	Don't include <config.h> after all.  This avoids a problem
30474	reported by Thiru Ramakrishnan in
30475	http://lists.gnu.org/archive/html/help-bison/2011-11/msg00000.html
30476	* cfg.mk: Exempt lib/yyerror.c from the sc_require_config_h_first test.
30477	* THANKS: Update.
30478
304792012-01-24  Paul Eggert  <eggert@cs.ucla.edu>
30480
30481	tests: port to Solaris 10 'diff -u'
30482	* tests/regression.at (parse-gram.y: LALR = IELR): Port to Solaris 10,
30483	where "diff -u X X" outputs "No differences encountered"
30484	instead of outputting nothing.  Reported by Tomohiro Suzuki in
30485	<http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00101.html>.
30486
304872012-01-24  Jim Meyering  <meyering@redhat.com>
30488
30489	maint: generate ChangeLog from git log
30490	* Makefile.am (gen-ChangeLog): New rule.
30491	(dist-hook): Depend on it.
30492	(EXTRA_DIST): Distribute the two ChangeLog-* files.
30493	* bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
30494	(bootstrap_post_import_hook): Ensure that ChangeLog exists.
30495	* build-aux/git-log-fix: New file.
30496	* ChangeLog-2012: Renamed ...
30497	* ChangeLog: ... from this.
30498	* ChangeLog-1998: Renamed ...
30499	* OChangeLog: ...from this
30500	* .gitignore: Add ChangeLog.
30501
305022012-01-24  Jim Meyering  <meyering@redhat.com>
30503
30504	change more quotes in source, and adjust tests to match
30505	Run this command to change each `%s' to '%s' in source directories:
30506	  git grep -l '`%s'\' src djgpp data \
30507	    |xargs perl -pi -e '$q="'\''";s/`%s$q/$q%s$q/g'
30508	* data/bison.m4: Affected per the above.
30509	* djgpp/subpipe.c: Likewise.
30510	* src/files.c: Likewise.
30511	* src/getargs.c: Likewise.
30512	* src/muscle-tab.c: Likewise.
30513	* src/reader.c: Likewise.
30514	* tests/glr-regression.at: Adjust to match.
30515	* tests/input.at: Likewise.
30516	* tests/push.at: Likewise.
30517	* tests/skeletons.at: Likewise.
30518
305192012-01-23  Jim Meyering  <meyering@redhat.com>
30520
30521	quote consistently and make tests pass with new quoting from gnulib
30522	Updating to gnulib pulled in new quote and quotarg modules,
30523	by which quoting is now done like 'this' rather than `this'.
30524	That change induces many "make check" test failures.  This change
30525	adapts code and tests so that "make check" passes once again.
30526	* src/scan-code.l: Quote like 'this', not like `this'.
30527	* src/scan-gram.l: Likewise.
30528	* src/symtab.c: Likewise.
30529	* tests/actions.at: Adjust tests to match.
30530	* tests/input.at: Likewise.
30531	* tests/named-refs.at: Likewise.
30532	* tests/output.at: Likewise.
30533	* tests/regression.at: Likewise.
30534	* lib/.gitignore: Regenerate.
30535	* m4/.gitignore: Likewise.
30536
305372012-01-23  Jim Meyering  <meyering@redhat.com>
30538
30539	build: avoid possibly-replaced fprintf in liby-source, yyerror.c
30540	* lib/yyerror.c (yyerror): Use fputs and fputc rather than fprintf
30541	with a mere "%s\n" format.  Always return 0 now, on the assumption
30542	that the return value was never used anyway.
30543	Don't include <config.h> after all.  This avoids a problem
30544	reported by Thiru Ramakrishnan in
30545	http://lists.gnu.org/archive/html/help-bison/2011-11/msg00000.html
30546	* cfg.mk: Exempt lib/yyerror.c from the sc_require_config_h_first test.
30547	* THANKS: Update.
30548
305492012-01-23  Jim Meyering  <meyering@redhat.com>
30550
30551	build: update gnulib and autoconf submodules to latest (cherry picked from commit 728415f885e5cb8e518c8576fa6e1f541e384130)
30552
305532012-01-23  Jim Meyering  <meyering@redhat.com>
30554
30555	build: manually update bootstrap from gnulib, and adapt
30556	Updating to the latest bootstrap from gnulib involves more of a
30557	change than usual, and updating to the latest gnulib would involve
30558	its own set of challenges with the upcoming quoting changes, so
30559	we update bootstrap manually and separately.
30560	* bootstrap: Update from gnulib.
30561	* lib/Makefile.am: Initialize more variables to empty, so that gnulib.mk
30562	can append to them with "+=".
30563	* bootstrap.conf (gnulib_mk_hook): Remove.  No longer honored.
30564	(gnulib_tool_option_extras): Generate gnulib.mk.
30565
305662012-01-23  Jim Meyering  <meyering@redhat.com>
30567
30568	maint: include <config.h> first
30569	* cfg.mk (exclude_file_name_regexp--sc_require_config_h_first):
30570	Exempt data/glr.c and data/yacc.c from the include-config.h-first
30571	requirement.
30572
305732012-01-23  Jim Meyering  <meyering@redhat.com>
30574
30575	build: include <config.h> from lib/yyerror.c
30576	* lib/yyerror.c: Include <config.h>.
30577
305782012-01-23  Jim Meyering  <meyering@redhat.com>
30579
30580	maint: list djgpp/subpipe.c in po/POTFILES.in
30581	* po/POTFILES.in: Add djgpp/subpipe.c.
30582
305832012-01-23  Jim Meyering  <meyering@redhat.com>
30584
30585	maint: placate the space-TAB syntax-check
30586	* cfg.mk (exclude_file_name_regexp--sc_space_tab): Exempt
30587	tests/input.at and tests/c++.at, since they appear to use
30588	SP-TAB sequences deliberately.
30589	* OChangeLog: Remove space-before-TAB.
30590
305912012-01-23  Jim Meyering  <meyering@redhat.com>
30592
30593	doc: correct typo: s/can not/cannot/
30594	* doc/bison.texinfo (Bug Reports): s/can not/cannot/
30595	And remove trailing blanks.
30596
305972012-01-23  Jim Meyering  <meyering@redhat.com>
30598
30599	build: generalize etc/prefix-gnulib-mk
30600	This script hard-coded "libbison" and lib/gnulib.mk.
30601	Adjust the script to require a --lib-name=$gnulib_name option
30602	and a FILE argument like lib/$gnulib_mk.
30603	Also add support for --help and --version.
30604	* etc/prefix-gnulib-mk: Generalize.
30605	* bootstrap.conf (bootstrap_post_import_hook): Update its invocation.
30606
306072012-01-22  Jim Meyering  <meyering@redhat.com>
30608
30609	maint: get gpl-3.0 from gnulib
30610	* bootstrap.conf (gnulib_modules): Add gpl-3.0.
30611	* doc/gpl-3.0.texi: Remove from version control, now that
30612	we get it via gnulib.
30613	* doc/.gitignore: Ignore it.
30614
306152012-01-20  Akim Demaille  <demaille@gostai.com>
30616
30617	maint: be more robust to gnulib's FOO_H variables.
30618	* configure.ac: Instead of listing gnulib's variables, look for
30619	them among AC_SUBST variables.
30620
306212012-01-20  Jim Meyering  <meyering@redhat.com>
30622
30623	maint: generate ChangeLog from git log
30624	* Makefile.am (gen-ChangeLog): New rule.
30625	(dist-hook): Depend on it.
30626	(EXTRA_DIST): Distribute the two ChangeLog-* files.
30627	* bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
30628	(bootstrap_post_import_hook): Ensure that ChangeLog exists.
30629	* build-aux/git-log-fix: New file.
30630	* ChangeLog-2012: Renamed ...
30631	* ChangeLog: ... from this.
30632	* ChangeLog-1998: Renamed ...
30633	* OChangeLog: ...from this
30634	* .gitignore: Add ChangeLog.
30635
306362012-01-19  Jim Meyering  <meyering@redhat.com>
30637
30638	change more quotes in source, and adjust tests to match
30639	Run this command to change each `%s' to '%s' in source directories:
30640	  git grep -l '`%s'\' src djgpp data \
30641	    |xargs perl -pi -e '$q="'\''";s/`%s$q/$q%s$q/g'
30642	* data/bison.m4: Affected per the above.
30643	* djgpp/subpipe.c: Likewise.
30644	* src/files.c: Likewise.
30645	* src/getargs.c: Likewise.
30646	* src/muscle-tab.c: Likewise.
30647	* src/reader.c: Likewise.
30648	* tests/glr-regression.at: Adjust to match.
30649	* tests/input.at: Likewise.
30650	* tests/push.at: Likewise.
30651	* tests/skeletons.at: Likewise.
30652
306532012-01-19  Jim Meyering  <meyering@redhat.com>
30654
30655	quote consistently and make tests pass with new quoting from gnulib
30656	Updating to gnulib pulled in new quote and quotarg modules,
30657	by which quoting is now done like 'this' rather than `this'.
30658	That change induces many "make check" test failures.  This change
30659	adapts code and tests so that "make check" passes once again.
30660	* src/scan-code.l: Quote like 'this', not like `this'.
30661	* src/scan-gram.l: Likewise.
30662	* src/symtab.c: Likewise.
30663	* tests/actions.at: Adjust tests to match.
30664	* tests/input.at: Likewise.
30665	* tests/named-refs.at: Likewise.
30666	* tests/output.at: Likewise.
30667	* tests/regression.at: Likewise.
30668	* lib/.gitignore: Regenerate.
30669	* m4/.gitignore: Likewise.
30670
306712012-01-19  Jim Meyering  <meyering@redhat.com>
30672
30673	build: update gnulib and autoconf submodules to latest
30674
306752012-01-19  Jim Meyering  <meyering@redhat.com>
30676
30677	build: manually update bootstrap from gnulib, and adapt
30678	Updating to the latest bootstrap from gnulib involves more of a
30679	change than usual, and updating to the latest gnulib would involve
30680	its own set of challenges with the upcoming quoting changes, so
30681	we update bootstrap manually and separately.
30682	* bootstrap: Update from gnulib.
30683	* Makefile.am: Initialize more variables to empty, so that gnulib.mk
30684	can append to them with "+=".
30685	* bootstrap.conf (gnulib_mk_hook): Remove.  No longer honored.
30686	(bootstrap_post_import_hook): Instead, run the same command,
30687	etc/prefix-gnulib-mk lib/$gnulib_mk, via slightly different API.
30688	Temporarily disable "bootstrap_sync=true".
30689	* etc/prefix-gnulib-mk: Don't prepend "lib/" to tokens like -I$(...
30690	or "\".
30691
306922012-01-19  Jim Meyering  <meyering@redhat.com>
30693
30694	maint: include <config.h> first
30695	* cfg.mk (exclude_file_name_regexp--sc_require_config_h_first):
30696	Exempt data/glr.c and data/yacc.c from the include-config.h-first
30697	requirement.
30698
306992012-01-19  Jim Meyering  <meyering@redhat.com>
30700
30701	build: include <config.h> from lib/yyerror.c
30702	* lib/yyerror.c: Include <config.h>.
30703
307042012-01-19  Jim Meyering  <meyering@redhat.com>
30705
30706	maint: list djgpp/subpipe.c in po/POTFILES.in
30707	* po/POTFILES.in: Add djgpp/subpipe.c.
30708
307092012-01-19  Jim Meyering  <meyering@redhat.com>
30710
30711	maint: placate the space-TAB syntax-check
30712	* cfg.mk (exclude_file_name_regexp--sc_space_tab): Exempt
30713	tests/input.at and tests/c++.at, since they appear to use
30714	SP-TAB sequences deliberately.
30715	* OChangeLog: Remove space-before-TAB.
30716
307172012-01-19  Jim Meyering  <meyering@redhat.com>
30718
30719	maint: remove final trailing space
30720	* src/scan-gram.l (%): Remove single space at end of line.
30721
307222012-01-19  Jim Meyering  <meyering@redhat.com>
30723
30724	maint: get gpl-3.0 from gnulib
30725	* bootstrap.conf (gnulib_modules): Add gpl-3.0.
30726	* doc/gpl-3.0.texi: Remove from version control, now that
30727	we get it via gnulib.
30728	* doc/.gitignore: Ignore it.
30729
307302012-01-19  Jim Meyering  <meyering@redhat.com>
30731
30732	doc: correct typo: s/can not/cannot/
30733	* doc/bison.texinfo (Bug Reports): s/can not/cannot/
30734	And remove trailing blanks.
30735